mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
Merge pull request #2119 from blattms/fix-multiple-usage-printing-parallel
Only print usage information on one processes.
This commit is contained in:
commit
cab0724a26
@ -329,8 +329,14 @@ int mainFlow(int argc, char** argv)
|
|||||||
deckFilename = PreVanguard::canonicalDeckPath(deckFilename).string();
|
deckFilename = PreVanguard::canonicalDeckPath(deckFilename).string();
|
||||||
}
|
}
|
||||||
catch (const std::exception& e) {
|
catch (const std::exception& e) {
|
||||||
Opm::Parameters::printUsage<PreTypeTag>(PreProblem::helpPreamble(argc, const_cast<const char**>(argv)),
|
if (mpiRank == 0)
|
||||||
e.what());
|
{
|
||||||
|
Opm::Parameters::printUsage<PreTypeTag>(PreProblem::helpPreamble(argc, const_cast<const char**>(argv)),
|
||||||
|
e.what());
|
||||||
|
}
|
||||||
|
#if HAVE_MPI
|
||||||
|
MPI_Finalize();
|
||||||
|
#endif
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -142,15 +142,15 @@ namespace Opm
|
|||||||
|
|
||||||
EWOMS_END_PARAM_REGISTRATION(TypeTag);
|
EWOMS_END_PARAM_REGISTRATION(TypeTag);
|
||||||
|
|
||||||
// read in the command line parameters
|
int mpiRank = 0;
|
||||||
int status = Opm::setupParameters_<TypeTag>(argc, const_cast<const char**>(argv), /*doRegistration=*/false, /*allowUnused=*/true, /*handleHelp=*/true);
|
|
||||||
if (status == 0) {
|
|
||||||
|
|
||||||
int mpiRank = 0;
|
|
||||||
#if HAVE_MPI
|
#if HAVE_MPI
|
||||||
MPI_Comm_rank(MPI_COMM_WORLD, &mpiRank);
|
MPI_Comm_rank(MPI_COMM_WORLD, &mpiRank);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
// read in the command line parameters
|
||||||
|
int status = Opm::setupParameters_<TypeTag>(argc, const_cast<const char**>(argv), /*doRegistration=*/false, /*allowUnused=*/true, /*handleHelp=*/(mpiRank==0));
|
||||||
|
if (status == 0) {
|
||||||
|
|
||||||
// deal with unknown parameters.
|
// deal with unknown parameters.
|
||||||
|
|
||||||
int unknownKeyWords = 0;
|
int unknownKeyWords = 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user