Installation¶
The easiest way to install chemreac
(on linux) is to use
conda:
$ conda install -c chemreac chemreac pytest
and you’re done! To check if chemreac
is installed correctly you may run:
$ pytest --pyargs chemreac
which should run the test suite (all tests should pass or xfail). If you are using a special platform with non-standard math libraries you may need to compile your own pacakges. The “recipes” for the conda packages are kept here.
If you are not using the conda package manager you can still install
chemreac
from source. You will find the instructions for doing so below.
Building from source¶
Below you will find instructions for installation by building chemreac
from source.
You may also look in scripts/
folder for automated install scripts used
on the continuous integration servers.
Prerequisites¶
Version numbers of dependencies indicate what has been tested:
C++ compiler with C++11 support (e.g. GCC >= 4.8)
LAPACK (provided by e.g. OpenBLAS)
Sundials 2.6.2
Python (2.7 or >=3.4)
In addition to the standard library provided by Python, a number of python
packages are required (see setup.py), they are found on PyPI and are automatically installed when
using pip
.
For rendering the documentation you also need:
to run all the tests you also need these tools:
valgrind
graphviz
dot2tex
pdflatex
Building and installing¶
Once non-python prerequisites are in installed, you may procede e.g. as:
$ git clone https://github.com/chemreac/chemreac.git
$ cd chemreac
$ pip install --user -e .[all]
$ ./scripts/run_tests.sh
the above procedure works on Ubuntu 14.04 for example.
To specify an alternative LAPACK lib, set the environment variable LLAPACK, e.g.:
$ LLAPACK=openblas python setup.py build_ext --inplace
The following environment variables are also supported by
setup.py
(defaults to “0”, enable by setting them to “1”):
Environament variable |
Default |
Action |
---|---|---|
|
0 |
Enable parallell evaluation of rhs and jac. |
|
0 |
Use unblocked version of dgetrf instead of LAPACK |
|
0 |
Evaluate LU decomposition of blocks in parallel |
|
0 |
For debugging purposes only |
|
0 |
For debugging purposes only |
Enabling the first three is known to provide significant speed up for some scenarios (performance is system dependent, hence recommendations are not possible to give without benchmarking).
Tests¶
If you have py.test
installed you may run the test suite on the
installed package:
$ py.test --pyargs chemreac
All tests should pass (or xfail). If they do not, please file an issue.