diff options
author | Erik Schnetter <schnetter@cct.lsu.edu> | 2009-11-08 14:45:25 -0600 |
---|---|---|
committer | Barry Wardell <barry.wardell@gmail.com> | 2011-12-14 16:45:13 +0000 |
commit | 386c2e7ed1d0a5044479b8036b5cbcf4b35d4f54 (patch) | |
tree | 6ecf427c6c55763e97e771ed3061b289d38846c0 | |
parent | bda7fa3c16d9d74f24d4b03cc10d7cf429fce324 (diff) |
CarpetIOHDF5: Output a warning if multiple input files need to be read
Output a warning message if multiple input files need to be read from
one MPI process, since this is usually very slow. When reading files
from the same number of processes that wrote them, each process is
only supposed to need to open one file.
-rw-r--r-- | Carpet/CarpetIOHDF5/src/Input.cc | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/Carpet/CarpetIOHDF5/src/Input.cc b/Carpet/CarpetIOHDF5/src/Input.cc index c89cb652e..cc3358840 100644 --- a/Carpet/CarpetIOHDF5/src/Input.cc +++ b/Carpet/CarpetIOHDF5/src/Input.cc @@ -1,4 +1,5 @@ #include <cassert> +#include <cstdlib> #include <cstring> #include <list> #include <sstream> @@ -556,6 +557,13 @@ int Recover (cGH* cctkGH, const char *basefilename, int called_from) for (unsigned int tl = 0; tl < read_completely[vindex].size(); tl++) { all_done &= read_completely[vindex][tl]; + if (not read_completely[vindex][tl]) { + char * const fullname = CCTK_FullName (vindex); + CCTK_VWarn (1, __LINE__, __FILE__, CCTK_THORNSTRING, + "Variable %s on rl %d and tl %d not read completely. Will have to look for it in other files", + fullname, reflevel, tl); + free (fullname); + } } } if (all_done) { @@ -773,6 +781,7 @@ static list<fileset_t>::iterator OpenFileSet (const cGH* const cctkGH, // read all the metadata information ReadMetadata (fileset, file.file); + // first try to open a chunked file written on this processor // browse through all datasets contained in this file HDF5_ERROR (H5Giterate (file.file, "/", NULL, BrowseDatasets, &file)); assert (file.patches.size() > 0); |