diff options
author | tradke <tradke@b32723a9-ab3a-4a60-88e2-2e5d99d7c17a> | 2002-04-15 13:06:08 +0000 |
---|---|---|
committer | tradke <tradke@b32723a9-ab3a-4a60-88e2-2e5d99d7c17a> | 2002-04-15 13:06:08 +0000 |
commit | afa83bcec509680969a3d2f60736d656016220cb (patch) | |
tree | 3396fe2befc0c519d9924ee62f7c83ddf3999d67 | |
parent | 99944646fecea7537f07ff023e5731eced5508fd (diff) |
Removed routine IOUtil_RestartFromRecovery(). Now the recovery info is held
in IOUtil's GH extension.
You also need to update thorns IOBasic, IOASCII, and IOFlexIO now if you
didn't do so yet.
git-svn-id: http://svn.cactuscode.org/arrangements/CactusBase/IOUtil/trunk@157 b32723a9-ab3a-4a60-88e2-2e5d99d7c17a
-rw-r--r-- | src/CheckpointRecovery.c | 28 | ||||
-rw-r--r-- | src/Startup.c | 5 | ||||
-rw-r--r-- | src/ioutil_CheckpointRecovery.h | 3 |
3 files changed, 6 insertions, 30 deletions
diff --git a/src/CheckpointRecovery.c b/src/CheckpointRecovery.c index b592b47..5e033b8 100644 --- a/src/CheckpointRecovery.c +++ b/src/CheckpointRecovery.c @@ -325,25 +325,14 @@ static int IOUtil_RecoverFromFile (cGH *GH, @@*/ void IOUtil_RecoverGH (cGH *GH) { - ioGH *myGH; - - - myGH = (ioGH *) CCTK_GHExtension (GH, "IO"); - if (checkpoint_file_exists) { - myGH->recovered = IOUtil_RecoverFromFile (GH, NULL, CP_RECOVER_DATA) >= 0; - /* stop if recovery failed */ - if (! myGH->recovered) + if (IOUtil_RecoverFromFile (GH, NULL, CP_RECOVER_DATA) < 0) { CCTK_WARN (0, "Failed to restart from recovery !"); } } - else - { - myGH->recovered = 0; - } } @@ -861,19 +850,10 @@ void IOUtil_SetAllParameters (const char *parameters) } -int IOUtil_RestartFromRecovery (const cGH *GH) -{ - const ioGH *myGH; - - - myGH = (const ioGH *) CCTK_GHExtension (GH, "IO"); - - return (myGH ? myGH->recovered : 0); -} - - -/***************************** local routines ******************************/ +/******************************************************************** + ******************** Internal Routines ************************ + ********************************************************************/ /* callback for CCTK_TraverseString() to set the input flag for the given variable */ static void SetInputFlag (int vindex, const char *optstring, void *flags) diff --git a/src/Startup.c b/src/Startup.c index e8b4609..ba284e0 100644 --- a/src/Startup.c +++ b/src/Startup.c @@ -186,7 +186,6 @@ static void *SetupGH (tFleshConfig *config, int convergence_level, cGH *GH) /* avoid compiler warnings about unused parameters */ - config = config; convergence_level = convergence_level; myproc = CCTK_MyProc (GH); @@ -301,8 +300,8 @@ static void *SetupGH (tFleshConfig *config, int convergence_level, cGH *GH) newGH->out_single = out3D_single; #endif - /* reset the flag incidicating restart from recovery */ - newGH->recovered = 0; + /* copy the 'recovered' flag to this GH extension */ + newGH->recovered = config->recovered; /* reset the flags array for the file reader */ newGH->do_inVars = NULL; diff --git a/src/ioutil_CheckpointRecovery.h b/src/ioutil_CheckpointRecovery.h index 3944b2a..5b7c0e8 100644 --- a/src/ioutil_CheckpointRecovery.h +++ b/src/ioutil_CheckpointRecovery.h @@ -60,9 +60,6 @@ char *IOUtil_GetAllParameters (const cGH *GH, int all); /* set all parameters contained in the given string */ void IOUtil_SetAllParameters (const char *parameters); -/* return true if this run was restarted from recovery, otherwise false */ -int IOUtil_RestartFromRecovery (const cGH *GH); - /* print the checkpoint/recovery timings to stdout */ void IOUtil_PrintTimings (const char *description, int ntimers, |