packages:
  all:
    providers:
      mpi: [openmpi, intel-oneapi-mpi]
      jpeg: [libjpeg]
      zlib-api: [zlib-ng]
    require:
      - spec: ^intel-oneapi-mpi
        when: '%oneapi ^mpi'

      - spec: ^openmpi
        when: '%gcc ^mpi'

      - spec: ^openmpi
        when: '%aocc ^mpi'

      - spec: ^nvhpc+mpi
        when: '%nvhpc ^mpi'

      - spec: ^openblas
        when: '%gcc ^blas'

      - spec: ^openblas
        when: '%gcc ^lapack'

      - spec: ^intel-oneapi-mkl
        when: '%oneapi ^blas'

      - spec: ^intel-oneapi-mkl
        when: '%oneapi ^lapack'

      - spec: ^nvhpc+blas
        when: '%nvhpc ^blas'

      - spec: ^nvhpc+lapack
        when: '%nvhpc ^lapack'

      - spec: '+ipo'
        when: '%gcc'

  # ----------------------------------------------------------------------------
  # Requirements
  # ----------------------------------------------------------------------------
  cuda:
    require:
    - spec: '@12.4.0'
    - spec: '+allow-unsupported-compilers'
      when: '%oneapi'

  gnuplot:
    require:
    - spec: '@5.4.10'

  hdf5:
    prefer:
    - spec: '@1.14.3'
    require:
    - spec: '+hl +threadsafe +szip +cxx +fortran'
    - spec: '+ipo'
      when: '%gcc'

  hypre:
    require:
    - spec: '+unified-memory ~magma'
      when: '+cuda'

  intel-oneapi-mkl:
    prefer: ['+cluster']

  libfabric:
    require:
    - spec: 'fabrics=mlx,mrail,psm3,verbs,udp,tcp,sockets,shm'

  llvm:
    prefer: ['~clang']

  mesa:
    require: ['~llvm', '+opengl', '+opengles', '+osmesa']

  metis:
    require: ['+real64']

  openblas:
    prefer: ['threads=pthreads']

  openmpi:
    require:
    - spec: '@5.0.3 fabrics=ofi,ucx,verbs schedulers=slurm ~rsh +romio romio-filesystem=gpfs +internal-pmix'
    - spec: ^ucx +cuda
      when: +cuda

  petsc:
    require:
    - spec: '+hypre +mumps +saws +scalapack'

  python:
    require:
    - spec: +ssl
    - spec: +optimizations
      when: '%gcc'

  tk:
    require: ['+xft', '+xss']

  ucx:
    require:
    - spec: +rdmacm +rc +dc +ud +cma +verbs +vfs
    - spec: +gdrcopy
      when: +cuda

  # ----------------------------------------------------------------------------
  # System dependencies
  # ----------------------------------------------------------------------------
  rdma-core:
    buildable: false
    externals:
    - spec: 'rdma-core@47.1'
      prefix: /usr

  slurm:
    buildable: false
    externals:
    - spec: 'slurm@23-11-7-1'
      prefix: /usr

  pmix:
    buildable: false
    externals:
    - spec: 'pmix@5.0.1'
      prefix: /usr
