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

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

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

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

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

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

  kokkos-kernels:
    require: ['+cuda', '+cublas', '+cusolver', '+cusparse', 'cuda_arch=89']

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

  openmpi:
    require: ['+cuda', 'cuda_arch=89']

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

  paraview:
    require: ['~cuda']

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

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

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

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

  quantum-espresso:
    require:
    - spec: '+nvtx'

  suite-sparse:
    require:
    - spec: '+cuda'
      when: '@7.3.1'
    - spec: '~cuda'
      when: '@7.2.1'

  ucx:
    require:
      - spec: '+xpmem +cma +rdmacm +rc +ud +dc +verbs +ib_hw_tm +gdrcopy +cuda cuda_arch=89 ~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
