make it possible to disable the terminal output

the well model and (probably) the ECL output writing code look like
they cannot be gagged.
This commit is contained in:
Andreas Lauser 2018-06-21 12:14:17 +02:00
parent b5cddef928
commit 394790475f
2 changed files with 10 additions and 6 deletions

View File

@ -102,8 +102,6 @@ int main(int argc, char** argv)
int mpiRank = mpiHelper.rank();
#endif
const bool outputCout = (mpiRank == 0);
// we always want to use the default locale, and thus spare us the trouble
// with incorrect locale settings.
Opm::resetLocale();
@ -119,6 +117,10 @@ int main(int argc, char** argv)
if (status != 0)
return status;
bool outputCout = false;
if (mpiRank == 0)
outputCout = EWOMS_GET_PARAM(PreTypeTag, bool, FlowEnableTerminalOutput);
std::string deckFilename = EWOMS_GET_PARAM(PreTypeTag, std::string, EclDeckFileName);
typedef typename GET_PROP_TYPE(PreTypeTag, Vanguard) PreVanguard;
deckFilename = PreVanguard::canonicalDeckPath(deckFilename).string();

View File

@ -136,9 +136,9 @@ namespace Opm
return status;
setupParallelism_();
setupOutput_();
printStartupMessage_();
setupEbosSimulator_();
setupOutput_();
setupLogging_();
printPRTHeader_();
runDiagnostics_();
@ -185,8 +185,6 @@ namespace Opm
mpiRank_ = 0;
mpiSize_ = 1;
#endif
outputCout_ = (mpiRank_ == 0);
}
// Print startup message if on output rank.
@ -236,7 +234,11 @@ namespace Opm
<< std::endl;
}
outputToFiles_ = outputCout_ && (outputMode_ != OutputModeNone);
outputCout_ = false;
if (mpiRank_ == 0) {
outputCout_ = EWOMS_GET_PARAM(TypeTag, bool, FlowEnableTerminalOutput);
outputToFiles_ = (outputMode_ != OutputModeNone);
}
}
// Setup the OpmLog backends