From f7f7a801866271138a1888a493ae0c50ca372b52 Mon Sep 17 00:00:00 2001 From: tradke Date: Mon, 15 Apr 2002 12:18:15 +0000 Subject: Removed calls to IOUtil_RestartFromRecovery(). Now the recovery info is taken from IOUtil's GH extension. git-svn-id: http://svn.cactuscode.org/arrangements/CactusPUGHIO/IOFlexIO/trunk@229 ebee0441-1374-4afa-a3b5-247f3ba15b9a --- src/Write2D.c | 8 +++++--- src/Write3D.c | 3 +-- 2 files changed, 6 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/Write2D.c b/src/Write2D.c index dd4c880..c623c1a 100644 --- a/src/Write2D.c +++ b/src/Write2D.c @@ -28,7 +28,7 @@ #include "cctk.h" #include "cctk_Parameters.h" #include "Hyperslab.h" -#include "CactusBase/IOUtil/src/ioutil_CheckpointRecovery.h" +#include "CactusBase/IOUtil/src/ioGH.h" #include "ioFlexGH.h" static const char *rcsid = "$Id$"; @@ -70,6 +70,7 @@ int IOFlexIO_Write2D (const cGH *GH, int vindex, const char *alias) DECLARE_CCTK_PARAMETERS int dir; /* looper for directions */ int myproc; /* my processor ID */ + const ioGH *ioUtilGH; flexioGH *myGH; /* IOFlexIO's extensions */ int ioflex_type; /* IEEEIO output datatype */ int groupindex; /* variable's group index */ @@ -98,8 +99,9 @@ int IOFlexIO_Write2D (const cGH *GH, int vindex, const char *alias) return (-1); } - /* Get the handle for IOFlexIO extensions */ + /* Get the handles for IOUtil and IOFlexIO extensions */ myGH = (flexioGH *) GH->extensions[CCTK_GHExtensionHandle ("IOFlexIO")]; + ioUtilGH = (const ioGH *) GH->extensions[CCTK_GHExtensionHandle ("IO")]; /* What processor are we on? */ myproc = CCTK_MyProc (GH); @@ -163,7 +165,7 @@ int IOFlexIO_Write2D (const cGH *GH, int vindex, const char *alias) /* if restart from recovery, try to open an exisiting file ... */ IEEEfile_2D[dir] = NULL; - if (IOUtil_RestartFromRecovery (GH)) + if (ioUtilGH->recovered) { IEEEfile_2D[dir] = IEEEopen (fname, "a"); } diff --git a/src/Write3D.c b/src/Write3D.c index 0a6ab76..9850d05 100644 --- a/src/Write3D.c +++ b/src/Write3D.c @@ -39,7 +39,6 @@ #include "CactusPUGH/PUGH/src/include/pugh.h" #include "CactusBase/IOUtil/src/ioGH.h" #include "CactusBase/IOUtil/src/ioutil_Utils.h" -#include "CactusBase/IOUtil/src/ioutil_CheckpointRecovery.h" #include "ioFlexGH.h" /* the rcs ID and its dummy funtion to use it */ @@ -390,7 +389,7 @@ static IEEEfile_3D_t *IOFlexIO_Get3Dfile (const cGH *GH, const char *alias, { if (myproc == ioUtilGH->ioproc) { - if (IOUtil_RestartFromRecovery (GH)) + if (ioUtilGH->recovered) { IEEEfile_3D->iofile = IEEEopen (IEEEfile_3D->filename, "a"); *isNewFile = ! IOisValid (IEEEfile_3D->iofile); -- cgit v1.2.3