spack:

  view: false

  concretizer:
    reuse: False
    unify: False

  modules:
    default:
      enable:: [lmod]
      lmod:
        defaults:
        - mvapich2@3.0a
        core_compilers: [gcc@11.2.0]
        blacklist_implicits: true
        verbose: true
        hash_length: 0
        whitelist: [mvapich2]
        hierarchy: [mpi]
        projections: {}
        core_specs: []
        all:
          autoload: direct
          environment:
            set:
              ${PACKAGE}_ROOT: ${PREFIX}
          suffixes:
            +rocm: rocm
        py-warpx:
          suffixes:
            ^warpx dims=2: dims2
            ^warpx dims=3: dims3
            ^warpx dims=rz: dimsRZ

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

  packages:
    all:
      compiler: [gcc@11.2.0]
      providers:
        blas: [openblas]
        lapack: [openblas]
        mpi: [mvapich2]
        scalapack: [netlib-scalapack]
      target: [zen3]
      variants: +mpi
    mpi:
      require: "mvapich2"
    binutils:
      variants: +ld +gold +headers +libiberty ~nls
    elfutils:
      variants: +bzip2 ~nls +xz
    hdf5:
      variants: +fortran +hl +shared
    libfabric:
      variants: fabrics=sockets,tcp,udp,rxm
    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
    mesa:
      version: [21.3.8]

    # FACILITY REQUESTED PREFERENCES
    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

    # EXTERNALS
    mvapich2:
      buildable: false
      externals:
      - spec: mvapich2@3.0a
        prefix: /gpfs/alpine/csc439/world-shared/mvapich2/mvapich2-3.0a/install
        modules:
        - mvapich2/3.0a
    libfabric:
      buildable: false
      externals:
      - spec: libfabric@1.15
        modules:
        - libfabric/1.15.0.0

    # ROCm
    comgr:
      buildable: false
      externals:
      - spec: comgr@5.4.0
        prefix: /opt/rocm-5.4.0/
        modules: [rocm/5.4.0]
    hip-rocclr:
      buildable: false
      externals:
      - spec: hip-rocclr@5.4.0
        prefix: /opt/rocm-5.4.0/hip
        modules: [rocm/5.4.0]
    hipblas:
      buildable: false
      externals:
      - spec: hipblas@5.4.0
        prefix: /opt/rocm-5.4.0/
        modules: [rocm/5.4.0]
    hipcub:
      buildable: false
      externals:
      - spec: hipcub@5.4.0
        prefix: /opt/rocm-5.4.0/
        modules: [rocm/5.4.0]
    hipfft:
      buildable: false
      externals:
      - spec: hipfft@5.4.0
        prefix: /opt/rocm-5.4.0/
        modules: [rocm/5.4.0]
    hipsparse:
      buildable: false
      externals:
      - spec: hipsparse@5.4.0
        prefix: /opt/rocm-5.4.0/
        modules: [rocm/5.4.0]
    miopen-hip:
      buildable: false
      externals:
      - spec: hip-rocclr@5.4.0
        prefix: /opt/rocm-5.4.0/
        modules: [rocm/5.4.0]
    miopengemm:
      buildable: false
      externals:
      - spec: miopengemm@5.4.0
        prefix: /opt/rocm-5.4.0/
        modules: [rocm/5.4.0]
    rccl:
      buildable: false
      externals:
      - spec: rccl@5.4.0
        prefix: /opt/rocm-5.4.0/
        modules: [rocm/5.4.0]
    rocblas:
      buildable: false
      externals:
      - spec: rocblas@5.4.0
        prefix: /opt/rocm-5.4.0/
        modules: [rocm/5.4.0]
    rocfft:
      buildable: false
      externals:
      - spec: rocfft@5.4.0
        prefix: /opt/rocm-5.4.0/
        modules: [rocm/5.4.0]
    rocm-clang-ocl:
      buildable: false
      externals:
      - spec: rocm-clang-ocl@5.4.0
        prefix: /opt/rocm-5.4.0/
        modules: [rocm/5.4.0]
    rocm-cmake:
      buildable: false
      externals:
      - spec: rocm-cmake@5.4.0
        prefix: /opt/rocm-5.4.0/
        modules: [rocm/5.4.0]
    rocm-dbgapi:
      buildable: false
      externals:
      - spec: rocm-dbgapi@5.4.0
        prefix: /opt/rocm-5.4.0/
        modules: [rocm/5.4.0]
    rocm-debug-agent:
      buildable: false
      externals:
      - spec: rocm-debug-agent@5.4.0
        prefix: /opt/rocm-5.4.0/
        modules: [rocm/5.4.0]
    rocm-device-libs:
      buildable: false
      externals:
      - spec: rocm-device-libs@5.4.0
        prefix: /opt/rocm-5.4.0/
        modules: [rocm/5.4.0]
    rocm-gdb:
      buildable: false
      externals:
      - spec: rocm-gdb@5.4.0
        prefix: /opt/rocm-5.4.0/
        modules: [rocm/5.4.0]
    rocm-opencl:
      buildable: false
      externals:
      - spec: rocm-opencl@5.4.0
        prefix: /opt/rocm-5.4.0/opencl
        modules: [rocm/5.4.0]
    rocm-smi-lib:
      buildable: false
      externals:
      - spec: rocm-smi-lib@5.4.0
        prefix: /opt/rocm-5.4.0/
        modules: [rocm/5.4.0]
    hip:
      buildable: false
      externals:
      - spec: hip@5.4.0
        prefix: /opt/rocm-5.4.0
        modules:
        - craype-accel-amd-gfx90a
        - rocm/5.4.0
        extra_attributes:
          compilers:
            c: /opt/rocm-5.4.0/llvm/bin/clang++
            c++: /opt/rocm-5.4.0/llvm/bin/clang++
            hip: /opt/rocm-5.4.0/hip/bin/hipcc
        environment:
          set:
            MPICH_GPU_SUPPORT_ENABLED: 1 
    hipsolver:
      buildable: false
      externals:
      - spec: hipsolver@5.4.0
        prefix: /opt/rocm-5.4.0
        modules:
        - rocm/5.4.0
    llvm-amdgpu:
      buildable: false
      externals:
      - spec: llvm-amdgpu@5.4.0
        prefix: /opt/rocm-5.4.0/llvm
        modules: [rocm/5.4.0]
        extra_attributes:
          compilers:
            c: /opt/rocm-5.4.0/llvm/bin/clang++
            cxx: /opt/rocm-5.4.0/llvm/bin/clang++
    hsakmt-roct:
      buildable: false
      externals:
      - spec: hsakmt-roct@5.4.0
        prefix: /opt/rocm-5.4.0/
        modules: [rocm/5.4.0]
    hsa-rocr-dev:
      buildable: false
      externals:
      - spec: hsa-rocr-dev@5.4.0
        prefix: /opt/rocm-5.4.0/
        modules: [rocm/5.4.0]
        extra_atributes:
          compilers:
            c: /opt/rocm-5.4.0/llvm/bin/clang++
            cxx: /opt/rocm-5.4.0/llvm/bin/clang++
    roctracer-dev-api:
      buildable: false
      externals:
      - spec: roctracer-dev-api@5.4.0
        prefix: /opt/rocm-5.4.0
        modules: [rocm/5.4.0]
    roctracer-dev:
      buildable: false
      externals:
      - spec: roctracer-dev@5.4.0
        prefix: /opt/rocm-5.4.0
        modules: [rocm/5.4.0]
    rocprim:
      buildable: false
      externals:
      - spec: rocprim@5.4.0
        prefix: /opt/rocm-5.4.0
        modules: [rocm/5.4.0]
    rocrand:
      buildable: false
      externals:
      - spec: rocrand@5.4.0
        prefix: /opt/rocm-5.4.0
        modules: [rocm/5.4.0]
    rocsolver:
      buildable: false
      externals:
      - spec: rocsolver@5.4.0
        prefix: /opt/rocm-5.4.0
        modules: [rocm/5.4.0]
    rocsparse:
      buildable: false
      externals:
      - spec: rocsparse@5.4.0
        prefix: /opt/rocm-5.4.0
        modules: [rocm/5.4.0]
    rocthrust:
      buildable: false
      externals:
      - spec: rocthrust@5.4.0
        prefix: /opt/rocm-5.4.0
        modules: [rocm/5.4.0]
    rocprofiler-dev:
      buildable: false
      externals:
      - spec: rocprofiler-dev@5.4.0
        prefix: /opt/rocm-5.4.0
        modules:
        - rocm/5.4.0

  specs:
  # CPU
  - adios
  - alquimia
  - aml
  - amrex
  - arborx
  - archer
  - argobots
  - axom
  - bolt
  - butterflypack
  - cabana
  - caliper
  - chai ~benchmarks ~tests
  - charliecloud
  - conduit
  - datatransferkit
  - dyninst
  - ecp-data-vis-sdk ~cuda ~rocm +adios2 +cinema +darshan +faodel +hdf5 +paraview +pnetcdf +sz +unifyfs +veloc +visit +vtkm +zfp
  - exaworks
  - flit
  - flux-core
  - fortrilinos
  - gasnet
  - ginkgo
  - globalarrays
  - gmp
  - gotcha
  - h5bench
  - hdf5-vol-async
  - heffte +fftw
  - hpctoolkit
  - hpx max_cpu_count=512 networking=mpi
  - hypre
  - kokkos +openmp
  - kokkos-kernels +openmp
  - lammps
  - legion
  - 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
  - omega-h
  - openmpi
  - openpmd-api
  - papi
  - papyrus
  - parsec ~cuda
  - pdt
  - petsc
  - plasma
  - 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
  - quantum-espresso
  - raja
  - scr
  - slate ~cuda
  - stc
  - strumpack ~slate
  - sundials
  - superlu
  - superlu-dist
  - swig
  - swig@4.0.2-fortran
  - tasmanian
  - tau +mpi +python
  - trilinos@13.0.1 +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
  - upcxx
  - variorum

  # no amdgpu_target
  - cabana +rocm ^kokkos +rocm amdgpu_target=gfx90a
  - hpctoolkit +rocm # hash needed updating
  - tau +mpi +rocm

  # amdgpu_target=gfx90a
  - amrex +rocm amdgpu_target=gfx90a
  - arborx +rocm amdgpu_target=gfx90a
  - chai ~benchmarks +rocm amdgpu_target=gfx90a
  - ecp-data-vis-sdk +paraview +vtkm +rocm amdgpu_target=gfx90a
  - gasnet +rocm amdgpu_target=gfx90a
  - ginkgo +rocm amdgpu_target=gfx90a
  - heffte +rocm amdgpu_target=gfx90a
  - hypre +rocm amdgpu_target=gfx90a
  - hpx max_cpu_count=512 +rocm amdgpu_target=gfx90a
  - kokkos +rocm amdgpu_target=gfx90a
  - magma ~cuda +rocm amdgpu_target=gfx90a
  - mfem +rocm amdgpu_target=gfx90a # required adding explicit depends_on for rocsparse
  - petsc +rocm amdgpu_target=gfx90a
  - raja ~openmp +rocm amdgpu_target=gfx90a
  - slate +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@13.4.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

  # Included in ecp-data-viz-sdk
  # - adios2
  # - ascent
  # - darshan-runtime
  # - darshan-util
  # - faodel
  # - hdf5 +fortran +hl +shared
  # - parallel-netcdf
  # - paraview +qt ^mesa@21.3.8
  # - sz
  # - veloc
  # - vtk-m
  # - vtk-m ~openmp ~rendering +rocm amdgpu_target=gfx90a
  # - zfp

  # CPU ERRORS
  # - bricks                            # bricks
  # - dealii                            # slepc
  # - flecsi                            # pfunit
  # - geopm                             # geopm
  # - loki                              # loki
  # - phist                             # phist
  # - pruners-ninja                     # pruners-ninja
  # - rempi                             # rempi
  # - slepc                             # slepc
  # - stat                              # launchmon
  # - visit                             # vtk@8.1.2
  # - wannier90                         # wannier90
  # --
  # bricks: weak/args.h:14:8: error: 'size_t' does not name a type; VSBrick-7pt.py-Scalar-8x8x8-1:30:3: error: 'vfloat512' was not declared in this scope
  # dealii: trilinos-13.0.1-gf2n2lavzxs77fcpqyw657s3ysgu2e5l/lib/cmake/ShyLU/ShyLUConfig.cmake:160 (INCLUDE): INCLUDE could not find requested file:
  # geopm: configure: error: Failed to determine MPI Fortran build flags use --with-mpi-bin or --with-mpicxx or --disable-mpi
  # glib: ERROR: Unhandled python exception Disk quota exceeded - (122, 'Disk quota exceeded') this is probably not a Meson bug. FAILED: meson-internal__install
  # gtkplus: modules/printbackends/cups/gtkprintbackendcups.c:34:10: fatal error: cups/cups.h: No such file or directory
  # launchmon: launchmon/src/sdbg_base_symtab.hxx:207:49: error: ISO C++17 does not allow dynamic exception specifications
  # launchmon: sdbg_base_symtab.hxx:197:34: error: ISO C++17 does not allow dynamic exception specifications
  # librsvg: error: could not compile `cssparser` due to: /usr/bin/ld: cannot find .../spack-stage-librsvg-2.51.0-i3kyrqfehr7ip7msht4uiboatpbxjfnt/spack-src/target/release/deps/libproc_macro2-b865193815fed41d.rlib: No such file or directory
  # loki: https://github.com/spack/spack/issues/32122
  # loki: loki/SmallObj.h:462:57: error: ISO C++17 does not allow dynamic exception specifications
  # pfunit: Fatal Error: Cannot read module file '/gpfs/alpine/csc439/world-shared/mvapich2/mvapich2-3.0a/install/include/mpi.mod' opened at (1), because it was created by a different version of GNU Fortran
  # phist: Fatal Error: Cannot read module file '/gpfs/alpine/csc439/world-shared/mvapich2/mvapich2-3.0a/install/include/mpi.mod' opened at (1), because it was created by a different version of GNU Fortran
  # pruners-ninja: https://github.com/spack/spack/issues/32112
  # pruners-ninja: test/ninja_test_util.c:34: multiple definition of `a'
  # 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'?
  # slepc: /usr/bin/sha1sum: a.out: No such file or directory
  # slurm: libtool:   error: 'openapi_ref.lo' is not a valid libtool object
  # vtk@8.1.2: Could NOT find HDF5 (missing: HDF5_HL_LIBRARIES) (found version "1.8.21")
  # wannier90: ../comms.F90:1214:22: Error: Type mismatch between actual argument at (1) and actual argument at (2) (COMPLEX(8)/INTEGER(4)).

  # GPU ERRORS
  # - caliper +rocm amdgpu_target=gfx90a                # caliper
  # - papi +rocm amdgpu_target=gfx90a                   # papi
  # - slepc +rocm amdgpu_target=gfx90a                  # slepc
  # --
  # caliper: /usr/bin/ld: ../../libcaliper-serial.so.2.8.0: undefined reference to `hipKernelNameRef'
  # caliper: https://github.com/spack/spack/issues/32827
  # papi: Fatal Error: File '/opt/rocm-5.4.0/llvm/include/omp_lib.mod' opened at (1) is not a GNU Fortran module file
  # slate: cmake-3.23/Modules/FindPackageHandleStandardArgs.cmake:230: Could NOT find Threads (missing: Threads_FOUND)
  # slepc: /usr/bin/sha1sum: a.out: No such file or directory
  # trilinos: belos/src/BelosBlockCGSolMgr.hpp:370:37: error: dynamic initialization is not supported for __device__, __constant__, __shared__, and __managed__ variables.

  # SKIPPED
  # - catalyst              # included in paraview since @5.7:
  # - gptune ~mpispawn      # hard openmpi dependency
  # - libnrm                # hard mpich dependency
  # - nvhpc                 # not relevant on AMD GPU system