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:
Markus Blatt 2016-10-14 11:14:54 +02:00
parent cdf7f3cc0d
commit a7cc4962e2
2 changed files with 11 additions and 1 deletions

View File

@ -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.

View File

@ -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,