mirror of
https://github.com/OPM/opm-simulators.git
synced 2024-11-26 03:00:17 -06:00
SimulatorFullyImplicitOutput: added flag for async output.
This commit is contained in:
parent
29053dc18d
commit
d5c375f297
@ -307,9 +307,15 @@ namespace Opm
|
||||
// serial output is only done on I/O rank
|
||||
if( isIORank )
|
||||
{
|
||||
// spawn write thread that calls eclWriter.writeTimeStepSerial
|
||||
WriterCall call( *this, timer, state, wellState, substep );
|
||||
std::async( std::move( call ) );
|
||||
if( asyncOutput_ ) {
|
||||
// spawn write thread that calls eclWriter.writeTimeStepSerial
|
||||
WriterCall call( *this, timer, state, wellState, substep );
|
||||
std::async( std::move( call ) );
|
||||
}
|
||||
else {
|
||||
// just write the data to disk
|
||||
writeTimeStepSerial( timer, state, wellState, substep );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -261,6 +261,7 @@ namespace Opm
|
||||
std::unique_ptr< OutputWriter > matlabWriter_;
|
||||
std::unique_ptr< EclipseWriter > eclWriter_;
|
||||
EclipseStateConstPtr eclipseState_;
|
||||
const bool asyncOutput_ ;
|
||||
};
|
||||
|
||||
|
||||
@ -293,7 +294,8 @@ namespace Opm
|
||||
parallelOutput_->numCells(),
|
||||
parallelOutput_->globalCell() )
|
||||
: 0 ),
|
||||
eclipseState_(eclipseState)
|
||||
eclipseState_(eclipseState),
|
||||
asyncOutput_( output_ ? param.getDefault("async_output", bool( false ) ) : false )
|
||||
{
|
||||
// For output.
|
||||
if (output_ && parallelOutput_->isIORank() ) {
|
||||
|
Loading…
Reference in New Issue
Block a user