From 94422d5e4a2172a25920f67dc4eee79490322e4e Mon Sep 17 00:00:00 2001 From: Magalame Date: Thu, 16 May 2019 15:57:02 -0400 Subject: Updated INSTALL.md for linux, created SUNDIALS.md for sundials installation Also added some instructions about stack --- docs/SUNDIALS.md | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 docs/SUNDIALS.md diff --git a/docs/SUNDIALS.md b/docs/SUNDIALS.md new file mode 100644 index 0000000..e413131 --- /dev/null +++ b/docs/SUNDIALS.md @@ -0,0 +1,28 @@ +# Sundials installation + +You can download the Sundials source files [here](https://computation.llnl.gov/projects/sundials/sundials-software). Note: `hmatrix-sundials` doesn't work with versions superior to 3.2.1 (4.0.0 and above). + +Assuming we choose the 3.2.1 version: + + $ wget https://computation.llnl.gov/projects/sundials/download/sundials-3.2.1.tar.gz + $ tar -xzf sundials-3.2.1.tar.gz + $ cd sundials-3.2.1 + $ mkdir instdir + $ mkdir builddir + $ cd builddir + $ cmake -DCMAKE_INSTALL_PREFIX=/absolute/path/to/sundials-3.2.1/instdir -DEXAMPLES_INSTALL_PATH=/absolute/path/to/sundials-3.2.1/instdir/examples ../../sundials-3.2.1 + $ make + $ make install + + +Then for an installation in a project, one should add to `stack.yaml`: +``` +extra-include-dirs: +- /absolute/path/to/instdir/sundials-3.2.1/include +extra-lib-dirs: +- /absolute/path/to/instdir/sundials-3.2.1/builddir/src/cvode +- /absolute/path/to/instdir/sundials-3.2.1/builddir/src/arkode +``` + +Or in the global scope: `stack install hmatrix-sundials --extra-lib-dirs=/absolute/path/to/instdir/sundials-3.2.1/builddir/src/arkode --extra-lib-dirs=//absolute/path/to/instdir/sundials-3.2.1/builddir/src/cvode --extra-include-dirs=/absolute/path/to/instdir/sundials-3.2.1/include` + -- cgit v1.2.3