added: check command line parameters when doing a .OPMRST restart

compare command line used to create .OPMRST differ
to current run and warn if they differ. safety net to avoid
misunderstandings
This commit is contained in:
Arne Morten Kvarving
2023-04-25 15:08:49 +02:00
parent 1003bf7735
commit c61639251f
2 changed files with 81 additions and 0 deletions

View File

@@ -135,6 +135,8 @@ void outputReportStep(const SimulatorTimer& timer);
void outputTimestampFIP(const SimulatorTimer& timer,
const std::string& title,
const std::string& version);
void checkSerializedCmdLine(const std::string& current,
const std::string& stored);
/// a simulator for the blackoil model
template<class TypeTag>
@@ -665,6 +667,12 @@ protected:
}
}
if (EclGenericVanguard::comm().rank() == 0) {
std::ostringstream str;
Parameters::printValues<TypeTag>(str);
checkSerializedCmdLine(str.str(), strings[4]);
}
OPM_END_PARALLEL_TRY_CATCH("Error loading serialized state: ",
EclGenericVanguard::comm());
#endif