Skip to content

Commit

Permalink
Put check around windsave command in python, so only rank0 writes
Browse files Browse the repository at this point in the history
  • Loading branch information
Higginbottom committed Aug 29, 2014
1 parent 965d493 commit ebc5922
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions python.c
Original file line number Diff line number Diff line change
Expand Up @@ -2113,14 +2113,24 @@ run -- 07jul -- ksl
JM1304: moved geo.wcycle++ after xsignal to record cycles correctly. First cycle is cycle 0. */
/* NSH1306 - moved geo.wcycle++ back, but moved the log and xsignal statements */

Log_silent ("Saved wind structure in %s after cycle %d\n", windsavefile,
geo.wcycle);

xsignal (root, "%-20s Finished %d of %d ionization cycle \n", "OK",
geo.wcycle, wcycles);
geo.wcycle++; //Increment ionisation cycles

/* NSH 1408 - The wind save command was not inside the ifdef statement, and so many processors tried to access the same file. This is fixed below */

#ifdef MPI_ON
if (rank_global == 0)
{
#endif
wind_save (windsavefile);
Log_silent ("Saved wind structure in %s after cycle %d\n", windsavefile,
geo.wcycle);
#ifdef MPI_ON
}
MPI_Barrier(MPI_COMM_WORLD);
#endif



Expand Down Expand Up @@ -2312,7 +2322,7 @@ run -- 07jul -- ksl

geo.pcycle++; // Increment the spectral cycles

#ifdef MPI_ON
#ifdef MPI_ON
if (rank_global == 0)
{
#endif
Expand Down

1 comment on commit ebc5922

@Higginbottom
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This closes ticket #102

Please sign in to comment.