Commit 7941a31f authored by Timo Koch's avatar Timo Koch

Merge branch 'feature/opm-newest-version' into 'master'

Feature/opm newest version

See merge request !1419
parents 408f5140 2bd6a660
......@@ -58,7 +58,7 @@ installEcl()
cd $TOPDIR
if [ ! -e libecl ]; then
git clone -b 2018.04 https://github.com/Statoil/libecl.git
git clone -b 2018.10 https://github.com/Statoil/libecl.git
fi
if test "$DOWNLOAD_ONLY" == "y"; then
......@@ -288,11 +288,11 @@ installOPM()
fi
if [ ! -e opm-common ]; then
git clone -b release/2018.04 https://github.com/OPM/opm-common
git clone -b release/2018.10 https://github.com/OPM/opm-common
fi
if [ ! -e opm-grid ]; then
git clone -b release/2018.04 https://github.com/OPM/opm-grid
git clone -b release/2018.10 https://github.com/OPM/opm-grid
fi
if test "$DOWNLOAD_ONLY" == "y"; then
......@@ -305,21 +305,15 @@ installOPM()
return
fi
# apply patches
echo "Applying patch for opm-common"
cd $TOPDIR/opm-common
patch -p1 < $TOPDIR/dumux/patches/opm-common-2018.04.patch
echo "Applying patch for opm-grid"
cd $TOPDIR/opm-grid
patch -p1 < $TOPDIR/dumux/patches/opm-grid-2018.04.patch
# show additional information
echo "In addition, it might be necessary to set manually some"
echo "CMake variables in the CMAKE_FLAGS section of the .opts-file:"
echo " -DOPM_COMMON_ROOT=/path/to/opm-common \\"
echo " -Decl_DIR=/path/to/libecl/build \\"
echo " -DUSE_MPI=ON \\"
echo " -Decl_DIR=$TOPDIR/libecl/build"
echo " -DUSE_MPI=ON"
# show some opm prerequisites
echo "Maybe you also have to install the following packages (see the opm prerequisites at opm-project.org): "
echo " BLAS, LAPACK, Boost, SuperLU, SuiteSparse"
cd $TOPDIR
}
......@@ -444,7 +438,7 @@ usage()
echo " multidomain Download dune-multidomain."
echo " multidomaingrid Download and patch dune-multidomaingrid."
echo " nlopt Download and install nlopt."
echo " opm Download opm modules required for dune-cornerpoint."
echo " opm Download opm modules required for cornerpoint grids."
echo " pdelab Download dune-pdelab."
echo " typetree Download dune-typetree."
echo " ug Install the UG grid library."
......
......@@ -32,6 +32,13 @@ SPECIFIC_GENERATOR=""
# -DCMAKE_MAKE_PROGRAM='/usr/bin/ninja'
#"
OPM_FLAGS=""
# to build opm it might be necessary to set manually the following variables (comment the above line)
#OPM_FLAGS="
#-Decl_DIR=[/path/to]/libecl/build
#-DUSE_MPI=ON
#"
# set this to "ON" if you want to be able to have the headercheck target
DUMUX_ENABLE_HEADERCHECK=OFF
......@@ -39,7 +46,7 @@ DUMUX_ENABLE_HEADERCHECK=OFF
# you can also do this in any of the CMakeLists.txt in Dumux
# just rerun cmake again afterwards (run cmake <path-to-build-dir>)
CMAKE_FLAGS="$SPECIFIC_COMPILER $SPECIFIC_GENERATOR
CMAKE_FLAGS="$SPECIFIC_COMPILER $SPECIFIC_GENERATOR $OPM_FLAGS
-DCMAKE_CXX_FLAGS_RELEASE='$GXX_RELEASE_OPTS $GXX_RELEASE_WARNING_OPTS'
-DCMAKE_CXX_FLAGS_DEBUG='-O0 -g -ggdb -Wall -Wextra -Wno-unused-parameter -Wno-sign-compare'
-DCMAKE_CXX_FLAGS_RELWITHDEBINFO='$GXX_RELEASE_OPTS $GXX_RELEASE_WARNING_OPTS -g -ggdb -Wall'
......
......@@ -4,15 +4,3 @@
dune-istl 2.4.1, e.g.:
patch -p1 <../dumux/patches/istl-2.4.1.patch
- If opm-grid has to be used for, e.g., employing the CpGridCreator,
and Opm is compiled from source, it is necessary to patch opm-common and
opm-grid, namely, to execute in the corresponding folders:
patch -p1 <../dumux/patches/opm-common-2018.04.patch
patch -p1 <../dumux/patches/opm-grid-2018.04.patch
Currently, Dumux is supposed to be compatible with the Opm 2018.04 release.
In addition, it might be necessary to set manually some
CMake variables in the CMAKE_FLAGS section of the .opts-file:
-DOPM_COMMON_ROOT=/path/to/opm-common \
-Decl_DIR=/path/to/libecl/build \
-DUSE_MPI=ON \
diff --git a/cmake/Modules/OpmProject.cmake b/cmake/Modules/OpmProject.cmake
index 51d572df..68feda08 100644
--- a/cmake/Modules/OpmProject.cmake
+++ b/cmake/Modules/OpmProject.cmake
@@ -76,6 +76,7 @@ function (opm_cmake_config name)
set (template_dir "${OPM_MACROS_ROOT}/cmake/Templates")
# write configuration file to locate library
+ set(DUNE_PREFIX ${PROJECT_SOURCE_DIR})
set(OPM_PROJECT_EXTRA_CODE ${OPM_PROJECT_EXTRA_CODE_INTREE})
set(PREREQ_LOCATION "${PROJECT_SOURCE_DIR}")
configure_cmake_file (${name} "config" "")
@@ -123,6 +124,7 @@ function (opm_cmake_config name)
# of the build directory (using the same input template)
set(OPM_PROJECT_EXTRA_CODE ${OPM_PROJECT_EXTRA_CODE_INSTALLED})
set(PREREQ_LOCATION "${CMAKE_INSTALL_PREFIX}/share/opm/cmake/Modules")
+ set(DUNE_PREFIX ${CMAKE_INSTALL_PREFIX})
configure_cmake_file (${name} "install" "")
configure_vars (
FILE CMAKE "${PROJECT_BINARY_DIR}/${${name}_NAME}-install.cmake"
diff --git a/cmake/Templates/opm-project-config.cmake.in b/cmake/Templates/opm-project-config.cmake.in
index 421708a8..a783043d 100644
--- a/cmake/Templates/opm-project-config.cmake.in
+++ b/cmake/Templates/opm-project-config.cmake.in
@@ -24,6 +24,7 @@ if(NOT @opm-project_NAME@_FOUND)
set(CMAKE_MODULE_PATH "${CMAKE_MODULE_PATH}" @PREREQ_LOCATION@)
include(@opm-project_NAME@-prereqs)
# propagate these properties from one build system to the other
+ set (@opm-project_NAME@_PREFIX "@DUNE_PREFIX@")
set (@opm-project_NAME@_VERSION "@opm-project_VERSION@")
set (@opm-project_NAME@_DEFINITIONS "@opm-project_DEFINITIONS@")
set (@opm-project_NAME@_INCLUDE_DIRS "@opm-project_INCLUDE_DIRS@")
diff --git a/opm/grid/common/p2pcommunicator.hh b/opm/grid/common/p2pcommunicator.hh
index 1b4b327..55a2b2f 100644
--- a/opm/grid/common/p2pcommunicator.hh
+++ b/opm/grid/common/p2pcommunicator.hh
@@ -23,6 +23,7 @@
#include <vector>
#include <set>
#include <map>
+#include <cassert>
#include <dune/common/version.hh>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment