diff options
-rw-r--r-- | src/RestoreFile.c | 2 | ||||
-rw-r--r-- | src/Startup.c | 14 |
2 files changed, 15 insertions, 1 deletions
diff --git a/src/RestoreFile.c b/src/RestoreFile.c index 619a6dd..b3e92d0 100644 --- a/src/RestoreFile.c +++ b/src/RestoreFile.c @@ -497,7 +497,7 @@ static int GetCommonAttributes (cGH *GH, IOFile ifp, int unchunked, int *index, extras = ((pGA ***) pugh_pGH (GH)->variables)[*index][*timelevel]->extras; dims = unchunked ? extras->nsize : extras->lnsize; for (i = 0; i < groupdata.dim; i++) - if (dims [groupdata.dim - i - 1] != dims_stored [i]) + if (dims [i] != dims_stored [i]) flag = 1; break; } diff --git a/src/Startup.c b/src/Startup.c index d900f5a..c8edb41 100644 --- a/src/Startup.c +++ b/src/Startup.c @@ -55,6 +55,20 @@ void IOFlexIO_Startup (void) int IO_GHExtension; int IOMethod; + + if (CCTK_GHExtensionHandle ("IO") < 0) + { + CCTK_WARN (1, "Thorn IOUtil was not activated. " + "No IOFlexIO IO methods will be enabled."); + return; + } + if (CCTK_GHExtensionHandle ("PUGH") < 0) + { + CCTK_WARN (1, "Thorn PUGH was not activated. " + "No IOFlexIO IO methods will be enabled."); + return; + } + IO_GHExtension = CCTK_RegisterGHExtension ("IOFlexIO"); CCTK_RegisterGHExtensionSetupGH (IO_GHExtension, IOFlexIO_SetupGH); CCTK_RegisterGHExtensionInitGH (IO_GHExtension, IOFlexIO_InitGH); |