mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-01-16 17:31:58 -06:00
Use global grid only on IO process in EclWriter
This commit is contained in:
parent
bcff77fb4a
commit
4e6bbddbf5
@ -178,12 +178,14 @@ public:
|
|||||||
, collectToIORank_(simulator_.vanguard())
|
, collectToIORank_(simulator_.vanguard())
|
||||||
, eclOutputModule_(simulator, collectToIORank_)
|
, eclOutputModule_(simulator, collectToIORank_)
|
||||||
{
|
{
|
||||||
globalGrid_ = simulator_.vanguard().grid();
|
if (collectToIORank_.isIORank()) {
|
||||||
globalGrid_.switchToGlobalView();
|
globalGrid_ = simulator_.vanguard().grid();
|
||||||
eclIO_.reset(new Opm::EclipseIO(simulator_.vanguard().eclState(),
|
globalGrid_.switchToGlobalView();
|
||||||
Opm::UgGridHelpers::createEclipseGrid(globalGrid_, simulator_.vanguard().eclState().getInputGrid()),
|
eclIO_.reset(new Opm::EclipseIO(simulator_.vanguard().eclState(),
|
||||||
simulator_.vanguard().schedule(),
|
Opm::UgGridHelpers::createEclipseGrid(globalGrid_, simulator_.vanguard().eclState().getInputGrid()),
|
||||||
simulator_.vanguard().summaryConfig()));
|
simulator_.vanguard().schedule(),
|
||||||
|
simulator_.vanguard().summaryConfig()));
|
||||||
|
}
|
||||||
|
|
||||||
// create output thread if enabled and rank is I/O rank
|
// create output thread if enabled and rank is I/O rank
|
||||||
// async output is enabled by default if pthread are enabled
|
// async output is enabled by default if pthread are enabled
|
||||||
@ -198,7 +200,10 @@ public:
|
|||||||
{ }
|
{ }
|
||||||
|
|
||||||
const Opm::EclipseIO& eclIO() const
|
const Opm::EclipseIO& eclIO() const
|
||||||
{ return *eclIO_; }
|
{
|
||||||
|
assert(eclIO_);
|
||||||
|
return *eclIO_;
|
||||||
|
}
|
||||||
|
|
||||||
void writeInit()
|
void writeInit()
|
||||||
{
|
{
|
||||||
@ -239,7 +244,6 @@ public:
|
|||||||
if (reportStepNum == 0)
|
if (reportStepNum == 0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
const auto& summary = eclIO_->summary();
|
|
||||||
Scalar curTime = simulator_.time() + simulator_.timeStepSize();
|
Scalar curTime = simulator_.time() + simulator_.timeStepSize();
|
||||||
Scalar totalCpuTime =
|
Scalar totalCpuTime =
|
||||||
simulator_.executionTimer().realTimeElapsed() +
|
simulator_.executionTimer().realTimeElapsed() +
|
||||||
@ -272,6 +276,7 @@ public:
|
|||||||
|
|
||||||
std::vector<char> buffer;
|
std::vector<char> buffer;
|
||||||
if (collectToIORank_.isIORank()) {
|
if (collectToIORank_.isIORank()) {
|
||||||
|
const auto& summary = eclIO_->summary();
|
||||||
const auto& eclState = simulator_.vanguard().eclState();
|
const auto& eclState = simulator_.vanguard().eclState();
|
||||||
|
|
||||||
// Add TCPU
|
// Add TCPU
|
||||||
|
Loading…
Reference in New Issue
Block a user