out=gmx_ffopen(TrjoutFile,filemode);
break;
}
- if (outftp == efG87)
- fprintf(gmx_fio_getfp(trx_get_fileio(trxout)),"Generated by %s. #atoms=%d, a BOX is"
- " stored in this file.\n",ShortProgram(),nout);
}
if (natoms > atoms->nr) {
#include "gromacs/utility/exceptions.h"
#include "gromacs/utility/fatalerror.h"
#include "gromacs/utility/futil.h"
-#include "gromacs/utility/programcontext.h"
#include "gromacs/utility/smalloc.h"
gmx_bool output_env_get_print_xvgr_codes(const output_env_t oenv)
gmx::BinaryInformationSettings settings;
settings.generatedByHeader(true);
settings.linePrefix("# ");
- gmx::printBinaryInformation(fp, gmx::getProgramContext(), settings);
+ gmx::printBinaryInformation(fp, output_env_get_program_context(oenv),
+ settings);
}
GMX_CATCH_ALL_AND_EXIT_WITH_FATAL_ERROR;
- fprintf(fp, "# %s is part of G R O M A C S:\n#\n", ShortProgram());
+ fprintf(fp, "# %s is part of G R O M A C S:\n#\n",
+ output_env_get_program_display_name(oenv));
bromacs(pukestr, 99);
fprintf(fp, "# %s\n#\n", pukestr);
fprintf(fp, "@ title \"%s\"\n", xvgrstr(title, oenv, buf, STRLEN));
#include "gromacs/pbcutil/rmpbc.h"
#include "gromacs/utility/exceptions.h"
#include "gromacs/utility/fatalerror.h"
-#include "gromacs/utility/programcontext.h"
#include "gromacs/utility/smalloc.h"
#ifdef GMX_DOUBLE
sfree(yticks);
}
-static void writeraw(t_interf ***int1, t_interf ***int2, int tblocks, int xbins, int ybins, char **fnms)
+static void writeraw(t_interf ***int1, t_interf ***int2, int tblocks,
+ int xbins, int ybins, char **fnms,
+ const output_env_t oenv)
{
FILE *raw1, *raw2;
int i, j, n;
gmx::BinaryInformationSettings settings;
settings.generatedByHeader(true);
settings.linePrefix("# ");
- gmx::printBinaryInformation(raw1, gmx::getProgramContext(), settings);
- gmx::printBinaryInformation(raw2, gmx::getProgramContext(), settings);
+ gmx::printBinaryInformation(raw1, output_env_get_program_context(oenv),
+ settings);
+ gmx::printBinaryInformation(raw2, output_env_get_program_context(oenv),
+ settings);
}
GMX_CATCH_ALL_AND_EXIT_WITH_FATAL_ERROR;
fprintf(raw1, "# Legend: nt nx ny\n# Xbin Ybin Z t\n");
{
gmx_fatal(FARGS, "No or not correct number (2) of output-files: %d", nfxpm);
}
- writeraw(surf1, surf2, tblock, xslices, yslices, rawfiles);
+ writeraw(surf1, surf2, tblock, xslices, yslices, rawfiles, oenv);
}
#include "gromacs/pbcutil/rmpbc.h"
#include "gromacs/utility/exceptions.h"
#include "gromacs/utility/fatalerror.h"
-#include "gromacs/utility/programcontext.h"
#include "gromacs/utility/smalloc.h"
#define e2d(x) ENM2DEBYE*(x)
gmx::BinaryInformationSettings settings;
settings.generatedByHeader(true);
settings.linePrefix("# ");
- gmx::printBinaryInformation(dip3d, gmx::getProgramContext(),
+ gmx::printBinaryInformation(dip3d, output_env_get_program_context(oenv),
settings);
}
GMX_CATCH_ALL_AND_EXIT_WITH_FATAL_ERROR;
#include <sys/time.h>
#endif
-#include "gromacs/commandline/pargs.h"
#include "typedefs.h"
#include "types/commrec.h"
-#include "gromacs/utility/smalloc.h"
#include "gromacs/math/vec.h"
-#include "copyrite.h"
#include "gromacs/fileio/tpxio.h"
#include "gromacs/utility/cstringutil.h"
#include "readinp.h"
#include "gromacs/timing/walltime_accounting.h"
#include "gromacs/math/utilities.h"
+#include "gromacs/commandline/pargs.h"
+#include "gromacs/utility/baseversion.h"
#include "gromacs/utility/fatalerror.h"
+#include "gromacs/utility/smalloc.h"
/* Enum for situations that can occur during log file parsing, the
* corresponding string entries can be found in do_the_tests() in
sep_line(fp);
fprintf(fp, "\n P E R F O R M A N C E R E S U L T S\n");
sep_line(fp);
- fprintf(fp, "%s for Gromacs %s\n", ShortProgram(), GromacsVersion());
+ fprintf(fp, "%s for Gromacs %s\n", output_env_get_program_display_name(oenv),
+ gmx_version());
if (!bThreads)
{
fprintf(fp, "Number of ranks : %d\n", nnodes);
return oenv->xvg_format;
}
-const char *output_env_get_program_name(const output_env_t oenv)
+const char *output_env_get_program_display_name(const output_env_t oenv)
{
try
{
- return oenv->programContext.fullBinaryPath();
+ return oenv->programContext.displayName();
}
GMX_CATCH_ALL_AND_EXIT_WITH_FATAL_ERROR;
}
-const char *output_env_get_short_program_name(const output_env_t oenv)
+const gmx::ProgramContextInterface &
+output_env_get_program_context(const output_env_t oenv)
{
- try
- {
- // TODO: Use the display name once it doesn't break anything.
- return oenv->programContext.programName();
- }
- GMX_CATCH_ALL_AND_EXIT_WITH_FATAL_ERROR;
-}
-
-const char *output_env_get_cmd_line(const output_env_t oenv)
-{
- try
- {
- return oenv->programContext.commandLine();
- }
- GMX_CATCH_ALL_AND_EXIT_WITH_FATAL_ERROR;
+ return oenv->programContext;
}
sfree(mymol.name);
printf("\nWARNING: topologies generated by %s can not be trusted at face value.\n",
- ShortProgram());
+ output_env_get_program_display_name(oenv));
printf(" Please verify atomtypes and charges by comparison to other\n");
printf(" topologies.\n");
xvg_format_t output_env_get_xvg_format(const output_env_t oenv);
/* Returns enum (see above) for xvg output formatting */
-const char *output_env_get_program_name(const output_env_t oenv);
-/* return the program name */
-
-const char *output_env_get_cmd_line(const output_env_t oenv);
-/* return the command line */
-
-const char *output_env_get_short_program_name(const output_env_t oenv);
-/* get the short version (without path component) of the program name */
+/*! \brief
+ * Returns display name for the currently running program.
+ */
+const char *output_env_get_program_display_name(const output_env_t oenv);
#ifdef __cplusplus
}
the default time value a gmx_boolean view that is set to TRUE when the
user requests direct viewing of graphs,
the graph formatting type, the verbosity, and debug level */
+
+/*! \brief
+ * Returns gmx::ProgramContextInterface from an output_env structure.
+ */
+const gmx::ProgramContextInterface &
+output_env_get_program_context(const output_env_t oenv);
+
#endif
#endif
#endif
#include "typedefs.h"
-#include "copyrite.h"
+#include "oenv.h"
#include "force.h"
#include "mdrun.h"
#include "md_logging.h"
"but %s was not started through mpirun/mpiexec or only one rank was requested through mpirun/mpiexec"
#endif
#endif
- , ShortProgram()
+ , output_env_get_program_display_name(oenv)
);
}