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
    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:
      require: "@3.7.15"
    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@21.08.1.2
        modules:
        - cray-libsci/21.08.1.2
    cray-mpich:
      buildable: false
      externals:
      - spec: cray-mpich@8.1.17 %gcc
        prefix: /opt/cray/pe/mpich/8.1.17/ofi/gnu/9.1
        modules:
        - cray-mpich/8.1.17
    libfabric:
      buildable: false
      variants: fabrics=sockets,tcp,udp,rxm
      externals:
      - spec: libfabric@1.15.0.0
        prefix: /opt/cray/libfabric/1.15.0.0
        modules:
        - libfabric
    openssl:
      buildable: false
      externals:
      - spec: openssl@1.1.1d
        prefix: /usr
    openssh:
      buildable: false
      externals:
      - spec: openssh@8.4p1
        prefix: /usr
    slurm:
      buildable: false
      externals:
      - spec: slurm@22.05.5
        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.17
        core_compilers: [gcc@11.2.0]
        verbose: true
        hash_length: 0
        hierarchy: [mpi]
        projections: {}
        core_specs: []
        exclude_implicits: true
        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
  - adios2
  - alquimia
  - aml
  - amrex
  - arborx
  - archer
  - argobots
  - ascent
  - axom
  - bolt
  - butterflypack
  - cabana
  - caliper
  - chai ~benchmarks ~tests
  - charliecloud
  - conduit
  - darshan-runtime
  - darshan-util
  - datatransferkit
  - dyninst ^intel-tbb
  - faodel
  - flecsi
  - flit
  - flux-core
  - fortrilinos
  - ginkgo
  - globalarrays
  - gmp
  - gotcha
  - gptune
  - h5bench
  - hdf5 +fortran +hl +shared
  - hdf5-vol-async
  - heffte +fftw
  - hpctoolkit
  - hpx max_cpu_count=512 networking=mpi
  - hypre
  - kokkos-kernels +openmp
  - kokkos +openmp
  - lammps
  - legion
  - libnrm
  - libpressio +bitgrooming +bzip2 ~cuda ~cusz +fpzip +hdf5 +libdistributed +lua +openmp +python +sz +sz3 +unix +zfp +json +remote +netcdf
  - libquo
  - libunwind
  - mercury
  - metall
  - mfem
  - mpark-variant
  - mpifileutils ~xattr
  - nccmp
  - nco
  - netlib-scalapack
  - nrm
  - nvhpc
  - omega-h
  - openmpi
  - openpmd-api
  - papi
  - papyrus
  - parallel-netcdf
  - parsec ~cuda
  - pdt
  - petsc
  - plumed
  - precice
  - pumi
  - py-cinemasci
  - py-jupyterhub
  - py-libensemble
  - py-petsc4py
  - py-warpx ^warpx dims=2
  - py-warpx ^warpx dims=3
  - py-warpx ^warpx dims=rz
  - qthreads scheduler=distrib
  - raja
  - scr
  - slate ~cuda
  - slepc
  - stc
  - strumpack ~slate
  - sundials
  - superlu-dist
  - superlu
  - swig
  - swig@4.0.2-fortran
  - sz
  - tasmanian
  - tau +mpi +python
  - turbine
  - 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
  - umap
  - umpire
  - variorum
  - veloc
  - vtk-m
  - zfp

  # no cuda_arch
  - flux-core +cuda
  - hpctoolkit +cuda
  - papi +cuda
  - tau +mpi +cuda

  # cuda_arch=80
  - adios2 +cuda cuda_arch=80
  - amrex +cuda cuda_arch=80
  - arborx +cuda cuda_arch=80 ^kokkos +wrapper
  - ascent +cuda cuda_arch=80
  - cabana +cuda ^kokkos +wrapper +cuda_lambda +cuda cuda_arch=80
  - caliper +cuda cuda_arch=80
  - chai ~benchmarks ~tests +cuda cuda_arch=80 ^umpire ~shared
  - ecp-data-vis-sdk +adios2 +hdf5 +vtkm +zfp +cuda cuda_arch=80 
  - flecsi +cuda cuda_arch=80
  - ginkgo +cuda cuda_arch=80
  - heffte +cuda cuda_arch=80
  - 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 +cuda cuda_arch=80 ^cusz +cuda cuda_arch=80
  - magma +cuda cuda_arch=80
  - mfem +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
  - umpire ~shared +cuda cuda_arch=80
  - vtk-m +cuda cuda_arch=80
  - zfp +cuda cuda_arch=80

  # CPU ERRORS
  # - bricks                      # bricks
  # - dealii                      # mesa18
  # - ecp-data-vis-sdk ~cuda ~rocm +adios2 +ascent +cinema +darshan +faodel +hdf5 +paraview +pnetcdf +sz +unifyfs +veloc +visit +vtkm +zfp # font-util
  # - exaworks                    # rust
  # - gasnet                      # gasnet
  # - geopm                       # geopm
  # - loki                        # loki
  # - paraview +qt ^mesa          # llvm
  # - phist                       # phist
  # - plasma                      # plasma
  # - pruners-ninja               # pruners-ninja
  # - quantum-espresso            # quantum-espresso
  # - rempi                       # rempi
  # - stat                        # launchmon
  # - unifyfs                     # unifyfs
  # - upcxx                       # upcxx
  # - visit                       # font-util
  # - wannier90                   # wannier90
  # --
  # bricks: weak/args.h:14:8: error: 'size_t' does not name a type
  # catalyst: Catalyst-v5.6.0/VTK/Common/Core/vtkMath.h:1514:15: error: 'clamp' is not a member of 'std'
  # font-util: configure.ac:11: installing './compile'
  # 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: configure: error: Failed to determine MPI Fortran build flags use --with-mpi-bin or --with-mpicxx or --disable-mpi
  # launchmon: sdbg_base_symtab.hxx:197:34: error: ISO C++17 does not allow dynamic exception specifications
  # llvm@12.0.1: FAILED: openmp/libomptarget/libomptarget.so.12
  # loki: https://github.com/spack/spack/issues/32122
  # loki: loki/SmallObj.h:462:57: error: ISO C++17 does not allow dynamic exception specifications
  # mesa18: llvm-config: error: missing: /global/cfs/cdirs/m3896/shared/ParaTools/E4S/22.11/PrgEnv-gnu/spack/opt/spack/linux-sles15-zen3/gcc-11.2.0/llvm-10.0.1-5x7ckqxk2ekykp27p4warz4yu6qxx3hj/lib/libLLVMCore.so
  # phist: ./cfwrapper.py:343: DeprecationWarning: 'U' mode is deprecated
  # plasma: Could NOT find CBLAS (missing: CBLAS_INCLUDE_DIRS CBLAS_LIBRARIES), Could NOT find Accelerate (missing: Accelerate_INCLUDE_DIRS Accelerate_LIBRARIES)
  # pruners-ninja: https://github.com/spack/spack/issues/32112
  # pruners-ninja: test/ninja_test_util.c:34: multiple definition of `a';
  # 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
  # rempi: https://github.com/spack/spack/issues/32123
  # rempi: rempi_message_manager.h:53:3: error: 'string' does not name a type; did you mean 'stdin'?
  # rust: error: failed to run custom build command for `openssl-sys v0.9.65`
  # unifyfs: configure: error: couldn't find a suitable openssl-devel
  # upcxx: 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=?.
  # wannier90: Error: Type mismatch between actual argument at (1) and actual argument at (2) (COMPLEX(8)/INTEGER(4)).

  # GPU ERRORS
  # - axom +cuda cuda_arch=80             # axom
  # - bricks +cuda                        # bricks
  # - dealii +cuda                        # dealii
  # - trilinos@13.4.0 +cuda cuda_arch=80  # trilinos
  # - upcxx +cuda cuda_arch=80            # upcxx
  # --
  # axom: include/RAJA/policy/cuda/MemUtils_CUDA.hpp:120:3: error: 'cuda_dim_t' does not name a type; did you mean 'cudaLimit'?
  # bricks: weak/args.h:14:8: error: 'size_t' does not name a type
  # mesa18: llvm-config: error: missing: llvm-10.0.1-5x7ckqxk2ekykp27p4warz4yu6qxx3hj/lib/libLLVMDemangle.so
  # trilinos: The C++ compiler "/opt/cray/pe/mpich/8.1.17/ofi/gnu/9.1/bin/mpicxx" is not able to compile a simple test program.
  # upcxx: 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=?.

  # SKIPPED
  # - catalyst                            # catalyst is in paraview since @5.7