Commit cd7e2bc7 authored by Lukas Riedel's avatar Lukas Riedel

Merge branch '106-move-dorie-script-into-python-package' into 'master'

Resolve "Move 'dorie' script into Python package"

Closes #106

See merge request !102
parents 79a3cb0d 27324540
#!/bin/sh
LOCAL=$CI_BUILD_REF
git checkout $CI_BUILD_REF_NAME -q
REMOTE=$(git rev-parse $CI_BUILD_REF_NAME@{upstream})
git checkout $LOCAL -q
if [ "$LOCAL" = "$REMOTE" ]; then
echo "Deploying documentation to dorie-docs.bitballoon.com"
echo "{\"access_token\":\"$CI_BITBALLOON_TOKEN\",\"site_id\":\"$CI_BITBALLOON_ID\"}" > .bitballoon
if [[ -z build-cmake/doc/html/index.html ]]; then
echo "ERROR: no index.html in doc folder"
exit 1
fi
if ! command -v gem >/dev/null 2>&1; then
apt-get install ruby-dev -y
fi
if ! command -v bitballoon >/dev/null 2>&1; then
gem install bitballoon
fi
bitballoon deploy build-cmake/doc/html
else
echo "Commit $LOCAL is not the most recent commit on branch $CI_BUILD_REF_NAME ($REMOTE) - skipping deployment"
fi
......@@ -4,6 +4,7 @@ build-cmake/
# Exclude generated files
python/dorie/wrapper/pf_from_file.py
python/dorie/wrapper/test_dorie.py
python/dorie/cli/cmds.py
# Ignore temporary and auto-generated files #
*~
......
......@@ -61,6 +61,10 @@
* Merge Python packages into single new package `dorie`.
* Executables and files of unit-tests and system-tests are now located in
[`dune/dorie/test/`](dune/dorie/test/) and [`test/`](test/) respectively.
* The `dorie` CLI has been moved into the DORiE Python package. It can now only
be invoked after activating the DUNE virtual environment. The usage
instructions in docs and `README.md` have been updated accordingly.
### Deprecated
* The configuration file key `[parameters.interpolation]` is deprecated due to
......
......@@ -41,7 +41,6 @@ dune_enable_all_packages()
dune_require_cxx_standard(MODULE "dorie" VERSION 14)
# add subdirectories
add_subdirectory("bin")
add_subdirectory("m4")
add_subdirectory("cmake/modules")
add_subdirectory("python")
......
......@@ -18,26 +18,34 @@ directly to the the instructions on [how to execute DORiE](#run-dorie-run).
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
## Download Docker image
This setup is intended for users who simply want to start computations with DORiE.
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
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 pull dorie/dorie[:<tag>]
docker build -f docker/dorie.dockerfile -t dorie .
Omitting the tag information downloads the image with tag `latest` which
refers to the latest stable version. You can download any tag by specifying
`<tag>`. The list of available 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`.
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 Installation
docker run -it -v <dir>:/sim dorie <command>
You can also compile any local version of DORiE into a new Docker image. To do
so, execute
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 build -f docker/dorie.dockerfile -t <img> .
from within the top-level DORiE source directory. Docker will use a prepared
image from Dockerhub and install DORiE into it. The created image will be called
`<img>`.
## 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.
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!
......@@ -177,49 +185,85 @@ 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`.
You will then find the index page of the documentation at
`dorie/build-cmake/doc/html/index.html`.
## Run, DORiE, Run!
If you made the DORiE wrapper directory available through your `PATH` variable, you can call it by simply executing
DORiE provides a command line interface (CLI) for all its functions.
The required Python modules and all their dependencies are readily installed
into a virtual environment (`venv`), which has to be activated within a
shell session. You can do so by activating it in your current session
(Manual Installation only) or by running the Docker application.
dorie <command>
### 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 choice.
You can always find the wrapper in the `dorie/build-cmake/bin` folder of your installation and call it directly with
Start up the Docker application by calling
<path/to/>dorie/build-cmake/bin/dorie <command>
docker run -it -v <dir>:/mnt <img>
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
where you replace `<dir>` with a local directory for storing input and output
data, and `<img>` with `dorie/dorie[:<tag>]`.
If you built a local Docker image, replace `<img>` appropriately.
You can also insert `$PWD` as `<dir>` if you want to mount your
current working directory.
dorie create
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.
DORiE encapsulates two routines, the Parameter Field Generator (PFG) and the main program routine. Each takes a single `.ini` configuration file as arguments.
Notice, that you can only use **local file paths** in all configuration settings
due to the directory mount.
Tweak the paramters to your liking and then call
### Activate the `venv` locally
To activate the virtual environment within your current shell session, execute
dorie pfg <inifile>
source <path/to/>dorie/build-cmake/activate
to create a parameter field file. Make sure that you instruct the main routine to call the file you just created. Then call
where you replace `<path/to/>` with the path to the appropriate directory.
dorie run <inifile>
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
to execute the main program.
deactivate
List all available commands and find further help by executing
Notice that any virtual environment only applies to, and lasts for your current
terminal session!
dorie --help
_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.
or
### Execute the application
Any command to the DORiE application has the signature
dorie <command> --help
dorie <cmd> [<opts>] [<args>]
Using the `-h` or `--help` option, you can find all available commands and
further help.
## Start an interactive Docker session
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
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:
DORiE encapsulates two main routines, the Parameter Field Generator (PFG) and
the main program routine. Each takes a single `.ini` configuration file as
argument.
docker run -i -t --entrypoint=/bin/bash -v <dir>:/sim dorie
Tweak the parameters of `parfield.ini` to your liking and then call
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`.
dorie pfg parfield.ini
to create a parameter field file. Do the same with the `config.ini`, while
ensuring that you use the parameter field file you just created. Then call
dorie run config.ini
to execute the main program.
## 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`.
......
configure_file(dorie.in ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/dorie @ONLY)
# copy the temporary file into the final destination, setting the permissions
file(COPY ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/dorie
DESTINATION ${CMAKE_CURRENT_BINARY_DIR}
FILE_PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ
GROUP_EXECUTE WORLD_READ WORLD_EXECUTE)
install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/dorie DESTINATION ${CMAKE_INSTALL_BINDIR} PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ
GROUP_EXECUTE WORLD_READ WORLD_EXECUTE)
......@@ -40,11 +40,11 @@ dune_cmake_sphinx_doc(SPHINX_CONF ${CMAKE_CURRENT_SOURCE_DIR}/conf.py.in
python-dorie-parscraper.rst
python-dorie-testtools.rst
python-dorie-utilities.rst
quickstart-bcfile.rst
quickstart-cookbook.rst
quickstart-installation.rst
quickstart-parameters.rst
quickstart-parameter-file.rst
man-bcfile.rst
man-cookbook.rst
man-installation.rst
man-config-file.rst
man-parameter-file.rst
MODULE_ONLY)
if(TARGET sphinx_html)
......
......@@ -54,6 +54,7 @@ extensions = [
'sphinx.ext.ifconfig',
'sphinx.ext.viewcode',
'sphinx_cmake_dune',
'sphinxarg.ext',
'breathe'
]
......
......@@ -52,7 +52,7 @@ Simulation
The Simulation template receives the assembled Grid Function Space and initializes the PDELab Backends
to compute the solution.
.. doxygenclass:: Dune::Dorie::Simulation
.. doxygenclass:: Dune::Dorie::RichardsSimulation
.. _code-param:
Richards Equation Classes
......
......@@ -20,11 +20,11 @@ A ready-to-use application is available from `Docker Hub <https://hub.docker.com
DORiE is licensed under the `MIT License <https://ts-gitlab.iup.uni-heidelberg.de/dorie/dorie/blob/master/LICENSE.md>`_.
Never used DORiE before? Get to learn its features by working through :ref:`quickstart`.
If you have already installed DORiE, jump straight to the :doc:`quickstart-cookbook`
If you have already installed DORiE, jump straight to the :doc:`man-cookbook`
and have a look at the test cases described therein!
You might also want to have a look at both the :doc:`quickstart-parameters`
and :doc:`quickstart-bcfile`, explaining all input parameters and boundary condition
You might also want to have a look at both the :doc:`man-config-file`
and :doc:`man-bcfile`, explaining all input parameters and boundary condition
files, respectively.
A complete documentation of the :ref:`DORiE source code <c-reference>`, the
......@@ -39,17 +39,17 @@ Contents
.. _quickstart:
Quick Start
-----------
Manual
------
.. toctree::
:maxdepth: 1
quickstart-installation
quickstart-cookbook
quickstart-parameters
quickstart-bcfile
man-installation
python-dorie-wrapper
man-config-file
man-bcfile
man-cookbook
public-api
.. _c-reference:
......
......@@ -102,7 +102,7 @@ These lines follow a simple grammar:
The boundary conditions defined here are parsed in the same order as the boundary segments have been specified. In 3D, the rectangular boundary segments are parsed in a tabular fashion, where columns run faster than rows. Columns are defined along the first direction specified in the `Boundary Segmentation`_, and rows are defined along the second direction.
.. figure:: figures/quickstart-bcfile-segm1.png
.. figure:: figures/man-bcfile-segm1.png
:width: 40 %
:align: left
......
DORiE Configuration File Guide
******************************
Configuration File Guide
************************
.. contents::
:depth: 2
......
......@@ -11,14 +11,14 @@ This part of the documentation is intended for first-time DORiE users. It explai
Prerequisites
-------------
Before you start, make sure that :doc:`DORiE is installed correctly <quickstart-installation>`. To analyze DORiE's results to their full extend, install Paraview_. DORiE will create rectangular grids according to user specifications on the fly, using the DUNE GridFactory. For building simplex grids in two or three dimensions, you can use Gmsh_. Its :file:`.msh` files can be read directly into DORiE to run simulations on.
Before you start, make sure that :doc:`DORiE is installed correctly <man-installation>`. To analyze DORiE's results to their full extend, install Paraview_. DORiE will create rectangular grids according to user specifications on the fly, using the DUNE GridFactory. For building simplex grids in two or three dimensions, you can use Gmsh_. Its :file:`.msh` files can be read directly into DORiE to run simulations on.
DORiE Input Files
-----------------
DORiE needs multiple input files to work:
* **Parameter File:** (:file:`.ini`) Supplying static information on the simulation. Have a look at the :doc:`quickstart-parameters` for more information on the file syntax, or default and possible values.
* **Boundary Condition Datafile:** (:file:`.bcdat`) Specifying the boundary conditions dependent on time and space.Name (and path) of the desired file have to be stated in the Parameter File at key ``boundary.file``. The :doc:`quickstart-bcfile` supplies information on how write and use the BC Datafile.
* **Parameter File:** (:file:`.ini`) Supplying static information on the simulation. Have a look at the :doc:`man-config-file` for more information on the file syntax, or default and possible values.
* **Boundary Condition Datafile:** (:file:`.bcdat`) Specifying the boundary conditions dependent on time and space.Name (and path) of the desired file have to be stated in the Parameter File at key ``boundary.file``. The :doc:`man-bcfile` supplies information on how write and use the BC Datafile.
* *Optional* **Mesh File:** (:file:`.msh`) Representing the grid on which the simulation will run. This file is only required if ``grid.gridType = simplex`` is chosen in the Parameter File. The Path to the file and it's name will then have to be stated at ``grid.gridFile``. Use Gmsh_ to easily create such a file.
DORiE Output Files
......
*********************
Public API Definition
*********************
**********
Public API
**********
DORiE's Public API comprises the usage of the compiled program as well as the
main code segments for using instances of DORiE in other (DUNE) modules and
......@@ -12,11 +12,11 @@ Command Line API
The compiled program and the Docker application are executed via the
:doc:`Command Line Interface <python-dorie-wrapper>`. The specifications for the
respective configuration files are given in the
:doc:`Config File Guide <quickstart-parameters>`.
:doc:`Config File Guide <man-config-file>`.
The main routine (`dorie run <config>`) also requires input files for
:doc:`boundary conditions <quickstart-bcfile>` and
:doc:`soil parameters <quickstart-parameter-file>`.
:doc:`boundary conditions <man-bcfile>` and
:doc:`soil parameters <man-parameter-file>`.
Code API
========
......@@ -24,7 +24,7 @@ Code API
DORiE supplies the `Simulation` template. This is the main class for assembling
and running the solver.
.. doxygenclass:: Dune::Dorie::Simulation
.. doxygenclass:: Dune::Dorie::RichardsSimulation
:members:
The simulation template requires compile-time type specifications wrapped in a
......
......@@ -16,7 +16,7 @@ It provides the following components:
- a :mod:`matching function <dorie.parscraper.match_parameters>` that complements the information from the XML file with the location where each parameter is actually used in the code,
- :mod:`Writers <dorie.parscraper.writers>` for various output formats (e.g. to dynamically create the .ini files used in runs of the main program, or to create :doc:`a user cheat sheet <quickstart-parameters>` with further explanations),
- :mod:`Writers <dorie.parscraper.writers>` for various output formats (e.g. to dynamically create the .ini files used in runs of the main program, or to create :doc:`a user cheat sheet <man-config-file>` with further explanations),
- a :mod:`wrapper script <dorie.parscraper.wrapper>` controlling the scraping process.
......
****************************
DORiE Command Line Interface
****************************
**********************
Command Line Interface
**********************
DORiE consists of two main executables and multiple utility scripts. This wrapper script supplies input files, and manages the execution of these routines. It takes three main arguments:
.. contents::
:depth: 4
.. object:: dorie.py
DORiE consists of two main executables and multiple utility scripts.
This wrapper script supplies input files, and manages the execution of these
routines. The CLI is available from within the virtual environment
(``venv``).
The script is technically a Python script but can be executed with a simple `./dorie` command.
The virtual environment
=======================
.. option:: dorie create
A `virtual environment <https://docs.python.org/3/tutorial/venv.html>`_ is
a specially configured shell session, where only a certain Python installation
with specific modules is available. It is installed separately from the
system's Python installation to avoid compatibility issues. DUNE and DORiE
automatically create such a virtual environment upon configuration and install
the necessary modules into it. You then just need to activate it.
This command creates input files for executing DORiE. They are set up with the default values supplied by the :doc:`Parameter Scraper <dorie.parscraper>` and have to be adapted for the first program run.
Whenever using DORiE, you need to activate the virtual environment. You can do
so by running the Docker application, or by activating it from your local
installation. After following *either* of the subsequent instructions, you are
set up to execute DORiE.
.. option:: pfg <config>
Boot up the Docker application
------------------------------
The Docker application starts an interactive Docker container with its own file
system. To interchange files between the container and your local file system,
you need to mount a directory into it. Mounting a directory will include all its
subdirectories and preserve their relative file paths.
Execute the DORiE Parameter Field Generator. Given a config file (default: `parfield.ini`), this command will create a parameter field file in the H5 format representing the soil architecture for the simulation.
Start up the Docker application by calling
::
.. option:: run <config>
docker run -it -v <dir>:/mnt <img>
Execute the DORiE PDE solver. Depending on the options given in the config file (default: `config.ini`), the command will execute the main solver routine.
Replace ``<img>`` with ``dorie/dorie[:<tag>]`` and optionally insert the ``tag``
of the version you want to run. Omitting tag information will default to the
``latest`` tag which points to the latest stable version of DORiE.
.. option:: plot <vtk>
Replace ``<dir>`` with the directory you would like to mount into the container.
The mount endpoint is the directory ``/mnt`` inside the container. One easy way
of working with the directories is creating a new directory for input and output
data, navigating to it, and replacing ``<dir>`` with ``$PWD``, which mounts your
current working directory.
Call the Python plotting script on a single `.vtk` file. Prints the values of the specified (or all) variables into `.png`files.
Executing the above command will start an interactive (``bash``) shell session
inside the container's file system. You will be placed inside the ``/mnt``
directory.
.. option:: -h
Activate the ``venv`` locally
-----------------------------
After installing DORiE manually, you can activate the virtual environment in
your local shell. Simply execute
::
Print help messages. This option can be combined with all other options for details on how to formulate the command and its arguments
source <path/to/>dorie/build-cmake/activate
to activate it. The prefix ``(dune-env)`` will indicate that activation was
successful. You can deactivate the ``venv`` at any time by executing
::
deactivate
You are now ready to use the DORiE Command Line Interface!
CLI Commands
============
The Command Line Interface has the following signature:
::
dorie <cmd> [<opts>] [<args>]
The entire wrapper and every command of it support the ``-h`` or ``--help``
option for information about how to use the command, and on its possible
arguments.
The following is a documentation of the
`ArgumentParser https://docs.python.org/3.7/library/argparse.html`_
instance used for the CLI.
.. argparse::
:ref: dorie.cli.parser.create_cl_parser
:prog: dorie
\ No newline at end of file
Sphinx
sphinx_rtd_theme
sphinx-argparse
breathe
recommonmark
\ No newline at end of file
......@@ -7,14 +7,17 @@ ARG PROCNUM=1
ARG CC=gcc
ARG CXX=g++
# build DORiE
WORKDIR /opt/dune
ADD . /opt/dune/dorie/
RUN CMAKE_FLAGS="-DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER=${CC} -DCMAKE_CXX_COMPILER=${CXX} -DDUNE_PYTHON_VIRTUALENV_SETUP=True -DDUNE_PYTHON_ALLOW_GET_PIP=True" \
./dune-common/bin/dunecontrol --only=dorie configure \
&& MAKE_FLAGS="-j ${PROCNUM}" \
./dune-common/bin/dunecontrol --only=dorie make dorie-rfg dorie \
&& ./dune-common/bin/dunecontrol --only=dorie make -j ${PROCNUM} dorie-rfg dorie \
&& ./dune-common/bin/dunecontrol --only=dorie exec \
"rm build-cmake/dune/dorie/impl/libdorie-impl.a build-cmake/dune/dorie/impl/CMakeFiles/dorie-impl.dir/*.cc.o"
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
# move to working directory
WORKDIR /mnt
# run bash in the virtualenv (this actually creates two bash instances...)
ENTRYPOINT ["/opt/dune/dune-common/build-cmake/run-in-dune-env", "/bin/bash"]
\ No newline at end of file
......@@ -3,6 +3,7 @@ set(DUNE_PYTHON_INSTALL_EDITABLE TRUE)
# install Python package
add_subdirectory(dorie/wrapper)
add_subdirectory(dorie/dorie/cli)
dune_python_install_package(PATH dorie)
# set cache variable
......
configure_file(cmds.py.in ${CMAKE_CURRENT_SOURCE_DIR}/cmds.py)
\ No newline at end of file
import os
import sys
import shutil
import subprocess
try: # Python 2.x compatibility
input = raw_input
except NameError:
pass
# paths set by cmake
DORIEDIR = "/Users/lriedel/dune/dorie/build-cmake"
MPIEXEC = "/usr/local/bin/mpiexec"
MPIEXEC_NUMPROC_FLAG = "-n"
MPIEXEC_PREFLAG = ""
MPIEXEC_POSTFLAGS = ""
# set some paths
DORIE_EXECUTABLE = os.path.join(DORIEDIR, "dune/dorie/dorie")
PARAMETERDIR = os.path.join(DORIEDIR, "doc/default_files")
def MPIRUN(nproc,exe,*args,**kwargs):
mpi_flags = kwargs.get("mpi_flags") or []
return [k for k in [MPIEXEC,MPIEXEC_NUMPROC_FLAG,str(nproc)] \
+ mpi_flags + [MPIEXEC_PREFLAG,str(exe),
MPIEXEC_POSTFLAGS] + list(args) if k]
def run(args):
if not os.path.isfile(args["config"]):
raise IOError("Configuration file {} not found".format(args["config"]))
try:
if args["parallel"] == 1:
subprocess.check_call([DORIE_EXECUTABLE, args["config"]])
else:
subprocess.check_call(MPIRUN(args["parallel"], DORIE_EXECUTABLE,
args["config"], mpi_flags=args["mpi_flags"]))
except subprocess.CalledProcessError:
print("Error while running DORiE")
sys.exit(1)
def create(args):
for f in ("config.ini", "parfield.ini", "2d_infiltr.bcdat", "3d_infiltr.bcdat"):
newfile = os.path.join(os.getcwd(),f)
if os.path.exists(newfile) and not args["force"]:
override = (input("File {} exists. Override? [Y/n] ".format(f)) or "Y") in ["Y","y"]
if not override:
continue
shutil.copyfile(os.path.join(PARAMETERDIR, f), newfile)
print("Folder initialized")
def pfg(args):
if not os.path.isfile(args["config"]):
raise IOError("Configuration file {} not found".format(args["config"]))
try:
if args["parallel"] == 1:
subprocess.check_call(["pf_from_file.py", args["config"]])
else:
if args["mpi_flags"]:
mpi_flags = ["--mpi-flags=" + f for f in args["mpi_flags"]]
else:
mpi_flags = []
subprocess.check_call(["pf_from_file.py", args["config"],
"--parallel", str(args["parallel"])] + mpi_flags)
except subprocess.CalledProcessError:
print("Error while running DORiE")
sys.exit(1)
def plot(args):
if not os.path.isfile(args["vtk"]):
raise IOError("File {} not found".format(args["vtk"]))
try:
if args["var"]:
subprocess.check_call(["plot_vtk.py", "-f", args["vtk"], "--var", args["var"]])
else:
subprocess.check_call(["plot_vtk.py", "-f", args["vtk"]])
except subprocess.CalledProcessError:
print("Error while running DORiE")
sys.exit(1)
#!/usr/bin/env python3
import os
import sys
import shutil
import argparse
import warnings
import subprocess
import multiprocessing
try: # Python 2.x compatibility
input = raw_input
......@@ -19,12 +14,10 @@ MPIEXEC = "@MPIEXEC@"
MPIEXEC_NUMPROC_FLAG = "@MPIEXEC_NUMPROC_FLAG@"
MPIEXEC_PREFLAG = "@MPIEXEC_PREFLAG@"
MPIEXEC_POSTFLAGS = "@MPIEXEC_POSTFLAGS@"
#
# set some paths
DORIE_EXECUTABLE = os.path.join(DORIEDIR, "dune/dorie/dorie")
PARAMETERDIR = os.path.join(DORIEDIR, "doc/default_files")
DORIE_PYTHON = os.path.join(DORIEDIR, "run-in-dune-env")
def MPIRUN(nproc,exe,*args,**kwargs):