mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
[bugfix][AsyncOutput] Restore asynchronicity for output and make sure
that all output is written before the simulator is finalized.
This commit is contained in:
parent
e04bb6e91a
commit
526f1f9bb1
@ -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,
|
||||
|
@ -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();
|
||||
|
Loading…
Reference in New Issue
Block a user