diff options
Diffstat (limited to 'docs')
-rw-r--r-- | docs/SUNDIALS.md | 28 |
1 files changed, 28 insertions, 0 deletions
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 @@ | |||
1 | # Sundials installation | ||
2 | |||
3 | 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). | ||
4 | |||
5 | Assuming we choose the 3.2.1 version: | ||
6 | |||
7 | $ wget https://computation.llnl.gov/projects/sundials/download/sundials-3.2.1.tar.gz | ||
8 | $ tar -xzf sundials-3.2.1.tar.gz | ||
9 | $ cd sundials-3.2.1 | ||
10 | $ mkdir instdir | ||
11 | $ mkdir builddir | ||
12 | $ cd builddir | ||
13 | $ 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 | ||
14 | $ make | ||
15 | $ make install | ||
16 | |||
17 | |||
18 | Then for an installation in a project, one should add to `stack.yaml`: | ||
19 | ``` | ||
20 | extra-include-dirs: | ||
21 | - /absolute/path/to/instdir/sundials-3.2.1/include | ||
22 | extra-lib-dirs: | ||
23 | - /absolute/path/to/instdir/sundials-3.2.1/builddir/src/cvode | ||
24 | - /absolute/path/to/instdir/sundials-3.2.1/builddir/src/arkode | ||
25 | ``` | ||
26 | |||
27 | 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` | ||
28 | |||