Skip to content
Snippets Groups Projects
Commit b30e0423 authored by Christoph Grüninger's avatar Christoph Grüninger
Browse files

Adjust required Dune modules to version 2.4 or above.

Remove INSTALL and replace by INSTALL.cmake. This still needs some
love to reflect the current situation.
parent 252179a9
No related branches found
No related tags found
2 merge requests!31Feature/colebrookwhiteboundarylayer,!7Remove dune23 compatibility
Installation Instructions
=========================
Why CMake
=========
This file describes how to compile and install DuMuX using DUNE's
standard autotools based build system. If you would like to use the
alternative CMake based build system, please read the file
INSTALL.cmake.
You can use CMake 2.8.6 or higher as alternative to the build system
provided by DUNE. CMake is included in most GNU/Linux distributions
or can be downloaded at www.cmake.org. Using CMake has several
advantages compared to autotools:
DuMuX is a implemented as an ordinary DUNE module. For a full
explanation of the DUNE installation process, please read the
installation notes on the internet [0]. The following introduction is
meant for the impatient.
- Out-of-tree builds are the default way to build software: The
directory where the source code resides won't get modified during
compilation.
- Much faster checking of the configuration
- Much simpler to write your own modules
- Better dependency handling
- Less noisy output during compilation
Getting started
---------------
But alas, it comes with a cost:
In order to compile DuMuX, you first have to download and extract the
following DUNE modules into your source directory:
- dune-common from [1]
- dune-geometry from [1]
- dune-grid from [1]
- dune-istl from [1]
- dune-localfuctions from [1]
- Parameters to the compiler are usually not exactly the same as
those picked by DUNE's build system. This might sometimes lead to
problems.
- Dependencies between DUNE modules are not yet handled, i.e. all
DUNE modules on which DuMuX depends (-> common, grid, istl,
geometry, localfunctions) need to be installed already.
Use either the 2.2 release or the 2.3-svn trunk.
Preparing the installation
--------------------------
With option files you can enable options, set compiler flags and
define paths to external libraries. Exemplary option files are located
in $DUMUX_ROOT/optim.opts and $DUMUX_ROOT/debug.opts respectively.
($DUMUX_ROOT is the directory where the unpacked files of the DuMuX
distribution are located.)
After installing cmake on your system, make sure that the 'cmake'
executable is in your PATH. To configure the project, create a
new empty directory which will be used to store the files from
the build process and run
A mandatory option to be included in CONFIGURE_FLAGS is:
--enable-fieldvector-size-is-method
cd path/to/empty/build/directory
cmake path/to/DUMUX/source/directory
Now compile everything with
You might want to set a few parameters if you didn't install the
required libraries system wide. CMake cache variables can be set using
the "-D" command line switch to 'cmake'. The most important paramerters
are probably:
./dune-common/bin/dunecontrol --opts=$(DUMUX_ROOT)/optim.opts --module=dumux all
DUNE_DIR Path where all DUNE modules have been compiled and can be
found in subdirectories with the module name
DUNE_common_DIR Path where the DUNE-common module can be found. If there
is a 'dune-common' subdirectory in $DUNE_DIR, this is not
required.
(All other DUNE modules are analogous)
A more comprehensive introduction to the DUNE build system can be
found in [2].
BOOST_ROOT Path where the BOOST libraries from www.boost.org reside.
Usually this is detected automagically.
UG_DIR Location of the UG grid manager
ALUGrid_DIR Location of the ALUGrid grid manager
METIS_DIR Location of the METIS graph partioning library (required
for the parallel version of ALUGrid)
CMAKE_BUILD_TYPE Type of build. Either 'debug' or 'release', default is
'release'.
Links
-----
0. http://www.dune-project.org/doc/installation-notes.html
1. http://www.dune-project.org/download.html
2. http://www.dune-project.org/doc/buildsystem/buildsystem.pdf
If this was successfull, the project can be build by
make
Finally, install everything:
make install
Examples
========
cd path/to/empty/build/directory
cmake -DCMAKE_BUILD_TYPE=debug \
-DDUNE_DIR=/usr/local/dune/ \
-DUG_DIR=/usr/local/ug \
-DALUGrid_DIR=/usr/local/alugrid \
-DMETIS_DIR=/usr/local/metis \
path/to/DUMUX/source/directory
You might want to specify the compiler explicitly
by using the cmake options -DCMAKE_CXX_COMPILER and -DCMAKE_C_COMPILER.
Why CMake
=========
You can use CMake 2.8 or higher as alternative to the build system
provided by DUNE. CMake is included in most GNU/Linux distributions
or can be downloaded at www.cmake.org. Using CMake has several
advantages compared to autotools:
- Out-of-tree builds are the default way to build software: The
directory where the source code resides won't get modified during
compilation.
- Much faster checking of the configuration
- Much simpler to write your own modules
- Better dependency handling
- Less noisy output during compilation
But alas, it comes with a cost:
- Parameters to the compiler are usually not exactly the same as
those picked by DUNE's build system. This might sometimes lead to
problems.
- Dependencies between DUNE modules are not yet handled, i.e. all
DUNE modules on which DuMuX depends (-> common, grid, istl,
geometry, localfunctions) need to be installed already.
Preparing the installation
--------------------------
After installing cmake on your system, make sure that the 'cmake'
executable is in your PATH. To configure the project, create a
new empty directory which will be used to store the files from
the build process and run
cd path/to/empty/build/directory
cmake path/to/DUMUX/source/directory
You might want to set a few parameters if you didn't install the
required libraries system wide. CMake cache variables can be set using
the "-D" command line switch to 'cmake'. The most important paramerters
are probably:
DUNE_DIR Path where all DUNE modules have been compiled and can be
found in subdirectories with the module name
DUNE_common_DIR Path where the DUNE-common module can be found. If there
is a 'dune-common' subdirectory in $DUNE_DIR, this is not
required.
(All other DUNE modules are analogous)
BOOST_ROOT Path where the BOOST libraries from www.boost.org reside.
Usually this is detected automagically.
UG_DIR Location of the UG grid manager
ALUGrid_DIR Location of the ALUGrid grid manager
METIS_DIR Location of the METIS graph partioning library (required
for the parallel version of ALUGrid)
CMAKE_BUILD_TYPE Type of build. Either 'debug' or 'release', default is
'release'.
If this was successfull, the project can be build by
make
Finally, install everything:
make install
Examples
========
cd path/to/empty/build/directory
cmake -DCMAKE_BUILD_TYPE=debug \
-DDUNE_DIR=/usr/local/dune/ \
-DUG_DIR=/usr/local/ug \
-DALUGrid_DIR=/usr/local/alugrid \
-DMETIS_DIR=/usr/local/metis \
path/to/DUMUX/source/directory
With gcc 4.5.x, compilation might fail due to an internal compiler
error. In this case, you might want to specify the compiler explicitly
by using the cmake options -DCMAKE_CXX_COMPILER and -DCMAKE_C_COMPILER.
# Dune module information file
Module: dumux
Version: 2.9-git
Maintainer: dumux@listserv.uni-stuttgart.de
Depends: dune-grid (>= 2.3) dune-localfunctions (>= 2.3) dune-istl (>= 2.3)
Depends: dune-grid (>= 2.4) dune-localfunctions (>= 2.4) dune-istl (>= 2.4)
Suggests: dune-alugrid (>=2.4) dune-pdelab (>=2.0) dune-multidomain dune-cornerpoint
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