aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authortradke <tradke@ebee0441-1374-4afa-a3b5-247f3ba15b9a>2003-07-14 14:13:37 +0000
committertradke <tradke@ebee0441-1374-4afa-a3b5-247f3ba15b9a>2003-07-14 14:13:37 +0000
commit604979bc1db433a1c7ccefe0d87ec337cde75b1a (patch)
treee6e40ee1bd4d8a8cc6461e66263e96faef5f4171 /src
parentf24dce70a7cd3a91916e86e326a02d7ebfe9798b (diff)
Use CCTK_GroupStorageIncrease() to get the number of active timelevels for
checkpointing. git-svn-id: http://svn.cactuscode.org/arrangements/CactusPUGHIO/IOFlexIO/trunk@282 ebee0441-1374-4afa-a3b5-247f3ba15b9a
Diffstat (limited to 'src')
-rw-r--r--src/DumpGH.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/DumpGH.c b/src/DumpGH.c
index 32a2eeb..c94ed8e 100644
--- a/src/DumpGH.c
+++ b/src/DumpGH.c
@@ -18,7 +18,6 @@
#include "CactusBase/IOUtil/src/ioGH.h"
#include "CactusBase/IOUtil/src/ioutil_CheckpointRecovery.h"
#include "ioFlexGH.h"
-#include "CactusPUGH/PUGH/src/include/pugh.h"
#include <string.h>
#include <stdlib.h>
@@ -322,7 +321,6 @@ static int Checkpoint (const cGH *GH, int called_from)
cGroup gdata;
ioRequest *request;
flexioGH *myGH;
- const pGH *pughGH;
const ioGH *ioUtilGH;
char *fullname;
static char **cp_filenames = NULL;
@@ -350,7 +348,6 @@ static int Checkpoint (const cGH *GH, int called_from)
/* get the base filename ... */
myproc = CCTK_MyProc (GH);
- pughGH = PUGH_pGH (GH);
ioUtilGH = CCTK_GHExtension (GH, "IO");
IOUtil_PrepareFilename (GH, NULL, filename, called_from,
myproc / ioUtilGH->ioproc_every, ioUtilGH->unchunked);
@@ -419,8 +416,13 @@ static int Checkpoint (const cGH *GH, int called_from)
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--;
@@ -447,7 +449,7 @@ static int Checkpoint (const cGH *GH, int called_from)
{
/* 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"))