diff options
author | tradke <tradke@ebee0441-1374-4afa-a3b5-247f3ba15b9a> | 2002-05-06 09:16:28 +0000 |
---|---|---|
committer | tradke <tradke@ebee0441-1374-4afa-a3b5-247f3ba15b9a> | 2002-05-06 09:16:28 +0000 |
commit | fe88d9e6f770a9d36acc8ffc02655a5c68fa8b7d (patch) | |
tree | 50c97ccae5cd94d5b65209ed2be3dd4cbe1783c7 /src/Write.c | |
parent | 4121f7f8af4cb1b3232319205129d9cef22e53b1 (diff) |
Parameter names changes as announced in today's mail to users@cactuscode.org.
You must also update thorn IOUtil now.
git-svn-id: http://svn.cactuscode.org/arrangements/CactusPUGHIO/IOFlexIO/trunk@241 ebee0441-1374-4afa-a3b5-247f3ba15b9a
Diffstat (limited to 'src/Write.c')
-rw-r--r-- | src/Write.c | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/src/Write.c b/src/Write.c index 44ace87..90ae21f 100644 --- a/src/Write.c +++ b/src/Write.c @@ -84,7 +84,7 @@ int IOFlexIO_Write (const cGH *GH, int vindex, const char *alias) return (-1); } - if (verbose) + if (CCTK_Equals (verbose, "full")) { CCTK_VInfo (CCTK_THORNSTRING, "IOFlexIO output of variable '%s', " "alias '%s'", CCTK_VarName (vindex), alias); @@ -99,7 +99,7 @@ int IOFlexIO_Write (const cGH *GH, int vindex, const char *alias) { if (is_new_file || reuse_filehandles) { - if (verbose) + if (CCTK_Equals (verbose, "full")) { CCTK_VInfo (CCTK_THORNSTRING, "%s IEEEIO output file '%s'", is_new_file ? "Opening" : "Resuming", file->filename); @@ -177,25 +177,25 @@ int IOFlexIO_Write (const cGH *GH, int vindex, const char *alias) if (is_new_file) { IOFlexIOi_DumpGHExtensions (GH, file->iofile); - if (strcmp (out3D_parameters, "no")) + if (! CCTK_Equals (out_save_parameters, "no")) { - IOFlexIOi_DumpParameters (GH, strcmp (out3D_parameters, "all") == 0, + IOFlexIOi_DumpParameters (GH, CCTK_Equals (out_save_parameters, "all"), file->iofile); } } /* close the file */ - if (out3D_septimefiles || reuse_filehandles) + if (out_timesteps_per_file > 0 || reuse_filehandles) { - if (verbose) + if (CCTK_Equals (verbose, "full")) { CCTK_VInfo (CCTK_THORNSTRING, "%s IEEEIO output file '%s'", - out3D_septimefiles ? "Closing" : "Pausing", + out_timesteps_per_file > 0 ? "Closing" : "Pausing", file->filename); } IEEEbufferOff (file->iofile); - if (out3D_septimefiles) + if (out_timesteps_per_file > 0) { FLEXIO_ERROR (IOclose (file->iofile)); } @@ -205,7 +205,7 @@ int IOFlexIO_Write (const cGH *GH, int vindex, const char *alias) } } } - if (out3D_septimefiles) + if (out_timesteps_per_file > 0) { free (file->filename); free (file); @@ -248,7 +248,7 @@ static IEEEfile_t *OpenFile (const cGH *GH, const char *alias, int *is_new_file) nprocs = CCTK_nProcs (GH); myproc = CCTK_MyProc (GH); - if (out3D_septimefiles) + if (out_timesteps_per_file > 0) { tmp = extra; sprintf (extra, "%s.time_%7.3f", extra, GH->cctk_time); @@ -278,18 +278,18 @@ static IEEEfile_t *OpenFile (const cGH *GH, const char *alias, int *is_new_file) sprintf (extra, "%s.file_%d", extra, myproc / ioUtilGH->ioproc_every); /* if necessary create the output directory */ - outputdir = (char *) malloc (strlen (myGH->outdir) + strlen (alias) + 5); - sprintf (outputdir, "%s/%s_3d", myGH->outdir, alias); + outputdir = (char *) malloc (strlen (myGH->out_dir) + strlen (alias) + 5); + sprintf (outputdir, "%s/%s_3d", myGH->out_dir, alias); result = IOUtil_CreateDirectory (GH, outputdir, - ! CCTK_Equals (out3D_mode, "onefile"), + ! CCTK_Equals (out_mode, "onefile"), ioUtilGH->ioproc); if (result < 0) { CCTK_VWarn (1, __LINE__, __FILE__, CCTK_THORNSTRING, "Problem creating IOFlexIO output directory '%s'", outputdir); } - else if (result > 0 && CCTK_Equals (newverbose, "full")) + else if (result > 0 && CCTK_Equals (verbose, "full")) { CCTK_VInfo (CCTK_THORNSTRING, "IOFlexIO output directory '%s' already exists", outputdir); @@ -311,14 +311,14 @@ static IEEEfile_t *OpenFile (const cGH *GH, const char *alias, int *is_new_file) file = (IEEEfile_t *) malloc (sizeof (IEEEfile_t)); - file->filename = (char *) malloc (strlen (myGH->outdir) + strlen (extradir) + + file->filename = (char *) malloc (strlen (myGH->out_dir) + strlen (extradir) + strlen (alias) + strlen (extra) + strlen (GH->identity) + 10); - sprintf (file->filename, "%s/%s%s_3d%s%s.ieee", myGH->outdir, + sprintf (file->filename, "%s/%s%s_3d%s%s.ieee", myGH->out_dir, extradir, alias, extra, GH->identity); /* no need to store file info if used only once */ - if (! out3D_septimefiles) + if (out_timesteps_per_file < 0) { if (myproc == ioUtilGH->ioproc) { |