spack:
  include:
      - compiler_definitions.yaml

      - packages_stack.yaml
      - packages_env.yaml

      - modules_stack.yaml

      - definitions_env.yaml

      - config_stack.yaml

  definitions:
    # -------------------------------------------------------------------------
    # PE definition
    # -------------------------------------------------------------------------
    - mpi_gcc:
        - openmpi@5.0.3

    - mpi_oneapi:
        - intel-oneapi-mpi@2021.12.1

    - blas_gcc:
        - openblas@0.3.26

    - blas_oneapi:
        - intel-oneapi-mkl@2024.1.0

    - python_gcc:
        - python@3.11.7

    - python_oneapi:
        - python@3.11.7

    # -------------------------------------------------------------------------
    # Core packages
    # -------------------------------------------------------------------------
    - core_codes:
        - bzip2
        - cmake
        - emacs +tls
        - fastqc
        - fio
        - git
        - git-lfs
        - gmp
        - gnuplot
        - gzip
        - imagemagick +ghostscript
        - intel-oneapi-advisor
        - intel-oneapi-inspector
        - intel-oneapi-vtune
        - libarchive
        - libjpeg-turbo
        - libpng
        - libtiff
        - libxml2
        - lmod
        - mpfr
        - neovim
        - parallel
        - picard
        - rclone
        - sbt
        - sratoolkit
        - subversion
        - tar
        - tcl
        - tk
        - tmux
        - trimmomatic
        - valgrind
        - xclip
        - zlib-ng

    # -------------------------------------------------------------------------
    # Serial codes
    # -------------------------------------------------------------------------
    - serial_codes:
        - bwa
        - boost ~mpi
        - fftw +openmp ~mpi
        - fftw ~openmp ~mpi
        - eigen
        - gsl
        - hdf5@1.14.1 ~mpi
        - hisat2
        - htslib
        - intel-oneapi-tbb
        - jasper
        - kallisto ^hdf5 ~mpi
        - mafft
        - metis
        - muscle
        - netcdf-c~mpi ^hdf5~mpi
        - netcdf-fortran ^netcdf-c ~mpi ^hdf5 ~mpi
        - nfft
        - python
        - scotch
        - star
        - subread
        - superlu
        - voropp

    - gcc_serial_codes:
        - cistem  ^fftw~mpi
        - ctffind ^fftw ~mpi
        - ffmpeg +libx264
        - glpk+gmp
        - hwloc
        - intel-oneapi-mkl
        - libxc
        - ncview ^hdf5 ~mpi ^netcdf-c ~mpi ~parallel-netcdf
        - rust
        - sox
        - stacks
        - unblur ^fftw~mpi

    - oneapi_serial_codes:
        - abaqus@2023
        - intel-oneapi-ipp

    # -------------------------------------------------------------------------
    # Empty to specialize in environments
    # -------------------------------------------------------------------------
    - cuda_system_codes: []

    - cuda_serial_codes: []

    # -------------------------------------------------------------------------
    # Blas dependent codes
    # -------------------------------------------------------------------------
    - blas_codes:
        - arpack-ng ~mpi
        - superlu
        - suite-sparse

    - gcc_blas_codes:
        - armadillo +hdf5 ^arpack-ng ~mpi ^hdf5 ~mpi
        - octave

    # -------------------------------------------------------------------------
    # Parallel codes
    # -------------------------------------------------------------------------
    - mpi_codes:
        - fftw +mpi +openmp
        - hdf5@1.14.3 +mpi
        - openfoam-org +metis
        - osu-micro-benchmarks +graphing
        - parmetis
        - phylobayesmpi
        - scotch +mpi
        - netcdf-c
        - netcdf-fortran
        - parmetis

    - gcc_mpi_codes:
        - wrf ~pnetcdf build_type=dm+sm

    - blas_mpi_codes:
        - arpack-ng +mpi
        - hypre@2.31.0
        - mumps@5.6.2
        - superlu-dist@8.2.1
        - quantum-espresso +mpi +scalapack +gipaw
        - quantum-espresso +mpi +scalapack +gipaw hdf5=parallel
        - py-mpi4py

    - gcc_blas_mpi_codes:
        - gmsh +mpi +eigen +openmp +hdf5 ~fltk ~opencascade ~med ^mmg ~vtk
        - cpmd ~openmp
        - elmerfem +mumps +openmp +hypre
        - netlib-scalapack
        - yambo +mpi io=iotk,etsf-io

    - blas_mpi_python_codes:
        - boost +mpi
        - cgal
        - iq-tree@1.6.12+mpi
        - neuron +mpi +python
        - petsc@3.21.1
        - plumed
        - py-petsc4py
        - slepc

    - gcc_blas_mpi_python_codes:
        - adios2
        - eman2 +mpi
        - fenics +parmetis +hdf5 +scotch +suite-sparse ~vtk ~trilinos
        - gromacs +mpi +plumed
        - lammps build_type=Release +asphere +atc +body +class2 +colloid +compress +coreshell +dipole +diffraction +extra-dump +granular +h5md +kspace +latboltz +latte +lib +manybody +mc +misc +molecule +mpi +mpiio +netcdf +peri ~poems +python +qeq +replica +rigid +shock +ml-snap +srd +voronoi +plumed
        - opencv +vtk +python3
        - openfoam +metis
        - py-horovod
        - py-keras
        - py-tensorflow +mpi
        - py-topaz
        - py-torch +mpi ~magma
        - py-torchvision
        - relion ~mklfft
        - vtk
        - paraview +shared +python3 +hdf5 ~osmesa +opengl2
        - py-h5py
        - cp2k +mpi +plumed +openmp smm=blas

    # -------------------------------------------------------------------------
    # External packages
    # -------------------------------------------------------------------------
    - external_packages: []
    - when env['environment_type'] != 'cloud':
      external_packages:
        - ansys
        - cfdplusplus
        - comsol
        - fdtd
        - gurobi
        - gaussian
        - matlab
        - maple
        - mathematica
        - molpro
        - smr

    - when env['environment_type'] != 'cloud':
      blas_mpi_codes:
        vasp +hdf5 +scalapack +shmem +wannier90

    # -------------------------------------------------------------------------
    # Generic definitions
    # -------------------------------------------------------------------------
    - mpis:
        - $mpi_oneapi
        - $mpi_gcc


  specs:
    - matrix:
        - [$compilers_specs]

    - matrix:
        - [$blas_oneapi]
        - [$%compiler_oneapi]

    - matrix:
        - [$blas_gcc]
        - [$%compiler_gcc]

    - matrix:
        - [$mpi_oneapi]
        - [$%compiler_oneapi]

    - matrix:
        - [$mpi_gcc]
        - [$%compiler_gcc]

    - matrix:
        - [$core_codes]
        - [$%system_compiler]

    - matrix:
        - [$cuda_system_codes]
        - [$%system_compiler]

    - matrix:
        - [$serial_codes]
        - [$%compilers]

    - matrix:
        - [$gcc_serial_codes]
        - [$%compiler_gcc]

    - matrix:
        - [$oneapi_serial_codes]
        - [$%compiler_oneapi]

    - matrix:
        - [$cuda_serial_codes]
        - [$%compiler_gcc]

    - matrix:
        - [blas_codes]
        - [$^blas_gcc]
        - [$%compiler_gcc]

    - matrix:
        - [blas_codes]
        - [$^blas_oneapi]
        - [$%compiler_oneapi]

    - matrix:
        - [gcc_blas_codes]
        - [$^blas_gcc]
        - [$%compiler_gcc]

    - matrix:
        - [$mpi_codes]
        - [$^mpi_oneapi]
        - [$%compiler_oneapi]

    - matrix:
        - [$mpi_codes]
        - [$^mpi_gcc]
        - [$%compiler_gcc]

    - matrix:
        - [$gcc_mpi_codes]
        - [$^mpi_gcc]
        - [$%compiler_gcc]

    - matrix:
        - [$blas_mpi_codes]
        - [$^blas_oneapi]
        - [$^mpi_oneapi]
        - [$%compiler_oneapi]

    - matrix:
        - [$blas_mpi_codes]
        - [$^blas_gcc]
        - [$^mpi_gcc]
        - [$%compiler_gcc]

    - matrix:
        - [$blas_mpi_python_codes]
        - [$^blas_oneapi]
        - [$^mpi_oneapi]
        - [$^python_oneapi]
        - [$%compiler_oneapi]

    - matrix:
        - [$blas_mpi_python_codes]
        - [$^blas_gcc]
        - [$^mpi_gcc]
        - [$^python_gcc]
        - [$%compiler_gcc]

    - matrix:
        - [$gcc_blas_mpi_python_codes]
        - [$^blas_gcc]
        - [$^mpi_gcc]
        - [$^python_gcc]
        - [$%compiler_gcc]

  view: false
#    default:
#      root: /stack/packages/