You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If there are additional system packages that you want to use in a recipe, consider adding a `packages.yaml` file to the recipe, in which you can define additional external packages.
29
27
30
-
!!! warning
31
-
Only use external dependencies that are strictly necessary:
32
-
28
+
!!! warning "Only use external dependencies that are strictly necessary"
33
29
* the more dependencies, the more potential that software stacks will have to be rebuilt when the system is updated, and the more potential there are for breaking changes;
34
30
* the external packages are part of the Spack upstream configuration generated with the Stack - you might be constraining the choices of downstream users.
35
31
32
+
[](){#ref-cluster-config-network}
33
+
### Configuring MPI and network libraries: `network.yaml`
34
+
35
+
The `network.yaml` file contains two high level fields:
36
+
37
+
```yaml title="network.yaml"
38
+
mpi:
39
+
cray-mpich:
40
+
specs: [... default packages to add to the network stack ...]
41
+
openmpi:
42
+
specs: [... default packages to add to the network stack ...]
43
+
# standard Spack packages.yaml for packages
44
+
packages:
45
+
libfabric: ...
46
+
openmpi: ...
47
+
```
48
+
49
+
??? example "example `network.yaml` for grace hopper"
50
+
* The `specs` field for `mpi:cray-mpich:specs` and `mpi:openmpi:specs` fields set different default `libfabric` for the respective MPI distributions.
51
+
* By default `packages:cray-mpich` and `packages:openmpi` add the `+cuda` variant as a preference to build with cuda support by default on the Grace-Hopper nodes.
52
+
* This can be overriden by adding `~cuda` to the spec in `network:mpi` in your recipe.
53
+
* The version of `libfabric` on tye system is `1.22.0`, but it is set as buildable so that it can be build from source by Spack if a different (more recent) verson is selected in a recipe.
54
+
* A combination of `require` and `prefer` are used in the `packages` definitions to enforce settings and set defaults, respectively.
55
+
56
+
```yaml title="network.yaml"
57
+
mpi:
58
+
cray-mpich:
59
+
specs: ["libfabric@1.22"]
60
+
openmpi:
61
+
specs: ["libfabric@2.2.0"]
62
+
packages:
63
+
# adding a variant to the variants field of a package
64
+
# e.g. packages:openmpi:variants
65
+
# is not strong enough: if that variant does not exist it simply will be ignored with no error message
Copy file name to clipboardExpand all lines: docs/recipes.md
+8-16Lines changed: 8 additions & 16 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -155,12 +155,7 @@ Stackinator can configure MPI (cray-mpich and OpenMPI) its dependencies (libfabr
155
155
The `network` field replaces the `mpi` field in Stackinator 6.
156
156
See the [porting guide][ref-porting-network] for guidance on updating uenv recipes for Spack 1.0.
157
157
158
-
If the `network` field is not set, or is set to `null`, MPI will not be configured in an environment:
159
-
160
-
```yaml title="environments.yaml no network/mpi stack"
161
-
serial-env:
162
-
network: null
163
-
```
158
+
If the `network` field is not set, MPI will not be configured in an environment.
164
159
165
160
The `network` field has a field for defining MPI and additional custom package definitions
166
161
@@ -180,7 +175,7 @@ The `network` field has a field for defining MPI and additional custom package d
180
175
```
181
176
182
177
Provide a more explicit spec that disables `cuda` (this might be useful on a system where `cuda` support is the default).
183
-
Also request a specific version of `libfabric`
178
+
Also request a specific version of
184
179
```yaml title="environments.yaml"
185
180
network:
186
181
mpi: cray-mpich@9.0 ~cuda
@@ -198,7 +193,7 @@ The `network` field has a field for defining MPI and additional custom package d
198
193
It is only possible to have a single MPI implementation in an environment, specified through the `mpi` field.
199
194
Behind the scenes, Stackinator adds a hard requirement that all packages in the environment use the the chosen MPI, to help Spack concretise correctly.
200
195
201
-
??? tip "but I want to provide cray-mpich and openmpi in my uenv"
196
+
??? question "How do I provide cray-mpich and openmpi in my uenv?"
202
197
No problem!
203
198
Just add two environments in your `environments.yaml` file, for example:
204
199
@@ -227,8 +222,11 @@ Behind the scenes, Stackinator adds a hard requirement that all packages in the
227
222
228
223
The uenv will provide two views for the end user.
229
224
230
-
!!! question "Why add a `network:specs` field instead of just adding `libfabric` and friends to the main `specs` list"
231
-
The `network.yaml` file in the cluster config provides a set of default specs for MPI dependencies for each MPI distribution.
225
+
226
+
The `network.yaml` file in the cluster config provides a set of default specs for MPI dependencies for each MPI distribution.
227
+
See the [`network.yaml` documenation][ref-cluster-config-network] for more information about how the defaults are set.
228
+
229
+
??? question "Why add a `network:specs` field instead of just adding `libfabric` and friends to the main `specs` list?"
232
230
It is easier to override these by providing a custom field for network dependencies.
233
231
234
232
!!! alps
@@ -239,12 +237,6 @@ Behind the scenes, Stackinator adds a hard requirement that all packages in the
239
237
As such, it is recommended as an option for applications that have performance issues or bugs with cray-mpich.
240
238
241
239
242
-
243
-
244
-
#### Custimsing network dependences with specs
245
-
246
-
You can provide
247
-
248
240
### Specs
249
241
250
242
The list of software packages to install is configured in the `spec:` field of an environment. The specs follow the [standard Spack practice](https://spack.readthedocs.io/en/latest/environments.html#spec-concretization).
0 commit comments