mirror of
https://github.com/OPM/opm-simulators.git
synced 2024-12-02 05:49:09 -06:00
Work around MPIGuard which is broken in DUNE 2.7.0
Otherwise compilation aborts with: flow_ebos_gasoil.cpp:(.text+0xa5d0): multiple definition of `Dune::GuardCommunicator::create(ompi_communicator_t* const&)';
This commit is contained in:
parent
d30f6d272b
commit
6e1f729e8d
@ -97,7 +97,6 @@
|
||||
#include <dune/common/version.hh>
|
||||
#include <dune/common/fvector.hh>
|
||||
#include <dune/common/fmatrix.hh>
|
||||
#include <dune/common/parallel/mpiguard.hh>
|
||||
|
||||
#include <opm/output/eclipse/EclipseIO.hpp>
|
||||
|
||||
@ -917,7 +916,28 @@ public:
|
||||
}
|
||||
|
||||
if (enableExperiments)
|
||||
checkDeckCompatibility_();
|
||||
{
|
||||
int success = 1;
|
||||
const auto& cc = simulator.vanguard().grid().comm();
|
||||
|
||||
try
|
||||
{
|
||||
checkDeckCompatibility_();
|
||||
}
|
||||
catch(const std::exception& e)
|
||||
{
|
||||
success = 0;
|
||||
success = cc.min(success);
|
||||
throw;
|
||||
}
|
||||
|
||||
success = cc.min(success);
|
||||
|
||||
if (!success)
|
||||
{
|
||||
throw std::runtime_error("Checking deck compatibility failed");
|
||||
}
|
||||
}
|
||||
|
||||
// write the static output files (EGRID, INIT, SMSPEC, etc.)
|
||||
if (enableEclOutput_)
|
||||
@ -2108,7 +2128,6 @@ private:
|
||||
void checkDeckCompatibility_() const
|
||||
{
|
||||
const auto& comm = this->simulator().gridView().comm();
|
||||
Dune::MPIGuard guard;
|
||||
|
||||
if (comm.rank() == 0)
|
||||
{
|
||||
@ -2164,8 +2183,6 @@ private:
|
||||
throw std::runtime_error("The deck enables water, but this simulator cannot handle it.");
|
||||
// the opposite cases should be fine (albeit a bit slower than what's possible)
|
||||
}
|
||||
// throws an expeption on all processes if rank 0 had a problem
|
||||
guard.finalize();
|
||||
}
|
||||
|
||||
bool drsdtActive_() const
|
||||
|
Loading…
Reference in New Issue
Block a user