diff options
author | Erik Schnetter <schnetter@cct.lsu.edu> | 2005-11-19 21:30:00 +0000 |
---|---|---|
committer | Erik Schnetter <schnetter@cct.lsu.edu> | 2005-11-19 21:30:00 +0000 |
commit | faf30568e71db786158020927e94aaf47feea259 (patch) | |
tree | ca33858a379e39dee234055cdd2508c5da01c033 /Carpet/CarpetIOScalar | |
parent | da56c7f4f6c25392d9ccd9443d01171f7c8bbf0f (diff) |
CarpetIOScalar: Put unique build ID into output files
darcs-hash:20051119213026-dae7b-0895743e18a6601b19fe25f54c38524cac0a4d85.gz
Diffstat (limited to 'Carpet/CarpetIOScalar')
-rw-r--r-- | Carpet/CarpetIOScalar/interface.ccl | 6 | ||||
-rw-r--r-- | Carpet/CarpetIOScalar/src/ioscalar.cc | 5 |
2 files changed, 11 insertions, 0 deletions
diff --git a/Carpet/CarpetIOScalar/interface.ccl b/Carpet/CarpetIOScalar/interface.ccl index f7d451c04..de08e9614 100644 --- a/Carpet/CarpetIOScalar/interface.ccl +++ b/Carpet/CarpetIOScalar/interface.ccl @@ -17,6 +17,12 @@ REQUIRES FUNCTION IO_TruncateOutputFiles # Return a pointer to an unmodifiable C string +# which contains a unique ID for this build +CCTK_POINTER_TO_CONST \ +FUNCTION UniqueBuildID (CCTK_POINTER_TO_CONST IN cctkGH) +USES FUNCTION UniqueBuildID + +# Return a pointer to an unmodifiable C string # which contains a unique ID for this simulation CCTK_POINTER_TO_CONST \ FUNCTION UniqueSimulationID (CCTK_POINTER_TO_CONST IN cctkGH) diff --git a/Carpet/CarpetIOScalar/src/ioscalar.cc b/Carpet/CarpetIOScalar/src/ioscalar.cc index 9f1cd5470..efaa49e0f 100644 --- a/Carpet/CarpetIOScalar/src/ioscalar.cc +++ b/Carpet/CarpetIOScalar/src/ioscalar.cc @@ -316,6 +316,11 @@ namespace CarpetIOScalar { file << "# parameter filename: \"" << parameter_filename << "\"" << endl; } if (want_other) { + if (CCTK_IsFunctionAliased ("UniqueBuildID")) { + char const * const build_id + = (char const *) UniqueBuildID (cctkGH); + file << "# Build ID: " << build_id << endl; + } if (CCTK_IsFunctionAliased ("UniqueSimulationID")) { char const * const job_id = static_cast<char const *> (UniqueSimulationID (cctkGH)); |