spack:
  include:
      - compiler_definitions.yaml
      - packages_env.yaml

  definitions:
    # -------------------------------------------------------------------------
    # PE definition
    # -------------------------------------------------------------------------
    - mpi_codes:
        - osu-micro-benchmarks +graphing
        - hdf5 +mpi

    - mpi_oneapi:
        - intel-oneapi-mpi

    # -------------------------------------------------------------------------
    # Serial codes
    # -------------------------------------------------------------------------
    - serial_codes:
        - python
        - hdf5 ~mpi

    # -------------------------------------------------------------------------
    # Environment specific
    - when: env['environment'] in ['helvetios']
      mpi_gcc_stable:
        - openmpi
    - when: env['environment'] in ['izar', 'jed']
      mpi_gcc_stable:
        - openmpi +cuda
    - when: env['environment'] in ['izar', 'jed']
      serial_codes:
        - cuda

    # -------------------------------------------------------------------------
    # Generic definitions
    # -------------------------------------------------------------------------
    - mpis:
        - $mpi_oneapi
        - $mpi_gcc_stable


  specs:
    - matrix:
        - [$compilers_specs]

    - matrix:
        - [$mpi_oneapi]
        - [$%compiler_oneapi]

    - matrix:
        - [$mpi_gcc_stable]
        - [$%compiler_gcc_stable]

    - matrix:
        - [$serial_codes]
        - [$%compilers]

    - matrix:
        - [$mpi_codes]
        - [$%compilers]

  concretizer:
    unify: false
    duplicates:
      strategy: minimal

  view: false
#    default:
#      root: /stack/packages/
