From 09881ae7aafaa08c535b8b14258dcae7b62d56d3 Mon Sep 17 00:00:00 2001 From: tradke Date: Mon, 14 Jan 2002 11:48:48 +0000 Subject: Check the IOHDF5::outdir_HDF5 parameter being a format string for processor-specific output directories: if this parameter contains a '%u' format substring it will be subsituted by the actual processor ID. Please regard this feature as experimental for now. It only applies to parallel IO modes (IO::out3d_mode != "onefile"). git-svn-id: http://svn.cactuscode.org/arrangements/CactusPUGHIO/IOHDF5/trunk@83 4825ed28-b72c-4eae-9704-e50c059e567d --- src/Startup.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'src/Startup.c') diff --git a/src/Startup.c b/src/Startup.c index da5703a..405a110 100644 --- a/src/Startup.c +++ b/src/Startup.c @@ -144,7 +144,15 @@ static void *IOHDF5_SetupGH (tFleshConfig *config, If so take this directory otherwise default to "IO::outdir" */ if (CCTK_ParameterQueryTimesSet ("outdir_HDF5", CCTK_THORNSTRING) > 0) { - myGH->outdir = strdup (outdir_HDF5); + if (CCTK_Equals (out3D_mode, "onefile") || ! strstr (outdir_HDF5, "%u")) + { + myGH->outdir = strdup (outdir_HDF5); + } + else + { + myGH->outdir = (char *) malloc (strlen (outdir_HDF5) + 20); + sprintf (myGH->outdir, outdir_HDF5, CCTK_MyProc (GH)); + } } else { -- cgit v1.2.3