diff --git a/test/porousmediumflow/1p/incompressible/main.cc b/test/porousmediumflow/1p/incompressible/main.cc index 111dc5a7bf4719b40e3eeace8f7e419184d815f8..6c7ab9617520b0def839023894448556f37ceee9 100644 --- a/test/porousmediumflow/1p/incompressible/main.cc +++ b/test/porousmediumflow/1p/incompressible/main.cc @@ -38,6 +38,7 @@ #include <dumux/common/properties.hh> #include <dumux/common/parameters.hh> #include <dumux/common/dumuxmessage.hh> +#include <dumux/common/initialize.hh> #include <dumux/io/vtkoutputmodule.hh> #include <dumux/io/grid/gridmanager.hh> @@ -82,8 +83,12 @@ int main(int argc, char** argv) using TypeTag = Properties::TTag::TYPETAG; - // initialize MPI, finalize is done automatically on exit - const auto& mpiHelper = Dune::MPIHelper::instance(argc, argv); + // initialize Dumux (parallel helpers) + // always call this before any other code + Dumux::initialize(argc, argv); + + // get an instance of the MPI helper + const auto& mpiHelper = Dune::MPIHelper::instance(); // print dumux start message if (mpiHelper.rank() == 0) diff --git a/test/porousmediumflow/3p3c/infiltration/main.cc b/test/porousmediumflow/3p3c/infiltration/main.cc index 6580f1b414dd338aaad9134b21558c510597239a..f2facd1039d19834d9cb611519cfa6aeec6b26ff 100644 --- a/test/porousmediumflow/3p3c/infiltration/main.cc +++ b/test/porousmediumflow/3p3c/infiltration/main.cc @@ -31,6 +31,7 @@ #include <dumux/common/properties.hh> #include <dumux/common/parameters.hh> #include <dumux/common/dumuxmessage.hh> +#include <dumux/common/initialize.hh> #include <dumux/common/timeloop.hh> #include <dumux/linear/amgbackend.hh> @@ -55,8 +56,12 @@ int main(int argc, char** argv) //////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////// - // initialize MPI, finalize is done automatically on exit - const auto& mpiHelper = Dune::MPIHelper::instance(argc, argv); + // initialize Dumux (parallel helpers) + // always call this before any other code + Dumux::initialize(argc, argv); + + // get an instance of the MPI helper + const auto& mpiHelper = Dune::MPIHelper::instance(); // print dumux start message if (mpiHelper.rank() == 0) diff --git a/test/porousmediumflow/richards/lens/main.cc b/test/porousmediumflow/richards/lens/main.cc index 0c0f3aafd7054a12bd51f8c65bfc25c077c9bcbf..cdf033b772dd3b83a88896fdf6b37676305c2a0c 100644 --- a/test/porousmediumflow/richards/lens/main.cc +++ b/test/porousmediumflow/richards/lens/main.cc @@ -36,6 +36,7 @@ #include <dumux/common/properties.hh> #include <dumux/common/parameters.hh> #include <dumux/common/dumuxmessage.hh> +#include <dumux/common/initialize.hh> #include <dumux/linear/linearsolvertraits.hh> #if DUNE_VERSION_GTE(DUNE_ISTL,2,8) @@ -68,8 +69,12 @@ int main(int argc, char** argv) // define the type tag for this problem using TypeTag = Properties::TTag::TYPETAG; - // initialize MPI, finalize is done automatically on exit - const auto& mpiHelper = Dune::MPIHelper::instance(argc, argv); + // initialize Dumux (parallel helpers) + // always call this before any other code + Dumux::initialize(argc, argv); + + // get an instance of the MPI helper + const auto& mpiHelper = Dune::MPIHelper::instance(); // print dumux start message if (mpiHelper.rank() == 0)