spack:
  view: false

  concretizer:
    reuse: false
    unify: false

  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
      - craype-x86-milan
      - libfabric

  packages:
    all:
      require: "%gcc@11.2.0"
      providers:
        blas: [cray-libsci]
        mpi: [cray-mpich]
        tbb: [intel-tbb]
      target: [zen3]
      variants: +mpi
    tbb:
      require: intel-tbb
    cuda:
      require: "@:11.7.1"
    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
    # EXTERNALS
    cray-libsci:
      buildable: false
      externals:
      - spec: cray-libsci@23.02.1.1
        modules:
        - cray-libsci/23.02.1.1
    mpi:
      require: cray-mpich
    cray-mpich:
      buildable: false
      externals:
      - spec: cray-mpich@8.1.25 %gcc
        prefix: /opt/cray/pe/mpich/default/ofi/gnu/9.1
        modules:
        - cray-mpich/8.1.25
    libfabric:
      buildable: false
      variants: fabrics=sockets,tcp,udp,rxm
      externals:
      - spec: libfabric@1.15.2.0
        prefix: /opt/cray/libfabric/1.15.2.0
        modules:
        - libfabric/1.15.2.0
    slurm:
      buildable: false
      externals:
      - spec: slurm@23.02.4
        prefix: /usr
    openssl:
      version: [1.1.1d]
      buildable: false
      externals:
      - spec: openssl@1.1.1d
        prefix: /usr

    # SITE VARIANT/VERSION PREFERENCES
    mesa:
      variants: +osmesa~glx

  # modules:
  #   prefix_inspections:
  #     lib: [LD_LIBRARY_PATH]
  #     lib64: [LD_LIBRARY_PATH]
  #   default:
  #     'enable:': [lmod]
  #     lmod:
  #       defaults: [cray-mpich@8.1.25]
  #       core_compilers: [gcc@=11.2.0]
  #       verbose: true
  #       hash_length: 4
  #       hierarchy: [mpi]
  #       projections: {}
  #       core_specs: []
  #       exclude_implicits: false
  #       include: [cray-mpich]
  #       all:
  #         autoload: direct
  #         environment:
  #           set:
  #             ${PACKAGE}_ROOT: ${PREFIX}
  #         suffixes:
  #           +cuda cuda_arch=80: cuda80
  #           +openmp: openmp
  #       cabana:
  #         suffixes:
  #           ^kokkos +cuda cuda_arch=80: cuda80
  #       tau:
  #         suffixes:
  #           +cuda: cuda
  #       hpctoolkit:
  #         suffixes:
  #           +cuda: cuda
  #       bricks:
  #         suffixes:
  #           +cuda: cuda
  #       flux-core:
  #         suffixes:
  #           +cuda: cuda
  #       papi:
  #         suffixes:
  #           +cuda: cuda

  specs:
  # CPU
  - adios
  - alquimia
  - aml
  - amrex
  - arborx
  - argobots
  - axom
  - bolt
  - boost
  - butterflypack
  - cabana
  - caliper
  - chai ~benchmarks ~tests
  - charliecloud
  - conduit
  - datatransferkit
  - dyninst
    # - exaworks ^openssl certs=system
  - flecsi
  - flit
  - flux-core
  - fortrilinos
  - ginkgo
  - globalarrays
  - gmp
  - gotcha
  - h5bench
  - hdf5-vol-async
  - hdf5-vol-cache
  - hdf5-vol-log
  - heffte +fftw
  - hpctoolkit
  - hpx 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
  - nvhpc
    # - omega-h
  - openfoam
  - openmpi
  - openpmd-api
  - papi
  - papyrus
  - parsec ~cuda
  - pdt
  - petsc
  - phist
  - plasma
  - plumed
  - precice
  - pruners-ninja
  - pumi
  - py-h5py
  - py-jupyterhub
  - py-libensemble
  - py-petsc4py
  - qthreads scheduler=distrib
  - raja
  - rempi
  - scr
  - slate ~cuda
  - slepc
  - stc
  - strumpack ~slate
  - sundials
  - superlu
  - superlu-dist
  - swig@4.0.2-fortran
  - sz3
  - tasmanian
  - tau +mpi +python
  - 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
  - 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          # opengl: This package is intended to be a placeholder for system-provided OpenGL libraries from hardware vendors.
  # - gasnet                          # gasnet: configure fails: checking for C compiler flag --param max-inline-insns=100000... no/error: gcc: error: unrecognized command-line option '--param=max-inline-insns=100000'; did you mean '--param=max-inline-insns-auto='?
  # - geopm                           # geopm: https://github.com/spack/spack/issues/38795
  # - gptune ~mpispawn                # py-scipy@1.9.3: scipy/meson.build:131:7: ERROR: Dependency "sci_gnu_mpi" not found, tried pkgconfig and cmake
  # - lbann                           # dihydrogen: CMake Error at CMakeLists.txt:196 (find_package): Could not find a package configuration file provided by "Hydrogen"
  # - nrm                             # py-scipy@1.10.1: scipy/meson.build:134:7: ERROR: Dependency "sci_gnu_mpi" not found, tried pkgconfig and cmake
  # - py-warpx                        # hangs indefinitely?
  # - quantum-espresso                # quantum-espresso: CMake Error at cmake/FindSCALAPACK.cmake:503 (message): A required library with SCALAPACK API not found.  Please specify library location: -DSCALAPACK_DIR=/your/path/to/scalapack
  # - upcxx                           # upcxx: configure: ./conftest.o: error while loading shared libraries: libcudart.so.11.0: cannot open shared object file: No such file or directory; ERROR: Your C and C++ compilers failed to compile and link C/C++ code.

  # CUDA NOARCH
  - cabana +cuda ^kokkos +wrapper +cuda_lambda +cuda cuda_arch=80
  - flux-core +cuda
  - hpctoolkit +cuda
  - legion +cuda                    # legion: needs NVIDIA driver
  - papi +cuda
  - tau +mpi +cuda
  # --
  # - bricks +cuda                  # bricks: weak/args.h:14:8: error: 'size_t' does not name a type

  # CUDA 80
  - amrex +cuda cuda_arch=80
  - arborx +cuda cuda_arch=80 ^kokkos +wrapper
  - caliper +cuda cuda_arch=80
  - chai ~benchmarks ~tests +cuda cuda_arch=80 ^umpire ~shared
  - cusz +cuda cuda_arch=80
  - flecsi +cuda cuda_arch=80
  - ginkgo +cuda cuda_arch=80
  - heffte +cuda cuda_arch=80
  - hpx +cuda cuda_arch=80
  - hypre +cuda cuda_arch=80
  - kokkos +wrapper +cuda cuda_arch=80
  - kokkos-kernels +cuda cuda_arch=80 ^kokkos +wrapper +cuda cuda_arch=80
  - libpressio +bitgrooming +bzip2 +fpzip +hdf5 +libdistributed +lua +openmp +python +sz +sz3 +unix +zfp +json +remote +netcdf +cusz +mgard +cuda cuda_arch=80 ^cusz +cuda cuda_arch=80
  - magma +cuda cuda_arch=80
  - mfem +cuda cuda_arch=80
  - mgard +serial +openmp +timing +unstructured +cuda cuda_arch=80
    # - omega-h +cuda cuda_arch=80
  - parsec +cuda cuda_arch=80
  - petsc +cuda cuda_arch=80
  - raja +cuda cuda_arch=80
  - slate +cuda cuda_arch=80
  - slepc +cuda cuda_arch=80
  - strumpack ~slate +cuda cuda_arch=80
  - sundials +cuda cuda_arch=80
  - superlu-dist +cuda cuda_arch=80
  - tasmanian +cuda cuda_arch=80
  - lammps +cuda cuda_arch=80         # lammps: needs NVIDIA driver
  - umpire ~shared +cuda cuda_arch=80
  # INCLUDED IN ECP DAV CUDA
  # - ecp-data-vis-sdk ~rocm +adios2 ~ascent +hdf5 +vtkm +zfp +paraview +cuda cuda_arch=80 # +ascent fails because fides fetch error
  # - adios2 +cuda cuda_arch=80
  # - ascent +cuda cuda_arch=80       # failed ascent: https://github.com/spack/spack/issues/38045
  # - paraview +cuda cuda_arch=80
  # - vtk-m +cuda cuda_arch=80
  # - zfp +cuda cuda_arch=80
  # --
  # - axom +cuda cuda_arch=80         # axom: https://github.com/spack/spack/issues/29520
  # - dealii +cuda cuda_arch=80       # opengl: This package is intended to be a placeholder for system-provided OpenGL libraries from hardware vendors.
  # - lbann +cuda cuda_arch=80        # lbann: https://github.com/spack/spack/issues/38788
  # - py-torch +cuda cuda_arch=80     # skipped
  # - trilinos +cuda cuda_arch=80     # trilinos: The C++ compiler "/opt/cray/pe/mpich/default/ofi/gnu/9.1/bin/mpicxx" is not able to compile a simple test program. ; g++: error: unrecognized command-line option '--expt-extended-lambda'
  # - upcxx +cuda cuda_arch=80        # upcxx: needs NVIDIA driver; upcxx: configure: checking for C compiler flag --param max-inline-insns=100000... checking for C compiler flag --param max-inline-insns=100000... no/error: gcc: error: unrecognized command-line option '--param=max-inline-insns=100000'; did you mean '--param=max-inline-insns-auto='?
