eth-cscs / stackinator

Home Page:https://eth-cscs.github.io/stackinator/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

per-environment variants

bcumming opened this issue · comments

Add support for setting a variant that will be applied to every package in an environment, e.g. to set the cuda arch or +mpi.

# example environments.yaml
my-gpu-mpi-env:
  compiler:
  - toolchain: gcc
    spec: gcc@11 
  specs:
  - hdf5
  - osu-micro-benchmarks +cuda
  mpi:
    spec: cray-mpich-binary
    gpu: None
  unify: true
  variants:
    - +mpi
    - cuda_arch=80

The generated spack.yaml for the environment would contain:

  packages:
    all:
      variants:
      - cuda_arch=80
      - +mpi

The result would be hdf5 being built with mpi support and the osu benchmarks with support for A100.