From 71be17fbbcc0c9746a9a380a83fc47d466425c55 Mon Sep 17 00:00:00 2001 From: tradke Date: Mon, 14 Jul 2003 14:13:39 +0000 Subject: 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 --- src/DumpUtils.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'src') 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) -- cgit v1.2.3