Skip to content

Commit dcca6e5

Browse files
authored
Merge pull request #13 from scientificcomputing/dokken/spack
Add spack installation note
2 parents d830156 + 38d8155 commit dcca6e5

1 file changed

Lines changed: 19 additions & 3 deletions

File tree

docs/installation.md

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,35 +9,51 @@ python3 -m pip install io4dolfinx
99
`io4dolfinx` has some optional dependencies for specific backends (like ADIOS2 or H5PY). If you want to use these backends, you can install the library with the appropriate extras:
1010

1111
- Test dependencies (for running the test suite):
12+
1213
```bash
1314
python3 -m pip install "io4dolfinx[test]"
1415
```
1516

1617
- Documentation dependencies (for building the docs):
18+
1719
```bash
1820
python3 -m pip install "io4dolfinx[docs]"
1921
```
2022

2123
- For HDF5 support with MPI, you need to have an HDF5 library installed with MPI support, and the `h5py` Python package installed with MPI support. You can install `h5py` with MPI support using pip:
24+
2225
```bash
2326
python3 -m pip install --no-binary=h5py h5py
2427
```
2528

2629
- For pyvista support, you can install the `pyvista` package:
30+
2731
```bash
2832
python3 -m pip install pyvista
2933
```
34+
3035
or equivalently
36+
3137
```bash
3238
python3 -m pip install "io4dolfinx[pyvista]"
3339
```
3440

35-
- For ADIOS2 support you should have ADIOS2 installed with Python bindings, see https://adios2.readthedocs.io/en/latest/setting_up/setting_up.html for more info.
36-
41+
- For ADIOS2 support you should have ADIOS2 installed with Python bindings, see https://adios2.readthedocs.io/en/latest/setting_up/setting_up.html for more info.
3742

3843
## Spack
3944

40-
TBW
45+
The FEniCS Spack packages uses a separate [spack repo](https://github.com/FEniCS/spack-fenics) to be possible to maintain and keep up to date.
46+
We do the same for the [packages](https://github.com/scientificcomputing/spack_repos.git) maintained by Scientific Computing at Simula Research Laboratory.
47+
To install `py-io4dolfinx`, one should first install spack on your system, then use the following commands in a new spack environment:
48+
49+
```bash
50+
spack repo add https://github.com/FEniCS/spack-fenics.git
51+
spack repo add https://github.com/scientificcomputing/spack_repos.git
52+
spack add py-io4dolfinx@1.1 ^py-fenics-dolfinx+petsc4py ^adios2+python+hdf5 ^petsc+mumps
53+
```
54+
55+
to get an installation of `io4dolfinx` with all backends installed. If you require further petsc packages you should activate them by adding them to `^petsc+....`.
56+
See [Spack PETSc](https://packages.spack.io/package.html?name=petsc) for options.
4157

4258
## Docker
4359

0 commit comments

Comments
 (0)