Welcome to DORiE!¶
(__D__UNE-__O__perated __Ri__chards equation solving __E__nvironment)
DORiE is a software suite for solving Richard’s Equation. The core feature is a C++ PDE-solver powered by DUNE and the DUNE-PDELab module. It implements a Discontinous Galerkin (DG) discretization scheme on structured rectangular / cubic and unstructured simplex grids in two and three spatial dimensions, and makes use of advanced features like adaptive grid refinement.
The suite encapsulates a documentation and various tools for program setup, program testing, and output analysis, which are mostly written in Python.
DORiE is developed and maintained by the DORiE Developers of the TS-CCEES research group at IUP Heidelberg, supervised by Kurt Roth, in collaboration with Ole Klein and the Scientific Computing Group of IWR Heidelberg.
Installation Instructions¶
DORiE is a DUNE module and requires several other DUNE modules as well as third party software packages. Installation can be handled manually on your local machine, but for inexperienced users it is recommended to use the deployment software Docker instead.
No installation is necessary if you download DORiE as Docker image from Docker Hub. You can then proceed directly to the the instructions on how to execute DORiE. The commands listed there are appended to the usual commands for running a Docker container. See the description on Docker Hub for further details.
Docker Installation - Simple Setup¶
This setup is intended for users who simply want to start computations with DORiE.
Install Docker on your machine. Then, use git clone
to download the DORiE repository into a suitable directory on your machine. Enter the directory, and call
docker build -f docker/dorie.dockerfile -t dorie .
Docker will use a prepared image from Dockerhub and install DORiE into it. You can now call DORiE via the Docker deamon from any directory dir
on your machine:
docker run -it -v <dir>:/sim dorie <command>
The -v
option tells docker to mount the directory into the container work directory (sim
).
In the section ‘Usage’ you will find a list of possible commands. Note that input and output files can only be placed in the <dir>
directory or subdirectories thereof. You must use relative paths in the DORiE configuration files.
Manual Installation¶
Installing all packages manually can be quite an effort, but useful for developers who want to have easy access to the source files or users who prefer to run DORiE without the Docker overhead.
Whenever possible, dependencies should be installed using a package manager, like APT on Ubuntu or Homebrew on Mac. Manual installation on a Windows environment is strongly discouraged!
DORiE is configured, built, and installed via the
DUNE Buildsystem, using the
dunecontrol
script to handle DUNE-internal dependencies.
Dependencies¶
Depending on your system configuration, there will be more packages necessary to install DORiE on your machine. See the step-by-step manual for further details.
The specified versions are the supported ones, where compatibility is ensured by CI tests.
| Software | Version/Branch | Comments | | ———| ————– | ——– | | CMake | 3.10.2 | | GCC | 7.3 | Alternatively: LLVM Clang >=6 | git | | pkg-config | | HDF5 | 1.10 | with MPI support | FFTW3 | 3.3.7 | with MPI support | Python | 3.6 | | pip | 3.6 | | MPI | | Tested with OpenMPI 2.1.1 | SuperLU | 5.2 | | dune-common | releases/2.6 | dune-geometry | releases/2.6 | dune-grid | releases/2.6 | dune-uggrid | releases/2.6 | dune-istl | releases/2.6 | dune-localfunctions | releases/2.6 | dune-functions | releases/2.6 | dune-typetree | releases/2.6 | dune-pdelab | releases/2.6 | dune-randomfield | master
Optional Packages¶
| Software | Version/Branch | Comments | | ———| ————– | ——– | | dune-testtools | master | Handles system tests | doxygen | 1.8.13 | Builds documentation | METIS | 5 | For parallel runs | ParMETIS | 4 | For parallel runs
Step-by-step Instructions¶
These instructions are suitable for a clean Ubuntu or macOS setup. The main difference between the two systems is the package manager. Debian-based systems have the APT manager already built in. On Mac, we recommend installing Homebrew. If you prefer to use MacPorts, you need to check if some of the packages require different installation options than displayed here.
If you installed Anaconda on your machine, you don’t need to install Python or Pip. Simply skip these packages when using the package managers for installing the software. However, notice the warnings when compiling DORiE below!
macOS users need to start by installing the Apple Command Line Tools by executing
xcode-select --install
Install third party packages:
Ubuntu:
apt update apt install cmake doxygen gcc g++ gfortran \ git libatlas-base-dev libfftw3-dev libfftw3-mpi-dev \ libfreetype6-dev libhdf5-mpi-dev libopenmpi-dev libpng-dev \ libsuperlu-dev libxft-dev python3-dev python3-pip
macOS:
brew update brew install cmake doxygen gcc libpng open-mpi \ pkg-config python3 superlu brew install hdf5 --with-mpi brew install fftw --with-mpi
The parallel linear solver of DORiE can make use of the ParMETIS package. If you want to run DORiE in parallel on multiple processes, additionally install METIS and ParMETIS:
Ubuntu:
apt install libmetis-dev libparmetis-dev
macOS: Support is dropped because ParMETIS is currently unavailable from Homebrew.
Parallel runs without these two packages are possible but not supported!
Clone the DUNE modules and DORiE into a suitable folder on your machine. Use
git checkout
to switch to the correct branches (see above). Enter the parent folder, and callCMAKE_FLAGS="-DDUNE_PYTHON_VIRTUALENV_SETUP=True -DDUNE_PYTHON_ALLOW_GET_PIP=True" ./dune-common/bin/dunecontrol all
to build all DUNE modules. Additionally, you can add
MAKE_FLAGS="-j X"
before the call todunecontrol
to compile onX
processes in parallel.If you installed software into paths not appended to your
PATH
variable, you will have to addCMAKE_FLAGS
to the call to make sure that CMake finds all packages. Alternatively, you can add a custom options file. See the DUNE Installation Instructions for details. CMake will throw an error if required packages are not found.Warning: Anacoda supplies its own version of HDF5 which is typically found first by CMake. If you have Anaconda installed on your machine, add
HDF5_ROOT=/usr/local
to the
CMAKE_FLAGS
in the call todunecontrol
above.After a successful build you can call the
dorie
wrapper located indorie/build-cmake/bin
from anywhere on your machine, but it is more handy to add this location to your search path. You can add the directory to yourPATH
variable by callingPATH=<path/to/>dorie/build-cmake/bin:$PATH
However, this will only last for your current terminal session. Another option is to add this path permanently in your shell configuration file.
Installing DUNE and DORiE via
make install
into your usual work environment is strongly discouraged!
Experimental Features¶
The local operator implementing Richards equation’s discretization supports
multiple scheme settings. Setting these via the config file is disabled by
default. You can enable this feature by reconfiguring DORiE with the CMake flag
-DEXPERIMENTAL_DG_FEATURES=On
, and rebuilding it.
The configuration settings in the section [dg.experimental]
will then override
the default settings.
Recommended Third-Party Software¶
The following software packages are cross-platform, so you should be able to find a release that fits your operating system:
Usage¶
Documentation¶
The documentation of the latest release branch can be found online.
The documentation can be built after DORiE has been properly configured (i.e., by calling dunecontrol
). Note that you might have to re-configure DORiE once after installing it, because some dependencies are installed at configure time (e.g. by dunecontrol --only=dorie configure
). To build the documentation, just run
dunecontrol --only=dorie make doc
or navigate to the dorie/build-cmake
directory and call
make doc
The documentation files can now be found in the subfolder dorie/build-cmake/doc
.
Run, DORiE, Run!¶
If you made the DORiE wrapper directory available through your PATH
variable, you can call it by simply executing
dorie <command>
You can always find the wrapper in the dorie/build-cmake/bin
folder of your installation and call it directly with
<path/to/>dorie/build-cmake/bin/dorie <command>
To start your first simulation run, create a new directory and enter it. Place some exemplary configuration and boundary condition data files in there by calling
dorie create
DORiE encapsulates two routines, the Parameter Field Generator (PFG) and the main program routine. Each takes a single .ini
configuration file as arguments.
Tweak the paramters to your liking and then call
dorie pfg <inifile>
to create a parameter field file. Make sure that you instruct the main routine to call the file you just created. Then call
dorie run <inifile>
to execute the main program.
List all available commands and find further help by executing
dorie --help
or
dorie <command> --help
Start an interactive Docker session¶
In case you built DORiE using docker build
and want to start an interactive session, e.g. to build the documentation or do some debugging, you can do so by specifying a custom entrypoint for the container:
docker run -i -t --entrypoint=/bin/bash -v <dir>:/sim dorie
This way, an interactive bash session inside the container will be started (instead of directly running DORiE). Note that DUNE and DORiE are located in /opt/dune
.
Troubleshooting¶
CMake heavily caches the results of its configuration process. In case you encounter errors or strange behavior, especially after an update, you should delete the DORiE build folder (called build-cmake
by default) and re-install DORiE using dunecontrol
.
If the problem persists, take a look at the List of Known Bugs, or create an issue yourself. For problems related to the installation, refer to the sections below.
Debugging¶
DORiE can be built with debugging flags via CMake. To do so, run
CMAKE_FLAGS="-DCMAKE_BUILD_TYPE=Debug" dunecontrol --only=dorie all
After building, a debugger can hook into the executables.
Note: If no CMAKE_BUILD_TYPE
is specified during re-configuration, the last configuration build type is used. If no CMake files exist, it defaults to Release
. You will find the actual value displayed in the final output of CMake.
To re-create a release build, configure DORiE with the release build type by executing
CMAKE_FLAGS="-DCMAKE_BUILD_TYPE=Release" dunecontrol --only=dorie all
Debugging inside Docker¶
A debugger needs special security privileges usually not provided by the Docker engine. To enable debugging inside Docker, these privileges have to be granted when calling docker run
by adding the options
--security-opt seccomp=unconfined
The debugger gdb
is pre-installed in the Docker container.
Running System Tests¶
DORiE includes system tests for comparing its results the ones of ODE solvers or former versions of itself. They ensure that DORiE is running correctly and producing the expected results. If you installed DORiE, you have to make sure that all test executables are built by calling
dunecontrol --only=dorie make build_tests
You then execute the system tests with
ARGS="--output-on-failure" dunecontrol --only=dorie make test
You will be informed whether each test has been passed or failed, and you may find additional output in the DORiE build directory.
Further Help¶
Open an issue, or write to the DORiE developer mailing list.