Skip to content

Commit 1b215aa

Browse files
authored
Add a Spack installation guide (#850)
* Add a Spack installation guide * Fix link * Fix doxygen * Update installation.md * Fix titles
1 parent 35de9ca commit 1b215aa

2 files changed

Lines changed: 89 additions & 7 deletions

File tree

README.md

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -56,12 +56,7 @@ To use DDC components, one needs the following dependencies:
5656

5757
## Getting the code and basic configuration
5858

59-
```bash
60-
git clone --recurse-submodules --jobs 4 https://github.com/CExA-project/ddc.git
61-
cd ddc
62-
cmake -D DDC_BUILD_KERNELS_FFT=OFF -D DDC_BUILD_KERNELS_SPLINES=OFF -D DDC_BUILD_PDI_WRAPPER=OFF -B build
63-
cmake --build build --parallel 4
64-
```
59+
Please see [this page](docs/installation.md) for a detailed installation guide.
6560

6661
## Contributing
6762

docs/installation.md

Lines changed: 88 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,91 @@ Copyright (C) The DDC development team, see COPYRIGHT.md file
66
SPDX-License-Identifier: MIT
77
-->
88

9-
Under construction
9+
## Quick start
10+
11+
A quick way to compile DDC is to disable all optional components providing only core features
12+
13+
```bash
14+
git clone --recurse-submodules --jobs 4 https://github.com/CExA-project/ddc.git
15+
cmake -D DDC_BUILD_KERNELS_FFT=OFF -D DDC_BUILD_KERNELS_SPLINES=OFF -D DDC_BUILD_PDI_WRAPPER=OFF -B ddc/build
16+
cmake --build ddc/build --parallel 4
17+
ctest --test-dir ddc/build
18+
cmake --install ddc/build --prefix path/to/ddc/install
19+
```
20+
21+
## Using Spack package manager
22+
23+
\note We are currently working on providing a DDC recipe for the Spack package manager.
24+
25+
In the meantime, as of Spack 0.23.1, we provide a CPU Spack environment that contains almost all dependencies. The rest of the dependencies are provided by the git submodules.
26+
27+
### Spack installation
28+
29+
#### Download
30+
31+
```bash
32+
wget https://github.com/spack/spack/releases/download/v0.23.1/spack-0.23.1.tar.gz
33+
tar -xvf spack-0.23.1.tar.gz
34+
rm spack-0.23.1.tar.gz
35+
```
36+
37+
#### Activation
38+
39+
One first needs to activate Spack before executing any command.
40+
41+
```bash
42+
. spack-0.23.1/share/spack/setup-env.sh
43+
```
44+
45+
#### DDC environment installation
46+
47+
```bash
48+
spack env create ddc-env ddc-env.yaml
49+
```
50+
51+
Here is the content of `ddc-env.yaml`:
52+
53+
```yaml
54+
# ddc-env.yaml
55+
spack:
56+
concretizer:
57+
unify: true
58+
definitions:
59+
- compilers:
60+
- 'gcc@10:14'
61+
- packages:
62+
- 'benchmark@1.8:1 ~performance_counters'
63+
- 'cmake@3.22:3'
64+
- 'doxygen@1.9.8:1'
65+
- 'fftw@3.3:3'
66+
- 'ginkgo@1.8:1'
67+
- 'googletest@1.14:1 +gmock'
68+
- 'kokkos@4.4.1:4'
69+
specs:
70+
- lapack
71+
- matrix:
72+
- [$packages]
73+
- [$%compilers]
74+
view:
75+
default:
76+
root: .spack-env/view
77+
exclude: ['gcc-runtime']
78+
packages:
79+
all:
80+
providers:
81+
lapack: [openblas]
82+
variants: cxxstd=17
83+
```
84+
85+
#### Compilation of DDC
86+
87+
```bash
88+
git clone --recurse-submodules --jobs 4 https://github.com/CExA-project/ddc.git
89+
cmake -D DDC_BUILD_PDI_WRAPPER=OFF -B ddc/build
90+
ctest --test-dir ddc/build
91+
cmake --build ddc/build --parallel 4
92+
```
93+
94+
#### Installation of DDC
95+
96+
\warning Installing DDC solely using the bundled libraries (provided via git submodules) is currently untested and not recommended. For better stability, we recommend using system-installed or Spack-installed dependencies whenever possible.

0 commit comments

Comments
 (0)