Commit 6043f4b2 authored by Lukas Riedel's avatar Lukas Riedel

Merge branch 'feature/install-instructions-mac' into 'master'

improved installation instructions, enabled 'simple' Docker installation

Readme changes:
* added manual installation instructions for Mac OS X #26 
* added information on debugging inside docker #22 
* added information on how to build Dorie inside Docker and call from outside, see #19 

Tweaked Dockerfile to install Dorie properly.

See merge request !6
parents 5055d8c6 ad32eafe
......@@ -3,6 +3,7 @@ MAINTAINER Dion Häfner
WORKDIR /opt/dune
ADD . /opt/dune/dorie/
RUN ./dune-common/bin/dunecontrol --only=dorie all -DCMAKE_CXX_FLAGS="-O3"
RUN ./dune-common/bin/dunecontrol --only=dorie make install
#RUN ./dune-common/bin/dunecontrol --only=dorie make test
RUN source /opt/dune/venv/dorie/bin/activate && ./dune-common/bin/dunecontrol --only=dorie all
ENV PATH="/opt/dune/dorie/build-cmake/bin:${PATH}"
WORKDIR /sim
ENTRYPOINT ["/opt/dune/dorie/build-cmake/bin/dorie"]
\ No newline at end of file
......@@ -7,7 +7,7 @@ DORiE is a software suite for solving Richard's Equation. The core feature is a
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, 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.
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://conan2.iwr.uni-heidelberg.de/people/oklein/) and the [Scientific Computing Group](https://conan2.iwr.uni-heidelberg.de/) of IWR Heidelberg.
# Installation Instructions
......@@ -16,8 +16,25 @@ DORiE is a [DUNE](https://dune-project.org/) module and requires several other D
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 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).
## 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 -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 -i -t -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.
## Docker Installation - Interactive Setup
This setup is intended for advanced users. You will gain access to the DORiE module outside the container, and be able to make changes to the source code.
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
......@@ -47,7 +64,9 @@ Then compile and install all modules again by executing
## Manual Installation
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!
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](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 DORiE on your machine. See the step-by-step manual for further details.
......@@ -78,11 +97,13 @@ Depending on your system configuration, there will be more packages necessary to
If you also want to build the documentation, you will additionally need to install Doxygen, Sphinx and Breathe.
### 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.
### Step-by-step Instructions
These instructions are suitable for a clean **Ubuntu** or **Mac OS X** 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/), you need to check if some of the packages require different installation options than displayed here.
1. Install third party packages:
**Ubuntu:**
apt update
apt install autoconf bison cmake flex gcc-5 g++-5 gfortran-5 \
git libatlas-base-dev libfftw3-dev libfftw3-mpi-dev \
......@@ -90,10 +111,36 @@ The following instructions follow the basic installation on a fresh Ubuntu syste
libsuperlu-dev libxft-dev python-dev python-pip python-sphinx \
python-breathe doxygen
**Mac OS X:**
brew update
brew install automake cmake doxygen gcc libtool libpng open-mpi \
pkg-config superlu
brew install hdf5 --with-mpi
brew install fftw --with-mpi
Install the PyPi package manager pip by downloading the [get_pip.py](https://bootstrap.pypa.io/get-pip.py) script and calling
sudo -H python get_pip.py
2. Install the necessary Python packages using `pip`:
**Ubuntu:**
python -m pip install virtualenv
**Mac OS X:**
sudo -H python -m pip install virtualenv sphinx==1.3.6 breathe --ignore-installed
3. **Mac OS X** only:
1. The Apple Clang compiler shipped with CMake is not suitable for compiling DUNE and UG. Before proceeding, call
export CC=gcc-6
export CXX=g++-6
to enfore the Homebrew'd GCC compiler. Note that this variable export only lasts for your current terminal session. Always make sure that the configuration tool actually finds GCC instead of the Apple Clang.
3. Clone the specified version of UG into a suitable folder on your machine. Install it by calling
autoreconf -is
......@@ -112,6 +159,7 @@ The following instructions follow the basic installation on a fresh Ubuntu syste
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
The following software packages are cross-platform, so you should be able to find a release that fits your operating system:
......@@ -131,26 +179,36 @@ The documentation can be built after DORiE has been properly configured (i.e., b
The documentation files can now be found in the subfolder `dorie/build-cmake/doc`.
## Usage
## Run, DORiE, Run!
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
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 program.
to execute the main program.
List all available commands and find further help by executing
dorie help
dorie --help
or
dorie <command> --help
## 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`.
......@@ -170,6 +228,13 @@ To re-create a release build, configure DORiE with the release build type by exe
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.
### 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:
......
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