diff options
author | Roland Haas <roland.haas@physics.gatech.edu> | 2012-08-01 11:43:12 -0700 |
---|---|---|
committer | Roland Haas <roland.haas@physics.gatech.edu> | 2012-08-01 11:43:12 -0700 |
commit | a54c76a4a07b2c28cdca4dd3767abab334257f8f (patch) | |
tree | 828e032e2fab350f718668679f1f5cd8efa4aeeb | |
parent | c85f9d8262cbdb84e2f16cb391ac1d9a57ec0823 (diff) |
CarpetIOHDF5: do not re-parse files for patches when using
open_one_input_file_at_a_time
-rw-r--r-- | Carpet/CarpetIOHDF5/src/Input.cc | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/Carpet/CarpetIOHDF5/src/Input.cc b/Carpet/CarpetIOHDF5/src/Input.cc index f8f16a83d..c8c657964 100644 --- a/Carpet/CarpetIOHDF5/src/Input.cc +++ b/Carpet/CarpetIOHDF5/src/Input.cc @@ -550,8 +550,10 @@ int Recover (cGH* cctkGH, const char *basefilename, int called_from) in_recovery ? "checkpoint" : "input", file.filename); } - // browse through all datasets contained in this file - HDF5_ERROR (H5Giterate (file.file, "/", NULL, BrowseDatasets, &file)); + if (file.patches.size() == 0) { + // browse through all datasets contained in this file + HDF5_ERROR (H5Giterate (file.file, "/", NULL, BrowseDatasets, &file)); + } } assert (file.patches.size() > 0); if (myGH->recovery_filename_list and not myGH->recovery_filename_list[i]) { @@ -659,7 +661,6 @@ int Recover (cGH* cctkGH, const char *basefilename, int called_from) if (open_one_input_file_at_a_time) { HDF5_ERROR (H5Fclose (file.file)); file.file = -1; - file.patches.clear(); free(file.filename); file.filename = NULL; } |