mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
Prevent multiple *.?.dbg/prt files in production crashed parallel runs.
There was a fallout when skipping concating these files to the default ones (PR #1708). We should also have deactivated creating these files at all. As a result these files appeared in all parallel runs that were aborted. This change now prevents creating and logging to these files in parallel in a default run (--enable-parallel-logging-fallout-warning=false). Developers can still activate logging and concating to see whether everything is only logged on the io process by passing --enable-parallel-logging-fallout-warning=true. Closes 3725
This commit is contained in:
@@ -343,7 +343,8 @@ Opm::setupLogging(const int mpi_rank_,
|
||||
const std::string& cmdline_output_dir,
|
||||
const std::string& cmdline_output,
|
||||
const bool output_cout_,
|
||||
const std::string& stdout_log_id)
|
||||
const std::string& stdout_log_id,
|
||||
const bool allRanksDbgLog)
|
||||
{
|
||||
if (!cmdline_output_dir.empty()) {
|
||||
ensureOutputDirExists_(cmdline_output_dir);
|
||||
@@ -402,6 +403,10 @@ Opm::setupLogging(const int mpi_rank_,
|
||||
std::cerr << "Value " << cmdline_output
|
||||
<< " is not a recognized output mode. Using \"all\" instead.\n";
|
||||
}
|
||||
if (!allRanksDbgLog && mpi_rank_ != 0)
|
||||
{
|
||||
output = FileOutputMode::OUTPUT_NONE;
|
||||
}
|
||||
}
|
||||
|
||||
if (output > FileOutputMode::OUTPUT_NONE) {
|
||||
|
||||
@@ -64,7 +64,8 @@ setupLogging(int mpi_rank_,
|
||||
const std::string& cmdline_output_dir,
|
||||
const std::string& cmdline_output,
|
||||
bool output_cout_,
|
||||
const std::string& stdout_log_id);
|
||||
const std::string& stdout_log_id,
|
||||
const bool allRanksDbgLog);
|
||||
|
||||
/// \brief Reads the deck and creates all necessary objects if needed
|
||||
///
|
||||
|
||||
Reference in New Issue
Block a user