mirror of
https://github.com/OPM/opm-simulators.git
synced 2024-12-28 02:00:59 -06:00
fixed: build without MPI
This commit is contained in:
parent
c0938e74f4
commit
c40c733a57
@ -37,7 +37,6 @@ list (APPEND MAIN_SOURCE_FILES
|
||||
opm/simulators/utils/DeferredLogger.cpp
|
||||
opm/simulators/utils/gatherDeferredLogger.cpp
|
||||
opm/simulators/utils/moduleVersion.cpp
|
||||
opm/simulators/utils/ParallelEclipseState.cpp
|
||||
opm/simulators/utils/ParallelRestart.cpp
|
||||
opm/simulators/wells/VFPProdProperties.cpp
|
||||
opm/simulators/wells/VFPInjProperties.cpp
|
||||
@ -46,6 +45,9 @@ list (APPEND MAIN_SOURCE_FILES
|
||||
if(CUDA_FOUND)
|
||||
list (APPEND MAIN_SOURCE_FILES opm/simulators/linalg/bda/cusparseSolverBackend.cu)
|
||||
endif()
|
||||
if(MPI_FOUND)
|
||||
list(APPEND MAIN_SOURCE_FILES opm/simulators/utils/ParallelEclipseState.cpp)
|
||||
endif()
|
||||
|
||||
# originally generated with the command:
|
||||
# find tests -name '*.cpp' -a ! -wholename '*/not-unit/*' -printf '\t%p\n' | sort
|
||||
@ -68,12 +70,12 @@ list (APPEND TEST_SOURCE_FILES
|
||||
tests/test_stoppedwells.cpp
|
||||
tests/test_relpermdiagnostics.cpp
|
||||
tests/test_norne_pvt.cpp
|
||||
tests/test_ParallelRestart.cpp
|
||||
tests/test_wellstatefullyimplicitblackoil.cpp
|
||||
)
|
||||
|
||||
if(MPI_FOUND)
|
||||
list(APPEND TEST_SOURCE_FILES tests/test_parallelistlinformation.cpp)
|
||||
list(APPEND TEST_SOURCE_FILES tests/test_parallelistlinformation.cpp
|
||||
tests/test_ParallelRestart.cpp)
|
||||
endif()
|
||||
|
||||
list (APPEND TEST_DATA_FILES
|
||||
|
@ -53,7 +53,6 @@
|
||||
#endif
|
||||
#include "eclwellmanager.hh"
|
||||
#include "eclequilinitializer.hh"
|
||||
#include "eclmpiserializer.hh"
|
||||
#include "eclwriter.hh"
|
||||
#include "ecloutputblackoilmodule.hh"
|
||||
#include "ecltransmissibility.hh"
|
||||
|
@ -20,8 +20,6 @@
|
||||
*/
|
||||
#include "config.h"
|
||||
|
||||
#include <ebos/eclmpiserializer.hh>
|
||||
|
||||
#include <flow/flow_ebos_blackoil.hpp>
|
||||
|
||||
#ifndef FLOW_BLACKOIL_ONLY
|
||||
@ -39,7 +37,6 @@
|
||||
#include <opm/simulators/flow/SimulatorFullyImplicitBlackoilEbos.hpp>
|
||||
#include <opm/simulators/flow/FlowMainEbos.hpp>
|
||||
#include <opm/simulators/utils/moduleVersion.hpp>
|
||||
#include <opm/simulators/utils/ParallelEclipseState.hpp>
|
||||
#include <opm/models/utils/propertysystem.hh>
|
||||
#include <opm/models/utils/parametersystem.hh>
|
||||
#include <opm/simulators/flow/MissingFeatures.hpp>
|
||||
@ -71,6 +68,11 @@
|
||||
#include <dune/common/parallel/mpihelper.hh>
|
||||
#endif
|
||||
|
||||
#if HAVE_MPI
|
||||
#include <ebos/eclmpiserializer.hh>
|
||||
#include <opm/simulators/utils/ParallelEclipseState.hpp>
|
||||
#endif
|
||||
|
||||
BEGIN_PROPERTIES
|
||||
|
||||
// this is a dummy type tag that is used to setup the parameters before the actual
|
||||
|
@ -451,13 +451,17 @@ namespace Opm
|
||||
if (FluidSystem::numActivePhases() > 1) {
|
||||
RelpermDiagnostics diagnostic;
|
||||
if (mpi_size_ > 1) {
|
||||
#if HAVE_MPI
|
||||
this->grid().switchToGlobalView();
|
||||
static_cast<ParallelEclipseState&>(this->eclState()).switchToGlobalProps();
|
||||
#endif
|
||||
}
|
||||
diagnostic.diagnosis(eclState(), deck(), this->grid());
|
||||
if (mpi_size_ > 1) {
|
||||
#if HAVE_MPI
|
||||
this->grid().switchToDistributedView();
|
||||
static_cast<ParallelEclipseState&>(this->eclState()).switchToDistributedProps();
|
||||
#endif
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user