diff options
author | allen <allen@ebee0441-1374-4afa-a3b5-247f3ba15b9a> | 1999-07-30 22:46:00 +0000 |
---|---|---|
committer | allen <allen@ebee0441-1374-4afa-a3b5-247f3ba15b9a> | 1999-07-30 22:46:00 +0000 |
commit | 0d0f6983f1800c01c8553bc8e4be441342252b0b (patch) | |
tree | fea31440962f5a8d74c53b8f821804c919e8d415 /src/Write3D.c | |
parent | fa54b6d245abe8c84bb6e89ef30fd4f5cef66b29 (diff) |
A lot of parameter name changes, especially for IO
git-svn-id: http://svn.cactuscode.org/arrangements/CactusPUGHIO/IOFlexIO/trunk@27 ebee0441-1374-4afa-a3b5-247f3ba15b9a
Diffstat (limited to 'src/Write3D.c')
-rw-r--r-- | src/Write3D.c | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/src/Write3D.c b/src/Write3D.c index ea34b45..2d30a43 100644 --- a/src/Write3D.c +++ b/src/Write3D.c @@ -149,7 +149,7 @@ void IOFlexIO_Write3D (cGH *GH, int index, const char *alias) ioUtilGH = (ioGH *) GH->extensions [CCTK_GHExtensionHandle ("IO")]; myGH = (flexioGH *) GH->extensions [CCTK_GHExtensionHandle ("IOFlexIO")]; - if (output_verbose) { + if (verbose) { printf ("-------------------------------------------------------\n"); printf ("3D I/O on Grid Function %s\n", alias); printf (" downsample (x,y,z): (%d,%d,%d) ioproc : %d\n", @@ -177,8 +177,8 @@ void IOFlexIO_Write3D (cGH *GH, int index, const char *alias) * Also I have some vague recollection of needing it in some * very strange case ... So leave it here for now (PW 11.5.98) */ - if (IEEEfile_3D->iofile >= 0 && onefileperslice) { - if (output_verbose) + if (IEEEfile_3D->iofile >= 0 && out3D_septimefiles) { + if (verbose) printf ("Closing IEEEfile from previous iteration.\n"); CACTUS_IEEEIO_ERROR (IOclose (IEEEfile_3D->iofile)); IEEEfile_3D->iofile = -1; /* prevent attempts to close it twice! */ @@ -214,7 +214,7 @@ void IOFlexIO_Write3D (cGH *GH, int index, const char *alias) IOFlexIO_Write3D_closeFile (GH, IEEEfile_3D); } - if (output_verbose) + if (verbose) printf ("-------------------\n"); } @@ -244,18 +244,18 @@ void IOFlexIO_Write3D_closeFile (cGH *GH, IEEEfile_3D_t *IEEEfile_3D) myGH = (flexioGH *) GH->extensions [CCTK_GHExtensionHandle ("IOFlexIO")]; - if (myGH->reuse_fh) { - if (output_verbose) + if (myGH->out3d_reuse_filehandles) { + if (verbose) printf ("Pausing file %s\n", IEEEfile_3D->filename); IEEEbufferOff (IEEEfile_3D->iofile); CACTUS_IEEEIO_ERROR (IOpause (IEEEfile_3D->iofile)); } else { - if (output_verbose) + if (verbose) printf ("Closing file %s\n", IEEEfile_3D->filename); CACTUS_IEEEIO_ERROR (IOclose (IEEEfile_3D->iofile)); } - if (onefileperslice) + if (out3D_septimefiles) free (IEEEfile_3D); } @@ -289,7 +289,7 @@ void IOFlexIO_Write3D_openFile (cGH *GH, IEEEfile_3D_t *IEEEfile_3D, if (isNewFile) { /* First time through or one file per slice; open anew */ - if (output_verbose) + if (verbose) printf ("Opening file '%s'\n", IEEEfile_3D->filename); IEEEfile_3D->iofile = IEEEopen (IEEEfile_3D->filename, "w"); @@ -302,23 +302,23 @@ void IOFlexIO_Write3D_openFile (cGH *GH, IEEEfile_3D_t *IEEEfile_3D, free (msg); } - } else if (myGH->reuse_fh) { + } else if (myGH->out3d_reuse_filehandles) { /* resume the file (reopen descriptor) This allows descriptor reuse without requiring expensive destruction and reallocation of the associated datastructures */ - if (output_verbose) + if (verbose) printf ("Resuming file '%s'\n", IEEEfile_3D->filename); CACTUS_IEEEIO_ERROR (IOresume (IEEEfile_3D->iofile)); } else { - /* File is closed, not onefileperslice and not first time. + /* File is closed, not out3D_septimefiles and not first time. Therefore we must be conserving file handles and failed to use the pause()/resume methods(), So append. */ - if (output_verbose) + if (verbose) printf ("Re-opening file '%s' in append mode\n", IEEEfile_3D->filename); IEEEfile_3D->iofile = IEEEopen (IEEEfile_3D->filename, "a"); @@ -388,7 +388,7 @@ IEEEfile_3D_t *IOFlexIO_Get3Dfile (cGH *GH, const char *alias, int *isNewFile) sprintf (extra, "%s_chunked", extra); #endif - if (onefileperslice) { + if (out3D_septimefiles) { char *tmp = extra; sprintf (extra, "%s.time_%7.3f", extra, GH->cctk_time); @@ -419,7 +419,7 @@ IEEEfile_3D_t *IOFlexIO_Get3Dfile (cGH *GH, const char *alias, int *isNewFile) sprintf (createdir, "mkdir -p %s/%s_3d", myGH->outpfx_3D, alias); - if (output_verbose) { + if (verbose) { printf ("Creating output directory with command\n %s\n", createdir); fflush (stdout); } @@ -453,7 +453,7 @@ IEEEfile_3D_t *IOFlexIO_Get3Dfile (cGH *GH, const char *alias, int *isNewFile) extradir, alias, extra); /* no need to store file info if used only once */ - if (! onefileperslice) + if (! out3D_septimefiles) StoreNamedData (&myGH->fileList_3D, alias, IEEEfile_3D); /* set flag to indicate that file should be opened in create mode */ |