mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
added: explicitly check that number of processes matches .OPMRST file
while the grid hash check would pick this up as well, it's better to emit an explicit error message
This commit is contained in:
parent
163ea6f0b0
commit
1003bf7735
@ -644,6 +644,17 @@ protected:
|
|||||||
const std::string groupName = "/report_step/" + std::to_string(loadStep_);
|
const std::string groupName = "/report_step/" + std::to_string(loadStep_);
|
||||||
reader.read(timer, groupName, "simulator_timer", HDF5File::DataSetMode::ROOT_ONLY);
|
reader.read(timer, groupName, "simulator_timer", HDF5File::DataSetMode::ROOT_ONLY);
|
||||||
|
|
||||||
|
std::tuple<std::array<std::string,5>,int> header;
|
||||||
|
reader.read(header, "/", "simulator_info", HDF5File::DataSetMode::ROOT_ONLY);
|
||||||
|
const auto& [strings, procs] = header;
|
||||||
|
|
||||||
|
if (EclGenericVanguard::comm().size() != procs) {
|
||||||
|
throw std::runtime_error("Number of processes (procs=" +
|
||||||
|
std::to_string(EclGenericVanguard::comm().size()) +
|
||||||
|
") does not match .OPMRST file (procs=" +
|
||||||
|
std::to_string(procs) + ")");
|
||||||
|
}
|
||||||
|
|
||||||
if (EclGenericVanguard::comm().size() > 1) {
|
if (EclGenericVanguard::comm().size() > 1) {
|
||||||
std::size_t stored_hash;
|
std::size_t stored_hash;
|
||||||
reader.read(stored_hash, "/", "grid_checksum");
|
reader.read(stored_hash, "/", "grid_checksum");
|
||||||
|
Loading…
Reference in New Issue
Block a user