spack:
  include:
      - compiler_definitions.yaml

      - packages_stack.yaml
      - packages_accel.yaml
      - packages_env.yaml

      - modules_stack.yaml
      - modules_env.yaml
      - modules_accel.yaml

      - definitions_accel.yaml
      - definitions_env.yaml
      - definitions_stack.yaml

  modules:
    default:
      lmod:
        hierarchy: ['mpi']

  packages:
    blas:
      require: ['intel-oneapi-mkl']

    lapack:
      require: ['intel-oneapi-mkl']

    mpi:
      require: ['intel-oneapi-mpi']

    scalapack:
      require: ['intel-oneapi-mkl +cluster']

    icu4c:
      require: ['%gcc']

    cuda:
      require:
      - spec: '+allow-unsupported-compilers'
        when: '%oneapi'

    intel-oneapi-mkl:
      require:
      - '%oneapi ^intel-oneapi-runtime target={target}'

    intel-oneapi-mpi:
      require: ['%oneapi ^intel-oneapi-runtime target={target}']

    intel-oneapi-tbb:
      require: ['%oneapi ^intel-oneapi-runtime target={target}']

    intel-oneapi-runtime:
      require: ['%oneapi target={target} ^gcc-runtime target=x86_64_v3']

  definitions:
    # -------------------------------------------------------------------------
    # PE definition
    # -------------------------------------------------------------------------
    - mpi_oneapi:
        - "intel-oneapi-mpi"

    - blas_oneapi:
        - "intel-oneapi-mkl"

    - python_oneapi:
        - python@3.11.7 %gcc@11.2.1

  specs:
    - matrix:
        - [$compilers_specs]

    # --------------------------------------------------------------------------
    - matrix:
        - [$serial_codes]
        - [$%compiler_oneapi]

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

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

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

    - matrix:
        - [$blas_codes]
        - [$^blas_oneapi]
        - [$%compiler_oneapi]

    - matrix:
        - [$python_codes]
        - [$^python_oneapi]
        - [$%compiler_oneapi]

    - matrix:
        - [$python_blas_codes]
        - [$^blas_oneapi]
        - [$%compiler_oneapi]

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

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

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

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

  view: false
