aboutsummaryrefslogtreecommitdiff
path: root/Carpet/CarpetIOASCII/src
diff options
context:
space:
mode:
authorschnetter <>2002-04-29 09:27:00 +0000
committerschnetter <>2002-04-29 09:27:00 +0000
commit254b613d10c1e97335866223c76f2167d515f44d (patch)
treeedea6966aed967334215446022e02c0cfd81e438 /Carpet/CarpetIOASCII/src
parent78ccca24070f8ee20223e089c5fbb6d623b5bcba (diff)
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
Diffstat (limited to 'Carpet/CarpetIOASCII/src')
-rw-r--r--Carpet/CarpetIOASCII/src/ioascii.cc10
1 files changed, 7 insertions, 3 deletions
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<outdim>
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<outdim>
// 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());