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

  config:
    install_tree:
      root: /stack/spack/opt/spack

  definitions:
    - 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'] == 'jed'
      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'] == 'jed'
      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:
  - matrix:
    - [$compilers_specs]
    - [$%core_compiler]
  - matrix:
    - [$all_serial_codes]
    - [$%compilers]
  - matrix:
    - [$mpi_codes]
    - [$^mpis]
    - [$%compilers]

  concretizer:
    unify: when_possible
    duplicates: "none"

  view:
    default:
      root: /stack/packages/
