diff options
author | tradke <tradke@ebee0441-1374-4afa-a3b5-247f3ba15b9a> | 2000-09-21 22:32:52 +0000 |
---|---|---|
committer | tradke <tradke@ebee0441-1374-4afa-a3b5-247f3ba15b9a> | 2000-09-21 22:32:52 +0000 |
commit | 3a95b0833cdae9cba390f6c83e33e6c4476a84e6 (patch) | |
tree | e27c38bbf48abf1d40a8f29206465e6af0dcd9be /src/DumpGH.c | |
parent | 4f26dd60ba0aec96bb2cf4fbec7947ac9552c598 (diff) |
Now the steerable checkpointing parameters are checked within the checkpoint
routines.
git-svn-id: http://svn.cactuscode.org/arrangements/CactusPUGHIO/IOFlexIO/trunk@156 ebee0441-1374-4afa-a3b5-247f3ba15b9a
Diffstat (limited to 'src/DumpGH.c')
-rw-r--r-- | src/DumpGH.c | 28 |
1 files changed, 23 insertions, 5 deletions
diff --git a/src/DumpGH.c b/src/DumpGH.c index 17ab942..9d1f4e4 100644 --- a/src/DumpGH.c +++ b/src/DumpGH.c @@ -45,14 +45,24 @@ void IOFlexIO_ConditionallyDumpGH (cGH *GH) { DECLARE_CCTK_PARAMETERS - if (checkpoint_every > 0 && - GH->cctk_iteration % checkpoint_every == 0) { - if (verbose) { + + if (checkpoint && + ((checkpoint_every > 0 && GH->cctk_iteration % checkpoint_every == 0) || + checkpoint_next)) + { + if (verbose) + { CCTK_INFO("------------------------------------------------------------"); CCTK_VInfo (CCTK_THORNSTRING, "Dumping periodic checkpoint file at " "iteration %d", GH->cctk_iteration); } IOFlexIO_DumpGH (GH, CP_EVOLUTION_DATA); + + /* reset the 'checkpoint_next' parameter */ + if (checkpoint_next) + { + CCTK_ParameterSet ("checkpoint_next", CCTK_THORNSTRING, "no"); + } } } @@ -79,7 +89,8 @@ void IOFlexIO_TerminationDumpGH (cGH *GH) { /*** FIXME: no cactus_terminate flag anymore ? ***/ #if 0 - if (cactus_terminate == TERMINATION_RAISED_BRDCAST) { + if (cactus_terminate == TERMINATION_RAISED_BRDCAST) + { IOFlexIO_DumpGH (GH, CP_EVOLUTION_DATA); } #else @@ -105,6 +116,9 @@ void IOFlexIO_TerminationDumpGH (cGH *GH) void IOFlexIO_InitialDataDumpGH (cGH *GH) { + DECLARE_CCTK_PARAMETERS + + /*** FIXME ***/ #if 0 cGH *helperGH; @@ -129,7 +143,11 @@ void IOFlexIO_InitialDataDumpGH (cGH *GH) } #endif #endif - IOFlexIO_DumpGH (GH, CP_INITIAL_DATA); + + if (checkpoint && checkpoint_ID) + { + IOFlexIO_DumpGH (GH, CP_INITIAL_DATA); + } } |