packages:
  all:
    target: ["zen4"]
    prefer: ['target=zen4']
    require:
      - "~rocm"

      - spec: cuda_arch=90
        when: '+cuda'

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

  # ---------------------------------------------------------------------------
  cuda:
    prefer:
    - spec: "^gcc-runtime@12.3.0"
      when: "%gcc"
    - spec: "%gcc@12.3.0 target=zen4"
      when: "%gcc"
    require:
    - '@12.4.0'

  hypre:
    require:
    - spec: '+cuda cuda_arch=90 +unified-memory'
      when: '%gcc'

  kokkos:
    require:
    - spec: '+cuda +cuda_lambda cuda_arch=90 +cuda_uvm +wrapper ~openmptarget'
      when: '%gcc'

  nvshmem:
    require:
    - spec: '+cuda cuda_arch=90 +ibgda +nccl +ucx +mpi'

  openmpi:
    require:
      - spec: '+cuda cuda_arch=90'

  papi:
    require: ['+nvml', '+infiniband', '+cuda']

  petsc:
    require:
    - spec: '+cuda cuda_arch=90'
      when: '%gcc'

  py-tensorflow:
    require:
    - spec: '+cuda cuda_arch=90 +nccl'

  py-torch:
    require:
    - spec: '+cuda cuda_arch=90 +nccl +cudnn'

  python:
    require:
    - spec: 'target=zen4'
      when: '%gcc@12.3.0'

  quantum-espresso:
    require:
    - spec: '~cuda'

  suite-sparse:
    require:
    - spec: '+cuda'

  ucx:
    require:
      - spec: '+xpmem +cma +rdmacm +rc +ud +dc +verbs +ib_hw_tm +gdrcopy +cuda cuda_arch=90 ~rocm'

  # ---------------------------------------------------------------------------
  # Externals
  # ---------------------------------------------------------------------------
  pmix:
    buildable: false
    externals:
    - spec: 'pmix@5.0.2'
      prefix: /usr

  rdma-core:
    buildable: false
    externals:
    - spec: 'rdma-core@51.1'
      prefix: /usr

  slurm:
    buildable: false
    externals:
    - spec: 'slurm@24-05-0-2'
      prefix: /usr

  xpmem:
    buildable: false
    externals:
    - spec: 'xpmem@2.7.3'
      prefix: /usr
