diff options
author | Roland Haas <roland.haas@physics.gatech.edu> | 2012-08-01 11:43:12 -0700 |
---|---|---|
committer | Barry Wardell <barry.wardell@gmail.com> | 2012-09-11 18:23:31 +0100 |
commit | 4abdb582f5d64a83982548888a2b39fc3d7e0134 (patch) | |
tree | 501ad1cb6462e045291848eac4803c9f17b96ef0 | |
parent | 1cbe97c00dad3c408d613b8953956d8cd41c523d (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; } |