Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make spack config:deprecated configuration accessible in environment #153

Merged
merged 3 commits into from
Jan 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 10 additions & 7 deletions docs/recipes.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,13 +80,14 @@ To provide a single Spack stack that meets the workflow's needs, we would create
```yaml title="environments.yaml high level overview"
# A GCC-based programming environment
prgenv-gnu:
compiler: # ... compiler toolchain
mpi: # ... mpi configuration
unify: # ... configure Spack concretizer
specs: # ... list of packages to install
variants: # ... variants to apply to packages (e.g. +mpi)
packages: # ... list of external packages to use
views: # ... environment views to provide to users
compiler: # ... compiler toolchain
mpi: # ... mpi configuration
deprecated: # ... whether to allow usage of deprecated packages or not
unify: # ... configure Spack concretizer
specs: # ... list of packages to install
variants: # ... variants to apply to packages (e.g. +mpi)
packages: # ... list of external packages to use
views: # ... environment views to provide to users
# An NVIDIA programming environment
prgenv-nvgpu:
# ... same structure as prgenv-gnu
Expand Down Expand Up @@ -181,6 +182,8 @@ The following versions of cray-mpich are currently provided:

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).

The `deprecated: ` field controls if Spack should consider versions marked as deprecated, and can be set to `true` or `false` (for considering or not considering deprecated versions, respectively).

The `unify:` field controls the Spack concretiser, and can be set to three values `true`, `false` or `when_possible`.
The

Expand Down
4 changes: 4 additions & 0 deletions stackinator/schema/environments.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@
"required": ["compiler", "specs"],
"additionalProperties": false,
"properties": {
"deprecated": {
"type": "boolean",
"default": false
},
"unify": {
"enum": ["when_possible", true, false],
"default": true
Expand Down
2 changes: 2 additions & 0 deletions stackinator/templates/environments.spack.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ spack:
{% endif %}
- compilers.yaml
- config.yaml
config:
deprecated: {{ config.deprecated }}
concretizer:
unify: {{ config.unify }}
reuse: false
Expand Down