diff options
-rw-r--r-- | CarpetDev/CarpetIOF5/src/iof5.cc | 2 | ||||
-rw-r--r-- | CarpetDev/CarpetIOF5/src/output.cc | 4 |
2 files changed, 4 insertions, 2 deletions
diff --git a/CarpetDev/CarpetIOF5/src/iof5.cc b/CarpetDev/CarpetIOF5/src/iof5.cc index 0782a84aa..15ebbe273 100644 --- a/CarpetDev/CarpetIOF5/src/iof5.cc +++ b/CarpetDev/CarpetIOF5/src/iof5.cc @@ -311,6 +311,8 @@ namespace CarpetIOF5 { vector<bool> output_var(CCTK_NumVars()); output_var.at(vindex) = true; + // NOTE: We should output metadata at most once per iteration, + // probably only once per restart (per file) output(cctkGH, open_file, output_var, false, true); // Close file diff --git a/CarpetDev/CarpetIOF5/src/output.cc b/CarpetDev/CarpetIOF5/src/output.cc index d7c2f4649..a362141a8 100644 --- a/CarpetDev/CarpetIOF5/src/output.cc +++ b/CarpetDev/CarpetIOF5/src/output.cc @@ -862,14 +862,14 @@ namespace CarpetIOF5 { - CCTK_INFO("Writing simulation metadata..."); - // Create metadata only once // TODO: instead, overwrite the metadata htri_t const exists = H5Lexists(file, metadata_group, H5P_DEFAULT); assert(exists >= 0); if (exists) return; + CCTK_INFO("Writing simulation metadata..."); + // Create a group to hold all metadata hid_t const group = H5Gcreate(file, metadata_group, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); |