From 583fb902d2d169f05c7cf8007db8eeadfd6a7fd7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Atgeirr=20Fl=C3=B8=20Rasmussen?= Date: Fri, 1 Sep 2023 11:19:16 +0200 Subject: [PATCH 1/2] Guards communication parts inside HAVE_MPI. --- opm/simulators/flow/BlackoilModelEbosNldd.hpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/opm/simulators/flow/BlackoilModelEbosNldd.hpp b/opm/simulators/flow/BlackoilModelEbosNldd.hpp index 7032c8a5a..2f7383f29 100644 --- a/opm/simulators/flow/BlackoilModelEbosNldd.hpp +++ b/opm/simulators/flow/BlackoilModelEbosNldd.hpp @@ -257,6 +257,7 @@ public: model_.ebosSimulator().model().invalidateAndUpdateIntensiveQuantities(/*timeIdx=*/0); } +#if HAVE_MPI // Communicate solutions: // With multiple processes, this process' overlap (i.e. not // owned) cells' solution values have been modified by local @@ -285,6 +286,7 @@ public: // Update intensive quantities for our overlap values. model_.ebosSimulator().model().invalidateAndUpdateIntensiveQuantitiesOverlap(/*timeIdx=*/0); } +#endif // HAVE_MPI // Finish with a Newton step. // Note that the "iteration + 100" is a simple way to avoid entering From 91c2e12a252a80b07b44bf6a66020d8db97640d6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Atgeirr=20Fl=C3=B8=20Rasmussen?= Date: Fri, 1 Sep 2023 11:19:36 +0200 Subject: [PATCH 2/2] Document new input parameter. --- opm/simulators/linalg/ISTLSolverEbos.hpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/opm/simulators/linalg/ISTLSolverEbos.hpp b/opm/simulators/linalg/ISTLSolverEbos.hpp index be1b6c838..5430de875 100644 --- a/opm/simulators/linalg/ISTLSolverEbos.hpp +++ b/opm/simulators/linalg/ISTLSolverEbos.hpp @@ -178,6 +178,9 @@ std::unique_ptr blockJacobiAdjacency(const Grid& grid, /// \param[in] simulator The opm-models simulator object /// \param[in] parameters Explicit parameters for solver setup, do not /// read them from command line parameters. + /// \param[in] forceSerial If true, will set up a serial linear solver only, + /// local to the current rank, instead of creating a + /// parallel (MPI distributed) linear solver. ISTLSolverEbos(const Simulator& simulator, const FlowLinearSolverParameters& parameters, bool forceSerial = false) : simulator_(simulator), iterations_( 0 ),