spack:

  view: false
  concretization: separately

  config:
    concretizer: clingo

  modules:
    default:
      enable:: [lmod]
      lmod:
        core_compilers: [gcc@11.2.0]
        blacklist_implicits: true
        verbose: true
        hash_length: 0
        whitelist: [cray-mpich]
        hierarchy: [mpi]
        projections: {}
        core_specs: []
        all:
          autoload: direct
          environment:
            set:
              ${PACKAGE}_ROOT: ${PREFIX}
          suffixes:
            +rocm: rocm
        py-warpx:
          suffixes:
            ^warpx dims=2: dims2
            ^warpx dims=3: dims3
            ^warpx dims=rz: dimsRZ

  compilers:
  - compiler:
      spec: gcc@11.2.0
      paths:
        cc: gcc
        cxx: g++
        f77: gfortran
        fc: gfortran
      flags: {}
      operating_system: sles15
      target: any
      modules:
      - PrgEnv-gnu
      - gcc/11.2.0
      environment: {}
      extra_rpaths: []

  packages:
    all:
      compiler: [gcc@11.2.0]
      providers:
        blas: [openblas]
        lapack: [openblas]
        mpi: [cray-mpich]
        scalapack: [netlib-scalapack]
      target: [zen3]
      variants: +mpi
    binutils:
      variants: +ld +gold +headers +libiberty ~nls
    cuda:
      version: [11.4.2]
    elfutils:
      variants: +bzip2 ~nls +xz
    hdf5:
      variants: +fortran +hl +shared
    libfabric:
      variants: fabrics=sockets,tcp,udp,rxm
    libunwind:
      variants: +pic +xz
    mpich:
      variants: ~wrapperrpath
    ncurses:
      variants: +termlib
    openblas:
      variants: threads=openmp
    python:
      version: [3.8.13]
    trilinos:
      variants: +amesos +amesos2 +anasazi +aztec +belos +boost +epetra +epetraext
        +ifpack +ifpack2 +intrepid +intrepid2 +isorropia +kokkos +ml +minitensor +muelu
        +nox +piro +phalanx +rol +rythmos +sacado +stk +shards +shylu +stokhos +stratimikos
        +teko +tempus +tpetra +trilinoscouplings +zoltan +zoltan2 +superlu-dist gotype=long_long
    xz:
      variants: +pic
    mesa:
      version: [21.3.8]

    # FACILITY REQUESTED PREFERENCES
    petsc:
      variants: +batch
    parallel-netcdf:
      variants: +cxx +fortran +fpic
    netlib-scalapack:
      variants: +fpic
    netcdf-c:
      variants: ~hdf4 +mpi +parallel-netcdf +shared
    fftw:
      variants: precision=float,double,long_double
    darshan-runtime:
      variants: scheduler=slurm

    # EXTERNALS
    cray-mpich:
      buildable: false
      externals:
      - spec: cray-mpich@8.1.16 %gcc@11.2.0
        prefix: /opt/cray/pe/mpich/8.1.16/ofi/gnu/9.1
        modules:
        - cray-mpich/8.1.16
        - libfabric/1.15.0.0
    libfabric:
      buildable: false
      externals:
      - spec: libfabric@1.15
        modules:
        - libfabric/1.15.0.0

    # ROCm 5.1.0
    comgr:
      buildable: false
      externals:
      - spec: comgr@5.1.0
        prefix: /opt/rocm-5.1.0/
        modules: [rocm/5.1.0]
    hip-rocclr:
      buildable: false
      externals:
      - spec: hip-rocclr@5.1.0
        prefix: /opt/rocm-5.1.0/hip
        modules: [rocm/5.1.0]
    hipblas:
      buildable: false
      externals:
      - spec: hipblas@5.1.0
        prefix: /opt/rocm-5.1.0/
        modules: [rocm/5.1.0]
    hipcub:
      buildable: false
      externals:
      - spec: hipcub@5.1.0
        prefix: /opt/rocm-5.1.0/
        modules: [rocm/5.1.0]
    hipfft:
      buildable: false
      externals:
      - spec: hipfft@5.1.0
        prefix: /opt/rocm-5.1.0/
        modules: [rocm/5.1.0]
    hipsparse:
      buildable: false
      externals:
      - spec: hipsparse@5.1.0
        prefix: /opt/rocm-5.1.0/
        modules: [rocm/5.1.0]
    miopen-hip:
      buildable: false
      externals:
      - spec: hip-rocclr@5.1.0
        prefix: /opt/rocm-5.1.0/
        modules: [rocm/5.1.0]
    miopengemm:
      buildable: false
      externals:
      - spec: miopengemm@5.1.0
        prefix: /opt/rocm-5.1.0/
        modules: [rocm/5.1.0]
    rccl:
      buildable: false
      externals:
      - spec: rccl@5.1.0
        prefix: /opt/rocm-5.1.0/
        modules: [rocm/5.1.0]
    rocblas:
      buildable: false
      externals:
      - spec: rocblas@5.1.0
        prefix: /opt/rocm-5.1.0/
        modules: [rocm/5.1.0]
    rocfft:
      buildable: false
      externals:
      - spec: rocfft@5.1.0
        prefix: /opt/rocm-5.1.0/
        modules: [rocm/5.1.0]
    rocm-clang-ocl:
      buildable: false
      externals:
      - spec: rocm-clang-ocl@5.1.0
        prefix: /opt/rocm-5.1.0/
        modules: [rocm/5.1.0]
    rocm-cmake:
      buildable: false
      externals:
      - spec: rocm-cmake@5.1.0
        prefix: /opt/rocm-5.1.0/
        modules: [rocm/5.1.0]
    rocm-dbgapi:
      buildable: false
      externals:
      - spec: rocm-dbgapi@5.1.0
        prefix: /opt/rocm-5.1.0/
        modules: [rocm/5.1.0]
    rocm-debug-agent:
      buildable: false
      externals:
      - spec: rocm-debug-agent@5.1.0
        prefix: /opt/rocm-5.1.0/
        modules: [rocm/5.1.0]
    rocm-device-libs:
      buildable: false
      externals:
      - spec: rocm-device-libs@5.1.0
        prefix: /opt/rocm-5.1.0/
        modules: [rocm/5.1.0]
    rocm-gdb:
      buildable: false
      externals:
      - spec: rocm-gdb@5.1.0
        prefix: /opt/rocm-5.1.0/
        modules: [rocm/5.1.0]
    rocm-opencl:
      buildable: false
      externals:
      - spec: rocm-opencl@5.1.0
        prefix: /opt/rocm-5.1.0/opencl
        modules: [rocm/5.1.0]
    rocm-smi-lib:
      buildable: false
      externals:
      - spec: rocm-smi-lib@5.1.0
        prefix: /opt/rocm-5.1.0/
        modules: [rocm/5.1.0]
    hip:
      buildable: false
      externals:
      - spec: hip@5.1.0
        prefix: /opt/rocm-5.1.0/hip
        modules: [rocm/5.1.0]
        extra_attributes:
          compilers:
            c: /opt/rocm-5.1.0/llvm/bin/clang++
            c++: /opt/rocm-5.1.0/llvm/bin/clang++
            hip: /opt/rocm-5.1.0/hip/bin/hipcc
    llvm-amdgpu:
      buildable: false
      externals:
      - spec: llvm-amdgpu@5.1.0
        prefix: /opt/rocm-5.1.0/llvm
        modules: [rocm/5.1.0]
        extra_attributes:
          compilers:
            c: /opt/rocm-5.1.0/llvm/bin/clang++
            cxx: /opt/rocm-5.1.0/llvm/bin/clang++
    hsakmt-roct:
      buildable: false
      externals:
      - spec: hsakmt-roct@5.1.0
        prefix: /opt/rocm-5.1.0/
        modules: [rocm/5.1.0]
    hsa-rocr-dev:
      buildable: false
      externals:
      - spec: hsa-rocr-dev@5.1.0
        prefix: /opt/rocm-5.1.0/
        modules: [rocm/5.1.0]
        extra_atributes:
          compilers:
            c: /opt/rocm-5.1.0/llvm/bin/clang++
            cxx: /opt/rocm-5.1.0/llvm/bin/clang++
    roctracer-dev-api:
      buildable: false
      externals:
      - spec: roctracer-dev-api@5.1.0
        prefix: /opt/rocm-5.1.0/roctracer
        modules: [rocm/5.1.0]
    rocprim:
      buildable: false
      externals:
      - spec: rocprim@5.1.0
        prefix: /opt/rocm-5.1.0
        modules: [rocm/5.1.0]
    rocrand:
      buildable: false
      externals:
      - spec: rocrand@5.1.0
        prefix: /opt/rocm-5.1.0
        modules: [rocm/5.1.0]
    rocsolver:
      buildable: false
      externals:
      - spec: rocsolver@5.1.0
        prefix: /opt/rocm-5.1.0
        modules: [rocm/5.1.0]
    rocsparse:
      buildable: false
      externals:
      - spec: rocsparse@5.1.0
        prefix: /opt/rocm-5.1.0
        modules: [rocm/5.1.0]
    rocthrust:
      buildable: false
      externals:
      - spec: rocthrust@5.1.0
        prefix: /opt/rocm-5.1.0
        modules: [rocm/5.1.0]

  specs:
  - adios@1.13.1
  - adios2@2.8.0
  - aml@0.1.0
  - amrex@22.05
  - arborx@1.2
  - archer@2.0.0
  - argobots@1.1
  - axom@0.6.1
  - bolt@2.0
  - butterflypack@2.1.1
  - cabana@0.4.0
  - caliper@2.7.0
  - chai@2.4.0 ~benchmarks ~tests
  - charliecloud@0.26
  - conduit@0.8.3
  - darshan-runtime@3.3.1
  - darshan-util@3.3.1
  - datatransferkit@3.1-rc3
  - dyninst@12.1.0
  - exaworks@0.1.0
  - faodel@1.2108.1
  - flecsi@1.4.2
  - flit@2.1.0
  - flux-core@0.38.0
  - fortrilinos@2.0.0
  - gasnet@2022.3.0
  - ginkgo@1.4.0
  - globalarrays@5.8
  - gmp@6.2.1
  - gotcha@1.0.3
  - gptune@3.0.0
  - hdf5@1.10.7 +fortran +hl +shared
  - heffte@2.2.0 +fftw
  - hpctoolkit@2022.04.15
  - hpx@1.7.1 networking=mpi
  - hypre@2.24.0
  - kokkos-kernels@3.6.00 +openmp
  - kokkos@3.6.00 +openmp
  - lammps@20220107
  - legion@21.03.0
  - libnrm@0.1.0
  - libquo@1.3.1
  - libunwind@1.6.2
  - mercury@2.1.0
  - metall@0.20
  - mfem@4.4.0
  - mpark-variant@1.4.0
  - mpifileutils@0.11.1 ~xattr
  - nccmp@1.9.0.1
  - nco@5.0.1
  - netlib-scalapack@2.2.0
  - nrm@0.1.0
  - omega-h@9.34.1
  - openmpi@4.1.3
  - openpmd-api@0.14.4
  - papi@6.0.0.1
  - papyrus@1.0.2
  - parallel-netcdf@1.12.2
  - paraview@5.10.1 +qt ^llvm@12.0.1
  - parsec@3.0.2012 ~cuda
  - pdt@3.25.1
  - petsc@3.17.1
  - phist@1.9.5
  - plasma@21.8.29
  - precice@2.4.0
  - pumi@2.2.7
  - py-cinemasci@1.7.0
  - py-jupyterhub@1.4.1
  - py-libensemble@0.9.1
  - py-petsc4py@3.17.1
  - py-warpx@22.05 ^warpx dims=2
  - py-warpx@22.05 ^warpx dims=3
  - py-warpx@22.05 ^warpx dims=rz
  - qthreads@1.16 scheduler=distrib
  - raja@0.14.0
  - slate@2021.05.02 ~cuda
  - slepc@3.17.1
  - stc@0.9.0
  - strumpack@6.3.1 ~slate
  - sundials@6.2.0
  - superlu-dist@7.2.0
  - superlu@5.3.0
  - swig@4.0.2
  - swig@4.0.2-fortran
  - sz@2.1.12
  - tasmanian@7.7
  - tau@2.31.1 +mpi +python
  - trilinos@13.0.1 +amesos +amesos2 +anasazi +aztec +belos +boost +epetra +epetraext +ifpack
    +ifpack2 +intrepid +intrepid2 +isorropia +kokkos +ml +minitensor +muelu +nox +piro
    +phalanx +rol +rythmos +sacado +stk +shards +shylu +stokhos +stratimikos +teko
    +tempus +tpetra +trilinoscouplings +zoltan +zoltan2 +superlu-dist gotype=long_long
  - turbine@1.3.0
  - umap@2.1.0
  - umpire@6.0.0
  - unifyfs@0.9.2
  - upcxx@2022.3.0
  - veloc@1.5
  - zfp@0.5.5

  # GPU
  - amrex@22.05 +rocm amdgpu_target=gfx90a
  - arborx@1.2 +rocm amdgpu_target=gfx90a
  - chai@2.4.0 ~benchmarks +rocm amdgpu_target=gfx90a
  - gasnet@2022.3.0 +rocm amdgpu_target=gfx90a
  - ginkgo@1.4.0 +rocm amdgpu_target=gfx90a
  - heffte@2.2.0 +rocm amdgpu_target=gfx90a
  - hpx@1.7.1 +rocm amdgpu_target=gfx90a
  - kokkos@3.6.00 +rocm amdgpu_target=gfx90a
  - magma@2.6.2 ~cuda +rocm amdgpu_target=gfx90a
  - mfem@4.4.0 +rocm amdgpu_target=gfx90a
  - petsc@3.17.1 +rocm amdgpu_target=gfx90a
  - raja@0.14.0 ~openmp +rocm amdgpu_target=gfx90a
  - slepc@3.17.1 +rocm amdgpu_target=gfx90a ^petsc +rocm amdgpu_target=gfx90a
  - strumpack@6.3.1 ~slate +rocm amdgpu_target=gfx90a
  - sundials@6.2.0 +rocm amdgpu_target=gfx90a
  - superlu-dist@7.2.0 +rocm amdgpu_target=gfx90a
  - tasmanian@7.7 +rocm amdgpu_target=gfx90a
  - tau@2.31.1 +mpi +rocm
  - umpire@6.0.0 +rocm amdgpu_target=gfx90a
  - upcxx@2022.3.0 +rocm amdgpu_target=gfx90a

  # FAILED BUILDS
  #- alquimia@1.0.9                              # pflotran
  #- ascent@0.8.0                                # vtk-m
  #- bricks@r0.1                                 # bricks
  #- cabana@0.4.0 +rocm                          # cabana: https://github.com/spack/spack/issues/27967
  #- catalyst@5.6.0                              # mesa; https://github.com/spack/spack/issues/30478
  #- dealii@9.3.3                                # mesa
  #- geopm@1.1.0                                 # geopm
  #- h5bench@1.2                                 # h5bench
  #- hpctoolkit@2022.04.15 +rocm                 # rocprofiler-dev
  #- loki@0.1.7                                  # loki
  #- papi@6.0.0.1 +rocm amdgpu_target=gfx90a     # rocprofiler-dev; https://github.com/spack/spack/issues/27898
  #- plumed@2.6.3                                # plumed
  #- pruners-ninja@1.0.1                         # pruners-ninja
  #- rempi@1.1.0                                 # rempi
  #- scr@3.0rc2                                  # scr
  #- slate@2021.05.02 +rocm amdgpu_target=gfx90a # slate; https://github.com/spack/spack/issues/30596
  #- stat@4.1.0                                  # mesa
  #- tau@2.31.1 +mpi +python +rocm +roctracer    # rocprofiler-dev
  #- trilinos@13.2.0 +rocm amdgpu_target=gfx90a  # trilinos
  #- variorum@0.4.1                              # variorum
  #- vtk-m@1.7.1                                 # vtk-m
  #- vtk-m@1.7.1 +rocm amdgpu_target=gfx90a      # vtk-m, https://github.com/spack/spack/issues/29527
  #- wannier90@3.1.0                             # wannier90

  # ERROR ANNOTATIONS
  # bricks: VSBrick-mpi9pt.py-Scalar-4x4x4x4-1:84:3: error: 'vfloat256' was not declared in this scope
  # cabana: g++: error: unrecognized command-line option '-fno-gpu-rdc'
  # geopm: configure: error: Failed to determine MPI Fortran build flags use --with-mpi-bin or --with-mpicxx or --disable-mpi
  # h5bench: commons/h5bench_util.h:196: multiple definition of `has_vol_async'
  # launchmon: sdbg_base_symtab.hxx:197:34: error: ISO C++17 does not allow dynamic exception specifications
  # loki: loki/SmallObj.h:462:57: error: ISO C++17 does not allow dynamic exception specifications
  # mesa: gallium/drivers/swr/rasterizer/jitter/builder_mem.h:87:36: error: cannot convert 'llvm::Value*' to 'llvm::Type*'
  # pango: gi-docgen/meson.build:10:0: Exception: python3 is missing modules: jinja2, markdown, markupsafe, pygments, toml, typogri
  # pflotran: pflotran/option.F90:750:21: Rank mismatch between actual argument at (1) and actual argument at (2) (scalar and rank-1)
  # plumed: lepton/Operation.h:902:39: error: 'numeric_limits' is not a member of 'std'
  # pruners-ninja: test/ninja_test_util.c:34: multiple definition of `a'
  # rempi: rempi_message_manager.h:53:3: error: 'string' does not name a type; did you mean 'stdin'?
  # rocprofiler-dev: /usr/bin/ld: cannot find -ldrm, cannot find -ldrm_amdgpu
  # scr: test_common.c.o: undefined reference to symbol 'MPI_Comm_rank'; /usr/bin/ld: /opt/cray/pe/mpich/8.1.16/ofi/gnu/9.1/lib/libmpi_gnu_91.so.12: error adding symbols: DSO missing from command line
  # slate +rocm: cmake-3.23/Modules/FindPackageHandleStandardArgs.cmake:230: Could NOT find Threads (missing: Threads_FOUND)
  # trilinos +rocm: CMake Error at packages/kokkos/cmake/kokkos_arch.cmake:448 (MESSAGE): HIP enabled but no AMD GPU architecture currently enabled.  Please enable one AMD GPU architecture via -DKokkos_ARCH_{..}=ON'.
  # variorum: /usr/bin/ld: Intel/CMakeFiles/variorum_intel.dir/IvyBridge_3E.c.o:(.bss+0x0): multiple definition of `g_platform';
  # vtk-m +rocm: vtkmdiy/mpi/datatypes.hpp:42:12: error: 'size_t' has not been declared
  # vtk-m: vtkmdiy/mpi/datatypes.hpp:42:12: error: 'size_t' has not been declared
  # wannier90: ../comms.F90:1214:22: Error: Type mismatch between actual argument at (1) and actual argument at (2) (COMPLEX(8)/INTEGER(4)).

  # SKIPPED
  #- nvhpc@22.3