spack:
  include:
    - mirrors.yaml
    - packages.yaml
    - repos.yaml

  definitions:
    - compilers:
        - gcc@12.2.0
        - intel-oneapi-compilers

    - when: env['environment'] == 'helvetios'
      serial_codes_per_cluster:
        - ucx +rdmacm +rc +dc +ud +cma +mlx5_dv +parameter_checking +thread_multiple +verbs ~cuda ~gdrcopy
    - when: env['environment'] == 'izar'
      serial_codes_per_cluster:
        - ucx +rdmacm +rc +dc +ud +cma +mlx5_dv +parameter_checking +thread_multiple +verbs +cuda cuda_arch=70 +gdrcopy

    - mpi_codes:
        - osu-micro-benchmarks

    - when: env['environment'] == 'helvetios'
      mpis:
        - openmpi fabrics=ofi,ucx,verbs schedulers=slurm ~rsh +gpfs
    - when: env['environment'] == 'izar'
      mpis:
        - openmpi fabrics=ofi,ucx,verbs schedulers=slurm ~rsh +gpfs +cuda cuda_arch=70

    - all_serial_codes:
        - $serial_codes_per_cluster
        - $mpis

  specs:
  - $compilers
  - matrix:
    - [$all_serial_codes]
    - [$%compilers]
  - matrix:
    - [$mpi_codes]
    - [$^mpis]
    - [$%compilers]

  concretizer:
    unify: when_possible
  view:
    default:
      root: /stack/packages/
      link: all
      link_type: copy
