README.md 19.1 KB
Newer Older
1
# DORiE
2
(**D**UNE-**O**perated **Ri**chards equation solving **E**nvironment)
Dion Haefner's avatar
Dion Haefner committed
3

Lukas Riedel's avatar
Lukas Riedel committed
4 5 6 7 8
DORiE is a software package for solving the Richards equation coupled with the
passive transport equation. The core feature is a C++ PDE-solver powered by
[DUNE](https://dune-project.org/) and especially the
[DUNE-PDELab](https://dune-project.org/modules/dune-pdelab/) module.

9 10 11 12
Just getting started? Use the
[Cook Book](https://hermes.iup.uni-heidelberg.de/dorie_doc/master/html/cookbook/index.html)
in the User Manual to dive right in!

Lukas Riedel's avatar
Lukas Riedel committed
13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48
### Contents of this README

* [Overview](#overview)
* [Installation](#installation-instructions)
    * [Docker Image](#download-docker-image)
    * [Manual Installation](#manual-installation)
    * [Recommended Tools](#recommended-third-party-software)
* [Documentation](#documentation)
* [Usage](#usage)
* [Troubleshooting](#troubleshooting)

---

## Overview

DORiE offers a variety of solver and discretization solutions. The passive
transport module is optional. For both modules independently, users may choose
finite volume (FV) or discontinuous Galerkin (DG) discretizations. The latter
may be used on unstructured grids and can take advantage of adaptive local grid
refinement.

The C++ routines are accompanied by 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](mailto:dorieteam@iup.uni-heidelberg.de) of the
[TS-CCEES](http://ts.iup.uni-heidelberg.de/) research group at the
[Institute of Environmental Physics (IUP) Heidelberg](http://www.iup.uni-heidelberg.de/),
supervised by
[Kurt Roth](http://ts.iup.uni-heidelberg.de/people/prof-dr-kurt-roth/),
in collaboration with
[Ole Klein](https://conan.iwr.uni-heidelberg.de/people/oklein/) and the
[Scientific Computing Group](https://conan.iwr.uni-heidelberg.de/) of the
[Interdisciplinary Center for Scientific Computing (IWR) Heidelberg](https://typo.iwr.uni-heidelberg.de/home/).

DORiE is free software and licensed under the
49
[GNU General Public License Version 3](https://www.gnu.org/licenses/gpl-3.0.en.html).
50
For the copyright notice and the list of copyright holders,
Lukas Riedel's avatar
Lukas Riedel committed
51 52 53 54
see [`COPYING.md`](COPYING.md).

Contributions to the project are always welcome! Please notice our
[Contribution Guidelines](CONTRIBUTING.md).
55

Lukas Riedel's avatar
Lukas Riedel committed
56
## Installation Instructions
57

Lukas Riedel's avatar
Lukas Riedel committed
58 59 60 61 62
DORiE is a [DUNE](https://dune-project.org/) module and requires several other
DUNE modules as well as third party software packages. Installation can be
handled manually on your local machine, but we recommend using a pre-compiled
image for the deployment software [Docker](https://www.docker.com/) to
inexperienced users instead.
63

Lukas Riedel's avatar
Lukas Riedel committed
64
### Download Docker Image
65

Lukas Riedel's avatar
Lukas Riedel committed
66 67
No installation is necessary if you download DORiE as Docker image from
[Docker Hub](https://hub.docker.com/r/dorie/dorie/).
68

Lukas Riedel's avatar
Lukas Riedel committed
69 70 71
If you want to use any stable version of DORiE, or the most recent unstable
version, you can download the appropriate images from Docker Hub. To do so,
execute
72

Lukas Riedel's avatar
Lukas Riedel committed
73
    docker pull dorie/dorie[:<tag>]
74

Lukas Riedel's avatar
Lukas Riedel committed
75 76
Omitting the tag information downloads the image with tag `latest` which
refers to the latest stable version. You can download any tag by specifying
Lukas Riedel's avatar
Lukas Riedel committed
77 78 79 80
`<tag>`. The list of
[available tags](https://hub.docker.com/r/dorie/dorie/tags) can be found on
Docker Hub and matches the release tags list of the Git repository. The latest
unstable version is tagged as `devel`.
81

Lukas Riedel's avatar
Lukas Riedel committed
82 83 84 85
You can then proceed directly to the the instructions on
[how to execute DORiE](#running-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.
Dion Haefner's avatar
Dion Haefner committed
86

Lukas Riedel's avatar
Lukas Riedel committed
87
### Manual Installation
88

Lukas Riedel's avatar
Lukas Riedel committed
89 90 91
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.
Dion Häfner's avatar
Dion Häfner committed
92

Lukas Riedel's avatar
Lukas Riedel committed
93 94 95 96
Whenever possible, dependencies should be installed using a package manager
like [APT](https://wiki.ubuntuusers.de/APT/) on Ubuntu or
[Homebrew](http://brew.sh/) on Mac. Manual installation on a Windows
environment is not supported!
97

98 99 100 101
DORiE is configured, built, and installed via the
[DUNE Buildsystem](https://dune-project.org/doc/installation/), using the
`dunecontrol` script to handle DUNE-internal dependencies.

Lukas Riedel's avatar
Lukas Riedel committed
102
#### Step-by-step Instructions
Lukas Riedel's avatar
Lukas Riedel committed
103 104 105 106 107 108
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](http://brew.sh/). If you prefer to use
[MacPorts](https://www.macports.org/), notice that packages will need to be
installed differently than indicated here.
109

110 111 112
Manual installations on macOS require installing HDF5 from source. This can
be tricky, but the following instructions should work on a clean system.

Lukas Riedel's avatar
Lukas Riedel committed
113 114 115 116
If you installed [Anaconda](https://conda.io/docs/user-guide/install/download.html)
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!
117

Lukas Riedel's avatar
Lukas Riedel committed
118 119
1. **macOS** users need to start by installing the Apple Command Line Tools by
    executing
120 121

        xcode-select --install
122
    
Lukas Riedel's avatar
Lukas Riedel committed
123 124
    Make sure you have no pending software updates for your respective version
    of macOS!
Dion Haefner's avatar
Dion Haefner committed
125

Lukas Riedel's avatar
Lukas Riedel committed
126
2. Install third party packages:
Lukas Riedel's avatar
Lukas Riedel committed
127

128
    **Ubuntu:**
Lukas Riedel's avatar
Lukas Riedel committed
129 130

        apt update
Lukas Riedel's avatar
Lukas Riedel committed
131
        apt install cmake doxygen gcc g++ gfortran \
Dion Haefner's avatar
Dion Haefner committed
132
                    git libatlas-base-dev libfftw3-dev libfftw3-mpi-dev \
133 134
                    libfreetype6-dev libhdf5-mpi-dev libmuparser-dev \
                    libopenmpi-dev libpng-dev libsuperlu-dev libyaml-cpp-dev \
Lukas Riedel's avatar
Lukas Riedel committed
135
                    libxft-dev python3-dev python3-pip python3-vtk7
136

Lukas Riedel's avatar
Lukas Riedel committed
137
    **macOS:**
138 139

        brew update
140
        brew install cmake doxygen fftw gcc libpng open-mpi muparser \
Lukas Riedel's avatar
Lukas Riedel committed
141
                     pkg-config python3 superlu yaml-cpp
142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166

2. **macOS only:** Install HDF5 with MPI support from source.

    1. Download an archive of the
    [HDF5 source code](https://www.hdfgroup.org/downloads/hdf5/source-code/),
    and extract it.

    2. Enter the extracted folder. In there, create a `build` directory, and
    enter it:

            mkdir build && cd build

    3. Configure your build. If you followed the instructions above, the
    OpenMPI C compiler is reachable via the command `mpicc`. If not, you have
    to specify a full path to it. Use the option `prefix` to specify where
    you want the package to be installed. This should *not* be a
    system-reserved path like `/usr/local`, and *not* be located in a
    sub-directory of the source code. Execute the configuration script:

            ./../configure CC=mpicc --prefix=<hdf5-path> --enable-parallel

    4. Build and install the library:

            make && make install

Lukas Riedel's avatar
Lukas Riedel committed
167 168 169
3. 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:
Lukas Riedel's avatar
Lukas Riedel committed
170 171 172

    **Ubuntu:**

173
        apt install libmetis-dev libparmetis-dev
Lukas Riedel's avatar
Lukas Riedel committed
174

Lukas Riedel's avatar
Lukas Riedel committed
175 176
    **macOS:** _Support is dropped because ParMETIS is currently unavailable
    from Homebrew._
Lukas Riedel's avatar
Lukas Riedel committed
177 178 179

    **Parallel runs without these two packages are possible but not supported!**

Lukas Riedel's avatar
Lukas Riedel committed
180 181
4. Clone the [DUNE modules](#dune-Packages) into a suitable folder on your
    machine. Use `git checkout` to switch to the correct branches.
182 183 184 185 186 187 188 189 190

5. Clone DORiE into the same folder.

    DORiE includes
    [Git Submodules](https://git-scm.com/book/en/v2/Git-Tools-Submodules),
    which requires you to add the `--recurse-submodules` option to the
    `git clone` command. Switch to the desired branch or tag.

6. Enter the parent folder, and call
191 192

        CMAKE_FLAGS="-DDUNE_PYTHON_VIRTUALENV_SETUP=True -DDUNE_PYTHON_ALLOW_GET_PIP=True" ./dune-common/bin/dunecontrol all
193

Lukas Riedel's avatar
Lukas Riedel committed
194 195
    to build all DUNE modules. Additionally, you can add `MAKE_FLAGS="-j X"`
    to the command in order to compile on `X` processes in parallel.
196

Lukas Riedel's avatar
Lukas Riedel committed
197 198 199 200 201
    If you installed software into paths not appended to your `PATH` variable,
    you will have to add `CMAKE_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](https://dune-project.org/doc/installation/)
    for details. CMake will throw an error if required packages are not found.
202

Lukas Riedel's avatar
Lukas Riedel committed
203
    If you installed HDF5 from source (all **macOS** users) or use Anaconda,
204 205 206 207 208 209
    specify the path to your HDF5 installation by using the `HDF5_ROOT`
    variable. On Ubuntu, add the path to the APT package,

        -DHDF5_ROOT=/usr/

    and on macOS, add
210

211
        -DHDF5_ROOT=<hdf5-path>
212

213 214
    to the `CMAKE_FLAGS` in the above command, replacing `<hdf5-path>` with the
    path chosen as installation prefix when configuring HDF5.
215

Lukas Riedel's avatar
Lukas Riedel committed
216
### Recommended Third-Party Software
217

Lukas Riedel's avatar
Lukas Riedel committed
218 219
The following software packages are cross-platform, so you should be able to
find a release that fits your operating system:
Dion Haefner's avatar
Dion Haefner committed
220

Lukas Riedel's avatar
Lukas Riedel committed
221 222 223 224
* [ParaView](http://www.paraview.org/): A powerful post-processing tool for VTK
    files. Offers both visualization and data analysis tools.
* [Gmsh](http://gmsh.info/): An open-source CAD that can be used to create the
    `.msh` files used by DORiE to define unstructured meshes.
Dion Haefner's avatar
Dion Haefner committed
225

Lukas Riedel's avatar
Lukas Riedel committed
226 227 228 229 230
### 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.
Dion Haefner's avatar
Dion Haefner committed
231

Lukas Riedel's avatar
Lukas Riedel committed
232
#### DUNE Packages
233

Lukas Riedel's avatar
Lukas Riedel committed
234 235 236 237 238 239 240 241 242 243 244 245 246 247 248
| Software | Version/Branch | Comments |
| ---------| -------------- | -------- |
| [dune-common](https://gitlab.dune-project.org/core/dune-common) | releases/2.6
| [dune-geometry](https://gitlab.dune-project.org/core/dune-geometry) | releases/2.6
| [dune-grid](https://gitlab.dune-project.org/core/dune-grid) | releases/2.6
| [dune-uggrid](https://gitlab.dune-project.org/staging/dune-uggrid) | releases/2.6
| [dune-istl](https://gitlab.dune-project.org/core/dune-istl) | releases/2.6
| [dune-localfunctions](https://gitlab.dune-project.org/core/dune-localfunctions) | releases/2.6
| [dune-functions](https://gitlab.dune-project.org/staging/dune-functions) | releases/2.6
| [dune-typetree](https://gitlab.dune-project.org/staging/dune-typetree) | releases/2.6
| [dune-pdelab](https://gitlab.dune-project.org/pdelab/dune-pdelab) | releases/2.6
| [dune-randomfield](https://gitlab.dune-project.org/oklein/dune-randomfield) | releases/2.6
| [dune-testtools](https://gitlab.dune-project.org/quality/dune-testtools) | releases/2.6 | *Optional:* For system tests

#### DUNE Requirements
249

Lukas Riedel's avatar
Lukas Riedel committed
250 251 252 253 254 255 256 257 258 259 260
| Software | Version/Branch | Comments |
| ---------| -------------- | -------- |
| CMake | 3.10.2 |
| GCC | 7.3 | Alternatively: LLVM Clang >=6, or Apple Clang 10
| git |
| pkg-config |
| FFTW3 | 3.3.7 | MPI support required
| Python | 3.6 |
| pip | 3.6 |
| MPI | | Tested with OpenMPI 2.1.1
| SuperLU | 5.2 |
Dion Haefner's avatar
Dion Haefner committed
261

Lukas Riedel's avatar
Lukas Riedel committed
262
#### DORiE Requirements
263

Lukas Riedel's avatar
Lukas Riedel committed
264 265 266 267 268 269 270 271 272 273
| Software | Version/Branch | Comments |
| ---------| -------------- | -------- |
| [HDF5](https://www.hdfgroup.org/solutions/hdf5/) | 1.10 | MPI support required
| [yaml-cpp](https://github.com/jbeder/yaml-cpp) | >= 5.2.0 |
| [muparser](http://beltoforion.de/article.php?a=muparser) | master |
| [VTK](https://vtk.org/) | >= 7.1.1 | For the Python module only
| [spdlog](https://github.com/gabime/spdlog) | 1.1.0 | Included as Git Submodule
| [Google Test](https://github.com/google/googletest) | `HEAD` | Included as Git Submodule

#### Optional Packages
274

Lukas Riedel's avatar
Lukas Riedel committed
275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292
| Software | Version/Branch | Comments |
| -------- | -------------- | -------- |
| [doxygen](http://www.stack.nl/~dimitri/doxygen/) | 1.8.13 | Builds documentation
| [METIS](http://glaros.dtc.umn.edu/gkhome/views/metis) | 5 | For parallel runs
| [ParMETIS](http://glaros.dtc.umn.edu/gkhome/views/metis) | 4 | For parallel runs


## Documentation

The documentation of DORiE is twofold. The Sphinx documentation contains a
manual with guidelines and tutorials for users of the compiled software
package. The Doxygen documentation of the C++ source code is intended for
developers only and explains the inner workings of the software.

Both parts of the documentation are deployed to our documentation server for
every branch pushed to the main repository. You will find the latest
[user manual](https://hermes.iup.uni-heidelberg.de/dorie_doc/master/html/) and
[C++ code documentation](https://hermes.iup.uni-heidelberg.de/dorie_doc/master/doxygen/html/)
293 294
there. The documentation for other branches can be accessed via the
[overview page](https://hermes.iup.uni-heidelberg.de/dorie_doc/).
Dion Haefner's avatar
Dion Haefner committed
295

296 297
The documentation can also be built locally after DORiE has been properly
configured following the step-by-step instructions above. To build the
Lukas Riedel's avatar
Lukas Riedel committed
298
documentation, move to the `dorie/build-cmake` directory and simply run
Lukas Riedel's avatar
Lukas Riedel committed
299 300 301

    make doc

Lukas Riedel's avatar
Lukas Riedel committed
302 303 304
You will then find the index page of the Sphinx user documentation at
`dorie/build-cmake/doc/html/index.html` and the index page of the Doxygen
source code documentation at `dorie/build-cmake/doc/doxygen/html/index.html`.
Dion Haefner's avatar
Dion Haefner committed
305

Lukas Riedel's avatar
Lukas Riedel committed
306 307 308
## Usage

DORiE provides a command line interface (CLI) for all its user functions.
Lukas Riedel's avatar
Lukas Riedel committed
309
The required Python modules and all their dependencies are readily installed
Lukas Riedel's avatar
Lukas Riedel committed
310
into a Python virtual environment (`venv`), which has to be activated within a
Lukas Riedel's avatar
Lukas Riedel committed
311 312
shell session. You can do so by activating it in your current session
(Manual Installation only) or by running the Docker application.
313

Lukas Riedel's avatar
Lukas Riedel committed
314 315 316
### Run the `venv` using the Docker application
If you did not install DORiE locally, you can use the Docker application to
boot up the virtual environment in a mounted directory of your choice.
317

Lukas Riedel's avatar
Lukas Riedel committed
318
Start up the Docker application by calling
Lukas Riedel's avatar
Lukas Riedel committed
319

Lukas Riedel's avatar
Lukas Riedel committed
320
    docker run -it -v <dir>:/mnt <img>
321

Lukas Riedel's avatar
Lukas Riedel committed
322
where you replace `<dir>` with a local directory for storing input and output
Lukas Riedel's avatar
Lukas Riedel committed
323 324 325
data, and `<img>` with `dorie/dorie[:<tag>]`. We recommend moving into the
designated input and output directory on your local machine and inserting
`$PWD` as `<dir>` to mount the current directory into the container.
326

Lukas Riedel's avatar
Lukas Riedel committed
327 328 329 330
The command boots up a (`bash`) shell inside a Docker container and mounts
the directory `<dir>` and all its subdirectories into the directory `/mnt`
inside the container. Your shell session starts in this directory with the
virtual environment activated.
331

Lukas Riedel's avatar
Lukas Riedel committed
332 333
Notice, that you can only use **local file paths** in all configuration
settings due to the directory mount.
334

Lukas Riedel's avatar
Lukas Riedel committed
335
### Activate the `venv` locally
Lukas Riedel's avatar
Lukas Riedel committed
336
To activate the virtual environment within your current shell session, execute
337

Lukas Riedel's avatar
Lukas Riedel committed
338
    source <path/to/>dorie/build-cmake/activate
339

Lukas Riedel's avatar
Lukas Riedel committed
340
where you replace `<path/to/>` with the path to the appropriate directory.
341

Lukas Riedel's avatar
Lukas Riedel committed
342 343 344
Your shell will now display the prefix `(dune-env)` to indicate that it is
configured appropriately. You can exit the environent at any time by simply
executing
Dion Haefner's avatar
Dion Haefner committed
345

Lukas Riedel's avatar
Lukas Riedel committed
346
    deactivate
Dion Haefner's avatar
Dion Haefner committed
347

Lukas Riedel's avatar
Lukas Riedel committed
348 349
Notice that any virtual environment only applies to, and lasts for, your
current terminal session!
Dion Haefner's avatar
Dion Haefner committed
350

Lukas Riedel's avatar
Lukas Riedel committed
351 352
_With the virtual environment activated,_ you can now navigate to any directory
that you would like to contain your simulation input and/or output data.
Dion Haefner's avatar
Dion Haefner committed
353

Lukas Riedel's avatar
Lukas Riedel committed
354
### Execute the application
Lukas Riedel's avatar
Lukas Riedel committed
355
Any command to the DORiE application has the signature
356

Lukas Riedel's avatar
Lukas Riedel committed
357
    dorie <cmd> [<opts>] [<args>]
358

Lukas Riedel's avatar
Lukas Riedel committed
359
Using the `-h` or `--help` option, you can find all available commands and
Lukas Riedel's avatar
Lukas Riedel committed
360 361
further help. To start your first simulation run, create a new directory and
enter it.
Lukas Riedel's avatar
Lukas Riedel committed
362

Lukas Riedel's avatar
Lukas Riedel committed
363 364 365
#### 1 — Default input files
Create some exemplary configuration files along with parameter and boundary
condition data files by calling
Lukas Riedel's avatar
Lukas Riedel committed
366 367

    dorie create
Lukas Riedel's avatar
Lukas Riedel committed
368

Lukas Riedel's avatar
Lukas Riedel committed
369 370 371 372 373 374 375
The data files are valid input files for very limited scenarios. The main
configuration file `config.ini` requires tweaking by the user. Most `UNDEFINED`
values must be properly defined before starting the simulation. A cheat sheet
for the single config file entries as well as manuals on how the boundary
condition and parameter files are used can be found in the user documentation.

#### 2 — _Optional:_ Create a random field
Lukas Riedel's avatar
Lukas Riedel committed
376
DORiE implements a lightweight wrapper around the `dune-randomfield`
Lukas Riedel's avatar
Lukas Riedel committed
377 378 379
generator. You can use it to easily create a heterogeneous soil architecture.
This step is optional. Tweak the parameters of `parfield.ini` to your liking
and then call
Lukas Riedel's avatar
Lukas Riedel committed
380

Lukas Riedel's avatar
Lukas Riedel committed
381 382
    dorie pfg parfield.ini

Lukas Riedel's avatar
Lukas Riedel committed
383 384 385
A cheat sheet for this config file is also available from the documentation.

#### 3 — Perform a simulation
Lukas Riedel's avatar
Lukas Riedel committed
386 387 388 389 390 391 392
The DORiE main routine is executed with the `run` command.
Tweak the parameters of `config.ini` to your liking. You will need to
reference several additional input files for soil parameters, boundary
conditions, GMSH grid files (optional), and grid mappings (optional).
Refer to the documentation for further information.

Once prepared, call
Lukas Riedel's avatar
Lukas Riedel committed
393 394 395

    dorie run config.ini

Lukas Riedel's avatar
Lukas Riedel committed
396
to execute the solver.
Lukas Riedel's avatar
Lukas Riedel committed
397

Lukas Riedel's avatar
Lukas Riedel committed
398 399 400 401 402 403
## 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-build
DORiE using `dunecontrol`.
Dion Haefner's avatar
Dion Haefner committed
404

Lukas Riedel's avatar
Lukas Riedel committed
405 406 407
If the problem persists, take a look at the
[list of Issues](https://ts-gitlab.iup.uni-heidelberg.de/dorie/dorie/issues),
and feel free to create an Issue yourself if the problem is not yet reported.
Dion Haefner's avatar
Dion Haefner committed
408

Lukas Riedel's avatar
Lukas Riedel committed
409
### Debugging
Dion Haefner's avatar
Dion Haefner committed
410
DORiE can be built with debugging flags via CMake. To do so, run
411

Dion Haefner's avatar
Dion Haefner committed
412
    CMAKE_FLAGS="-DCMAKE_BUILD_TYPE=Debug" dunecontrol --only=dorie all
413

Dion Haefner's avatar
Dion Haefner committed
414
After building, a debugger can hook into the executables.
415

Lukas Riedel's avatar
Lukas Riedel committed
416 417 418 419
**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.
420

Lukas Riedel's avatar
Lukas Riedel committed
421 422
To re-create a release build, configure DORiE with the release build type by
executing
423

Dion Haefner's avatar
Dion Haefner committed
424
    CMAKE_FLAGS="-DCMAKE_BUILD_TYPE=Release" dunecontrol --only=dorie all
425

Lukas Riedel's avatar
Lukas Riedel committed
426 427 428 429 430 431 432 433
### Running System Tests
DORiE includes a testing system for comparing its results the ones of ODE
solvers or former versions of itself. This ensures that DORiE is running
correctly and producing the expected results. We distinguish _unit tests_ for
testing certain features of the code, and _system tests_ for verifying the
results of the final application. As system tests require executing the DUNE
solvers, it is recommended to build them in a `Release` environment.
Additionaly, there is a set of tests for the Python module.
Lukas Riedel's avatar
Lukas Riedel committed
434 435

| Test category | Build tests | Execute tests | Recommended build type |
436
| ------------- | ----------- | ------------- | ---------------------- |
437 438 439 440
| Unit tests | `make build_unit_tests` | `make unit_tests` | `Debug` |
| System tests | `make build_system_tests` | `make system_tests` | `Release` |
| Python tests | _Not required_ | `make test_python` | _Any_ |
| Cookbook examples (no testing performed) | `make all` | `make example_tests` | `Release` |
Lukas Riedel's avatar
Lukas Riedel committed
441 442 443

The `make` commands are to be executed from within the `build-cmake` directory.

444 445 446 447 448 449 450 451 452
#### Code Coverage Report
To enable code coverage reports, configure DORiE with the CMake option
`COVERAGE_REPORT` enabled, like so (from the `build-cmake` directory):

    cmake -DCOVERAGE_REPORT=On ..

This will add the appropriate compiler flags to _all_ targets. You then have to
re-build all binaries. After running tests or executing the application, you
can retrieve code coverage information using the
Lukas Riedel's avatar
Lukas Riedel committed
453
[`gcovr`](https://gcovr.com/index.html) utility.
Dion Haefner's avatar
Dion Haefner committed
454

Lukas Riedel's avatar
Lukas Riedel committed
455 456 457 458
### Further Help
[Open an Issue](https://ts-gitlab.iup.uni-heidelberg.de/dorie/dorie/issues/new),
on GitLab or write to the
[DORiE developer mailing list](mailto:dorieteam@iup.uni-heidelberg.de).