Installation of Dune/PDELab (with tutorial) from Source on a Debian-based Linux System for Beginners
Here we demonstrate how to install the current stable release 2.10 of DUNE, PDELab and the PDELab tutorial from source on Ubuntu 24.04 LTS. This is the way to go if you want to have access to all of Dune’s source files (e.g. because you want to inspect or modify them) and to have more control over the build process (e.g. change compiler flags or enable/disable certain libraries). Consequently this way of installation is more complex than installation from binary packages. We will simplify life by providing shell scripts that do all the work.
This installation includes the module dune-pdelab-tutorials providing a tutorial for PDELab. Click here for an overview of the tutorial.
PDELab 2.10 and the DUNE 2.10 modules need a C++ compiler with C++17 support, i.e., at least GCC 9 or Clang 10, and CMake 3.16 or newer. The compiler and CMake versions of Ubuntu 24.04 LTS fulfill these requirements.
We assume that you are running a freshly installed Ubuntu 24.04 LTS with no additional packages installed yet. In order to install and run Dune you first need to install the following packages (for this to work you need sudo rights):
sudo apt install build-essential gfortran pkg-config
sudo apt install git wget
sudo apt install cmake
sudo apt install mpich mpich-doc libmpich-dev
sudo apt install libsuitesparse-dev
sudo apt install libgmp-dev
sudo apt install zlib1g zlib1g-dev
sudo apt install texlive
sudo apt install texlive-science
sudo apt install texlive-latex-extra
sudo apt install texlive-bibtex-extra
sudo apt install texlive-fonts-extra
sudo apt install paraview
sudo apt install gmsh
In order to create a Dune source installation the following steps are necessary:
- Download and install any necessary external libraries such as HDF5 or FFTW
- Download all dune modules from Dune’s git server
- Create an appropriate opts-file giving compiler name, compiler options, location of the installed external libraries, etc.
- Run Dune’s build system in all the modules using
dunecontrol.
In order to automate these steps we provide installer scripts. Just check out the following repository
git clone https://parcomp-git.iwr.uni-heidelberg.de/peter/dune-installer.git
run the installer:
./dune-installer/pdelab-2.10/installer.sh my-dune-dir
Here my-dune-dir is the name of a new directory where you want your
Dune installation in. This will download all Dune modules needed for
PDELab and its tutorial: the core modules dune-common, dune-geometry,
dune-grid, dune-istl and dune-localfunctions, the modules dune-typetree
and dune-functions required by PDELab, the grid managers dune-uggrid
(needed for many examples of the tutorial) and dune-alugrid, and
dune-vtk. It also downloads PDELab including its tutorial and creates an
opts-file and a build-script.
Now run the build-script:
cd my-dune-dir
./buildmodules.sh
If this does not work for you then you need to edit the installer
script in dune-installer/pdelab-2.10/installer.sh and ask some
expert (e.g on the mailing list).
If all went well, where are the compiled files? The build-script sets up things for a so-called out-of-source build. The command
cd release-build
gets you to a directory that mirrors all dune-modules but with the build files in it (the build files contain the executables ready to be run whereas source files contain “just” the instructions of how to create those executables).
A good way to proceed from here is to look at the PDELab tutorial:
cd dune-pdelab-tutorials
|
Legal Statements / Impressum |
Hosted by TU Dresden & Uni Heidelberg |
generated with Hugo v0.131.0
(Oct 15, 22:23, 2026)