diff options
Diffstat (limited to 'src/Write3D.c')
-rw-r--r-- | src/Write3D.c | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/src/Write3D.c b/src/Write3D.c index e99a870..453559c 100644 --- a/src/Write3D.c +++ b/src/Write3D.c @@ -130,17 +130,15 @@ void IOFlexIO_Write3D_closeFile (cGH *GH, IEEEfile_3D_t *IEEEfile_3D); void IOFlexIO_Write3D (cGH *GH, int index, const char *alias) { DECLARE_CCTK_PARAMETERS - int myproc, nprocs; + int myproc; int timelevel; ioGH *ioUtilGH; - flexioGH *myGH; int isNewFile; IEEEfile_3D_t *IEEEfile_3D; /* Get the handle for IOUtil and IOFlexIO extensions */ ioUtilGH = (ioGH *) GH->extensions [CCTK_GHExtensionHandle ("IO")]; - myGH = (flexioGH *) GH->extensions [CCTK_GHExtensionHandle ("IOFlexIO")]; if (verbose) { printf ("-------------------------------------------------------\n"); @@ -153,7 +151,6 @@ void IOFlexIO_Write3D (cGH *GH, int index, const char *alias) /* What processor are we on? */ myproc = CCTK_MyProc (GH); - nprocs = CCTK_nProcs (GH); /* Get the filename and descriptor for output */ @@ -410,9 +407,9 @@ IEEEfile_3D_t *IOFlexIO_Get3Dfile (cGH *GH, const char *alias, int *isNewFile) /* If necessary create the output directory */ if (myproc == 0) { - outputdir = (char *) malloc (strlen (myGH->outpfx_3D) + + outputdir = (char *) malloc (strlen (myGH->outdir3D) + strlen (alias) + 5); - sprintf (outputdir, "%s/%s_3d", myGH->outpfx_3D, alias); + sprintf (outputdir, "%s/%s_3d", myGH->outdir3D, alias); if (CCTK_mkdir (outputdir) != 0) CCTK_WARN (1, "Problem creating 3D output directory"); @@ -436,12 +433,12 @@ IEEEfile_3D_t *IOFlexIO_Get3Dfile (cGH *GH, const char *alias, int *isNewFile) IEEEfile_3D = (IEEEfile_3D_t *) malloc (sizeof (IEEEfile_3D_t)); - IEEEfile_3D->filename = (char *) malloc (strlen (myGH->outpfx_3D) + + IEEEfile_3D->filename = (char *) malloc (strlen (myGH->outdir3D) + strlen (extradir) + strlen (alias) + strlen (extra) + 10); - sprintf (IEEEfile_3D->filename, "%s/%s%s_3d%s.ieee", myGH->outpfx_3D, + sprintf (IEEEfile_3D->filename, "%s/%s%s_3d%s.ieee", myGH->outdir3D, extradir, alias, extra); /* no need to store file info if used only once */ |