dune-spack/README.md

50 lines
1012 B
Markdown
Raw Normal View History

2020-03-30 20:22:34 +00:00
# Dune Spack repository
## Installation
Clone spack git
```
git clone https://github.com/spack/spack.git
source ./share/spack/setup-env.sh
spack bootstrap
```
add dune spack repo
```
cd $HOME
git clone https://github.com/gauthier12/dune_spack_repo.git
spack repo add dune_spack_repo
```
2020-05-10 19:33:26 +00:00
Install dune with desired modules
2020-03-30 20:22:34 +00:00
```
2020-05-10 19:33:26 +00:00
spack install dune+desired+modules+.....
2020-03-30 20:22:34 +00:00
```
2020-05-10 19:33:26 +00:00
by example
```
spack install dune+uggrid+grid+functions
```
modules dependencies wil be automatically downloaded and added
## Use
To use dune, load the module
2020-03-30 20:22:34 +00:00
```
2020-05-10 19:35:21 +00:00
source /PATH/TO/SPACK/share/spack/setup-env.sh
2020-05-10 19:33:26 +00:00
spack load dune
2020-03-30 20:22:34 +00:00
```
2020-05-10 19:36:47 +00:00
if python module was installed, python bindings are avalaible after loading the module
## Build a new module
2020-05-10 19:33:26 +00:00
### Load the dune module
```
2020-05-10 19:35:21 +00:00
source /PATH/TO/SPACK/share/spack/setup-env.sh
2020-05-10 19:33:26 +00:00
spack load dune
```
### Initialize dune project
```
duneproject
```
Answer the questions about the new modules, enter the project folder and compile with standard cmake
```
mkdir build
cd build
cmake ..
cmake --build .
2020-04-06 09:30:52 +00:00
```