diff options
author | tradke <tradke@ebee0441-1374-4afa-a3b5-247f3ba15b9a> | 2000-03-14 17:05:54 +0000 |
---|---|---|
committer | tradke <tradke@ebee0441-1374-4afa-a3b5-247f3ba15b9a> | 2000-03-14 17:05:54 +0000 |
commit | ce573e602773f737f664904cc68051bad16f910a (patch) | |
tree | 5eb4a26b78e0238bd0b1ea86f911ca18318b179f /src/RestoreFile.c | |
parent | a605efeccf30f1ab733cc0f58694b4404750884d (diff) |
More stuff for cp/recovery.
Changes to use the new interface for CCTK_ParameterWalk().
Preparations for calling parameter recovery routine by scheduler.
Checkpoint only variables of active implementations.
Fixed warnings when compiling with LAM-MPI or no MPI at all.
Thomas
git-svn-id: http://svn.cactuscode.org/arrangements/CactusPUGHIO/IOFlexIO/trunk@96 ebee0441-1374-4afa-a3b5-247f3ba15b9a
Diffstat (limited to 'src/RestoreFile.c')
-rw-r--r-- | src/RestoreFile.c | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/src/RestoreFile.c b/src/RestoreFile.c index 7cfe2fb..c0ed026 100644 --- a/src/RestoreFile.c +++ b/src/RestoreFile.c @@ -31,9 +31,11 @@ static char *rcsid = "$Id$"; /* local function prototypes */ -static int GetChunkAttributes (cGH *GH, IOFile ifp, int index); static int GetCommonAttributes (cGH *GH, IOFile ifp, int unchunked, int *index, int *grouptype, int *timelevel); +#ifdef MPI +static int GetChunkAttributes (cGH *GH, IOFile ifp, int index); +#endif /*@@ @@ -87,13 +89,13 @@ int IOFlexIO_RestoreIEEEIOfile (cGH *GH, IOFile ifp, int file_ioproc, int file_ioproc_every, int file_unchunked) { DECLARE_CCTK_PARAMETERS - int i, index, gtype; + int index, gtype; int myproc, nprocs; int nDatasets, currentDataset; int timelevel; /* current timelevel to be restored */ pGH *pughGH; /* PUGH extension handle */ #ifdef MPI - int proc; + int i, proc; CCTK_INT info [3]; /* communication buffer for MPI */ #endif @@ -175,7 +177,8 @@ int IOFlexIO_RestoreIEEEIOfile (cGH *GH, IOFile ifp, int file_ioproc, int npoints; void *buffer; int chunkdims [3], chunkorigin [3]; - int element_size, mpi_type; + int element_size; + MPI_Datatype mpi_type; switch (CCTK_VarTypeI (index)) { case CCTK_VARIABLE_CHAR: @@ -289,7 +292,7 @@ int IOFlexIO_RestoreIEEEIOfile (cGH *GH, IOFile ifp, int file_ioproc, /* And here the code for non-IO processors: */ #ifdef MPI int npoints; - int mpi_type; + MPI_Datatype mpi_type; MPI_Status ms; /* They don't know how many datasets there are, because the IO processors @@ -525,6 +528,7 @@ static int GetCommonAttributes (cGH *GH, IOFile ifp, int unchunked, int *index, It verifies via the name attribute that this chunk belongs to the current variable given by its index. */ +#ifdef MPI static int GetChunkAttributes (cGH *GH, IOFile ifp, int index) { int i; @@ -560,3 +564,4 @@ static int GetChunkAttributes (cGH *GH, IOFile ifp, int index) return (0); } +#endif |