From 254b613d10c1e97335866223c76f2167d515f44d Mon Sep 17 00:00:00 2001 From: schnetter <> Date: Mon, 29 Apr 2002 09:27:00 +0000 Subject: Updated Carpet to the recent changes in Cactus. Updated Carpet to the recent changes in Cactus. I/O: Finding out whether this is a restart now requires looking at the ioGH structure. Timelevels: Timelevels now have to be allocated explicitely. Made Carpet compile with the Intel 6.0 C++ compiler. darcs-hash:20020429092752-07bb3-65b0b317ba98c017e16294d2ff8ac6a8a424a102.gz --- Carpet/CarpetIOASCII/src/ioascii.cc | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'Carpet/CarpetIOASCII/src') diff --git a/Carpet/CarpetIOASCII/src/ioascii.cc b/Carpet/CarpetIOASCII/src/ioascii.cc index 03d427da1..7b4f106ab 100644 --- a/Carpet/CarpetIOASCII/src/ioascii.cc +++ b/Carpet/CarpetIOASCII/src/ioascii.cc @@ -15,7 +15,7 @@ #include "cctk.h" #include "cctk_Parameters.h" -#include "CactusBase/IOUtil/src/ioutil_CheckpointRecovery.h" +#include "CactusBase/IOUtil/src/ioGH.h" #include "Carpet/CarpetLib/src/data.hh" #include "Carpet/CarpetLib/src/dist.hh" @@ -28,7 +28,7 @@ #include "ioascii.hh" -static const char* rcsid = "$Header: /home/eschnett/C/carpet/Carpet/Carpet/CarpetIOASCII/src/ioascii.cc,v 1.30 2002/03/26 13:22:28 schnetter Exp $"; +static const char* rcsid = "$Header: /home/eschnett/C/carpet/Carpet/Carpet/CarpetIOASCII/src/ioascii.cc,v 1.31 2002/04/29 11:27:56 schnetter Exp $"; CCTK_FILEVERSION(CarpetIOASCII_ioascii_cc) @@ -171,6 +171,10 @@ int CarpetIOASCII return 0; } + // Get grid hierarchy extentsion from IOUtil + const ioGH * const iogh = (const ioGH *)CCTK_GHExtension (cgh, "IO"); + assert (iogh); + // Create the output directory const char* myoutdir = GetStringParameter("outdir%dD", outdir); if (CCTK_MyProc(cgh)==0) { @@ -254,7 +258,7 @@ int CarpetIOASCII // the root processor if (do_truncate[n]) { struct stat fileinfo; - if (! IOUtil_RestartFromRecovery(cgh) + if (! iogh->recovered || stat(filename, &fileinfo)!=0) { file.open (filename, ios::out | ios::trunc); assert (file.good()); -- cgit v1.2.3