-
Notifications
You must be signed in to change notification settings - Fork 23
How to install AtChem2
AtChem2 can be installed on Unix/Linux or macOS systems. Download the latest stable release at: https://github.com/AtChem/AtChem2/releases. Alternatively, download the zip file with the development version (master branch
) or use git to clone the repository.
For more information, see the AtChem2 manual in the doc/
directory.
- Fortran compiler: GNU
gfortran
(default) or Intelifort
. - Python, cmake, Ruby (optional).
- BLAS, LAPACK.
The dependencies are installed in a dependencies directory (e.g., $HOME/atchem-lib/
) using the scripts in the tools/install/
directory.
-
CVODE and openlibm:
./tools/install/install_cvode.sh ~/atchem-lib/ ./tools/install/install_openlibm.sh ~/atchem-lib/
-
numdiff (only required to run the Test Suite) may already be installed. If not, it can be installed locally in the dependencies directory:
./tools/install/install_numdiff.sh ~/atchem-lib/numdiff/
Add
PATH=$PATH:$HOME/atchem-lib/numdiff/bin
to.bash_profile
(or.profile
). -
FRUIT (only required to run the Test Suite, needs Ruby). Add to
.bash_profile
(or.profile
):GEM_HOME=$HOME/.gem PATH=$PATH:$GEM_HOME/bin
Then, run the installation script:
./tools/install/install_fruit.sh ~/atchem-lib/
-
After installing the dependencies, copy the example
Makefile
to the AtChem2 main directory:cp ./tools/install/Makefile.skel ./Makefile
(v1.2) ORcp ./tools/Makefile ./Makefile
(v1.1.1 and earlier) -
Edit
./Makefile
to set the correct paths of CVODE, openlibm and (optionally) FRUIT. -
To test the installation, compile and run the example mechanism:
- for v1.2:
./build/build_atchem2.sh ./mcm/mechanism_test.fac ./atchem2
- for v1.1.1 and earlier:
./tools/build.sh ./tools/mcm_example.fac ./atchem2
- for v1.2:
When AtChem2 is run for the first time, it may give an error like this:
dyld: Library not loaded: @rpath/libsundials_cvode.2.dylib
Referenced from: /Users/username/AtChem2/./atchem2
Reason: image not found
Abort trap: 6
In this case, type at the terminal prompt the following command (change the path to the CVODE library as appropriate):
export DYLD_LIBRARY_PATH=$(HOME)/atchem-lib/cvode/lib
To make it permanent, add the command to .bash_profile
(or .profile
).
Advanced users may wish to use instead the accepted answer in this Stack Overflow post and hardcode rpath
in this instance for each of libsundials_cvode.2.dylib
, libsundials_fvecserial.2.dylib
, libsundials_vecserial.2.dylib
.