Skip to content

Commit

Permalink
build system cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
akva2 committed Nov 16, 2018
1 parent f027262 commit f771049
Show file tree
Hide file tree
Showing 11 changed files with 39 additions and 213 deletions.
14 changes: 0 additions & 14 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -99,20 +99,6 @@ endmacro (tests_hook)
# all setup common to the OPM library modules is done here
include (OpmLibMain)

# download Eigen if user doesn't have the correct version
if (NOT EIGEN3_FOUND)
message (STATUS "Downloading Eigen3")
include (ExternalProject)
externalProject_Add (Eigen3
GIT_REPOSITORY git://github.com/OPM/eigen3
UPDATE_COMMAND git checkout 9e788db99d73f3199ade74bfda8d9f73fdfbbe4c
CMAKE_ARGS -Wno-dev -DEIGEN_TEST_NO_OPENGL=1 -DEIGEN_BUILD_PKGCONFIG=0 -DCMAKE_INSTALL_PREFIX=${CMAKE_BINARY_DIR}/eigen3-installed
)

include_directories (${CMAKE_BINARY_DIR}/eigen3-installed/include/eigen3)
add_dependencies (opmsimulators Eigen3)
endif (NOT EIGEN3_FOUND)

if (HAVE_OPM_TESTS)
include (${CMAKE_CURRENT_SOURCE_DIR}/compareECLFiles.cmake)
endif()
Expand Down
108 changes: 4 additions & 104 deletions CMakeLists_files.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -25,26 +25,15 @@
list (APPEND MAIN_SOURCE_FILES
opm/autodiff/Compat.cpp
opm/autodiff/ExtractParallelGridInformationToISTL.cpp
opm/autodiff/NewtonIterationBlackoilInterleaved.cpp
opm/autodiff/NewtonIterationUtilities.cpp
opm/autodiff/GridHelpers.cpp
opm/autodiff/moduleVersion.cpp
opm/autodiff/BlackoilPropsAdFromDeck.cpp
opm/autodiff/BlackoilModelParameters.cpp
opm/autodiff/WellDensitySegmented.cpp
opm/autodiff/LinearisedBlackoilResidual.cpp
opm/autodiff/MPIUtilities.cpp
opm/autodiff/VFPProdProperties.cpp
opm/autodiff/VFPProdPropertiesLegacy.cpp
opm/autodiff/VFPInjProperties.cpp
opm/autodiff/VFPInjPropertiesLegacy.cpp
opm/autodiff/MissingFeatures.cpp
opm/core/props/rock/RockFromDeck.cpp
opm/core/props/satfunc/RelpermDiagnostics.cpp
opm/core/props/satfunc/SaturationPropsFromDeck.cpp
opm/core/simulator/BlackoilState.cpp
opm/core/simulator/SimulatorReport.cpp
opm/core/utility/Event.cpp
opm/core/wells/InjectionSpecification.cpp
opm/core/wells/ProductionSpecification.cpp
opm/core/wells/WellCollection.cpp
Expand All @@ -60,34 +49,20 @@ list (APPEND MAIN_SOURCE_FILES
opm/simulators/timestepping/gatherConvergenceReport.cpp
)

if(PETSc_FOUND)
list(APPEND MAIN_SOURCE_FILES opm/core/linalg/LinearSolverPetsc.cpp)
endif()


# originally generated with the command:
# find tests -name '*.cpp' -a ! -wholename '*/not-unit/*' -printf '\t%p\n' | sort
list (APPEND TEST_SOURCE_FILES
tests/test_autodiffhelpers.cpp
tests/test_autodiffmatrix.cpp
tests/test_blackoil_amg.cpp
tests/test_block.cpp
tests/test_convergencereport.cpp
tests/test_graphcoloring.cpp
tests/test_span.cpp
tests/test_syntax.cpp
tests/test_scalar_mult.cpp
tests/test_vfpproperties.cpp
tests/test_milu.cpp
tests/test_multmatrixtransposed.cpp
tests/test_wellmodel.cpp
# tests/test_thresholdpressure.cpp
tests/test_wellswitchlogger.cpp
tests/test_timer.cpp
tests/test_invert.cpp
tests/test_event.cpp
tests/test_wells.cpp
tests/test_equil_legacy.cpp
tests/test_blackoilstate.cpp
tests/test_wellsmanager.cpp
tests/test_wellcontrols.cpp
Expand Down Expand Up @@ -130,82 +105,38 @@ list (APPEND TEST_DATA_FILES
)


# originally generated with the command:
# find tutorials examples -name '*.c*' -printf '\t%p\n' | sort
list (APPEND EXAMPLE_SOURCE_FILES
examples/find_zero.cpp
)

# originally generated with the command:
# find opm -name '*.h*' -a ! -name '*-pch.hpp' -printf '\t%p\n' | sort
list (APPEND PUBLIC_HEADER_FILES
opm/autodiff/AutoDiffBlock.hpp
opm/autodiff/AutoDiffHelpers.hpp
opm/autodiff/AutoDiffMatrix.hpp
opm/autodiff/AutoDiff.hpp
opm/autodiff/AquiferCarterTracy.hpp
opm/autodiff/BlackoilAmg.hpp
opm/autodiff/BlackoilDetails.hpp
opm/autodiff/BlackoilLegacyDetails.hpp
opm/autodiff/BlackoilModel.hpp
opm/autodiff/BlackoilModelBase.hpp
opm/autodiff/BlackoilModelBase_impl.hpp
opm/autodiff/BlackoilModelEnums.hpp
opm/autodiff/BlackoilModelParameters.hpp
opm/autodiff/BlackoilModelParametersEbos.hpp
opm/autodiff/BlackoilPressureModel.hpp
opm/autodiff/BlackoilPropsAdFromDeck.hpp
opm/autodiff/BlackoilAquiferModel.hpp
opm/autodiff/BlackoilAquiferModel_impl.hpp
opm/autodiff/Compat.hpp
opm/autodiff/CPRPreconditioner.hpp
opm/autodiff/createGlobalCellArray.hpp
opm/autodiff/DefaultBlackoilSolutionState.hpp
opm/autodiff/BlackoilSequentialModel.hpp
opm/autodiff/BlackoilReorderingTransportModel.hpp
opm/autodiff/BlackoilTransportModel.hpp
opm/autodiff/fastSparseOperations.hpp
opm/autodiff/DebugTimeReport.hpp
opm/autodiff/DuneMatrix.hpp
opm/autodiff/ExtractParallelGridInformationToISTL.hpp
opm/autodiff/FlowLinearSolverParameters.hpp
opm/autodiff/FlowMain.hpp
opm/autodiff/FlowMainEbos.hpp
opm/autodiff/FlowMainSequential.hpp
opm/autodiff/GeoProps.hpp
opm/autodiff/GraphColoring.hpp
opm/autodiff/GridHelpers.hpp
opm/autodiff/GridInit.hpp
opm/autodiff/ISTLSolver.hpp
opm/autodiff/ISTLSolverEbos.hpp
opm/autodiff/IterationReport.hpp
opm/autodiff/moduleVersion.hpp
opm/autodiff/NewtonIterationBlackoilInterface.hpp
opm/autodiff/NewtonIterationBlackoilInterleaved.hpp
opm/autodiff/NewtonIterationUtilities.hpp
opm/autodiff/NonlinearSolver.hpp
opm/autodiff/NonlinearSolver_impl.hpp
opm/autodiff/NonlinearSolverEbos.hpp
opm/autodiff/LinearisedBlackoilResidual.hpp
opm/autodiff/ParallelDebugOutput.hpp
opm/autodiff/ParallelOverlappingILU0.hpp
opm/autodiff/ParallelRestrictedAdditiveSchwarz.hpp
opm/autodiff/RateConverter.hpp
opm/autodiff/RedistributeDataHandles.hpp
opm/autodiff/SimFIBODetails.hpp
opm/autodiff/SimulatorBase.hpp
opm/autodiff/SimulatorBase_impl.hpp
opm/autodiff/SimulatorFullyImplicitBlackoilEbos.hpp
opm/autodiff/SimulatorFullyImplicitBlackoil.hpp
opm/autodiff/SimulatorSequentialBlackoil.hpp
opm/autodiff/WellConnectionAuxiliaryModule.hpp
opm/autodiff/WellDensitySegmented.hpp
opm/autodiff/WellStateFullyImplicitBlackoil.hpp
opm/autodiff/ThreadHandle.hpp
opm/autodiff/VFPProperties.hpp
opm/autodiff/VFPHelpers.hpp
opm/autodiff/VFPProdProperties.hpp
opm/autodiff/VFPInjProperties.hpp
opm/autodiff/VFPProdProperties.hpp
opm/autodiff/WellHelpers.hpp
opm/autodiff/StandardWells.hpp
opm/autodiff/StandardWells_impl.hpp
opm/autodiff/WellInterface.hpp
opm/autodiff/WellInterface_impl.hpp
opm/autodiff/StandardWell.hpp
Expand All @@ -216,41 +147,18 @@ list (APPEND PUBLIC_HEADER_FILES
opm/autodiff/BlackoilWellModel.hpp
opm/autodiff/BlackoilWellModel_impl.hpp
opm/autodiff/MissingFeatures.hpp
opm/core/linalg/LinearSolverPetsc.hpp
opm/core/linalg/ParallelIstlInformation.hpp
opm/core/pressure/legacy_well.h
opm/core/pressure/tpfa/compr_quant_general.h
opm/core/pressure/tpfa/compr_source.h
opm/core/props/BlackoilPhases.hpp
opm/core/props/BlackoilPropertiesInterface.hpp
opm/core/props/IncompPropertiesInterface.hpp
opm/core/props/IncompPropertiesShadow.hpp
opm/core/props/IncompPropertiesShadow_impl.hpp
opm/core/props/phaseUsageFromDeck.hpp
opm/core/props/pvt/ThermalGasPvtWrapper.hpp
opm/core/props/pvt/ThermalOilPvtWrapper.hpp
opm/core/props/pvt/ThermalWaterPvtWrapper.hpp
opm/core/props/rock/RockFromDeck.hpp
opm/core/props/satfunc/RelpermDiagnostics.hpp
opm/core/props/satfunc/SaturationPropsInterface.hpp
opm/core/props/satfunc/RelpermDiagnostics_impl.hpp
opm/core/simulator/BlackoilState.hpp
opm/core/simulator/BlackoilStateToFluidState.hpp
opm/core/simulator/EquilibrationHelpers.hpp
opm/core/simulator/ExplicitArraysFluidState.hpp
opm/core/simulator/ExplicitArraysSatDerivativesFluidState.hpp
opm/core/simulator/SimulatorReport.hpp
opm/core/simulator/WellState.hpp
opm/core/simulator/initState.hpp
opm/core/simulator/initStateEquil.hpp
opm/core/simulator/initStateEquil_impl.hpp
opm/core/simulator/initState_impl.hpp
opm/core/utility/DataMap.hpp
opm/core/utility/Event.hpp
opm/core/utility/Event_impl.hpp
opm/core/utility/initHydroCarbonState.hpp
opm/core/utility/miscUtilities_impl.hpp
opm/core/utility/share_obj.hpp
opm/core/well_controls.h
opm/core/wells.h
opm/core/wells/InjectionSpecification.hpp
Expand All @@ -260,18 +168,10 @@ list (APPEND PUBLIC_HEADER_FILES
opm/core/wells/WellsManager.hpp
opm/core/wells/DynamicListEconLimited.hpp
opm/core/wells/WellsManager_impl.hpp
opm/polymer/GravityColumnSolverPolymer.hpp
opm/polymer/GravityColumnSolverPolymer_impl.hpp
opm/polymer/IncompPropertiesDefaultPolymer.hpp
opm/polymer/PolymerBlackoilState.hpp
opm/polymer/SinglePointUpwindTwoPhasePolymer.hpp
opm/polymer/Point2D.hpp
opm/simulators/ParallelFileMerger.hpp
opm/simulators/thresholdPressures.hpp
opm/simulators/WellSwitchingLogger.hpp
opm/simulators/timestepping/AdaptiveSimulatorTimer.hpp
opm/simulators/timestepping/AdaptiveTimeStepping.hpp
opm/simulators/timestepping/AdaptiveTimeStepping_impl.hpp
opm/simulators/timestepping/AdaptiveTimeSteppingEbos.hpp
opm/simulators/timestepping/ConvergenceReport.hpp
opm/simulators/timestepping/TimeStepControl.hpp
Expand Down
80 changes: 26 additions & 54 deletions compareECLFiles.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -144,26 +144,17 @@ set(abs_tol 2e-2)
set(rel_tol 1e-5)
set(coarse_rel_tol 1e-2)

foreach(SIM flow flow_legacy)
add_test_compareECLFiles(CASENAME spe1
FILENAME SPE1CASE2
SIMULATOR ${SIM}
ABS_TOL ${abs_tol}
REL_TOL ${coarse_rel_tol})
endforeach()

add_test_compareECLFiles(CASENAME spe1_2p
FILENAME SPE1CASE2_2P
add_test_compareECLFiles(CASENAME spe1
FILENAME SPE1CASE2
SIMULATOR flow
ABS_TOL ${abs_tol}
REL_TOL ${rel_tol}
DIR spe1)
REL_TOL ${coarse_rel_tol})

add_test_compareECLFiles(CASENAME spe1_2p
FILENAME SPE1CASE2_2P
SIMULATOR flow_legacy
SIMULATOR flow
ABS_TOL ${abs_tol}
REL_TOL ${coarse_rel_tol}
REL_TOL ${rel_tol}
DIR spe1)

add_test_compareECLFiles(CASENAME spe1_oilgas
Expand All @@ -173,12 +164,6 @@ add_test_compareECLFiles(CASENAME spe1_oilgas
REL_TOL ${coarse_rel_tol}
DIR spe1)

add_test_compareECLFiles(CASENAME spe1
FILENAME SPE1CASE1
SIMULATOR flow_sequential
ABS_TOL ${abs_tol}
REL_TOL ${rel_tol})

add_test_compareECLFiles(CASENAME spe1
FILENAME SPE1CASE1
SIMULATOR flow
Expand Down Expand Up @@ -221,20 +206,11 @@ add_test_compareECLFiles(CASENAME spe3
REL_TOL ${coarse_rel_tol}
TEST_ARGS --tolerance-wells=1e-6 --flow-newton-max-iterations=20)

add_test_compareECLFiles(CASENAME spe3
FILENAME SPE3CASE1
SIMULATOR flow_legacy
add_test_compareECLFiles(CASENAME spe9
FILENAME SPE9_CP_SHORT
SIMULATOR flow
ABS_TOL ${abs_tol}
REL_TOL ${coarse_rel_tol}
TEST_ARGS tolerance_wells=1e-6 max_iter=20)

foreach(SIM flow flow_legacy)
add_test_compareECLFiles(CASENAME spe9
FILENAME SPE9_CP_SHORT
SIMULATOR ${SIM}
ABS_TOL ${abs_tol}
REL_TOL ${rel_tol})
endforeach()
REL_TOL ${rel_tol})

add_test_compareECLFiles(CASENAME spe9group
FILENAME SPE9_CP_GROUP
Expand Down Expand Up @@ -310,18 +286,16 @@ opm_set_test_driver(${PROJECT_SOURCE_DIR}/tests/run-restart-regressionTest.sh ""
# Cruder tolerances for the restarted tests
set(abs_tol_restart 2e-1)
set(rel_tol_restart 4e-5)
foreach(sim flow flow_legacy)
add_test_compare_restarted_simulation(CASENAME spe1
FILENAME SPE1CASE2_ACTNUM
SIMULATOR ${sim}
ABS_TOL ${abs_tol_restart}
REL_TOL ${rel_tol_restart})
add_test_compare_restarted_simulation(CASENAME spe9
FILENAME SPE9_CP_SHORT
SIMULATOR ${sim}
ABS_TOL ${abs_tol_restart}
REL_TOL ${rel_tol_restart})
endforeach()
add_test_compare_restarted_simulation(CASENAME spe1
FILENAME SPE1CASE2_ACTNUM
SIMULATOR flow
ABS_TOL ${abs_tol_restart}
REL_TOL ${rel_tol_restart})
add_test_compare_restarted_simulation(CASENAME spe9
FILENAME SPE9_CP_SHORT
SIMULATOR flow
ABS_TOL ${abs_tol_restart}
REL_TOL ${rel_tol_restart})

# PORV test
opm_set_test_driver(${PROJECT_SOURCE_DIR}/tests/run-porv-acceptanceTest.sh "")
Expand All @@ -336,15 +310,13 @@ add_test_compareECLFiles(CASENAME norne
# Init tests
opm_set_test_driver(${PROJECT_SOURCE_DIR}/tests/run-init-regressionTest.sh "")

foreach(sim flow flow_legacy)
add_test_compareECLFiles(CASENAME norne
FILENAME NORNE_ATW2013
SIMULATOR ${sim}
ABS_TOL ${abs_tol}
REL_TOL ${rel_tol}
PREFIX compareECLInitFiles
DIR_PREFIX /init)
endforeach()
add_test_compareECLFiles(CASENAME norne
FILENAME NORNE_ATW2013
SIMULATOR flow
ABS_TOL ${abs_tol}
REL_TOL ${rel_tol}
PREFIX compareECLInitFiles
DIR_PREFIX /init)

# Parallel tests
if(MPI_FOUND)
Expand Down
2 changes: 1 addition & 1 deletion debian/control
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Build-Depends: build-essential, debhelper (>= 9), libboost-filesystem-dev,
libdune-common-dev, libdune-istl-dev, cmake, libtinyxml-dev, bc,
libecl-dev, git, zlib1g-dev, libtool, doxygen,
texlive-latex-extra, texlive-latex-recommended, ghostscript,
libopm-material-dev, libeigen3-dev,
libopm-material-dev,
libboost-iostreams-dev, libopm-common-dev,
libopm-grid-dev, libdune-grid-dev,
libtrilinos-zoltan-dev, libopenmpi-dev, mpi-default-bin, libewoms-dev
Expand Down
4 changes: 0 additions & 4 deletions opm-simulators-prereqs.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,6 @@ set (opm-simulators_DEPS
"LAPACK REQUIRED"
# Look for MPI support
"MPI"
# PETSc numerical backend
"PETSc"
# Tim Davis' SuiteSparse archive
"SuiteSparse COMPONENTS umfpack"
# SuperLU direct solver
Expand All @@ -42,8 +40,6 @@ set (opm-simulators_DEPS
"opm-material REQUIRED"
"opm-grid REQUIRED"
"ewoms REQUIRED"
# Eigen
"Eigen3 3.2.0"
)

find_package_deps(opm-simulators)
Expand Down
2 changes: 1 addition & 1 deletion redhat/opm-simulators.spec
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ BuildRequires: git suitesparse-devel doxygen bc devtoolset-6-toolchain
BuildRequires: opm-grid-devel opm-grid-openmpi-devel opm-grid-mpich-devel
BuildRequires: ewoms-devel ewoms-openmpi-devel ewoms-mpich-devel
BuildRequires: opm-material-devel opm-material-openmpi-devel opm-material-mpich-devel
BuildRequires: tinyxml-devel dune-istl-devel eigen3-devel ecl-devel zlib-devel
BuildRequires: tinyxml-devel dune-istl-devel ecl-devel zlib-devel
BuildRequires: openmpi-devel trilinos-openmpi-devel ptscotch-openmpi-devel scotch-devel
BuildRequires: mpich-devel trilinos-mpich-devel ptscotch-mpich-devel
BuildRequires: opm-common-devel opm-common-openmpi-devel opm-common-mpich-devel
Expand Down
Loading

0 comments on commit f771049

Please sign in to comment.