mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -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
|
// serial output is only done on I/O rank
|
||||||
if( isIORank )
|
if( isIORank )
|
||||||
{
|
{
|
||||||
// spawn write thread that calls eclWriter.writeTimeStepSerial
|
if( asyncOutput_ ) {
|
||||||
WriterCall call( *this, timer, state, wellState, substep );
|
// spawn write thread that calls eclWriter.writeTimeStepSerial
|
||||||
std::async( std::move( call ) );
|
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< OutputWriter > matlabWriter_;
|
||||||
std::unique_ptr< EclipseWriter > eclWriter_;
|
std::unique_ptr< EclipseWriter > eclWriter_;
|
||||||
EclipseStateConstPtr eclipseState_;
|
EclipseStateConstPtr eclipseState_;
|
||||||
|
const bool asyncOutput_ ;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@ -293,7 +294,8 @@ namespace Opm
|
|||||||
parallelOutput_->numCells(),
|
parallelOutput_->numCells(),
|
||||||
parallelOutput_->globalCell() )
|
parallelOutput_->globalCell() )
|
||||||
: 0 ),
|
: 0 ),
|
||||||
eclipseState_(eclipseState)
|
eclipseState_(eclipseState),
|
||||||
|
asyncOutput_( output_ ? param.getDefault("async_output", bool( false ) ) : false )
|
||||||
{
|
{
|
||||||
// For output.
|
// For output.
|
||||||
if (output_ && parallelOutput_->isIORank() ) {
|
if (output_ && parallelOutput_->isIORank() ) {
|
||||||
|
Loading…
Reference in New Issue
Block a user