mirror of
https://github.com/OPM/opm-upscaling.git
synced 2025-02-25 18:45:23 -06:00
fixed: instance a MPI helper in gravity pressure test
the #undef HAVE_MPI trick does not work because we are linking against MPI code already compiled in a library.
This commit is contained in:
@@ -31,8 +31,13 @@
|
||||
//
|
||||
#define UNITTEST_TRESPASS_PRIVATE_PROPERTY_DP 1
|
||||
|
||||
// This test fails in an MPI environment.
|
||||
#undef HAVE_MPI
|
||||
#include <dune/common/version.hh>
|
||||
|
||||
#if DUNE_VERSION_NEWER(DUNE_COMMON, 2, 3)
|
||||
#include <dune/common/parallel/mpihelper.hh>
|
||||
#else
|
||||
#include <dune/common/mpihelper.hh>
|
||||
#endif
|
||||
|
||||
#include <opm/upscaling/RelPermUtils.hpp>
|
||||
#undef UNITTEST_TRESPASS_PRIVATE_PROPERTY_DP
|
||||
@@ -404,6 +409,10 @@ PORO
|
||||
// calling tesselateGrid()).
|
||||
const auto mpi_rank = 1;
|
||||
|
||||
int m_argc = boost::unit_test::framework::master_test_suite().argc;
|
||||
char** m_argv = boost::unit_test::framework::master_test_suite().argv;
|
||||
Dune::MPIHelper& mhelper = Dune::MPIHelper::instance(m_argc, m_argv);
|
||||
|
||||
Opm::RelPermUpscaleHelper helper{mpi_rank, options};
|
||||
{
|
||||
auto parse = Opm::Parser{};
|
||||
|
||||
Reference in New Issue
Block a user