Commit b44dc25c authored by Dion Häfner's avatar Dion Häfner

Merge branch 'update/install-instructions' into 'master'

updated installation instructions #2, CMake now handles compiler flags #1

Readme now contains installation instructions:
* Docker instructions
* Required software
* Ubuntu step-by-step manual installation (based on Dockerfile instructions)

CMake now handles compiler flags:
* build type is `Release` by default
* for a `Debug` build, warnings are enabled
* information on how to create different types of builds are added to the Readme

See merge request !1
parents ff8f324c bfa87cb7
# Exclude build folder
build-cmake/
# Exclude the parsed mini file
testing/convergence.mini
# Ignore temporary and auto-generated files #
*~
*.pyc
......
......@@ -2,7 +2,6 @@ image: dorie/dune-env:2.4
variables:
DUNE_CONTROL_PATH: /opt/dune:$CI_PROJECT_DIR
COMPILER_FLAGS: -O3
before_script:
- cd /opt/dune
......@@ -12,7 +11,6 @@ stages:
main_job:
script:
- export CMAKE_FLAGS="-DCMAKE_CXX_FLAGS='$COMPILER_FLAGS'"
- ./dune-common/bin/dunecontrol --only=dorie all
- ./dune-common/bin/dunecontrol --only=dorie make install
- ARGS="--output-on-failure" ./dune-common/bin/dunecontrol --only=dorie make test
......@@ -20,9 +18,9 @@ main_job:
update_dune_job:
script:
- export CMAKE_FLAGS="-DCMAKE_CXX_FLAGS='$COMPILER_FLAGS'"
- ./dune-common/bin/dunecontrol update || true
- ./dune-common/bin/dunecontrol --module=dorie all
- ./dune-common/bin/dunecontrol --only=dorie make install
- ./dune-common/bin/dunecontrol exec "rm -rf build-cmake"
- ./dune-common/bin/dunecontrol all
- ./dune-common/bin/dunecontrol make install
- ARGS="--output-on-failure" ./dune-common/bin/dunecontrol --only=dorie make test
stage: main
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()
......@@ -37,3 +46,5 @@ add_subdirectory("cmake/modules")
# finalize the dune project, e.g. generating config.h etc.
finalize_dune_project(GENERATE_CONFIG_H_CMAKE)
message(STATUS "Build Type: ${CMAKE_BUILD_TYPE}")
......@@ -3,121 +3,178 @@
[![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)
## Quick installation
More comprehensive installation instructions of the current `master` branch can be found [in the online documentation](http://dorie-docs.gitballoon.com) (password: `richards`).
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.
0. __Mac OS:__ Make sure you have the most recent version of the Command Line Tools installed (just run `xcode-select --install`).
The suite encapsulates a documentation and various tools for program setup, program testing, and output analysis, which are mostly written in Python.
1. Follow our [Git Tutorial](http://shangrila.iup.uni-heidelberg.de:30000/dorie/dorie/wikis/git-tutorial) to clone the repository to a suitable location on your computer. Make sure the path to the repository does not contain any spaces, as this will break most of the configure scripts.
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.
2. Run the install.sh script by calling
bash install.sh
# Installation Instructions
You will be prompted to enter your password. You need to have `sudo` rights on your machine to install DORiE.
*Note*: This will try to install some large dependencies with the package managers `apt-get` (Linux) or MacPorts (OSX). If this fails for some reason, you will have to make sure to install these packages to your system manually.
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.
3. The DORiE installation routine provides multiple options:
* `doriecontrol install core`: Install only packages needed to compile and run DORiE (minimal installation).
* `doriecontrol install all`: Install the core packages as well as documentation tools and the testing suite (full installation).
Choose one of the two commands and run it from the command line.
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.
4. Grab a cup of your favorite beverage.
## 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).
Run a new container from this image by calling
5. Once everything is installed without errors, you can start runs with
docker run -i -t dorie/dune-env:2.4 /bin/bash
dorie run INIFILE
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
For more information, type
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!*
bash install.sh help
Next, use `git clone` to download the DORiE repository into the shared folder. Enter the container, and execute
or
dunecontrol --only=dorie all
doriecontrol help
to build DORiE. Lastly, install the DORiE binaries by calling
or
dunecontrol --only=dorie make install
dorie help
### Update DUNE
The DUNE modules in the repository might be outdated. You can update to the newest versions by calling
dunecontrol update
## Usage
Then compile and install all modules again by executing
1. Create some folder(s) that you would like to hold the input and output files of the run.
2. Call
dunecontrol all && dunecontrol make install
dorie create
to create a set of dummy input files in your current folder.
3. Modify the input to your liking. Make sure to specify all parameters that are set to `UNDEFINED`. The Parameter Cheat Sheet in the `doc/` directory of the repository provides information on the meaning of all parameters, including recommended values.
4. Start the run with
## 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!
dorie run INIFILE [OPTIONS]
### 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.
| Software | Version/Branch | Comments |
| ---------| -------------- | -------- |
| CMake | >= 2.8.12 |
| GCC | >= 5 |
| git |
| pkg-config |
| 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 |
| 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)
| [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
| [dune-istl](https://gitlab.dune-project.org/core/dune-istl) | releases/2.4
| [dune-localfunctions](https://gitlab.dune-project.org/core/dune-localfunctions) | releases/2.4
| [dune-typetree](https://gitlab.dune-project.org/pdelab/dune-typetree) | releases/2.4
| [dune-pdelab](https://gitlab.dune-project.org/pdelab/dune-pdelab) | releases/2.4
| [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
You may get a list of the available commands and options by executing
If you also want to build the documentation, you will additionally need to install Doxygen.
dorie help
### 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 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
3. Clone the specified version of UG into a suitable folder on your machine. Install it by calling
autoreconf -is
./configure --enable-parallel --without-x --enable-dune --enable-system-heap
make && make install
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
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 make install
## Recommended third-party software
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.
The following software packages are too large or too specialized to be bundled with DORiE, but are nonetheless recommended.
They are cross-platform, so you should be able to find a release that fits your operating system.
## 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:
* [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`).
If you want to install the dependencies and build the documentation yourself (e.g. because you are using an older version of DORiE), you can use some convenience functions provided by `doriecontrol`.
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
If you did not choose the full installation routine, you have to install the documentation tools separately before building the doc. Do so by calling
dunecontrol --only=dorie make doc
doriecontrol install doc
The documentation files can now be found in the subfolder `dorie/build-cmake/doc`.
_After_ installing DORiE, you can create the documentation by calling
## Usage
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
doriecontrol make doc
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.
It can then be found in the `doc/` directory of your repository.
To start your first simulation run, create a new directory and enter it. Place some exemplary configuration files in there by calling
## 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.
dorie create
### Something went wrong during the install.sh script
* Make sure you ran the script with `bash`.
* Look through the output of the script. If you see any errors, try to resolve them.
* If nothing works, open an issue, or send the output of the script to the [DORiE developer mailing list](mailto:dorieteam@iup.uni-heidelberg.de).
Tweak the paramters to your liking and then call
### I ran 'doriecontrol install all / core', but DORiE doesn't work
This is probably due to an error while building one of the dependencies. Have a look at the installation.log file in the main directory. Search for errors, maybe you can detect which package failed to build, and resolve the error yourself. If this doesn't work, open an issue, or send the installation.log file to the [DORiE developer mailing list](mailto:dorieteam@iup.uni-heidelberg.de).
dorie run <inifile>
Note that if you just want to rebuild one specific package, you don't have to work through the whole build process again - just use the command
to execute the program.
doriecontrol install PACKAGES
List all available commands and find further help by executing
e.g.,
dorie help
doriecontrol install openmpi dune dorie
## 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`.
to rebuild OpenMPI, DUNE, and DORiE.
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.
### 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. You will need to install the testing suite first (this is _not_ done by default) and rebuild DORiE:
### 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.
doriecontrol install testing dorie
**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.
Then, you can run the system tests:
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
### 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:
doriecontrol 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
### Further Help
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)
......
alabaster==0.7.7
Babel==2.2.0
breathe==4.1.0
docutils==0.12
Jinja2==2.8
MarkupSafe==0.23
Pygments==2.1
pytz==2015.7
six==1.10.0
snowballstemmer==1.2.1
Sphinx==1.3.5
sphinx-rtd-theme==0.1.9
wheel==0.24.0
alabaster
Babel
breathe
docutils
Jinja2
MarkupSafe
Pygments
pytz
six
snowballstemmer
Sphinx
sphinx-rtd-theme
wheel
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import sys
from setuptools import setup
# do nothing, just install requirements
setup(name='dorie.doc')
cycler==0.9.0
matplotlib==1.5.1
numpy==1.10.4
pyparsing==2.0.7
python-dateutil==2.4.2
pytz==2015.7
scipy==0.17.0
six==1.10.0
wheel==0.24.0
cycler
matplotlib
numpy
pyparsing
python-dateutil
pytz
scipy
six
wheel
......@@ -13,7 +13,6 @@ setup(name='dorie.parscraper',
author='Dion Häfner <mail@dionhaefner.de>',
author_email='dorieteam@iup.uni-heidelberg.de',
url='',
install_requires=['dorie.utilities'],
packages=['dorie.parscraper'],
scripts=dorie_parscraper_scripts()
)
cycler==0.9.0
matplotlib==1.5.1
numpy==1.10.4
pyparsing==2.0.6
python-dateutil==2.4.2
pytz==2015.7
scipy==0.17.0
six==1.10.0
wheel==0.24.0
cycler
matplotlib
numpy
pyparsing
python-dateutil
pytz
scipy
six
wheel
......@@ -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'],
scripts=dorie_testtools_scripts())
cycler==0.9.0
matplotlib==1.5.1
numpy==1.10.4
pyparsing==2.0.7
python-dateutil==2.4.2
pytz==2015.7
scipy==0.17.0
six==1.10.0
wheel==0.24.0
cycler
matplotlib
numpy
pyparsing
python-dateutil
pytz
scipy
six
wheel
......@@ -15,6 +15,5 @@ setup(name='dorie.utilities',
author_email='dorieteam@iup.uni-heidelberg.de',
url='',
packages=['dorie.utilities'],
install_requires=['numpy','scipy','matplotlib'],
scripts=dorie_utilities_scripts()
)
include /home/dion/codes/dune/dorie/build-cmake/doc/parameters/default.ini
__inifile_optionkey = run
_asset_path = "/home/dion/codes/dune/dorie/testing"
_evaluation = convergence, correlation
output.fileName = convergence | unique
output.outputPath = convergence | unique
output.asciiVtk = true
time.end = 1E5
grid.initialLevel = 0, 1, 2 | expand
grid.gridType = gmsh, rectangular | expand
grid.cells = 20 20
grid.gridFile = "{_asset_path}/meshes/mesh.msh"
boundary.file = "{_asset_path}/bcs/bcFile2d.dat"
parameters.soilDistribution = twoMedia
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