From 3cc469805eb860c1ef3d69a29f20280f84621544 Mon Sep 17 00:00:00 2001 From: tradke Date: Mon, 6 May 2002 09:10:41 +0000 Subject: 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/CactusBase/IOBasic/trunk@125 b589c3ab-70e8-4b4d-a09f-cba2dd200880 --- doc/documentation.tex | 63 +++++++++++++++++------------------- param.ccl | 56 +++++++++++++++----------------- src/OutputInfo.c | 26 +++++++-------- src/OutputScalar.c | 50 +++++++++-------------------- src/Startup.c | 89 +++++++++++++++++++++------------------------------ src/WriteScalar.c | 12 +++---- src/iobasicGH.h | 2 +- 7 files changed, 126 insertions(+), 172 deletions(-) diff --git a/doc/documentation.tex b/doc/documentation.tex index 5b45783..6c886e8 100644 --- a/doc/documentation.tex +++ b/doc/documentation.tex @@ -6,11 +6,11 @@ \author{Gabrielle Allen, Thomas Radke} \maketitle -\abstract{Thorn IOBasic provides I/O methods for outputting scalar values in +\abstract{Thorn {\bf IOBasic} provides I/O methods for outputting scalar values in ASCII format into files and for printing them as runtime information to screen.} \section{Purpose} -Thorn IOBasic registers 2 I/O methods with the I/O interface in the flesh +Thorn {\bf IOBasic} registers 2 I/O methods with the I/O interface in the flesh which both output the same following information: % \begin{itemize} @@ -22,11 +22,11 @@ which both output the same following information: The I/O methods differ in the destination the output is written to: \begin{itemize} \item{\tt Scalar}\\ - This method outputs the information into ASCII files named {\tt ".tl"} (for CCTK\_SCALAR variables) and {\tt "\_.tl"} + This method outputs the information into ASCII files named {\tt ".\{asc|xg\}"} (for CCTK\_SCALAR variables) and {\tt "\_.\{asc|xg\}"} (for CCTK\_GF and CCTK\_ARRAY variables where {\tt reduction} would stand - for {\tt min, max, nm1, nm2} respectively).\\ - The output data can be plotted by using either {\it xgraph} or - {\it gnuplot}. The output style can be selected via parameter settings. + for the type of reduction value that is output).\\ + The output data can be plotted by using either {\it xgraph} (for {\tt "*.xg"} files) or + {\it gnuplot} (for {\tt "*.asc"} files). The output style can be selected via parameter settings. \item {\tt Info}\\ This method prints the data as runtime information to {\it stdout}.\\ The output occurs as a table with columns containing the current iteration @@ -35,7 +35,7 @@ The I/O methods differ in the destination the output is written to: \end{itemize} % % -\section{{\tt IOBasic} Parameters} +\section{{\bf IOBasic} Parameters} % Parameters to control the {\tt Scalar} I/O method are: \begin{itemize} @@ -43,9 +43,11 @@ Parameters to control the {\tt Scalar} I/O method are: How often to do {\tt Scalar} output. If this parameter is set in the parameter file, it will override the setting of the shared {\tt IO::out\_every} parameter. - \item {\tt IOBasic::outdir}\\ - The directory in which to place the {\tt Scalar} ASCII output files.\\ - If the directory doesn't exist at startup it will be created. + \item {\tt IOBasic::out\_dir}\\ + The directory in which to place the {\tt Scalar} ASCII output files. + If the directory doesn't exist at startup it will be created.\\ + If this paraeter is set to an empty string {\tt Scalar} output will go + to the standard output directory as specified in {\tt IO::out\_dir}. \item {\tt IOBasic::outScalar\_style}\\ How to start comments in the {\tt Scalar} ASCII output files.\\ Possible choices for this keywork parameter are {\it xgraph} and @@ -102,7 +104,7 @@ All of the above parameters marked as steerable can be changed at runtime. % \section{Examples} % -{\bf Example for {\tt Info} Output}\\ +\subsection {Example for {\tt Info} Output} % The following parameter settings request info output for variables {\tt grid::r, wavetoy::phi} (both are CCTK grid functions) and {\tt mythorn::complex} @@ -115,15 +117,13 @@ add other reduction operators within the $<>$ braces. For the scalar variable {\tt mythorn::complex} both the real and imaginary part are printed. \begin{verbatim} -IOBasic::outInfo_every = 2 -IOBasic::outInfo_vars = "grid::r - wavetoy::phi[reductions=] - mythorn::complex" -IOBasic::outInfo_reductions = "minimum maximum" + IOBasic::outInfo_every = 2 + IOBasic::outInfo_vars = "grid::r + wavetoy::phi[reductions=] + mythorn::complex" + IOBasic::outInfo_reductions = "minimum maximum" \end{verbatim} -\vspace*{2ex} The resulting screen output would look like this: -\begin{tiny} \begin{verbatim} --------------------------------------------------------------------------------------------- it | | GRID::r | WAVETOY::phi | MYTHORN::complex | @@ -136,10 +136,8 @@ The resulting screen output would look like this: 8 | 0.138 | 0.02986294 | 0.86602540 | 0.07351147 | 6.90359593 | 0.00000000 | 10 | 0.172 | 0.02986294 | 0.86602540 | 0.07781795 | 6.90359593 | 0.00000000 | \end{verbatim} -\end{tiny} % -\vspace*{3ex} -{\bf Example for {\tt Scalar} Output}\\ +\subsection {Example for {\tt Scalar} Output} % The following parameter settings request scalar output for all grid function variables in the group {\tt grid::coordinates} and for the scalar variable @@ -147,18 +145,17 @@ variables in the group {\tt grid::coordinates} and for the scalar variable Output occurs every 10th iteration. {\tt gnuplot} output style is selected for the ASCII files which are placed into a subdirectory {\tt scalar\_output}. \begin{verbatim} -IOBasic::outScalar_every = 10 -IOBasic::outScalar_vars = "grid::coordinates grid::coarse_dx" -IOBasic::outScalar_reductions = "minimum maximum" -IOBasic::outScalar_style = "gnuplot" -IOBasic::outdir = "scalar_output" + IOBasic::outScalar_every = 10 + IOBasic::outScalar_vars = "grid::coordinates grid::coarse_dx" + IOBasic::outScalar_reductions = "minimum maximum" + IOBasic::outScalar_style = "gnuplot" + IOBasic::out_dir = "scalar_output" \end{verbatim} -\vspace*{2ex} This would create the following ASCII files: \begin{verbatim} -~/Cactus/par> ls scalar_output -coarse_dx.tl r_min.tl x_min.tl y_min.tl z_min.tl -r_max.tl x_max.tl y_max.tl z_max.tl + ~/Cactus/par> ls scalar_output + coarse_dx.asc r_minimum.asc x_minimum.asc y_minimum.asc z_minimum.asc + r_maximum.asc x_maximum.asc y_maximum.asc z_maximum.asc \end{verbatim} % % @@ -172,7 +169,7 @@ reduction operators (eg. thorn {\tt PUGHSlab} in the {\tt CactusPUGH} arrangement). For a list of possible reduction operations please refer to the documention of this reduction thorn.\\[3ex] % -{\bf Getting Output from IOBasic's I/O Mehtods}\\ +{\bf Getting Output from {\bf IOBasic}'s I/O Mehtods}\\ % You obtain output by an I/O method by either % @@ -187,9 +184,9 @@ invoke I/O methods by application thorns please see the documentation of thorn {\tt IOUtil} and the flesh.\\[3ex] % % -{\bf Building Cactus configurations with IOBasic}\\ +{\bf Building Cactus configurations with {\bf IOBasic}}\\ % -Since {\tt IOBasic} uses parameters from {\tt IOUtil} it also needs this I/O +Since {\bf IOBasic} uses parameters from {\tt IOUtil} it also needs this I/O helper thorn be compiled into Cactus and activated at runtime in the {\tt ActiveThorns} parameter in your parameter file. % diff --git a/param.ccl b/param.ccl index 391b6c8..ba1cda5 100644 --- a/param.ccl +++ b/param.ccl @@ -8,27 +8,31 @@ private: ########################## -# Directory to output to (overriden by 'IO::outdir') +# Directory to output to ########################## -STRING outdir "Name of Scalar output directory, overrides IO::outdir" +STRING out_dir "Output directory for IOBasic's scalar files, overrides IO::out_dir" STEERABLE = RECOVER { - .* :: "A regex which matches everything" -} "." -STRING outdirScalar "Name of Scalar output directory, overrides IO::outdir" + ".+" :: "A valid directory name" + "^$" :: "An empty string to choose the default from IO::out_dir" +} "" +STRING outdirScalar "Output directory for IOBasic's scalar files, overrides IO::out_dir (DEPRECATED IN BETA13)" STEERABLE = RECOVER { - .* :: "A regex which matches everything" -} "." + ".+" :: "A valid directory name" + "^$" :: "An empty string to choose the default from IO::out_dir" +} "" ########################## # What variables to output ########################## STRING outInfo_vars "Variables to output as Info to screen" STEERABLE = ALWAYS { - .* :: "A regex which matches everything" + ".+" :: "Space-separated list of fully qualified variable/group names" + "^$" :: "An empty string to output nothing" } "" STRING outScalar_vars "Variables to output into files" STEERABLE = ALWAYS { - .* :: "A regex which matches everything" + ".+" :: "Space-separated list of fully qualified variable/group names" + "^$" :: "An empty string to output nothing" } "" @@ -37,11 +41,11 @@ STRING outScalar_vars "Variables to output into files" STEERABLE = ALWAYS ########################## STRING outInfo_reductions "List of reductions to output as Info to screen" STEERABLE = ALWAYS { - ".*" :: "A regex which matches everything" + ".+" :: "Space-separated list of reduction operators" } "minimum maximum" STRING outScalar_reductions "List of reductions to output into files" STEERABLE = ALWAYS { - ".*" :: "A regex which matches everything" + ".+" :: "Space-separated list of reduction operators" } "minimum maximum norm1 norm2" @@ -50,11 +54,15 @@ STRING outScalar_reductions "List of reductions to output into files" STEERABLE ######################## INT outInfo_every "How often to do Info output" STEERABLE = ALWAYS { - -1:* :: "" + 1:* :: "Every so many iterations" + 0: :: "Disable Info output" + -1: :: "Default to IO::out_every" } -1 -INT outScalar_every "How often to do Info output" STEERABLE = ALWAYS +INT outScalar_every "How often to do Scalar output" STEERABLE = ALWAYS { - -1:* :: "" + 1:* :: "Every so many iterations" + 0: :: "Disable Scalar output" + -1: :: "Default to IO::out_every" } -1 @@ -73,30 +81,16 @@ STRING out_format "Which format for Scalar floating-point number output" STEERAB } ".13f" - ############################################################################# ### import IOUtil parameters ############################################################################# shares: IO -#################### -# Output directories -#################### -#FIXME: want USES AS -#USES STRING outdir - - -######################## -# How often to do output -######################## +#FIXME: want USES STRING out_dir AS default_out_dir USES INT out_every - - -################ -# various things -################ -USES BOOLEAN newverbose +USES KEYWORD verbose USES BOOLEAN new_filename_scheme + EXTENDS KEYWORD out_fileinfo { "axis labels" :: "add axis labels information to output files" diff --git a/src/OutputInfo.c b/src/OutputInfo.c index 5bc12b1..8a813c2 100644 --- a/src/OutputInfo.c +++ b/src/OutputInfo.c @@ -196,29 +196,25 @@ int IOBasic_TimeForInfoOutput (const cGH *GH, int vindex) DECLARE_CCTK_PARAMETERS - /* get the GH extensions for IOBasic */ - myGH = (iobasicGH *) CCTK_GHExtension (GH, "IOBasic"); - /* check if steerable parameters changed */ + myGH = (iobasicGH *) CCTK_GHExtension (GH, "IOBasic"); CheckSteerableParameters (myGH); - /* return if no output requested */ - if (myGH->outInfo_every <= 0 || GH->cctk_iteration % myGH->outInfo_every || - myGH->info_reductions[vindex].num_reductions == 0) - { - retval = 0; - } - else + /* check if this variable should be output */ + retval = myGH->outInfo_every > 0 && + GH->cctk_iteration % myGH->outInfo_every && + myGH->info_reductions[vindex].num_reductions > 0; + if (retval) { - /* check if not already output this iteration */ - retval = myGH->outInfo_last[vindex] != GH->cctk_iteration; - if (! retval) + /* check if variable was not already output this iteration */ + if (myGH->outInfo_last[vindex] == GH->cctk_iteration) { fullname = CCTK_FullName (vindex); CCTK_VWarn (5, __LINE__, __FILE__, CCTK_THORNSTRING, "Already done Info output for '%s' in current iteration " "(probably via triggers)", fullname); free (fullname); + retval = 0; } } @@ -317,7 +313,7 @@ static void CheckSteerableParameters (iobasicGH *myGH) myGH->outInfo_every = outInfo_every >= 0 ? outInfo_every : out_every; /* report if frequency changed */ - if (myGH->outInfo_every != out_old && ! CCTK_Equals (newverbose, "none")) + if (myGH->outInfo_every != out_old && ! CCTK_Equals (verbose, "none")) { if (myGH->outInfo_every > 0) { @@ -417,7 +413,7 @@ static void PrintHeader (iobasicGH *myGH, int num_vars) num_columns += myGH->info_reductions[vindex].num_reductions; if (myGH->info_reductions[vindex].num_reductions > 0 && - ! CCTK_Equals (newverbose, "none")) + ! CCTK_Equals (verbose, "none")) { fullname = CCTK_FullName (vindex); if (! msg) diff --git a/src/OutputScalar.c b/src/OutputScalar.c index 20c2695..b336f49 100644 --- a/src/OutputScalar.c +++ b/src/OutputScalar.c @@ -54,48 +54,31 @@ static void CheckSteerableParameters (iobasicGH *myGH); int IOBasic_ScalarOutputGH (const cGH *GH) { int vindex, retval; - const char *name; iobasicGH *myGH; - /* Get the GH extensions for IOBasic */ myGH = (iobasicGH *) CCTK_GHExtension (GH, "IOBasic"); - CheckSteerableParameters (myGH); - /* Return if no output is required */ + /* return if no output is required */ if (myGH->outScalar_every <= 0) { return (0); } - /* Loop over all variables */ - for (vindex = retval = 0; vindex < CCTK_NumVars (); vindex++) - { - /* Is it time for output ? */ - if (! IOBasic_TimeForScalarOutput (GH, vindex)) - { - continue; - } - - /* Get the variable name for this index (for filename) */ - name = CCTK_VarName (vindex); + retval = 0; -#ifdef IOBASIC_DEBUG - printf("\nIn IOBasic_ScalarOutputGH\n----------------\n"); - printf(" Index = %d\n",vindex); - printf(" Variable = -%s-\n",name); - printf(" Last output iteration was = %d\n",myGH->outScalar_last[vindex]); -#endif - - /* Make the IO call */ - if (IOBasic_WriteScalar (GH, vindex, name) == 0) + /* loop over all variables */ + for (vindex = CCTK_NumVars () - 1; vindex >= 0; vindex--) + { + if (IOBasic_TimeForScalarOutput (GH, vindex) && + IOBasic_WriteScalar (GH, vindex, CCTK_VarName (vindex)) == 0) { - /* Register GF as having 0D output this iteration */ - myGH->outScalar_last [vindex] = GH->cctk_iteration; + /* register variable as having output this iteration */ + myGH->outScalar_last[vindex] = GH->cctk_iteration; retval++; } - } /* end of loop over all variables */ + } return (retval); } @@ -147,7 +130,7 @@ int IOBasic_TimeForScalarOutput (const cGH *GH, int vindex) else { /* Check if variable wasn't already output this iteration */ - retval = myGH->outScalar_last [vindex] != GH->cctk_iteration; + retval = myGH->outScalar_last[vindex] != GH->cctk_iteration; if (! retval) { fullname = CCTK_FullName (vindex); @@ -205,13 +188,12 @@ int IOBasic_TriggerScalarOutput (const cGH *GH, int vindex) printf (" Variable = -%s-\n", name); #endif - /* Do the Scalar output */ + /* do the Scalar output */ retval = IOBasic_WriteScalar (GH, vindex, name); - if (retval == 0) { - /* Register variable as having Scalar output this iteration */ - myGH->outScalar_last [vindex] = GH->cctk_iteration; + /* register variable as having Scalar output this iteration */ + myGH->outScalar_last[vindex] = GH->cctk_iteration; } return (retval); @@ -255,7 +237,7 @@ static void CheckSteerableParameters (iobasicGH *myGH) myGH->outScalar_every = outScalar_every >= 0 ? outScalar_every : out_every; /* report if frequency changed */ - if (myGH->outScalar_every != out_old && ! CCTK_Equals (newverbose, "none")) + if (myGH->outScalar_every != out_old && ! CCTK_Equals (verbose, "none")) { if (myGH->outScalar_every > 0) { @@ -313,7 +295,7 @@ static void CheckSteerableParameters (iobasicGH *myGH) { CCTK_WARN (1, "Failed to parse 'IOBasic::outScalar_vars' parameter"); } - else if (! CCTK_Equals (newverbose, "none")) + else if (! CCTK_Equals (verbose, "none")) { msg = NULL; for (vindex = 0; vindex < num_vars; vindex++) diff --git a/src/Startup.c b/src/Startup.c index 3821d86..ab26165 100644 --- a/src/Startup.c +++ b/src/Startup.c @@ -8,7 +8,6 @@ @version $Id$ @@*/ -#include #include #include #include @@ -28,12 +27,11 @@ CCTK_FILEVERSION(CactusBase_IOBasic_Startup_c) ********************************************************************/ void IOBasic_Startup (void); + /******************************************************************** ******************** Internal Routines ************************ ********************************************************************/ -static void *IOBasic_SetupGH (tFleshConfig *config, - int convergence_level, - cGH *GH); +static void *IOBasic_SetupGH (tFleshConfig *config, int conv_level, cGH *GH); /*@@ @@ -82,7 +80,7 @@ void IOBasic_Startup (void) @vtype tFleshConfig * @vio unused @endvar - @var convergence_level + @var conv_level @vdesc the convergence level @vtype int @vio unused @@ -98,23 +96,21 @@ void IOBasic_Startup (void) pointer to the allocated GH extension structure @endreturndesc @@*/ -static void *IOBasic_SetupGH (tFleshConfig *config, - int convergence_level, - cGH *GH) +static void *IOBasic_SetupGH (tFleshConfig *config, int conv_level, cGH *GH) { - DECLARE_CCTK_PARAMETERS int i; - iobasicGH *newGH; + iobasicGH *myGH; + DECLARE_CCTK_PARAMETERS - /* suppress compiler warnings about unused variables */ - config = config; - convergence_level = convergence_level; - GH = GH; + /* suppress compiler warnings about unused parameters */ + (void) (config + 0); + (void) (conv_level + 0); + (void) (GH + 0); /* allocate the GH extension and its components */ - newGH = (iobasicGH *) malloc (sizeof (iobasicGH)); - if (newGH) + myGH = (iobasicGH *) malloc (sizeof (iobasicGH)); + if (myGH) { /* Register the IOBasic routines as output methods */ i = CCTK_RegisterIOMethod ("Scalar"); @@ -127,7 +123,7 @@ static void *IOBasic_SetupGH (tFleshConfig *config, CCTK_RegisterIOMethodTimeToOutput (i, IOBasic_TimeForInfoOutput); CCTK_RegisterIOMethodTriggerOutput (i, IOBasic_TriggerInfoOutput); - if (! CCTK_Equals (newverbose, "none")) + if (! CCTK_Equals (verbose, "none")) { CCTK_INFO ("I/O Method 'Scalar' registered"); CCTK_INFO ("Scalar: Output of scalar quantities (grid scalars, " @@ -139,68 +135,57 @@ static void *IOBasic_SetupGH (tFleshConfig *config, i = CCTK_NumVars (); - newGH->info_reductions = (iobasic_reductionlist_t *) + myGH->info_reductions = (iobasic_reductionlist_t *) calloc (2 * i, sizeof (iobasic_reductionlist_t)); - newGH->scalar_reductions = newGH->info_reductions + i; - newGH->outInfo_last = (int *) malloc (2 * i * sizeof (int)); - newGH->outScalar_last = newGH->outInfo_last + i; + myGH->scalar_reductions = myGH->info_reductions + i; + myGH->outInfo_last = (int *) malloc (2 * i * sizeof (int)); + myGH->outScalar_last = myGH->outInfo_last + i; - memset (newGH->outInfo_last, -1, 2 * i * sizeof (int)); + memset (myGH->outInfo_last, -1, 2 * i * sizeof (int)); - newGH->filenameListScalar = NULL; + myGH->filenameListScalar = NULL; - /* Check whether "IOBasic::outdir" was set. - If so take this dir otherwise default to "IO::outdir" */ - if (CCTK_ParameterQueryTimesSet ("outdir", CCTK_THORNSTRING) > 0 || - CCTK_ParameterQueryTimesSet ("outdirScalar", CCTK_THORNSTRING) > 0) + /* get the name of IOBasic's output directory */ + if (*out_dir == 0) { - if (CCTK_ParameterQueryTimesSet ("outdir", CCTK_THORNSTRING) <= 0) - { - CCTK_WARN (1, "Parameter 'IOBasic::outdirScalar is depricated in " - "BETA12, please use 'IOBasic::outdir' instead"); - outdir = outdirScalar; - } - } - else - { - outdir = *(const char **) - CCTK_ParameterGet ("outdir", CCTK_ImplementationThorn ("IO"), &i); + out_dir = *(const char **) + CCTK_ParameterGet ("out_dir", CCTK_ImplementationThorn ("IO"), + NULL); } /* skip the directory pathname if output goes into current directory */ - if (strcmp (outdir, ".")) + if (strcmp (out_dir, ".")) { - i = strlen (outdir); - newGH->outdir = (char *) malloc (i + 2); - strcpy (newGH->outdir, outdir); - newGH->outdir[i] = '/'; - newGH->outdir[i+1] = 0; + i = strlen (out_dir); + myGH->out_dir = (char *) malloc (i + 2); + strcpy (myGH->out_dir, out_dir); + myGH->out_dir[i] = '/'; + myGH->out_dir[i+1] = 0; } else { - newGH->outdir = ""; + myGH->out_dir = strdup (""); } /* create the output dir */ - if (*newGH->outdir && CCTK_MyProc (GH) == 0) + if (*myGH->out_dir && CCTK_MyProc (GH) == 0) { - i = IOUtil_CreateDirectory (GH, newGH->outdir, 0, 0); + i = IOUtil_CreateDirectory (GH, myGH->out_dir, 0, 0); if (i < 0) { CCTK_VWarn (1, __LINE__, __FILE__, CCTK_THORNSTRING, "IOBasic_SetupGH: Couldn't create Scalar output directory " - "'%s'", newGH->outdir); + "'%s'", myGH->out_dir); } - else if (i >= 0 && CCTK_Equals (newverbose, "full")) + else if (i >= 0 && CCTK_Equals (verbose, "full")) { CCTK_VInfo (CCTK_THORNSTRING, "Scalar: Output to directory '%s'", - newGH->outdir); + myGH->out_dir); } - } } - return (newGH); + return (myGH); } diff --git a/src/WriteScalar.c b/src/WriteScalar.c index e2856bf..118b48b 100644 --- a/src/WriteScalar.c +++ b/src/WriteScalar.c @@ -190,10 +190,10 @@ static int IOBasic_WriteScalarGA (const cGH *GH, int vindex, const char *alias) if (new_filename_scheme) { /* allocate filename string buffer and build the filename */ - filename = (char *) malloc (strlen (myGH->outdir) + + filename = (char *) malloc (strlen (myGH->out_dir) + strlen (alias) + strlen (reduction->name) + strlen (file_extension) + 2); - sprintf (filename, "%s%s_%s%s", myGH->outdir, alias, + sprintf (filename, "%s%s_%s%s", myGH->out_dir, alias, reduction->name, file_extension); } else @@ -221,9 +221,9 @@ static int IOBasic_WriteScalarGA (const cGH *GH, int vindex, const char *alias) } /* allocate filename string buffer and build the filename */ - filename = (char *) malloc (strlen (myGH->outdir) + + filename = (char *) malloc (strlen (myGH->out_dir) + strlen (alias) + strlen (file_extension)+5); - sprintf (filename, "%s%s_%s.tl", myGH->outdir, alias, + sprintf (filename, "%s%s_%s.tl", myGH->out_dir, alias, file_extension); } @@ -321,9 +321,9 @@ static int IOBasic_WriteScalarGS (const cGH *GH, int vindex, const char *alias) } /* build the output filename */ - filename = (char *) malloc (strlen (myGH->outdir) + strlen (alias) + + filename = (char *) malloc (strlen (myGH->out_dir) + strlen (alias) + strlen (file_extension) + 1); - sprintf (filename, "%s%s%s", myGH->outdir, alias, file_extension); + sprintf (filename, "%s%s%s", myGH->out_dir, alias, file_extension); /* create/reopen the file */ file = OpenScalarFile (GH, vindex, filename, "tl", "Scalar value", alias); diff --git a/src/iobasicGH.h b/src/iobasicGH.h index e957a00..573ccdf 100644 --- a/src/iobasicGH.h +++ b/src/iobasicGH.h @@ -39,7 +39,7 @@ typedef struct IOBASIC_GH char info_reductions_changed; /* directory in which to place scalar output */ - char *outdir; + char *out_dir; /* The last iteration output */ int *outInfo_last, *outScalar_last; -- cgit v1.2.3