aboutsummaryrefslogtreecommitdiff
path: root/Carpet/CarpetIOASCII
diff options
context:
space:
mode:
authorErik Schnetter <schnetter@cct.lsu.edu>2008-02-19 05:17:00 +0000
committerErik Schnetter <schnetter@cct.lsu.edu>2008-02-19 05:17:00 +0000
commit3c473ca1cfa2047147533e53b1b2083ea9ba407d (patch)
tree6f7260bfb535550b82076a92063c574091792946 /Carpet/CarpetIOASCII
parent90b450b5c09240d5e3b323ddd37ffabf9c3ab620 (diff)
CarpetIOASCII: Output Formaline's unique run id
darcs-hash:20080219051736-dae7b-2460a5ac4f4d223dcee7daf48cbf082b8d7bcc3b.gz
Diffstat (limited to 'Carpet/CarpetIOASCII')
-rw-r--r--Carpet/CarpetIOASCII/interface.ccl6
-rw-r--r--Carpet/CarpetIOASCII/src/ioascii.cc5
2 files changed, 11 insertions, 0 deletions
diff --git a/Carpet/CarpetIOASCII/interface.ccl b/Carpet/CarpetIOASCII/interface.ccl
index 36f675c55..5de734da9 100644
--- a/Carpet/CarpetIOASCII/interface.ccl
+++ b/Carpet/CarpetIOASCII/interface.ccl
@@ -53,3 +53,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/CarpetIOASCII/src/ioascii.cc b/Carpet/CarpetIOASCII/src/ioascii.cc
index 99cde41f7..f12b8d62d 100644
--- a/Carpet/CarpetIOASCII/src/ioascii.cc
+++ b/Carpet/CarpetIOASCII/src/ioascii.cc
@@ -751,6 +751,11 @@ namespace CarpetIOASCII {
= (char const *) UniqueSimulationID (cctkGH);
file << "# Simulation ID: " << job_id << eol;
}
+ if (CCTK_IsFunctionAliased ("UniqueRunID")) {
+ char const * const job_id
+ = (char const *) UniqueRunID (cctkGH);
+ file << "# Run ID: " << job_id << eol;
+ }
}
file << "#" << eol;
if (want_labels) {