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"
      compiler: [gcc@11.2.0]
      providers:
        blas: [cray-libsci]
        mpi: [cray-mpich]
        tbb: [intel-tbb]
      target: [zen3]
      variants: +mpi
    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
    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

    # EXTERNALS
    cray-libsci:
      buildable: false
      externals:
      - spec: cray-libsci@23.02.1.1
        modules:
        - cray-libsci/23.02.1.1
    cray-mpich:
      buildable: false
      externals:
      - spec: cray-mpich@8.1.25 %gcc
        prefix: /opt/cray/pe/mpich/8.1.25/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
    openssl:
      buildable: false
      externals:
      - spec: openssl@1.1.1s
        prefix: /global/common/software/nersc/pm-2022q4/sw/evp-patch
    openssh:
      buildable: false
      externals:
      - spec: openssh@8.4p1
        prefix: /global/common/software/nersc/pm-2022q4/sw/evp-patch
    slurm:
      buildable: false
      externals:
      - spec: slurm@23.02.1
        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
        mpich:
          suffixes:
            ^hwloc+cuda: hwloc-cuda
        py-warpx:
          suffixes:
            ^warpx dims=2: dims2
            ^warpx dims=3: dims3
            ^warpx dims=rz: dimsRZ

  specs:
  # CPU
  - adios
  - alquimia
  - aml
  - amrex
  - arborx
  - argobots
  - axom
  - bolt
  - boost
  - 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 # visit: font-util: [Makefile:756: install-data-hook] Error 1 share/fonts/X11/cyrillic: failed to write cache paraview: ispc: lex.cpp:398:9: error: 'yywrap' macro redefined [-Werror,-Wmacro-redefined]
  - exaworks
  - flecsi
  - flit
  - flux-core
  - fortrilinos
  - 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
  - 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
  - nvhpc
  - omega-h
  - openfoam
  - openmpi
  - openpmd-api
  - papi
  - papyrus
  - parsec ~cuda
  - pdt
  - petsc
  - phist
  - plasma
  - plumed
  - precice
  - 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
  - unifyfs
  - variorum
  - wannier90
  # INCLUDED IN ECP DAV CPU
  # - adios2
  # - ascent
  # - darshan-runtime
  # - darshan-util
  # - faodel
  # - hdf5
  # - libcatalyst
  # - parallel-netcdf
  # - paraview
  # - py-cinemasci
  # - sz
  # - unifyfs
  # - veloc
  # - visit
  # - vtk-m
  # - zfp
  # --
  # - bricks ~cuda            # bricks: weak/args.h:14:8: error: 'size_t' does not name a type
  # - dealii                  # mesa18: llvm-config: error: missing: llvm-10.0.1-ed5r7m6su2uwi6dbiyy4zhslbl77zto3/lib/libLLVMDemangle.so
  # - ecp-data-vis-sdk ~cuda ~rocm +adios2 +ascent +cinema +darshan +faodel +hdf5 +paraview +pnetcdf +sz +unifyfs +veloc +visit +vtkm +zfp
  # - gasnet                  # gasnet: configure error: Default PMI version "cray" could not be found.  Try loading the "cray-pmi" or "pmi" environment module, or specifying a different --with-pmi-version=?.
  # - geopm                   # geopm: configure: error: Failed to determine MPI Fortran build flags use --with-mpi-bin or --with-mpicxx or --disable-mpi
  # - gptune ~mpispawn        # py-scipy: scipy/meson.build:134:7: ERROR: Dependency "sci_gnu_mpi" not found, tried pkgconfig and cmake
  # - pruners-ninja           # pruners-ninja: test/ninja_test_util.c:34: multiple definition of `a'
  # - py-warpx ^warpx dims=2  # py-scipy: scipy/meson.build:134:7: ERROR: Dependency "sci_gnu_mpi" not found, tried pkgconfig and cmake
  # - py-warpx ^warpx dims=3  # py-scipy: scipy/meson.build:134:7: ERROR: Dependency "sci_gnu_mpi" not found, tried pkgconfig and cmake
  # - py-warpx ^warpx dims=rz # py-scipy: scipy/meson.build:134:7: ERROR: Dependency "sci_gnu_mpi" not found, tried pkgconfig and cmake
  # - quantum-espresso        # quantum-espresso: CMake Error at cmake/FindSCALAPACK.cmake:505 (message): A required library with SCALAPACK API not found.  Please specify library location: -DSCALAPACK_DIR=/your/path/to/scalapack
  # - stat ^intel-tbb         # launchmon: launchmon/src/sdbg_base_symtab.hxx:207:49: error: ISO C++17 does not allow dynamic exception specifications
  # - upcxx                   # upcxx: ./conftest.o: error while loading shared libraries: libcudart.so.11.0: cannot open shared object file: No such file or directory
  # - xyce +mpi +shared +pymi +pymi_static_tpls ^trilinos~shylu # xyce: 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 Trilin

  # +CUDA
  - amrex +cuda cuda_arch=80
  - arborx +cuda cuda_arch=80 ^kokkos +wrapper
  - cabana +cuda ^kokkos +wrapper +cuda_lambda +cuda cuda_arch=80
  - caliper +cuda cuda_arch=80
  - chai ~benchmarks ~tests +cuda cuda_arch=80 ^umpire ~shared
  - cusz +cuda cuda_arch=80
  - ecp-data-vis-sdk ~rocm +adios2 ~ascent +hdf5 ~paraview ~pnetcdf ~sz +vtkm +zfp +cuda cuda_arch=80
  - flecsi +cuda cuda_arch=80
  - flux-core +cuda
  - ginkgo +cuda cuda_arch=80
  - heffte +cuda cuda_arch=80
  - hpctoolkit +cuda
  - hpctoolkit +cuda
  - hpx max_cpu_count=512 +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
  - lammps +cuda cuda_arch=80
  - legion +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
  - papi +cuda
  - 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
  - tau +mpi +cuda
  - umpire ~shared +cuda cuda_arch=80
  - zfp +cuda cuda_arch=80
  # INCLUDED IN ECP DAV CUDA
  # - adios2 +cuda cuda_arch=80
  # - ascent +cuda cuda_arch=80
  # - paraview +cuda cuda_arch=80
  # - vtk-m +cuda cuda_arch=80
  # - zfp +cuda cuda_arch=80
  # --
  # - ascent +cuda cuda_arch=80           # ascent: ascent/runtimes/expressions/ascent_execution_policies.hpp(135): error: namespace "RAJA" has no member "cuda_exec"
  # - axom +cuda cuda_arch=80             # axom: /usr/bin/ld: ../../core/CMakeFiles/core.dir/utilities/FileUtilities.cpp.o: in function `__sti____cudaRegisterAll()': undefined reference to `__cudaRegisterLinkedBinary...
  # - bricks +cuda                        # bricks: weak/args.h:14:8: error: 'size_t' does not name a type
  # - dealii +cuda cuda_arch=80           # mesa18: llvm-config: error: missing: llvm-10.0.1-ed5r7m6su2uwi6dbiyy4zhslbl77zto3/lib/libLLVMDemangle.so
  # - lbann +cuda cuda_arch=80            # lbann: FAILED: CMakeFiles/lbann.dir/src/layers/activations/activations.cu.o: include/lbann/utils/impl/cuda.hpp(145): error: specializing function "lbann::gpu_lib::isfinite(const T &) [with T=__half]" requires "template<>" syntax
  # - trilinos@13.4.0: +cuda cuda_arch=80 # trilinos: The C++ compiler "/opt/cray/pe/mpich/8.1.25/ofi/gnu/9.1/bin/mpicxx" is not able to compile a simple test program.
  # - upcxx +cuda cuda_arch=80            # upcxx: configure error: Requested PMI version "cray" could not be found.  Try loading the "cray-pmi" or "pmi" environment module, or specifying a different --with-pmi-version=?.