diff --git a/opm/core/linalg/ParallelIstlInformation.hpp b/opm/core/linalg/ParallelIstlInformation.hpp index 03c873334..770411b55 100644 --- a/opm/core/linalg/ParallelIstlInformation.hpp +++ b/opm/core/linalg/ParallelIstlInformation.hpp @@ -28,11 +28,14 @@ #include #if HAVE_MPI && HAVE_DUNE_ISTL -#include "mpi.h" +#include + +#include #include #include #include #include +#include #include #include diff --git a/tests/DuneIstlTestHelpers.hpp b/tests/DuneIstlTestHelpers.hpp index 9335853da..6563fe34b 100644 --- a/tests/DuneIstlTestHelpers.hpp +++ b/tests/DuneIstlTestHelpers.hpp @@ -26,6 +26,8 @@ #error "This file needs to compiled with MPI support!" #endif +#include + #include #if DUNE_VERSION_NEWER(DUNE_COMMON, 2, 3) #include @@ -40,6 +42,8 @@ #include #include +#include + #include struct MPIFixture { diff --git a/tests/test_parallelistlinformation.cpp b/tests/test_parallelistlinformation.cpp index 762dad4e3..6066aceb5 100644 --- a/tests/test_parallelistlinformation.cpp +++ b/tests/test_parallelistlinformation.cpp @@ -48,8 +48,8 @@ void runSumMaxMinTest(const T offset) auto mat = create1DLaplacian(*comm.indexSet(), N, start, end, istart, iend); std::vector x(end-start); assert(comm.indexSet()->size()==x.size()); - for(auto i=comm.indexSet()->begin(), iend=comm.indexSet()->end(); i!=iend; ++i) - x[i->local()]=i->global()+offset; + for(auto it=comm.indexSet()->begin(), itend=comm.indexSet()->end(); it!=itend; ++it) + x[it->local()]=it->global()+offset; auto containers = std::make_tuple(x, x, x, x); auto operators = std::make_tuple(Opm::Reduction::makeGlobalSumFunctor(), Opm::Reduction::makeGlobalMaxFunctor(), @@ -94,8 +94,8 @@ BOOST_AUTO_TEST_CASE(singleContainerReductionTest) auto mat = create1DLaplacian(*comm.indexSet(), N, start, end, istart, iend); std::vector x(end-start); assert(comm.indexSet()->size()==x.size()); - for(auto i=comm.indexSet()->begin(), iend=comm.indexSet()->end(); i!=iend; ++i) - x[i->local()]=i->global(); + for(auto it=comm.indexSet()->begin(), itend=comm.indexSet()->end(); it!=itend; ++it) + x[it->local()]=it->global(); int value = 1; int oldvalue = value; comm.computeReduction(x,Opm::Reduction::makeGlobalSumFunctor(),value);