mirror of
https://github.com/OPM/opm-simulators.git
synced 2024-12-26 17:20:59 -06:00
Let only one rank write to step_timing.txt
All ranks were still writing to step_timing.txt at the same time. This made it unusable for parallel runs. With this commit only one processes writes to this file.
This commit is contained in:
parent
cdf7f3cc0d
commit
a7cc4962e2
@ -306,7 +306,11 @@ namespace Opm
|
||||
step_report.total_newton_iterations = solver->nonlinearIterations();
|
||||
step_report.total_linear_iterations = solver->linearIterations();
|
||||
step_report.total_linearizations = solver->linearizations();
|
||||
step_report.reportParam(tstep_os);
|
||||
|
||||
if ( output_writer_.isIORank() )
|
||||
{
|
||||
step_report.reportParam(tstep_os);
|
||||
}
|
||||
}
|
||||
|
||||
// Increment timer, remember well state.
|
||||
|
@ -273,6 +273,12 @@ namespace Opm
|
||||
/** \brief return true if output is enabled */
|
||||
bool output () const { return output_; }
|
||||
|
||||
/** \brief Whether this process does write to disk */
|
||||
bool isIORank () const
|
||||
{
|
||||
parallelOutput_->isIORank();
|
||||
}
|
||||
|
||||
void restore(SimulatorTimerInterface& timer,
|
||||
BlackoilState& state,
|
||||
WellStateFullyImplicitBlackoil& wellState,
|
||||
|
Loading…
Reference in New Issue
Block a user