spack:
  view: false

  concretizer:
    reuse: false
    unify: false

  modules:
    prefix_inspections:
      lib: [LD_LIBRARY_PATH]
      lib64: [LD_LIBRARY_PATH]
    default:
      'enable:': [lmod]
      lmod:
        defaults: [cray-mpich@8.1.23]
        core_compilers: [gcc@=11.2.0]
        verbose: true
        hash_length: 5
        hierarchy: [mpi]
        exclude_implicits: false
        all:
          autoload: direct
          environment:
            set:
              '{name}_ROOT': '{PREFIX}'
          suffixes:
            +rocm: rocm
        py-warpx:
          suffixes:
            ^warpx dims=2: dims2
            ^warpx dims=3: dims3
            ^warpx dims=rz: dimsRZ
        visit:
          suffixes:
            ^vtk-m +rocm: rocm

  include:
  - compilers.yaml
  - packages-rocm.yaml
  - packages-craype.yaml

  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
    python:
      version: [3.10.10]
    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

  specs:
  # CPU
  - adios
  - alquimia
  - aml
  - amrex
  - arborx
  - archer
  - argobots
  - axom
  - bolt
  - boost +python +filesystem +iostreams +system
  - butterflypack
  - cabana
  - caliper
  - chai ~benchmarks ~tests
  - charliecloud
  - conduit
  - datatransferkit
  - dyninst ^intel-tbb
  - ecp-data-vis-sdk ~cuda ~rocm +adios2 +ascent +cinema +darshan +faodel +hdf5 +paraview +pnetcdf +sz +unifyfs +veloc ~visit +vtkm +zfp ^ascent@0.9.0 ^paraview+examples+raytracing+visitbridge ^llvm ~cuda~flang~gold~internal_unwind~ipo~libcxx+link_llvm_dylib~libomptarget~lld~lldb+llvm_dylib~mlir+omp_as_runtime~omp_tsan~polly ^vtk-m@1.9.0 ^hdf5@1.14.0 +fortran +hl +shared ^unifyfs@1.0.1
  - exaworks # rust dependency cannot be build with read-only $HOME - build on login node or try setting CARGO_HOME
  - flecsi
  - flit
  - flux-core
  - fortrilinos
  - gasnet
  - ginkgo
  - globalarrays
  - gmp
  - gotcha
  - h5bench
  - heffte +fftw
  - hpctoolkit
  - hpx max_cpu_count=512 networking=mpi
  - hypre
  - kokkos +openmp
  - kokkos-kernels +openmp
  - lammps
  - lbann
  - legion
  - libnrm
  - libpressio +bitgrooming +bzip2 ~cuda ~cusz +fpzip +hdf5 +libdistributed +lua +openmp +python +sz +sz3 +unix +zfp +json +remote +netcdf
  - libquo
  - libunwind
  - loki
  - mercury
  - metall
  - mfem
  - mgard +serial +openmp +timing +unstructured ~cuda
  - mpark-variant
  - mpifileutils ~xattr
  - nccmp
  - nco
  - netlib-scalapack
  - nrm ^python@3.8.16
  - omega-h
  - openfoam
  - openmpi
  - openpmd-api
  - papi
  - papyrus
  - parsec ~cuda
  - pdt
  - petsc
  - phist +mpi
  - plasma
  - plumed
  - precice
  - pumi
  - py-h5py +mpi
  - py-h5py ~mpi
  - py-jupyterhub # rust dependency cannot be build with read-only $HOME - build on login node or try setting CARGO_HOME
  - py-libensemble +mpi +nlopt
  - py-petsc4py
  - py-warpx ^warpx dims=2
  - py-warpx ^warpx dims=3
  - py-warpx ^warpx dims=rz
  - qthreads scheduler=distrib
  - quantum-espresso
  - raja
  - rempi
  - slate ~cuda
  - slepc
  - stc
  - strumpack ~slate
  - sundials
  - superlu
  - superlu-dist
  - swig@4.0.2-fortran
  - sz3
  - tasmanian
  - tau +mpi +python # required compilers:environment:unset:LOADEDMODULES,__LMOD_REF_COUNT_LOADEDMODULES
  - 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
  # ECP DAV CPU
  # - adios2
  # - ascent
  # - darshan-runtime
  # - darshan-util
  # - faodel
  # - hdf5 +fortran +hl +shared
  # - libcatalyst
  # - parallel-netcdf
  # - paraview ~cuda ~qt
  # - py-cinemasci
  # - sz
  # - unifyfs
  # - veloc
  # - visit
  # - vtk-m
  # - zfp
  # --
  # --
  # - bricks                          # bricks: weak/args.h:14:8: error: 'size_t' does not name a type
  # - dealii                          # dealii: CMake Error at .../trilinos-13.4.1-wo7mcuaodgiiiwu7hv2ilftchebmnvvk/lib/cmake/ShyLU/ShyLUConfig.cmake:164 (include): include could not find requested file: trilinos-13.4.1-wo7mcuaodgiiiwu7hv2ilftchebmnvvk/lib/cmake/ShyLU/../ShyLU_Node/ShyLU_NodeConfig.cmake
  # - geopm                           # geopm: configure: error: Failed to determine MPI Fortran build flags use --with-mpi-bin or --with-mpicxx or --disable-mpi
  # - gptune ~mpispawn ^python@3.8.16 # gptune: cmake-3.26/Modules/FindPackageHandleStandardArgs.cmake:230 (message): Could NOT find Python3 (missing: Python3_INCLUDE_DIRS Python3_LIBRARIES
  # - pruners-ninja                   # pruners-ninja: test/ninja_test_util.c:34: multiple definition of `a'; 
  # - 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 to build using the correct compiler (`export CC=mpicc`).
  # - stat                            # launchmon: sdbg_base_symtab.hxx:197:34: error: ISO C++17 does not allow dynamic exception specifications
  # - xyce +mpi +shared +pymi +pymi_static_tpls ^trilinos~shylu # CMake Error at cmake/tps.cmake:220 (message): Unable to compile against Trilinos.  It is possible Trilinos was not properly configured, or the environment has changed since Trilinos was installed.  See the CMake log files for more information.

  # ROCM
  - amrex +rocm amdgpu_target=gfx90a
  - arborx +rocm amdgpu_target=gfx90a
  - cabana +rocm ^kokkos +rocm amdgpu_target=gfx90a
  - caliper +rocm amdgpu_target=gfx90a
  - chai ~benchmarks +rocm amdgpu_target=gfx90a
  - ecp-data-vis-sdk +adios2 ~ascent +hdf5 +paraview +pnetcdf +sz +vtkm +zfp +rocm amdgpu_target=gfx90a ^paraview+examples+raytracing+visitbridge ^llvm ~cuda~flang~gold~internal_unwind~ipo~libcxx+link_llvm_dylib~libomptarget~lld~lldb+llvm_dylib~mlir+omp_as_runtime~omp_tsan~polly ^vtk-m@1.9.0 ^hdf5@1.14.0 +fortran +hl +shared ^unifyfs@1.0.1
  - gasnet +rocm amdgpu_target=gfx90a
  - ginkgo +rocm amdgpu_target=gfx90a
  - heffte +rocm amdgpu_target=gfx90a
  - hpctoolkit +rocm
  - hypre +rocm amdgpu_target=gfx90a
  - kokkos +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
  - tau +mpi +rocm # required compilers:environment:unset:LOADEDMODULES,__LMOD_REF_COUNT_LOADEDMODULES
  - trilinos@14.0.0 +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
  # ECP DAV ROCM
  # - hdf5 +fortran +hl +shared
  # - hdf5-vol-async
  # - hdf5-vol-cache
  # - hdf5-vol-log
  # - libcatalyst
  # - paraview +rocm amdgpu_target=gfx90a
  # - vtk-m ~openmp +rocm amdgpu_target=gfx90a
  # --
  # --
  # - hpx max_cpu_count=512 +rocm amdgpu_target=gfx90a  # hpx: FAILED: libs/core/program_options/CMakeFiles/hpx_program_options.dir/Unity/unity_1_cxx.cxx.o: core/program_options/src/value_semantic.cpp:382:18: error: no viable constructor or deduction guide for deduction of template arguments of 'set'
  # - lbann +rocm amdgpu_target=gfx90a                  # aluminum: FAILED: src/CMakeFiles/Al.dir/Al.cpp.o: g++: error: unrecognized command-line option '--offload-arch=gfx90a'
  # - papi +rocm amdgpu_target=gfx90a                   # papi:Fatal Error: File '/opt/rocm-5.3.0/llvm/include/omp_lib.mod' opened at (1) is not a GNU Fortran module file compilation terminated.

  # SKIPPED
  # - nvhpc                      # not relevant on AMD GPU system
