diff options
author | tradke <tradke@7842ec3a-9562-4be5-9c5b-06ba18f2b668> | 2003-07-14 14:13:39 +0000 |
---|---|---|
committer | tradke <tradke@7842ec3a-9562-4be5-9c5b-06ba18f2b668> | 2003-07-14 14:13:39 +0000 |
commit | 71be17fbbcc0c9746a9a380a83fc47d466425c55 (patch) | |
tree | 7a7ae1d2f2f7142d4be8f8028dbdfce4af3c86c3 /src | |
parent | df0db0f516dc47dc68dd9420219f7891f5dd5169 (diff) |
Use CCTK_GroupStorageIncrease() to get the number of active timelevels for
checkpointing.
git-svn-id: http://svn.cactuscode.org/arrangements/CactusPUGHIO/IOHDF5Util/trunk@93 7842ec3a-9562-4be5-9c5b-06ba18f2b668
Diffstat (limited to 'src')
-rw-r--r-- | src/DumpUtils.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/DumpUtils.c b/src/DumpUtils.c index fc1ee9f..9bc696c 100644 --- a/src/DumpUtils.c +++ b/src/DumpUtils.c @@ -17,7 +17,6 @@ #include "CactusBase/IOUtil/src/ioGH.h" #include "CactusBase/IOUtil/src/ioutil_CheckpointRecovery.h" #include "ioHDF5UtilGH.h" -#include "CactusPUGH/PUGH/src/include/pugh.h" /* the rcs ID and its dummy function to use it */ static const char *rcsid = "$Header$"; @@ -60,7 +59,6 @@ int IOHDF5Util_DumpGH (const cGH *GH, const int *timers, hid_t file) cGroup gdata; char *fullname; ioRequest *request; - const pGH *pughGH; DECLARE_CCTK_PARAMETERS @@ -95,8 +93,6 @@ int IOHDF5Util_DumpGH (const cGH *GH, const int *timers, hid_t file) CCTK_TimerStartI (timers[CP_VARIABLES_TIMER]); } - pughGH = PUGH_pGH (GH); - /* ... now the variables, sorted by groups */ for (gindex = CCTK_NumGroups () - 1; gindex >= 0; gindex--) { @@ -106,8 +102,13 @@ int IOHDF5Util_DumpGH (const cGH *GH, const int *timers, hid_t file) continue; } - /* dump all timelevels except the oldest (for multi-level groups) */ + /* get the number of allocated timelevels */ CCTK_GroupData (gindex, &gdata); + gdata.numtimelevels = 0; + gdata.numtimelevels = CCTK_GroupStorageIncrease (GH, 1, &gindex, + &gdata.numtimelevels,NULL); + + /* dump all timelevels except the oldest (for multi-level groups) */ if (gdata.numtimelevels > 1) { gdata.numtimelevels--; @@ -134,7 +135,7 @@ int IOHDF5Util_DumpGH (const cGH *GH, const int *timers, hid_t file) { /* loop over all allocated timelevels of this variable */ for (request->timelevel = 0; - request->timelevel < PUGH_NumTimeLevels (pughGH, request->vindex)-1; + request->timelevel < gdata.numtimelevels; request->timelevel++) { if (CCTK_Equals (verbose, "full") && file >= 0) |