Merge pull request #2017 from atgeirr/fix-abort-unknown-param

Abort the run before reading the deck if there are unknown params.
This commit is contained in:
Joakim Hove
2019-09-23 22:10:17 +02:00
committed by GitHub
2 changed files with 41 additions and 42 deletions

View File

@@ -278,11 +278,15 @@ int main(int argc, char** argv)
PreProblem::setBriefDescription("Flow, an advanced reservoir simulator for ECL-decks provided by the Open Porous Media project.");
int status = Opm::FlowMainEbos<PreTypeTag>::setupParameters_(argc, argv);
if (status != 0)
if (status != 0) {
// if setupParameters_ returns a value smaller than 0, there was no error, but
// the program should abort. This is the case e.g. for the --help and the
// --print-properties parameters.
#if HAVE_MPI
MPI_Finalize();
#endif
return (status >= 0)?status:0;
}
FileOutputMode outputMode = FileOutputMode::OUTPUT_NONE;
bool outputCout = false;