spack:
  view: false

  concretizer:
    reuse: false
    unify: false

  packages:
    all:
      require: '%gcc@11.2.0'
      compiler: [gcc@11.2.0]
      providers:
        blas: [openblas]
        lapack: [openblas]
        mpi: [cray-mpich]
        tbb: [intel-tbb]
        scalapack: [netlib-scalapack]
      target: [zen3]
      variants: +mpi amdgpu_target=gfx90a
    tbb:
      require: intel-tbb
    binutils:
      variants: +ld +gold +headers +libiberty ~nls
    elfutils:
      variants: +bzip2 ~nls +xz
    hdf5:
      variants: +fortran +hl +shared
    libunwind:
      variants: +pic +xz
    ncurses:
      require: '@6.3 +termlib'
    openblas:
      variants: threads=openmp
    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]
    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
    paraview:
      require: ~qt +osmesa
    visit:
      require: ~gui +osmesa
    vtk-m:
      require: +examples
    libfabric:
      buildable: false
      externals:
      - spec: libfabric@1.15
        modules:
        - libfabric/1.15.2.0
    rust:
      buildable: false
      externals:
      - spec: rust@1.51.0
        prefix: /sw/frontier/spack-envs/base/opt/linux-sles15-x86_64/gcc-7.5.0/rust-1.51.0-xb3x3alj3c2kcen25f3m7wppjinnuxxz
    mpi:
      require: cray-mpich
    cray-mpich:
      buildable: false
      externals:
      - spec: cray-mpich@8.1.23
        prefix: /opt/cray/pe/mpich/8.1.23/ofi/gnu/9.1
        modules:
        - cray-mpich/8.1.23
        - libfabric/1.15.2.0
    openssl:
      buildable: false
      externals:
      - spec: openssl@1.1.1-os
        prefix: /lustre/orion/csc439/world-shared/E4S/ParaTools/frontier/23.02/externals/openssl
    comgr:
      buildable: false
      externals:
      - spec: comgr@5.3.0
        prefix: /opt/rocm-5.3.0/
        modules: [rocm/5.3.0]
      - spec: comgr@5.2.0
        prefix: /opt/rocm-5.2.0/
        modules: [rocm/5.2.0]
    hip-rocclr:
      buildable: false
      externals:
      - spec: hip-rocclr@5.3.0
        prefix: /opt/rocm-5.3.0/hip
        modules: [rocm/5.3.0]
      - spec: hip-rocclr@5.2.0
        prefix: /opt/rocm-5.2.0/hip
        modules: [rocm/5.2.0]
    hipblas:
      buildable: false
      externals:
      - spec: hipblas@5.3.0
        prefix: /opt/rocm-5.3.0/
        modules: [rocm/5.3.0]
      - spec: hipblas@5.2.0
        prefix: /opt/rocm-5.2.0/
        modules: [rocm/5.2.0]
    hipcub:
      buildable: false
      externals:
      - spec: hipcub@5.3.0
        prefix: /opt/rocm-5.3.0/
        modules: [rocm/5.3.0]
      - spec: hipcub@5.2.0
        prefix: /opt/rocm-5.2.0/
        modules: [rocm/5.2.0]
    hipfft:
      buildable: false
      externals:
      - spec: hipfft@5.3.0
        prefix: /opt/rocm-5.3.0/
        modules: [rocm/5.3.0]
      - spec: hipfft@5.2.0
        prefix: /opt/rocm-5.2.0/
        modules: [rocm/5.2.0]
    hipsparse:
      buildable: false
      externals:
      - spec: hipsparse@5.3.0
        prefix: /opt/rocm-5.3.0/
        modules: [rocm/5.3.0]
      - spec: hipsparse@5.2.0
        prefix: /opt/rocm-5.2.0/
        modules: [rocm/5.2.0]
    miopen-hip:
      buildable: false
      externals:
      - spec: miopen-hip@5.3.0
        prefix: /opt/rocm-5.3.0/
        modules: [rocm/5.3.0]
      - spec: miopen-hip@5.2.0
        prefix: /opt/rocm-5.2.0/
        modules: [rocm/5.2.0]
    miopengemm:
      buildable: false
      externals:
      - spec: miopengemm@5.3.0
        prefix: /opt/rocm-5.3.0/
        modules: [rocm/5.3.0]
      - spec: miopengemm@5.2.0
        prefix: /opt/rocm-5.2.0/
        modules: [rocm/5.2.0]
    rccl:
      buildable: false
      externals:
      - spec: rccl@5.3.0
        prefix: /opt/rocm-5.3.0/
        modules: [rocm/5.3.0]
      - spec: rccl@5.2.0
        prefix: /opt/rocm-5.2.0/
        modules: [rocm/5.2.0]
    rocblas:
      buildable: false
      externals:
      - spec: rocblas@5.3.0
        prefix: /opt/rocm-5.3.0/
        modules: [rocm/5.3.0]
      - spec: rocblas@5.2.0
        prefix: /opt/rocm-5.2.0/
        modules: [rocm/5.2.0]
    rocfft:
      buildable: false
      externals:
      - spec: rocfft@5.3.0
        prefix: /opt/rocm-5.3.0/
        modules: [rocm/5.3.0]
      - spec: rocfft@5.2.0
        prefix: /opt/rocm-5.2.0/
        modules: [rocm/5.2.0]
    rocminfo:
      buildable: false
      externals:
      - spec: rocminfo@5.3.0
        prefix: /opt/rocm-5.3.0/
        modules: [rocm/5.3.0]
      - spec: rocminfo@5.2.0
        prefix: /opt/rocm-5.2.0/
        modules: [rocm/5.2.0]
    rocm-clang-ocl:
      buildable: false
      externals:
      - spec: rocm-clang-ocl@5.3.0
        prefix: /opt/rocm-5.3.0/
        modules: [rocm/5.3.0]
      - spec: rocm-clang-ocl@5.2.0
        prefix: /opt/rocm-5.2.0/
        modules: [rocm/5.2.0]
    rocm-cmake:
      buildable: false
      externals:
      - spec: rocm-cmake@5.3.0
        prefix: /opt/rocm-5.3.0/
        modules: [rocm/5.3.0]
      - spec: rocm-cmake@5.2.0
        prefix: /opt/rocm-5.2.0/
        modules: [rocm/5.2.0]
    rocm-dbgapi:
      buildable: false
      externals:
      - spec: rocm-dbgapi@5.3.0
        prefix: /opt/rocm-5.3.0/
        modules: [rocm/5.3.0]
      - spec: rocm-dbgapi@5.2.0
        prefix: /opt/rocm-5.2.0/
        modules: [rocm/5.2.0]
    rocm-debug-agent:
      buildable: false
      externals:
      - spec: rocm-debug-agent@5.3.0
        prefix: /opt/rocm-5.3.0/
        modules: [rocm/5.3.0]
      - spec: rocm-debug-agent@5.2.0
        prefix: /opt/rocm-5.2.0/
        modules: [rocm/5.2.0]
    rocm-device-libs:
      buildable: false
      externals:
      - spec: rocm-device-libs@5.3.0
        prefix: /opt/rocm-5.3.0/
        modules: [rocm/5.3.0]
      - spec: rocm-device-libs@5.2.0
        prefix: /opt/rocm-5.2.0/
        modules: [rocm/5.2.0]
    rocm-gdb:
      buildable: false
      externals:
      - spec: rocm-gdb@5.3.0
        prefix: /opt/rocm-5.3.0/
        modules: [rocm/5.3.0]
      - spec: rocm-gdb@5.2.0
        prefix: /opt/rocm-5.2.0/
        modules: [rocm/5.2.0]
    rocm-opencl:
      buildable: false
      externals:
      - spec: rocm-opencl@5.3.0
        prefix: /opt/rocm-5.3.0/opencl
        modules: [rocm/5.3.0]
      - spec: rocm-opencl@5.2.0
        prefix: /opt/rocm-5.2.0/opencl
        modules: [rocm/5.2.0]
    rocm-smi-lib:
      buildable: false
      externals:
      - spec: rocm-smi-lib@5.3.0
        prefix: /opt/rocm-5.3.0/
        modules: [rocm/5.3.0]
      - spec: rocm-smi-lib@5.2.0
        prefix: /opt/rocm-5.2.0/
        modules: [rocm/5.2.0]
    hip:
      buildable: false
      externals:
      - spec: hip@5.3.0
        prefix: /opt/rocm-5.3.0
        modules: [rocm/5.3.0]
        extra_attributes:
          compilers:
            c: /opt/rocm-5.3.0/llvm/bin/clang++
            c++: /opt/rocm-5.3.0/llvm/bin/clang++
            hip: /opt/rocm-5.3.0/hip/bin/hipcc
        environment:
          set:
            MPICH_GPU_SUPPORT_ENABLED: 1
      - spec: hip@5.2.0
        prefix: /opt/rocm-5.2.0
        modules: [rocm/5.2.0]
        extra_attributes:
          compilers:
            c: /opt/rocm-5.2.0/llvm/bin/clang++
            c++: /opt/rocm-5.2.0/llvm/bin/clang++
            hip: /opt/rocm-5.2.0/hip/bin/hipcc
        environment:
          set:
            MPICH_GPU_SUPPORT_ENABLED: 1
    llvm-amdgpu:
      buildable: false
      externals:
      - spec: llvm-amdgpu@5.3.0
        prefix: /opt/rocm-5.3.0/llvm
        modules: [rocm/5.3.0]
        extra_attributes:
          compilers:
            c: /opt/rocm-5.3.0/llvm/bin/clang++
            cxx: /opt/rocm-5.3.0/llvm/bin/clang++
      - spec: llvm-amdgpu@5.2.0
        prefix: /opt/rocm-5.2.0/llvm
        modules: [rocm/5.2.0]
        extra_attributes:
          compilers:
            c: /opt/rocm-5.2.0/llvm/bin/clang++
            cxx: /opt/rocm-5.2.0/llvm/bin/clang++
    hsakmt-roct:
      buildable: false
      externals:
      - spec: hsakmt-roct@5.3.0
        prefix: /opt/rocm-5.3.0/
        modules: [rocm/5.3.0]
      - spec: hsakmt-roct@5.2.0
        prefix: /opt/rocm-5.2.0/
        modules: [rocm/5.2.0]
    hsa-rocr-dev:
      buildable: false
      externals:
      - spec: hsa-rocr-dev@5.3.0
        prefix: /opt/rocm-5.3.0/
        modules: [rocm/5.3.0]
        extra_atributes:
          compilers:
            c: /opt/rocm-5.3.0/llvm/bin/clang++
            cxx: /opt/rocm-5.3.0/llvm/bin/clang++
      - spec: hsa-rocr-dev@5.2.0
        prefix: /opt/rocm-5.2.0/
        modules: [rocm/5.2.0]
        extra_atributes:
          compilers:
            c: /opt/rocm-5.2.0/llvm/bin/clang++
            cxx: /opt/rocm-5.2.0/llvm/bin/clang++
    roctracer-dev-api:
      buildable: false
      externals:
      - spec: roctracer-dev-api@5.3.0
        prefix: /opt/rocm-5.3.0
        modules: [rocm/5.3.0]
      - spec: roctracer-dev-api@5.2.0
        prefix: /opt/rocm-5.2.0
        modules: [rocm/5.2.0]
    roctracer-dev:
      buildable: false
      externals:
      - spec: roctracer-dev@5.3.0
        prefix: /opt/rocm-5.3.0
        modules: [rocm/5.3.0]
      - spec: roctracer-dev@5.2.0
        prefix: /opt/rocm-5.2.0
        modules: [rocm/5.2.0]
    rocprim:
      buildable: false
      externals:
      - spec: rocprim@5.3.0
        prefix: /opt/rocm-5.3.0
        modules: [rocm/5.3.0]
      - spec: rocprim@5.2.0
        prefix: /opt/rocm-5.2.0
        modules: [rocm/5.2.0]
    rocrand:
      buildable: false
      externals:
      - spec: rocrand@5.3.0
        prefix: /opt/rocm-5.3.0
        modules: [rocm/5.3.0]
      - spec: rocrand@5.2.0
        prefix: /opt/rocm-5.2.0
        modules: [rocm/5.2.0]
    hipsolver:
      buildable: false
      externals:
      - spec: hipsolver@5.3.0
        prefix: /opt/rocm-5.3.0
        modules: [rocm/5.3.0]
      - spec: hipsolver@5.2.0
        prefix: /opt/rocm-5.2.0
        modules: [rocm/5.2.0]
    rocsolver:
      buildable: false
      externals:
      - spec: rocsolver@5.3.0
        prefix: /opt/rocm-5.3.0
        modules: [rocm/5.3.0]
      - spec: rocsolver@5.2.0
        prefix: /opt/rocm-5.2.0
        modules: [rocm/5.2.0]
    rocsparse:
      buildable: false
      externals:
      - spec: rocsparse@5.3.0
        prefix: /opt/rocm-5.3.0
        modules: [rocm/5.3.0]
      - spec: rocsparse@5.2.0
        prefix: /opt/rocm-5.2.0
        modules: [rocm/5.2.0]
    rocthrust:
      buildable: false
      externals:
      - spec: rocthrust@5.3.0
        prefix: /opt/rocm-5.3.0
        modules: [rocm/5.3.0]
      - spec: rocthrust@5.2.0
        prefix: /opt/rocm-5.2.0
        modules: [rocm/5.2.0]
    rocprofiler-dev:
      buildable: false
      externals:
      - spec: rocprofiler-dev@5.3.0
        prefix: /opt/rocm-5.3.0
        modules: [rocm/5.3.0]
      - spec: rocprofiler-dev@5.2.0
        prefix: /opt/rocm-5.2.0
        modules: [rocm/5.2.0]

  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: []

  specs:
  # CPU
  - adios
  - alquimia
  - aml
  - amrex
  - arborx
  - argobots
  - axom
  - bolt
  - boost +python +filesystem +iostreams +system
  - butterflypack
  - cabana
  - caliper
  - chai ~benchmarks ~tests
  - charliecloud
  - conduit
  - datatransferkit
  - dyninst ^intel-tbb
  - exaworks # had to use external rust to bypass ssl cert error; also rust dependency cannot be build with read-only $HOME - build on login node or try setting CARGO_HOME; rust: error: failed to acquire package cache lock
  - flecsi
  - flit
  - flux-core
  - fortrilinos
  - gasnet
  - ginkgo
  - globalarrays
  - gmp
  - gotcha
  - h5bench
  - hdf5-vol-async
  - hdf5-vol-cache
  - hdf5-vol-log
  - heffte +fftw
  - hpctoolkit
  - hpx max_cpu_count=512 networking=mpi
  - hypre
  - kokkos +openmp
  - kokkos-kernels +openmp
  - lammps
  - legion
  - libnrm
  - libpressio +bitgrooming +bzip2 ~cuda ~cusz +fpzip +hdf5 +libdistributed +lua +openmp
    +python +sz +sz3 +unix +zfp
  - libquo
  - libunwind
  - loki
  - mercury
  - metall
  - mfem
  - mgard +serial +openmp +timing +unstructured ~cuda
  - mpark-variant
  - mpifileutils ~xattr
  - nccmp
  - nco
  - netlib-scalapack
  - nrm
  - omega-h
  - openfoam
  - openmpi
  - openpmd-api
  - papi
  - papyrus
  - parsec ~cuda
  - pdt
  - petsc
  - phist
  - plasma
  - plumed
  - precice
  - pruners-ninja
  - pumi
  - py-h5py
  - py-libensemble
  - py-petsc4py
  - py-warpx
  - qthreads scheduler=distrib
  - quantum-espresso
  - raja
  - rempi
  - slate ~cuda
  - slepc
  - stc
  - strumpack ~slate
  - sundials
  - superlu
  - superlu-dist
  - swig@4.0.2-fortran
  - sz3
  - tasmanian
  - trilinos +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
  - umap
  - umpire
  - upcxx
  - variorum
  - wannier90
  - xyce +mpi +shared +pymi +pymi_static_tpls ^trilinos~shylu
  # INCLUDED IN ECP DAV CPU
  # - ecp-data-vis-sdk ~cuda ~rocm +adios2 +ascent +cinema +darshan +faodel +hdf5 +paraview +pnetcdf +sz +unifyfs +veloc +visit +vtkm +zfp # adios2~cuda, ascent~cuda, darshan-runtime, darshan-util, faodel, hdf5, libcatalyst, parallel-netcdf, paraview~cuda, py-cinemasci, sz, unifyfs, veloc, visit, vtk-m, zfp
  # - adios2
  # - ascent
  # - darshan-runtime
  # - darshan-util
  # - faodel
  # - hdf5
  # - libcatalyst
  # - parallel-netcdf
  # - paraview
  # - py-cinemasci
  # - sz
  # - unifyfs
  # - veloc
  # - visit                           # failed silo: https://github.com/spack/spack/issues/39538
  # - vtk-m
  # - zfp
  # --
  # - archer                          # submerged into llvm +libomp_tsan
  # - bricks ~cuda                    # bricks: weak/args.h:14:8: error: 'size_t' does not name a type
  # - dealii ^trilinos~shylu          # mesa@23.0.3: FAILED: src/gallium/auxiliary/libgallium.a.p/gallivm_lp_bld_nir_soa.c.ogallium/auxiliary/gallivm/lp_bld_nir_soa.c:1035:15: error: 'LLVMAtomicRMWBinOpFMin' undeclared (first use in this function); did you mean 'LLVMAtomicRMWBinOpUMin'?
  # - geopm                           # geopm: https://github.com/spack/spack/issues/38795
  # - gptune ~mpispawn                # gptune: cmake error: Could NOT find Python3 (missing: Python3_INCLUDE_DIRS Python3_LIBRARIES
  # - lbann                           # dihydrogen: CMake Error at CMakeLists.txt:196 (find_package): Could not find a package configuration file provided by "Hydrogen"
  # - py-jupyterhub                   # rust: error: failed to acquire package cache lock
  # - scr                             # scr: CMake Error at cmake/SCR_DEPENDENCIES.cmake:10 (MESSAGE): Could not find MPI! Either add an MPI compiler to your path or force CMake
  # - tau +mpi +python                # tau: Error: No available OTF support. Library not found at $(spack location -i otf2)/craycnl/lib64; required compilers:environment:unset:LOADEDMODULES,__LMOD_REF_COUNT_LOADEDMODULES

  # ROCM NOARCH
  - cabana +rocm ^kokkos +rocm amdgpu_target=gfx908
  - cabana +rocm ^kokkos +rocm amdgpu_target=gfx90a
  - hpctoolkit +rocm
  # - tau +mpi +rocm                  # tau: Error: No available OTF support. Library not found at $(spack location -i otf2)/craycnl/lib64; required compilers:environment:unset:LOADEDMODULES,__LMOD_REF_COUNT_LOADEDMODULES

  # ROCM 90a
  - amrex +rocm amdgpu_target=gfx90a
  - arborx +rocm amdgpu_target=gfx90a
  - caliper +rocm amdgpu_target=gfx90a
  - chai ~benchmarks +rocm amdgpu_target=gfx90a
  - gasnet +rocm amdgpu_target=gfx90a
  - ginkgo +rocm amdgpu_target=gfx90a
  - heffte +rocm amdgpu_target=gfx90a
  - hypre +rocm amdgpu_target=gfx90a
  - kokkos +rocm amdgpu_target=gfx90a
  - legion +rocm amdgpu_target=gfx90a
  - magma ~cuda +rocm amdgpu_target=gfx90a
  - mfem +rocm amdgpu_target=gfx90a
  - petsc +rocm amdgpu_target=gfx90a
  - raja ~openmp +rocm amdgpu_target=gfx90a
  - slate +rocm amdgpu_target=gfx90a
  - slepc +rocm amdgpu_target=gfx90a ^petsc +rocm amdgpu_target=gfx90a
  - strumpack ~slate +rocm amdgpu_target=gfx90a
  - sundials +rocm amdgpu_target=gfx90a
  - superlu-dist +rocm amdgpu_target=gfx90a
  - tasmanian ~openmp +rocm amdgpu_target=gfx90a
  - trilinos +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
    +rocm amdgpu_target=gfx90a
  - umpire +rocm amdgpu_target=gfx90a
  - upcxx +rocm amdgpu_target=gfx90a
  # INCLUDED IN ECP DAV ROCM
  # - ecp-data-vis-sdk +paraview +vtkm +rocm amdgpu_target=gfx90a
  # - hdf5
  # - hdf5-vol-async
  # - hdf5-vol-cache
  # - hdf5-vol-log
  # - libcatalyst
  # - paraview +rocm amdgpu_target=gfx90a
  # - vtk-m ~openmp +rocm amdgpu_target=gfx90a  # failed vtk-m: vtkm/Atomic.h:334:46: error: no member named 'memory_order_relaxed' in namespace 'Kokkos::Impl'; did you mean '__memory_order_relaxed'?
  # --
  # - hpx +rocm amdgpu_target=gfx90a            # hpx: '%gcc@11.2' conflicts with '+rocm'
  # - lbann ~cuda +rocm amdgpu_target=gfx90a    # aluminum: https://github.com/spack/spack/issues/38807
  # - papi +rocm amdgpu_target=gfx90a           # papi: https://github.com/spack/spack/issues/27898

  # - nvhpc                                      not relevant on AMD GPU system
