aboutsummaryrefslogtreecommitdiff
path: root/src/RestoreFile.c
diff options
context:
space:
mode:
authortradke <tradke@ebee0441-1374-4afa-a3b5-247f3ba15b9a>2000-04-28 11:31:01 +0000
committertradke <tradke@ebee0441-1374-4afa-a3b5-247f3ba15b9a>2000-04-28 11:31:01 +0000
commita7fe30f403bcefa9af4e97f745e8d82411d1aae7 (patch)
tree8c9e0922e0cfebc518e49c41b36bcc7148c3f32e /src/RestoreFile.c
parent311c56cb7f3fa21dfeeecaa43d7916f23bc764b2 (diff)
Removed all the scandir(3) stuff which is now in IOUtil. Just call
IOUtil's generich parameter recovery routine instead. git-svn-id: http://svn.cactuscode.org/arrangements/CactusPUGHIO/IOFlexIO/trunk@116 ebee0441-1374-4afa-a3b5-247f3ba15b9a
Diffstat (limited to 'src/RestoreFile.c')
-rw-r--r--src/RestoreFile.c17
1 files changed, 16 insertions, 1 deletions
diff --git a/src/RestoreFile.c b/src/RestoreFile.c
index 1e59035..e819b22 100644
--- a/src/RestoreFile.c
+++ b/src/RestoreFile.c
@@ -83,6 +83,7 @@ int IOFlexIOi_RecoverVariables (cGH *GH, fileinfo_t *file)
int nDatasets, currentDataset;
int timelevel; /* current timelevel to be restored */
pGH *pughGH; /* PUGH extension handle */
+ ioGH *ioUtilGH; /* IOUtil extension handle */
pGExtras *extras;
#ifdef CCTK_MPI
int i, proc;
@@ -93,8 +94,9 @@ int IOFlexIOi_RecoverVariables (cGH *GH, fileinfo_t *file)
/* to make the compiler happy */
nDatasets = 0;
- /* Get the handles for PUGH extensions */
+ /* Get the handles for PUGH IOUtil extensions */
pughGH = PUGH_pGH (GH);
+ ioUtilGH = (ioGH *) GH->extensions [CCTK_GHExtensionHandle ("IO")];
myproc = CCTK_MyProc (GH);
nprocs = CCTK_nProcs (GH);
@@ -147,6 +149,19 @@ int IOFlexIOi_RecoverVariables (cGH *GH, fileinfo_t *file)
continue;
}
+ /* if we read in initial data via the file reader interface
+ check whether the user wants to have this variable restored */
+ if (ioUtilGH->do_inVars && ! ioUtilGH->do_inVars [index]) {
+ if (verbose) {
+ char *varname = CCTK_FullName (index);
+
+ CCTK_VInfo (CCTK_THORNSTRING, "Ignoring variable '%s' for file "
+ "reader recovery", varname);
+ free (varname);
+ }
+ continue;
+ }
+
/* Read in the data */
if (verbose) {
char *fullname = CCTK_FullName (index);