Commit eb3e9ff1 authored by Dion Haefner's avatar Dion Haefner

Adjusted README:

  * use dunecontrol for all commands instead of fiddling with CMake in the build directory
  * some third-party version requirements seemed too strict
  * removed optional packages (METIS, parMETIS, Breathe, Sphinx)
  * removed Python VTK as suggested package. This is nearly impossible to build from source. People can use our VTK readers for post-processing (coming soon).
  * added section on cleaning build (delete build-cmake folder)
  * stressed that dunecontrol make install is optional (may not be desired by the user due to permissions / personal preference)

Added setup.py file for doc folder, so Sphinx and Breathe are installed at configure time now

Removed third-party Python packages from install_requires in setup.py files

Compiler flags are handled by CMake now. Default build type is Release, which automatically adds optimization flags, and equivalently for the Debug build type (cf. e.g. CMAKE_CXX_FLAGS_RELEASE).
parent 68db3308
cmake_minimum_required(VERSION 2.8.12)
project(dorie CXX)
# set build type
if(NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE "Release")
endif()
string(TOUPPER ${CMAKE_BUILD_TYPE} CMAKE_BUILD_TYPE_UPPER)
if(CMAKE_BUILD_TYPE_UPPER MATCHES DEBUG)
set(CMAKE_VERBOSE_MAKEFILE ON)
endif()
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -Wall")
#
if(NOT (dune-common_DIR OR dune-common_ROOT OR
"${CMAKE_PREFIX_PATH}" MATCHES ".*dune-common.*"))
string(REPLACE ${CMAKE_PROJECT_NAME} dune-common dune-common_DIR
${PROJECT_BINARY_DIR})
endif()
#find dune-common and set the module path
# find dune-common and set the module path
find_package(dune-common REQUIRED)
list(APPEND CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake/modules"
${dune-common_MODULE_PATH})
#include the dune macros
# include the dune macros
include(DuneMacros)
# set some variables
set(CMAKE_DISABLE_FIND_PACKAGE_Python2Interp 1)
# start a dune project with information from dune.module
dune_project()
dune_enable_all_packages()
......@@ -38,8 +47,4 @@ add_subdirectory("cmake/modules")
# finalize the dune project, e.g. generating config.h etc.
finalize_dune_project(GENERATE_CONFIG_H_CMAKE)
if(NOT CMAKE_BUILD_TYPE)
message(STATUS "Build Type: None")
else()
message(STATUS "Build Type: ${CMAKE_BUILD_TYPE}")
endif()
\ No newline at end of file
message(STATUS "Build Type: ${CMAKE_BUILD_TYPE}")
......@@ -3,32 +3,32 @@
[![build status](http://shangrila.iup.uni-heidelberg.de:30000/ci/projects/1/status.png?ref=master)](http://shangrila.iup.uni-heidelberg.de:30000/ci/projects/1?ref=master)
DORiE is a software suite for solving Richard's Equation. The core feature is a C++ PDE-solver powered by [DUNE](https://dune-project.org/). It implements a Discontinous Galerkin (DG) discretization scheme on structured rectangular and unstructured simplex grids in two and three spatial dimensions, and makes use of advanced features like adaptive grid refinement.
DORiE is a software suite for solving Richard's Equation. The core feature is a C++ PDE-solver powered by [DUNE](https://dune-project.org/). 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](mailto:dorieteam@iup.uni-heidelberg.de) of the [TS-CCEES](http://ts.iup.uni-heidelberg.de/) research group at IUP Heidelberg, 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 IWR Heidelberg, supervised by [Kurt Roth](http://ts.iup.uni-heidelberg.de/people/prof-dr-kurt-roth/).
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 IUP Heidelberg, 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 IWR Heidelberg.
# Installation Instructions
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 it's recommended to use the virtualization software [Docker](https://www.docker.com/) instead.
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 for inexperienced users it is recommended to use the deployment software [Docker](https://www.docker.com/) instead.
In any case, DORiE is configured, build, and installed via the [DUNE Buildsystem](https://dune-project.org/doc/installation/), using the `dunecontrol` script to handle DUNE-internal dependencies.
In any case, 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.
## Docker Installation
Install Docker on your machine. We prepared the [DORiE DUNE Environment Image](https://hub.docker.com/r/dorie/dune-env/) on [Dockerhub](https://hub.docker.com/). It's an image of the Ubuntu OS with all dependencies readily installed. The current version is v2.4 (referencing the DUNE module versions 2.4).
Install Docker on your machine. We have prepared a [DORiE DUNE Environment Image on Dockerhub](https://hub.docker.com/r/dorie/dune-env/), which is a modified image of the Ubuntu OS that has all dependencies readily installed. The current version is 2.4 (referencing the DUNE module version 2.4).
Run a new container from this image by calling
docker run -i -t dorie/dune-env:2.4 /bin/bash
Docker will automatically download the image if you did not already `docker pull` it. Use the `-v` option of the `run` command to mount a local directory into the container:
Docker will automatically download the image if necessary. Use the `-v` option of the `run` command to mount a local directory into the container:
-v <hostdir/dorie>:/opt/dune/dorie
This way, you can access the content of the (still empty) folder of the virtual machine from your local `<hostdir>/dorie` directory. *Mounting directories is not possible after your container has been started!*
Next, `git clone` the DORiE repository into the shared folder. Enter the container, and execute
Next, use `git clone` to download the DORiE repository into the shared folder. Enter the container, and execute
dunecontrol --only=dorie all
......@@ -50,29 +50,24 @@ Then compile and install all modules again by executing
Installing all packages manually can be quite an effort, but useful for developers who want to easily access documentation material and source files of the dependency packages. 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 strongly discouraged!
### Dependencies
Depending on your system configuration, there will be more packages necessary to install the software on your machine. See the step-by-step manual for further details.
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.
| Software | Version/Branch | Comments |
| ---------| -------------- | -------- |
| CMake | >= 3.0 |
| doxygen |
| CMake | >= 2.8.12 |
| GCC | >= 5 |
| git |
| pkg-config |
| HDF5 | | MPI library
| FFTW3 | | MPI library
| METIS |
| ParMETIS |
| Python | 3 |
| Python Pip | 3 |
| OpenMPI | >= 2 |
| SuperLU | >=5 |
| HDF5 | | with MPI support
| FFTW3 | | with MPI support
| Python | 2.7 or 3.x |
| pip | 2.7 or 3.x |
| MPI | | Tested with OpenMPI and Mpich
| SuperLU | 4.3 or 5.x |
| ----- | ----- | ----- |
| Breathe | | Install via `pip` |
| Sphinx | | Install via `pip` |
| VirtualEnv | | Install via `pip` |
| VirtualEnv | | Install via `pip` |
| ----- | ----- | ----- |
| [UG](https://gitlab.dune-project.org/ug/ug) | 3.12.1 | Follow the [IWR Installation Instructions](http://www.iwr.uni-heidelberg.de/frame/iwrwikiequipment/software/ug)
| [UG](https://gitlab.dune-project.org/ug/ug) | 3.12.1 | Follow the [IWR Installation Instructions](http://www.iwr.uni-heidelberg.de/frame/iwrwikiequipment/software/ug)
| [dune-common](https://gitlab.dune-project.org/core/dune-common) | releases/2.4
| [dune-geometry](https://gitlab.dune-project.org/core/dune-geometry) | releases/2.4
| [dune-grid](https://gitlab.dune-project.org/core/dune-grid) | releases/2.4
......@@ -83,55 +78,40 @@ Depending on your system configuration, there will be more packages necessary to
| [dune-python](https://gitlab.dune-project.org/quality/dune-python) | releases/2.4
| [dune-testtools](https://gitlab.dune-project.org/quality/dune-testtools) | releases/2.4
### Ubuntu Manual Installation
The following instructions follow the installation instructions on a 'clean' Ubuntu system and are similarly executed to create the DORiE Docker image from an Ubuntu Docker image.
If you also want to build the documentation, you will additionally need to install Doxygen.
1. Install the third party software using `apt-get`:
### Manual Installation on Ubuntu
The following instructions follow the basic installation on a fresh Ubuntu system and are similarly executed to create the DORiE Docker image.
1. Install third party packages:
apt-get update && apt-get install -y \
autoconf \
bison \
cmake \
doxygen \
flex \
gcc-5 \
g++-5 \
gfortran-5 \
git \
libatlas-base-dev \
libfftw3-dev \
libfftw3-mpi-dev \
libfreetype6-dev \
libhdf5-mpi-dev \
libmetis-dev \
libopenmpi-dev \
libpng-dev \
libscotchparmetis-dev \
libsuperlu-dev \
libxft-dev \
python3-dev \
python3-pip
apt update
apt install autoconf bison cmake doxygen flex gcc-5 g++-5 gfortran-5 \
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
2. Install the necessary Python packages using `pip`:
python3 -m pip install virtualenv
python3 -m pip install sphinx
python3 -m pip install breathe
3. Clone UG into a suitable folder on your machine and `git checkout` the specified version. Install it by calling
3. Clone the specified version of UG into a suitable folder on your machine. Install it by calling
autoreconf -is
./configure --prefix=<dir> --enable-parallel --without-x --enable-dune --enable-system-heap
./configure --enable-parallel --without-x --enable-dune --enable-system-heap
make && make install
Replace `<dir>` with a installation directory of choice.
4. Clone the DUNE modules and DORiE into a suitable folder on your machine. Make sure that you check out the correct branches (2.4 release branch). Enter the parent folder, and call
./dune-common/bin/dunecontrol all
4. Clone the DUNE modules and DORiE into a suitable folder on your machine. Make sure that you `git checkout` the specified branches. Enter the folder, and call
If you installed software into paths not appended to your `PATH` variable, you will have to add a custom options file to make sure that CMake finds all packages. See the [DUNE Installation Instructions](https://dune-project.org/doc/installation/) for details. CMake will throw an error if required packages are not found.
5. To install all DUNE packages into system locations (so you can call `dunecontrol` and `dorie` from anywhere), you can run
./dune-common/bin/dunecontrol all -DCMAKE_CXX_FLAGS="-O3"
./dune-common/bin/dunecontrol make install
If you installed software into paths not appended to your `PATH` variable, you will have to add a custom options file to make sure that CMake finds all packages. See the [DUNE Installation Instructions](https://dune-project.org/doc/installation/) for details. CMake will throw an error if required packages are not found.
This may require `sudo` rights on your machine. If you choose not to do this, make sure to append the location of `dunecontrol` (`dune-common/bin`) and `dorie` (`dorie/build-cmake/bin`) to your search path.
## Recommended Third-Party Software
......@@ -139,26 +119,25 @@ The following software packages are cross-platform, so you should be able to fin
* [Gmsh](http://gmsh.info/): An open-source CAD that can be used to create the `.msh` files used by DORiE to define triangular meshes.
* [ParaView](http://www.paraview.org/): A powerful post-processing tool for VTK files. Offers both visualization and data analysis tools.
* [Python VTK tools](http://www.vtk.org/Wiki/VTK/Examples/Python): If you want to write your own post-processing in python, you may use these tools which supply readers for binary VTK files.
# Usage
## Documentation
The documentation of the current `master` branch can be found [online](http://dorie-docs.gitballoon.com) (password: `richards`).
The documentation can be built after DORiE has been properly configured (i.e., by calling `dunecontrol`). Enter the build directory of DORiE (`dorie/build-cmake`) and execute
The documentation can be built after DORiE has been properly configured (i.e., by calling `dunecontrol`). Just run
make doc
dunecontrol --only=dorie make doc
The documentation files can now be found in the subfolder `dorie/build-cmake/doc`.
## Usage
DORiE installs a binary wrapper to access the functions and executables of DORiE from any location on your device. After a successful installation, you can call the wrapper by simply executing
During `make install`, DORiE installs a wrapper to access the functions and executables of DORiE from any location on your device. After a successful installation, you can call the wrapper by simply executing
dorie <command>
If you did not run `dunecontrol make install`, you can find the wrapper in the `dorie/build-cmake/bin` folder of your installation.
To start your first simulation run, create a new directory and enter it. Place some exemplary configuration files in there by calling
......@@ -175,27 +154,29 @@ List all available commands and find further help by executing
dorie help
## Troubleshooting
In case you encounter errors or strange behavior, you should first take a look at the [List of Known Bugs](http://shangrila.iup.uni-heidelberg.de:30000/dorie/dorie/issues?assignee_id=&author_id=&label_name=bug&milestone_id=&scope=all&sort=created_desc&state=opened). For problems related to the installation, refer to the sections below.
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](http://shangrila.iup.uni-heidelberg.de:30000/dorie/dorie/issues?assignee_id=&author_id=&label_name=bug&milestone_id=&scope=all&sort=created_desc&state=opened), or create an issue yourself. For problems related to the installation, refer to the sections below.
### Debugging
DORiE supports debugging builds via CMake. Navigate to the build directory (`dorie/build-cmake`) and execute
DORiE can be built with debugging flags via CMake. To do so, run
cmake -D CMAKE_BUILD_TYPE=Debug .. && make all
CMAKE_FLAGS="-DCMAKE_BUILD_TYPE=Debug" dunecontrol --only=dorie all
to reconfigure DORiE into a debugging build. This builds DORiE without optimization and inlcudes debugging flags. After building, a debugger can hook into the executables.
After building, a debugger can hook into the executables.
**Notice:** 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 `None`. You will find the actual value displayed in the final output of CMake.
**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 default build, configure DORiE with the default build type (`None`) by executing
To re-create a release build, configure DORiE with the release build type by executing
cmake -D CMAKE_BUILD_TYPE=None .. && make all
CMAKE_FLAGS="-DCMAKE_BUILD_TYPE=Release" dunecontrol --only=dorie all
### DORiE is running, but I suspect that something is wrong
You can execute system tests in order to ensure that DORiE is running correctly and producing the expected results. Navigate to the build directory (`dorie/build-cmake`) end execute
You can execute system tests in order to ensure that DORiE is running correctly and producing the expected results:
make test
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](mailto:dorieteam@iup.uni-heidelberg.de).
\ No newline at end of file
Open an issue, or write to the [DORiE developer mailing list](mailto:dorieteam@iup.uni-heidelberg.de).
......@@ -6,6 +6,7 @@ endfunction()
set(python_paths "")
install_python_package("doc" python_paths)
install_python_package("utilities" python_paths)
install_python_package("parscraper" python_paths)
if(dune-testtools_FOUND)
......
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import sys
from setuptools import setup
# do nothing, just install requirements
setup(name='dorie.doc')
......@@ -15,5 +15,5 @@ setup(name='dorie.testtools',
author_email='dorieteam@iup.uni-heidelberg.de',
url='',
packages=['dorie.testtools','dorie.testtools.evaluation', 'dorie.testtools.utilities','dorie.testtools.wrapper'],
install_requires=['numpy','scipy','matplotlib','dune.testtools','dorie.utilities'],
install_requires=['dune.testtools','dorie.utilities'],
scripts=dorie_testtools_scripts())
......@@ -15,6 +15,6 @@ setup(name='dorie.utilities',
author_email='dorieteam@iup.uni-heidelberg.de',
url='',
packages=['dorie.utilities'],
install_requires=['numpy','scipy','matplotlib'],
install_requires=[],
scripts=dorie_utilities_scripts()
)
add_executable("dorie" dorie.cc)
target_link_dune_default_libraries("dorie")
target_compile_options("dorie" PRIVATE $<$<CONFIG:Debug>:-Wall>)
target_compile_options("dorie" PRIVATE $<$<NOT:$<CONFIG:Debug>>:-O3 -g0>)
\ No newline at end of file
include /opt/dune/dorie/build-cmake/doc/parameters/default.ini
include /home/dion/codes/dune/dorie/build-cmake/doc/parameters/default.ini
__inifile_optionkey = run
_asset_path = "/opt/dune/dorie/testing"
_asset_path = "/home/dion/codes/dune/dorie/testing"
_evaluation = convergence, correlation
output.fileName = convergence | unique
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment