[bugfix][AsyncOutput] Restore asynchronicity for output and make sure

that all output is written before the simulator is finalized.
This commit is contained in:
Robert Kloefkorn 2020-02-07 14:37:02 +01:00
parent e04bb6e91a
commit 526f1f9bb1
2 changed files with 15 additions and 0 deletions

View File

@ -1056,6 +1056,12 @@ public:
eclWriter_->writeOutput(isSubStep);
}
void finalizeOutput() {
// this will write all pending output to disk
// to avoid corruption of output files
eclWriter_.reset();
}
void applyActions(int reportStep,
double sim_time,

View File

@ -277,6 +277,15 @@ public:
}
// make sure all output is written to disk before run is finished
{
Dune::Timer finalOutputTimer;
finalOutputTimer.start();
ebosSimulator_.problem().finalizeOutput();
report.output_write_time += finalOutputTimer.stop();
}
// Stop timer and create timing report
totalTimer.stop();
report.total_time = totalTimer.secsSinceStart();