Skip to content
Snippets Groups Projects
Commit 2202a7a3 authored by Martin Schneider's avatar Martin Schneider
Browse files

[cornerpoint] Modification of installexternal.sh script

The installexternal.sh script can be used to install opm
and ert and to apply patches to opm-common and opm-parser.
parent f72f09d2
No related branches found
No related tags found
1 merge request!182[cornerpoint] adapt to current Opm release 2016.04
......@@ -53,27 +53,41 @@ installAluGrid()
fi
}
installCornerpoint()
installErt()
{
cd $TOPDIR
checkLocationForDuneModules dune-cornerpoint
checkLocationForDuneModules ert
if test $CORRECT_LOCATION_FOR_DUNE_MODULES == "n"; then
return
fi
if [ ! -e dune-cornerpoint ]; then
git clone -b release/2015.10 https://github.com/OPM/dune-cornerpoint
if [ ! -e ert ]; then
git clone -b release/2016.04 https://github.com/Ensembles/ert.git
fi
if test "$DOWNLOAD_ONLY" == "y"; then
return
fi
if test "$CLEANUP" == "y"; then
rm -rf dune-cornerpoint
rm -rf ert
return
fi
# building ert
echo "Building ert"
cd $TOPDIR/ert
mkdir build
cd build
cmake ../devel
make
# show additional information
echo "Ert has been built in directory ert/build."
echo "Do not change this directory otherwise opm will not find ert!"
cd $TOPDIR
}
installFoamGrid()
......@@ -217,21 +231,25 @@ installOPM()
fi
if [ ! -e opm-common ]; then
git clone -b release/2015.10 https://github.com/OPM/opm-common
git clone -b release/2016.04 https://github.com/OPM/opm-common
fi
if [ ! -e opm-core ]; then
git clone -b release/2015.10 https://github.com/OPM/opm-core
git clone -b release/2016.04 https://github.com/OPM/opm-core
fi
if [ ! -e opm-material ]; then
git clone -b release/2015.10 https://github.com/OPM/opm-material
git clone -b release/2016.04 https://github.com/OPM/opm-material
fi
if [ ! -e opm-parser ]; then
git clone -b release/2015.10 https://github.com/OPM/opm-parser
git clone -b release/2016.04 https://github.com/OPM/opm-parser
fi
if [ ! -e opm-grid ]; then
git clone -b release/2016.04 https://github.com/OPM/opm-grid
fi
if test "$DOWNLOAD_ONLY" == "y"; then
return
fi
......@@ -241,23 +259,29 @@ installOPM()
rm -rf opm-core
rm -rf opm-material
rm -rf opm-parser
rm -rf opm-grid
return
fi
# apply patches
echo "Applying patch for opm-parser"
cd $TOPDIR/opm-parser
patch -p1 < $TOPDIR/dumux/patches/opm-parser-2015.10.patch
patch -p1 < $TOPDIR/dumux/patches/opm-parser-2016.04.patch
echo "Applying patch for opm-common"
cd $TOPDIR/opm-common
patch -p1 < $TOPDIR/dumux/patches/opm-common-2016.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 " -Ddune-cornerpoint_PREFIX=/path/to/dune-cornerpoint \\"
echo " -DOPM_COMMON_ROOT=/path/to/opm-common \\"
echo " -Dopm-grid_PREFIX_PREFIX=/path/to/opm-grid \\"
echo " -Dopm-common_PREFIX=/path/to/opm-common \\"
echo " -Dopm-core_PREFIX=/path/to/opm-core \\"
echo " -Dopm-material_PREFIX=/path/to/opm-material \\"
echo " -Dopm-parser_PREFIX=/path/to/opm-parser \\"
echo " -DHAVE_DUNE_CORNERPOINT=1 \\"
echo " -DHAVE_OPM_GRID=1 \\"
cd $TOPDIR
}
......@@ -377,7 +401,7 @@ usage()
echo "Where PACKAGES is one or more of the following"
echo " all Install everything and the kitchen sink."
echo " alugrid Download dune-alugrid."
echo " cornerpoint Download and patch dune-cornerpoint."
echo " ert Download and build ert."
echo " foamgrid Download dune-foamgrid."
echo " gstat Download and install gstat."
echo " metis Install the METIS graph partitioner."
......@@ -443,7 +467,7 @@ for TMP in "$@"; do
SOMETHING_DONE="y"
createExternalDirectory
installAluGrid
installCornerpoint
installErt
installFoamGrid
installGStat
installMETIS
......@@ -458,9 +482,9 @@ for TMP in "$@"; do
SOMETHING_DONE="y"
installAluGrid
;;
cornerpoint|dune-cornerpoint)
ert)
SOMETHING_DONE="y"
installCornerpoint
installErt
;;
foamgrid|dune-foamgrid)
SOMETHING_DONE="y"
......
......@@ -10,19 +10,16 @@
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 might be necessary to patch opm-parser:
and Opm is compiled from source, it might be necessary to patch opm-parser and opm-common:
patch -p1 <../dumux/patches/opm-parser-2016.04.patch
patch -p1 <../dumux/patches/opm-common-2016.04.patch
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/ \
-Dopm-grid_PREFIX=/path/to/opm-grid \
-Dopm-common_PREFIX=/path/to/opm-common \
-Dopm-core_PREFIX=/path/to/opm-core \
-Dopm-material_PREFIX=/path/to/opm-material \
-Dopm-parser_PREFIX=/path/to/opm-parser \
-Dopm-grid_DIR=/path/to/opm-grid \
-Dopm-common_DIR=/path/to/opm-common \
-Dopm-core_DIR=/path/to/opm-core \
-Dopm-parser_DIR=/path/to/opm-parser \
-Dopm-material_DIR=/path/to/opm-material \
-DHAVE_OPM_GRID=1 \
Currently, Dumux is supposed to be compatible with the Opm 2016.04 release.
diff --git a/cmake/Modules/Findopm-parser.cmake b/cmake/Modules/Findopm-parser.cmake
index cb08ade..612f669 100644
--- a/cmake/Modules/Findopm-parser.cmake
+++ b/cmake/Modules/Findopm-parser.cmake
@@ -38,8 +38,8 @@ string(REGEX REPLACE "${PROJECT_SOURCE_DIR}/?(.*)" "\\1" BUILD_DIR_SUFFIX "${PR
# or in relative directories to this one
if (OPM_PARSER_ROOT)
set (_no_default_path "NO_DEFAULT_PATH")
- set (_opm_parser_source "")
- set (_opm_parser_build "")
+ set (_opm_parser_source "${OPM_PARSER_ROOT}")
+ set (_opm_parser_build "${OPM_PARSER_ROOT}/${BUILD_DIR_SUFFIX}")
else ()
set (_no_default_path "")
set (_opm_parser_source
......@@ -28,7 +28,6 @@
#include "cc2pcornerpointproblem.hh"
#include <dumux/common/start.hh>
#include <opm/core/io/eclipse/EclipseGridInspector.hpp>
/*!
* \brief Provides an interface for customizing error messages associated with
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment