aboutsummaryrefslogtreecommitdiff
path: root/CarpetDev/CarpetIOF5/src/timestep.cc
diff options
context:
space:
mode:
Diffstat (limited to 'CarpetDev/CarpetIOF5/src/timestep.cc')
-rw-r--r--CarpetDev/CarpetIOF5/src/timestep.cc8
1 files changed, 8 insertions, 0 deletions
diff --git a/CarpetDev/CarpetIOF5/src/timestep.cc b/CarpetDev/CarpetIOF5/src/timestep.cc
index a5ad7b0f9..37d37cd20 100644
--- a/CarpetDev/CarpetIOF5/src/timestep.cc
+++ b/CarpetDev/CarpetIOF5/src/timestep.cc
@@ -7,6 +7,7 @@
#include <hdf5.h>
#include "cctk.h"
+#include "cctk_Functions.h"
#include "timestep.hh"
#include "utils.hh"
@@ -50,6 +51,13 @@ namespace CarpetIOF5 {
assert (m_hdf5_timestep >= 0);
write_or_check_attribute (m_hdf5_timestep, "time", time);
+ if (CCTK_IsFunctionAliased ("UniqueSimulationID")) {
+ cGH const * const cctkGH = get_file().get_cctkGH();
+ char const * const job_id
+ = static_cast<char const *> (UniqueSimulationID (cctkGH));
+ write_or_check_attribute (m_hdf5_timestep, "simulation id", job_id);
+ }
+
assert (invariant());
}