diff options
author | tradke <tradke@4825ed28-b72c-4eae-9704-e50c059e567d> | 2001-04-19 21:01:32 +0000 |
---|---|---|
committer | tradke <tradke@4825ed28-b72c-4eae-9704-e50c059e567d> | 2001-04-19 21:01:32 +0000 |
commit | bd9a1105c38e4af1fb80117358ddcc44969f56b5 (patch) | |
tree | d853eddde935ed4e8ad5d717d4deeb55341c597a /src/RecoverGH.c | |
parent | b9f16a044a9b435c03b1c13d9a7d6c049f57ce2f (diff) |
Recover GH extensions first, then all the variables.
git-svn-id: http://svn.cactuscode.org/arrangements/CactusPUGHIO/IOHDF5/trunk@52 4825ed28-b72c-4eae-9704-e50c059e567d
Diffstat (limited to 'src/RecoverGH.c')
-rw-r--r-- | src/RecoverGH.c | 25 |
1 files changed, 15 insertions, 10 deletions
diff --git a/src/RecoverGH.c b/src/RecoverGH.c index 2066b40..796db13 100644 --- a/src/RecoverGH.c +++ b/src/RecoverGH.c @@ -91,6 +91,8 @@ int IOHDF5_Recover (cGH *GH, static fileinfo_t fileinfo; /* this is static because info is passed from CP_RECOVERY_PARAMETERS to CP_RECOVERY_DATA */ + result = 0; + /* start the recovery timer if we were called at CCTK_RECOVER */ myGH = (ioHDF5GH *) CCTK_GHExtension (GH, "IOHDF5"); if (myGH && myGH->print_timing_info) @@ -127,17 +129,8 @@ int IOHDF5_Recover (cGH *GH, return (IOHDF5Util_RecoverParameters (&fileinfo)); } - /* Recover variables */ - if (verbose) - { - CCTK_VInfo (CCTK_THORNSTRING, "Recovering %schunked data with ioproc %d, " - "ioproc_every %d", fileinfo.unchunked ? "un" : "", - fileinfo.ioproc, fileinfo.ioproc_every); - } - result = IOHDF5Util_RecoverVariables (GH, &fileinfo); - /* Recover GH extensions */ - if (result == 0 && called_from == CP_RECOVER_DATA) + if (called_from == CP_RECOVER_DATA) { if (verbose) { @@ -146,6 +139,18 @@ int IOHDF5_Recover (cGH *GH, result = IOHDF5Util_RecoverGHextensions (GH, &fileinfo); } + if (! result) + { + /* Recover variables */ + if (verbose) + { + CCTK_VInfo (CCTK_THORNSTRING, "Recovering %schunked data with ioproc %d, " + "ioproc_every %d", fileinfo.unchunked ? "un" : "", + fileinfo.ioproc, fileinfo.ioproc_every); + } + result = IOHDF5Util_RecoverVariables (GH, &fileinfo); + } + /* Close the file and remove it if requested by the user */ if (CCTK_MyProc (GH) == fileinfo.ioproc) { |