aboutsummaryrefslogtreecommitdiff
path: root/Carpet/CarpetIOScalar
diff options
context:
space:
mode:
authorErik Schnetter <schnetter@cct.lsu.edu>2008-02-19 05:19:00 +0000
committerErik Schnetter <schnetter@cct.lsu.edu>2008-02-19 05:19:00 +0000
commita342204d2573e30f50a8c4e8158869ec169830a2 (patch)
tree904548323dae33b4d18405e71b50bf88dc40e7ac /Carpet/CarpetIOScalar
parent8367fa55237b3d925af7e64f2c0ad7296c6f680c (diff)
CarpetIOScalar: Output Formaline's unique run id
darcs-hash:20080219051947-dae7b-1357a272cb65d39c3f5932803e3140dbbbaabe4d.gz
Diffstat (limited to 'Carpet/CarpetIOScalar')
-rw-r--r--Carpet/CarpetIOScalar/interface.ccl6
-rw-r--r--Carpet/CarpetIOScalar/src/ioscalar.cc5
2 files changed, 11 insertions, 0 deletions
diff --git a/Carpet/CarpetIOScalar/interface.ccl b/Carpet/CarpetIOScalar/interface.ccl
index 15ac97758..1febe145c 100644
--- a/Carpet/CarpetIOScalar/interface.ccl
+++ b/Carpet/CarpetIOScalar/interface.ccl
@@ -29,3 +29,9 @@ USES FUNCTION UniqueBuildID
CCTK_POINTER_TO_CONST \
FUNCTION UniqueSimulationID (CCTK_POINTER_TO_CONST IN cctkGH)
USES FUNCTION UniqueSimulationID
+
+# Return a pointer to an unmodifiable C string
+# which contains a unique ID for this run
+CCTK_POINTER_TO_CONST \
+FUNCTION UniqueRunID (CCTK_POINTER_TO_CONST IN cctkGH)
+USES FUNCTION UniqueRunID
diff --git a/Carpet/CarpetIOScalar/src/ioscalar.cc b/Carpet/CarpetIOScalar/src/ioscalar.cc
index bf5a113ab..d637b1f66 100644
--- a/Carpet/CarpetIOScalar/src/ioscalar.cc
+++ b/Carpet/CarpetIOScalar/src/ioscalar.cc
@@ -339,6 +339,11 @@ namespace CarpetIOScalar {
= static_cast<char const *> (UniqueSimulationID (cctkGH));
file << "# Simulation ID: " << job_id << eol;
}
+ if (CCTK_IsFunctionAliased ("UniqueRunID")) {
+ char const * const job_id
+ = static_cast<char const *> (UniqueRunID (cctkGH));
+ file << "# Run ID: " << job_id << eol;
+ }
}
file << "#" << eol;
if (want_labels) {