Skip to content

Commit b35f31a

Browse files
authored
Clarify uenv spack view (#70)
1 parent dca32a4 commit b35f31a

File tree

1 file changed

+19
-5
lines changed

1 file changed

+19
-5
lines changed

docs/build-install/uenv.md

Lines changed: 19 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -43,24 +43,38 @@ graph TD
4343

4444
On systems that have NVIDIA GPUs (`gh200` and `a100` uarch), it also provides the latest version of `cuda` and `nccl`, and is configured for GPU-aware MPI communication.
4545

46-
To use Spack as an upstream, the uenv has to be started with the `spack` view:
46+
To use Spack as an upstream, the uenv can be started with the `spack` view:
4747

4848
```bash
4949
uenv start prgenv-gnu/24.11:v1 --view=spack
5050
```
5151

52-
??? note "what does the `spack` view do?"
52+
??? note "What does the `spack` view do?"
5353
The `spack` view sets environment variables that provide information about the version of Spack that was used to build the uenv, and where the uenv Spack configuration is stored.
54-
55-
This information is useful because it is strongly recomended that you use the same version of Spack to build software on top of the uenv.
56-
54+
5755
| <div style="width:12em">variable</div> | <div style="width:18em">example</div> | description |
5856
| -------- | ------- | ----------- |
5957
| `UENV_SPACK_CONFIG_PATH` | `user-environment/config` | the path of the upstream [spack configuration files]. |
6058
| `UENV_SPACK_REF` | `releases/v0.23` | the branch or tag used - this might be empty if a specific commit of Spack was used. |
6159
| `UENV_SPACK_URL` | `https://github.com/spack/spack.git` | The git repository for Spack - nearly always the main spack/spack repository. |
6260
| `UENV_SPACK_COMMIT` | `c6d4037758140fe...0cd1547f388ae51` | The commit of Spack that was used |
6361

62+
!!! warning
63+
64+
The environment variables set by the `spack` view are scoped by `UENV_`.
65+
Therefore, they don't change Spack-related environment variables.
66+
You can use them to consistently set Spack-related environment variables.
67+
68+
You can then set the uenv as an [upstream Spack instance](https://spack.readthedocs.io/en/latest/chain.html) as follows:
69+
70+
```bash
71+
export SPACK_SYSTEM_CONFIG_PATH=$UENV_SPACK_CONFIG_PATH
72+
```
73+
74+
??? warning "Upstream Spack version"
75+
76+
It is strongly recomended that your version of Spack and the version of Spack in the uenv match when building software on top of an uenv.
77+
6478
### Describing what to build
6579

6680
!!! example "Create a build path with a template `spack.yaml` and `repo`:"

0 commit comments

Comments
 (0)