packages:
  all:
    require:
      - "~rocm"

      - spec: cuda_arch={cuda_arch}
        when: '+cuda'

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

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

  # ---------------------------------------------------------------------------
  cuda:
    prefer:
    - spec: "^gcc-runtime@{gcc_version}"
      when: "%gcc"
    - spec: "%gcc@{gcc_version} target={target}"
      when: "%gcc"
    - spec: "target={target}"
      when: "%nvhpc"
    require:
    - spec: '@12.4.1'
      when: '%gcc'
    - spec: '@12.5.1'
      when: '%nvhpc'

  hypre:
    require: ['+cuda', 'cuda_arch={cuda_arch}', '+unified-memory']


  hwloc:
    require: ['+cuda', 'cuda_arch={cuda_arch}', '+nvml']

  kokkos:
    require: ['+cuda', '+cuda_lambda', 'cuda_arch={cuda_arch}', '+wrapper', '~openmptarget']

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

  libxc:
    require: ['+cuda', 'cuda_arch={cuda_arch}']

  nvshmem:
    require:
    - spec: '+cuda cuda_arch={cuda_arch} +nccl +ucx +mpi'
    - spec: '+ibgda'
      when: '@3:'

  openmpi:
    require: ['+cuda', 'cuda_arch={cuda_arch}']

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

  paraview:
    require: ['~cuda']

  petsc:
    require: ['+cuda', 'cuda_arch={cuda_arch}']

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

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

  python:
    require:
    - spec: 'target={target}'
      when: '%gcc@{gcc_version}'

  quantum-espresso:
    require:
    - spec: '+cuda +mpigpu'
      when: '%nvhpc'

  sirius:
    require: ['+cuda', 'cuda_arch={cuda_arch}']

  slepc:
    require: ['+cuda', 'cuda_arch={cuda_arch}']

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

  ucc:
    require:
    - spec: '+cuda cuda_arch={cuda_arch} +nccl'

  ucx:
    require: ['+gdrcopy', '+cuda', 'cuda_arch={cuda_arch}', '~rocm']
