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
        - ninja
        - parallel
        - picard
        - rclone
        - rust
        - 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
        - kokkos
        - mafft
        - metis
        - muscle
        - netcdf-c~mpi ^hdf5~mpi
        - netcdf-fortran ^netcdf-c ~mpi ^hdf5 ~mpi
        - nfft
        - python
        - scotch
        - star
        - subread
        - superlu
        - unblur ^fftw~mpi~openmp
        - 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
        - sox
        - stacks

    - 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

    # -------------------------------------------------------------------------
    # Python packages
    # -------------------------------------------------------------------------
    - python_codes:
        - bedtools2
        - bowtie2
        - cairo
        - mercurial
        - prinseq-lite
        - py-absl-py
        - py-astunparse
        - py-backports-entry-points-selectable
        - py-certifi
        - py-charset-normalizer
        - py-cycler
        - py-cython
        - py-distlib
        - py-filelock
        - py-gast
        - py-google-pasta
        - py-h5py
        - py-idna
        - py-kiwisolver
        - py-mpmath
        - py-packaging
        - py-pillow
        - py-pip
        - py-platformdirs
        - py-ply
        - py-protobuf
        - py-pybind11
        - py-pyparsing
        - py-python-dateutil
        - py-pytz
        - py-requests
        - py-semver
        - py-six
        - py-sympy
        - py-termcolor
        - py-urllib3
        - py-virtualenv
        - py-wheel
        - py-wrapt
        - samtools
        - scons
        - snakemake

    - python_blas_codes:
        - boost
        - gmsh ~mpi +hdf5 +cgns +eigen ~opencascade +openmp ~fltk ~med
        - iq-tree
        - py-biopython
        - py-keras-preprocessing
        - py-macs2
        - py-matplotlib
        - py-numpy
        - py-opt-einsum
        - py-pandas
        - py-pybigwig
        - py-xarray

    - gcc_python_codes:
        - blast-plus
        - caffe +python
        - gatk
        - gdb +tui +source-highlight +xz
        - julia+openlibm
        - libgd
        - mesa
        - mummer
        - node-js
        - openbabel +python
        - r
        - spades
        - xgboost

    - gcc_python_blas_codes:
        - polymake ^cddlib@0.94h
        - py-deeptools
        - py-scikit-learn
        - py-scipy
        - py-statsmodels
        - py-theano +cuda cuda_arch=70
        - py-cryolobm
        - py-pymol

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

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

    - mpi_blas_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

    - gcc_mpi_blas_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

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

    - gcc_mpi_blas_python_codes:
        # - eman2 +mpi
        - adios2
        - cp2k +mpi +plumed +openmp smm=blas
        # - fenics +parmetis +hdf5 +scotch +suite-sparse ~vtk ~trilinos
        - fenics-dolfinx
        - gromacs +mpi +plumed
        - lammps
        - opencv
        - openfoam +metis
        - paraview +shared +python +hdf5 ~osmesa +opengl2 +egl
        - py-fenics-basix
        - py-fenics-dolfinx
        - py-fenics-ffcx
        - py-fenics-ufl
        - py-h5py
        - py-horovod
        - py-keras
        - py-tensorflow
        - py-torch
        - py-torchvision
        - relion ~mklfft
        - topaz
        - vtk

    # -------------------------------------------------------------------------
    # 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:
        - [$python_codes]
        - [$^python_gcc]
        - [$%compiler_gcc]

    - matrix:
        - [$gcc_python_codes]
        - [$^python_gcc]
        - [$%compiler_gcc]

    - matrix:
        - [$python_codes]
        - [$^python_oneapi]
        - [$%compiler_oneapi]

    - matrix:
        - [$python_blas_codes]
        - [$^python_gcc]
        - [$^blas_gcc]
        - [$%compiler_gcc]

    - matrix:
        - [$python_blas_codes]
        - [$^python_oneapi]
        - [$^blas_oneapi]
        - [$%compiler_oneapi]

    - matrix:
        - [$gcc_python_blas_codes]
        - [$^python_gcc]
        - [$^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:
        - [$mpi_blas_codes]
        - [$^blas_oneapi]
        - [$^mpi_oneapi]
        - [$%compiler_oneapi]

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

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

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

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

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