minimum dune version required is now 2.7

This commit is contained in:
Arne Morten Kvarving
2023-02-27 09:39:25 +01:00
parent 5309ba22f7
commit f2983ac6af
29 changed files with 14 additions and 204 deletions

View File

@@ -29,14 +29,8 @@
#error "This file needs to compiled with MPI support!"
#endif
#include <dune/common/version.hh>
#if DUNE_VERSION_NEWER(DUNE_COMMON, 2, 7)
#include <dune/common/parallel/mpicommunication.hh>
#include <dune/common/parallel/communication.hh>
#else
#include <dune/common/parallel/mpicollectivecommunication.hh>
#include <dune/common/parallel/collectivecommunication.hh>
#endif
#include <dune/common/parallel/indexset.hh>
#include <dune/common/parallel/communicator.hh>

View File

@@ -144,11 +144,7 @@
template<class T>
std::tuple<T,int,int> PackUnpack(T& in)
{
#if DUNE_VERSION_NEWER(DUNE_COMMON, 2, 7)
const auto& comm = Dune::MPIHelper::getCommunication();
#else
const auto& comm = Dune::MPIHelper::getCollectiveCommunication();
#endif
Opm::EclMpiSerializer ser(comm);
ser.pack(in);

View File

@@ -31,12 +31,7 @@
#include <dune/common/unused.hh>
#include <dune/common/parallel/indexset.hh>
#include <dune/common/parallel/plocalindex.hh>
#include <dune/common/version.hh>
#if DUNE_VERSION_NEWER(DUNE_COMMON, 2, 7)
#include <dune/common/parallel/communication.hh>
#else
#include <dune/common/parallel/collectivecommunication.hh>
#endif
#include <dune/istl/bcrsmatrix.hh>
#include <dune/istl/owneroverlapcopy.hh>
#include <dune/istl/schwarz.hh>
@@ -277,11 +272,7 @@ void runBlackoilAmgLaplace()
typedef Dune::OwnerOverlapCopyCommunication<GlobalId> Communication;
typedef Dune::OverlappingSchwarzOperator<BCRSMat,Vector,Vector,Communication> Operator;
#if DUNE_VERSION_NEWER(DUNE_COMMON, 2, 7)
const auto& ccomm = Dune::MPIHelper::getCommunication();
#else
const auto& ccomm = Dune::MPIHelper::getCollectiveCommunication();
#endif
Communication comm(ccomm);
int n=0;

View File

@@ -58,11 +58,7 @@ init_unit_test_func()
BOOST_AUTO_TEST_CASE(BroadCast)
{
#if DUNE_VERSION_NEWER(DUNE_COMMON, 2, 7)
const auto& cc = Dune::MPIHelper::getCommunication();
#else
const auto& cc = Dune::MPIHelper::getCollectiveCommunication();
#endif
std::vector<double> d(3);
if (cc.rank() == 1)

View File

@@ -5,7 +5,6 @@
#include <boost/test/unit_test.hpp>
#include <boost/version.hpp>
#include <dune/common/version.hh>
#include <dune/common/fvector.hh>
#include <dune/istl/bcrsmatrix.hh>
#include <dune/istl/matrixmarket.hh>
@@ -14,11 +13,7 @@
BOOST_AUTO_TEST_CASE(testcsrtocscoffsetmap){
#if DUNE_VERSION_NEWER(DUNE_ISTL, 2, 7)
using Matrix = Dune::BCRSMatrix<double>;
#else
using Matrix = Dune::BCRSMatrix<Dune::FieldMatrix<double,1,1>>;
#endif
Matrix matrix;
{

View File

@@ -25,7 +25,6 @@
#include <boost/test/unit_test.hpp>
#include <dune/common/version.hh>
#include <opm/simulators/utils/gatherDeferredLogger.hpp>
#include <dune/common/parallel/mpihelper.hh>
@@ -81,11 +80,7 @@ void initLogger(std::ostringstream& log_stream) {
BOOST_AUTO_TEST_CASE(NoMessages)
{
#if DUNE_VERSION_NEWER(DUNE_COMMON, 2, 7)
const auto& cc = Dune::MPIHelper::getCommunication();
#else
const auto& cc = Dune::MPIHelper::getCollectiveCommunication();
#endif
std::ostringstream log_stream;
initLogger(log_stream);
@@ -107,11 +102,7 @@ BOOST_AUTO_TEST_CASE(NoMessages)
BOOST_AUTO_TEST_CASE(VariableNumberOfMessages)
{
#if DUNE_VERSION_NEWER(DUNE_COMMON, 2, 7)
const auto& cc = Dune::MPIHelper::getCommunication();
#else
const auto& cc = Dune::MPIHelper::getCollectiveCommunication();
#endif
std::ostringstream log_stream;
initLogger(log_stream);
@@ -149,11 +140,7 @@ BOOST_AUTO_TEST_CASE(VariableNumberOfMessages)
BOOST_AUTO_TEST_CASE(AllHaveOneMessage)
{
#if DUNE_VERSION_NEWER(DUNE_COMMON, 2, 7)
const auto& cc = Dune::MPIHelper::getCommunication();
#else
const auto& cc = Dune::MPIHelper::getCollectiveCommunication();
#endif
std::ostringstream log_stream;
initLogger(log_stream);

View File

@@ -7,6 +7,7 @@
#include<dune/istl/bcrsmatrix.hh>
#include<dune/istl/bvector.hh>
#include<dune/common/version.hh>
#include<dune/common/fmatrix.hh>
#include<dune/common/fvector.hh>
#include<opm/simulators/linalg/ParallelOverlappingILU0.hpp>

View File

@@ -103,11 +103,7 @@ struct GlobalFixture {
Dune::MPIHelper::instance(argcDummy, argvDummy);
#endif
#if DUNE_VERSION_NEWER(DUNE_COMMON, 2, 7)
Opm::FlowMainEbos<Opm::Properties::TTag::EclFlowProblem>::setupParameters_(argcDummy, argvDummy, Dune::MPIHelper::getCommunication());
#else
Opm::FlowMainEbos<Opm::Properties::TTag::EclFlowProblem>::setupParameters_(argcDummy, argvDummy, Dune::MPIHelper::getCollectiveCommunication());
#endif
}
};