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:
Arne Morten Kvarving
2016-04-25 11:16:08 +02:00
parent a4a9da0713
commit 18fc69ad4a

View File

@@ -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{};