Back to top

Installing DuMux

Prerequisites

DuMux builds and runs on Linux and Mac operating systems.

Installation on Windows is possible but it is definitely not something to try if you are a beginner. If you use Windows, we recommend the Ubuntu bash on Windows.. Alternatively, you can try to employ MinGW, Cygwin or a Linux Virtual Machine.

In order to build DuMux you need at least the following software:

  • C++17 compiler (GCC 7 or newer, Clang 5 or newer)
  • CMake (DuMux 3.3-git requires at least CMake 3.13; DuMux <= 3.2 requires at least CMake 3.1)
  • pkg-config

Detailed information on supported compiler and CMake versions can be found in the DuMux handbook. The following software is recommended but optional:

  • MPI (either OpenMPI, lam, or mpich)
  • ParaView (to visualize the results)
  • a browser (to access the GitLab instance and README files)

1. Installation via script

We provide you with a Python script that facilitates setting up a Dune/DuMux directory tree and configures all modules using CMake. Download installdumux.py and place it in a directory where you want to install Dune/DuMux . The script will create a folder “DUMUX” in which all dependencies will be downloaded and built.

Run the script by typing:

python3 installdumux.py

Follow the instructions printed after the script has completed successfully to verify everything works as expected.

For more detailed explanation on installation and building of DuMux , please have a look below or at the handbook of the latest release.

2. Installation from source

DuMux depends on Dune. You can obtain the required Dune modules in form of binary packages for Debian, Ubuntu and openSUSE, see the Dune binary packages. The Dune releases can also be obtained as tarballs. Alternatively, you can use Git and download the modules (recommended). To clone the Dune core modules (minimum requirement), you can run:

for module in common geometry grid localfunctions istl; do
  git clone -b releases/2.7 https://gitlab.dune-project.org/core/dune-$module.git
done

Our Git repository (just like Dune’s) offers anonymous read access. To clone the 3.2 release version, you can type:

git clone -b releases/3.2 https://git.iws.uni-stuttgart.de/dumux-repositories/dumux.git

You can clone the master branch (developer version) by typing:

git clone https://git.iws.uni-stuttgart.de/dumux-repositories/dumux.git

Alternatively, it is also possible to download release tarballs from Zenodo or from GitLab.

After obtaining all modules (at least the Dune core modules dune-common,dune-geometry,dune-grid,dune-istl,dune-localfunctions and dumux), DuMux is built together with other Dune modules. Assuming that the Dune core modules and DuMux are folders in the same directory

installation folder
|- dune-common
|- dune-geometry
|- dune-grid
|- dune-istl
|- dune-localfunctions
|- dumux

you can configure and build the module stack with the dunecontrol helper script:

./dune-common/bin/dunecontrol --opts=dumux/cmake.opts all

This will create a separate build folder called build-cmake individually in each module. In case you want to build the module stack in a separate build folder use

./dune-common/bin/dunecontrol --opts=dumux/cmake.opts --builddir=$(pwd)/build all

More details on the Dune build system can be found in the Dune installation notes. Dune and DuMux rely heavily on compiler optimization. The speed difference between running a compiler-optimized versus a non-optimized DuMux executable can easily exceed a factor of 10.
The default cmake.opts in dumux/cmake.opts already enable compiler optimisations. To use debug options use -DCMAKE_BUILD_TYPE=Debug instead of -DCMAKE_BUILD_TYPE=Release in the cmake.opts, or add set(CMAKE_BUILD_TYPE Debug) to any CMakeLists.txt containing a test that you want to compile non-optimised and with debug symbols enabled.

Compatible versions of Dune and DuMux

Only the following Dune and DuMux versions are compatible:

DuMux version Dune version
3.1, 3.2, 3.3-git 2.6*, 2.7, 2.8-git**
3.0 2.6*, 2.7
2.9, 2.10, 2.11, 2.12 2.4, 2.5, 2.6*
2.6, 2.7, 2.8 2.3, 2.4
2.5 2.2, 2.3

* Please use the most recent corresponding Git branches releases/2.6 instead of the 2.6.0 tarballs.

** Compatibility with Dune 2.8-git is tested automatically only for DuMux 3.3-git.