diff options
Diffstat (limited to 'Carpet/CarpetIOHDF5/src/Input.cc')
-rw-r--r-- | Carpet/CarpetIOHDF5/src/Input.cc | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/Carpet/CarpetIOHDF5/src/Input.cc b/Carpet/CarpetIOHDF5/src/Input.cc index 2729565c9..505e92e7b 100644 --- a/Carpet/CarpetIOHDF5/src/Input.cc +++ b/Carpet/CarpetIOHDF5/src/Input.cc @@ -247,6 +247,14 @@ int Recover (cGH* cctkGH, const char *basefilename, int called_from) // loop over all input files of this set for (unsigned int i = 0; i < fileset->files.size(); i++) { + + // some optimisation for the case when recovering on the same number + // of processors as during the checkpoint: + // read only this processor's chunked file, skip all others + if (fileset->nioprocs == dist::size() and i > 0) { + break; + } + const int file_idx = (i + fileset->first_ioproc) % fileset->nioprocs; file_t& file = fileset->files[file_idx]; |