Skip to content

Commit

Permalink
Release 1.3.2 (#27)
Browse files Browse the repository at this point in the history
* Fix crash if temporary files not open
* Fix issue with stormfiles with multiple cores
* Fix the MPI datatype for DataPoint
  • Loading branch information
Samuel Debionne authored May 15, 2017
1 parent aa5e6f4 commit f94a0a6
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 9 deletions.
2 changes: 1 addition & 1 deletion configure.ac
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
AC_INIT([asynch], [1.3.1], [[email protected]])
AC_INIT([asynch], [1.3.2], [[email protected]])
AC_CONFIG_MACRO_DIR([m4])

AM_INIT_AUTOMAKE([foreign -Wall -Werror])
Expand Down
5 changes: 5 additions & 0 deletions src/processdata.c
Original file line number Diff line number Diff line change
Expand Up @@ -1848,6 +1848,11 @@ FILE* PrepareTempFiles(Link* sys, unsigned int N, int* assignments, GlobalVars*
sprintf(filename, "%s", globals->temp_filename);
//sprintf(filename,"%s_%.3i",globals->temp_filename,my_rank);
outputfile = fopen(filename, "w+b");
if (outputfile == NULL)
{
printf("[%i]: Error: Could not create file %s.\n", my_rank, filename);
MPI_Abort(MPI_COMM_WORLD, 1);
}

//if(globals->assim_flag == 1) start = 0;
//else start = 1;
Expand Down
5 changes: 4 additions & 1 deletion src/riversys.c
Original file line number Diff line number Diff line change
Expand Up @@ -664,7 +664,10 @@ int Partition_Network(
//Allocate the link data according to the partition
for (unsigned int i = 0; i < N; i++)
if ((*assignments)[i] == my_rank || (*getting)[i])
{
system[i].my = malloc(sizeof(LinkData));
memset(system[i].my, 0, sizeof(LinkData));
}

return 0;
}
Expand Down Expand Up @@ -1708,7 +1711,7 @@ int Load_Forcings(
// Create an MPI type for struct DataPoint
const int nitems = 2;
int blocklengths[2] = { 1,1 };
MPI_Datatype types[2] = { MPI_INT, MPI_INT };
MPI_Datatype types[2] = { MPI_DOUBLE, MPI_FLOAT };
MPI_Datatype mpi_datapoint_type;
MPI_Aint offsets[2];

Expand Down
21 changes: 14 additions & 7 deletions src/system.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,12 @@ void Destroy_Link(Link* link, int rkd_flag, Forcing* forcings, GlobalVars* globa

if (link->my != NULL)
{
free(link->my->forcing_values);
free(link->my->forcing_indices);
free(link->my->forcing_change_times);
if (link->my->forcing_values)
free(link->my->forcing_values);
if (link->my->forcing_indices)
free(link->my->forcing_indices);
if (link->my->forcing_change_times)
free(link->my->forcing_change_times);
if (rkd_flag)
Destroy_ErrorData(&link->my->error_data);
Destroy_List(&link->my->list);
Expand All @@ -40,12 +43,16 @@ void Destroy_Link(Link* link, int rkd_flag, Forcing* forcings, GlobalVars* globa
free(link->discont_send);
free(link->discont_order_send);
}
for (i = 0; i < global->num_forcings; i++)

if (link->my->forcing_data)
{
if (link->my->forcing_data && forcings[i].flag != 4 && forcings[i].flag != 7)
Destroy_ForcingData(&(link->my->forcing_data[i]));
for (i = 0; i < global->num_forcings; i++)
{
if (forcings[i].flag != 4 && forcings[i].flag != 7)
Destroy_ForcingData(&(link->my->forcing_data[i]));
}
free(link->my->forcing_data);
}
free(link->my->forcing_data);
//if (link->qvs != NULL)
//{
// /*
Expand Down

0 comments on commit f94a0a6

Please sign in to comment.