diff options
author | Erik Schnetter <schnetter@cct.lsu.edu> | 2008-02-19 05:17:00 +0000 |
---|---|---|
committer | Erik Schnetter <schnetter@cct.lsu.edu> | 2008-02-19 05:17:00 +0000 |
commit | 3c473ca1cfa2047147533e53b1b2083ea9ba407d (patch) | |
tree | 6f7260bfb535550b82076a92063c574091792946 /Carpet/CarpetIOASCII | |
parent | 90b450b5c09240d5e3b323ddd37ffabf9c3ab620 (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.ccl | 6 | ||||
-rw-r--r-- | Carpet/CarpetIOASCII/src/ioascii.cc | 5 |
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) { |