packages:
  all:
    providers:
      mpi: [openmpi, intel-oneapi-mpi]
      jpeg: [libjpeg]
    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: "^cuda%gcc@12.3.0"
        when: '%gcc@12.3.0 ^cuda'

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

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

  # ----------------------------------------------------------------------------
  # Requirements
  # ----------------------------------------------------------------------------
  cuda:
    require:
    - spec: '@12.4.0'

  gnuplot:
    require:
    - spec: '@5.4.10'

  hdf5:
    variants: +hl +threadsafe +szip +cxx +fortran

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

  llvm:
    prefer: ['~clang']

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

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

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

  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@24-05-0-1'
      prefix: /usr

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