#
# Config file for the external dependencies of Abinit
#

#
# Permitted options:
#
#   * binaries  : optional, executables provided by the package;
#
#   * compounds : mandatory, space-separated list of compounds provided
#                 by the package: bins (binaries), incs (C headers and/or
#                 Fortran modules), libs (libraries);
#                 NOTE: this field is now deprecated;
#
#   * depends   : optional, space-separated list of other packages
#                 described in this file and required by the current
#                 package;
#
#   * detector  : mandatory, process used to detect the package; 'abinit' for
#                 an internal ABINIT-specific detection process, 'steredeg'
#                 for a shared detection module;
#
#   * fallback  : mandatory, whether the package has a fallback (yes or no);
#                 see https://launchpad.net/abinit-fallbacks for details;
#
#   * flavors   : optional, space-separated list of variants of a complex
#                 package, to let users specify their preferred version;
#                 the first item of the list is used as default value;
#
#   * headers   : optional, space-separated list of C/C++ header files
#                 provided by the package;
#
#   * libraries : optional, space-separated list of names of the static
#                 libraries provided by the package, without the 'lib'
#                 prefix nor the '.a' extension (WARNING: the order
#                 must be the same as at link time!);
#
#   * modules   : optional, space-separated list of Fortran modules
#                 provided by the package;
#
#   * name      : mandatory, user-friendly name of the package;
#
#   * optional  : mandatory, whether the package can be disabled without
#                 degrading the overall performance of Abinit;
#
#   * status    : mandatory, 'new' to inform users of the novelty of
#                 a package, or 'removed' to let them know that the
#                 package cannot be used anymore; should default to
#                 'stable', in order to turn off reports;
#

[DEFAULT]
compounds = incs libs
fallback = no
optional = yes
status = new

[abinit_common]
depends = bigdft levmar libpsml libxc triqs wannier90 fft linalg papi netcdf gpu mpi libxml2
detector = steredeg
languages = fortran
libraries =
  abinit_common
name = ABINIT Common

[bigdft]
depends = linalg libxc
detector = steredeg
languages = fortran
fallback = yes
headers =
  bigdft.h
  bigdft_cst.h
  bigdft_input_keys.h
libraries =
  bigdft-1
  abinit
modules =
  bigdft_api.mod
  constrained_dft.mod
  dictionaries.mod
  dictionaries_base.mod
  diis_sd_optimization.mod
  dynamic_memory.mod
  exception_callbacks.mod
  gaussians.mod
  input_old_text_format.mod
  memory_profiling.mod
  metadata_interfaces.mod
  module_fft_sg.mod
  module_base.mod
  module_defs.mod
  module_fragments.mod
  module_input.mod
  module_input_keys.mod
  module_interfaces.mod
  module_private_api.mod
  module_types.mod
  module_xc.mod
  overlap_point_to_point.mod
  poisson_solver.mod
  randomdata.mod
  vdwcorrection.mod
  wrapper_linalg.mod
  wrapper_mpi.mod
  yaml_output.mod
  yaml_parse.mod
  yaml_strings.mod
name = BigDFT

[fft]
detector = steredeg
languages = c fortran
flavors = auto custom dfti fftw3 fftw3-threads goedecker
name = FFT
optional = no

[fftw3]
detector = steredeg
languages = c fortran
headers =
  fftw3.h
libraries =
  fftw3 fftw3f
name = FFTW3

[gpu]
depends = mpi
detector = steredeg
languages = c c++ fortran
flavors = cuda-double cuda-single
name = GPU

[hdf5]
detector = steredeg
fallback = yes
languages = c
headers =
  hdf5.h
libraries =
  hdf5
modules =
  hdf5.mod
extra_vars =
  H5CC
name = Hierarchical Data Format 5
optional = no

[levmar]
detector = steredeg
languages = c
headers =
  levmar.h
libraries =
  levmar
name = Levenberg-Marquardt algorithm

[libpaw]
depends = libxc fft linalg gpu mpi libxml2
detector = steredeg
languages = c fortran
libraries =
  paw
name = LibPAW

[libpsml]
depends = xmlf90
detector = steredeg
languages = fortran
fallback = yes
libraries =
  psml
name = LibPSML

[libxc]
detector = steredeg
languages = c fortran
fallback = yes
headers =
  xc.h
  xc_config.h
  xc_funcs.h
libraries =
  xc
  xcf90
modules =
  libxc_funcs_m.mod
  xc_f90_lib_m.mod
  xc_f90_types_m.mod
name = LibXC
optional = no

[libxml2]
detector = abinit
languages = c
libraries =
  xml2
name = LibXML2

[linalg]
depends = gpu mpi
compounds = -incs libs
detector = steredeg
languages = c c++ fortran
fallback = yes
flavors = auto acml atlas custom easybuild +elpa essl +gpu:magma mkl netlib openblas +mpi:plasma +mpi:scalapack
headers =
  lapacke.h
libraries =
  lapack
  blas
name = linear algebra
optional = no

[mpi]
detector = steredeg
languages = c c++ fortran
flavors = auto double-wrap flags native prefix
name = MPI
optional = yes

[netcdf]
detector = steredeg
languages = c fortran
fallback = yes
binaries =
  nc-config
  nccopy
  ncdump
  ncgen
  ncgen3
headers =
  netcdf.h
libraries =
  netcdf
name = NetCDF
optional = no

[netcdf_fortran]
depends = netcdf
detector = steredeg
languages = c fortran
fallback = yes
binaries =
  nf-config
libraries =
  netcdff
modules =
  netcdf.inc
  netcdf.mod
  typesizes.mod
name = NetCDF-Fortran
optional = no

[papi]
detector = steredeg
languages = c
libraries =
  papi
name = PAPI
overrides = abi_timer_enable="no"

[pfft]
depends = mpi
detector = steredeg
languages = c
headers =
  pfft.h
libraries =
  pfft
name = FFTW3

[triqs]
detector = steredeg
languages = c++
libraries =
  triqs
name = TRIQS

[wannier90]
depends = linalg
detector = steredeg
languages = fortran
fallback = yes
libraries =
  wannier90
name = Wannier90

[xmlf90]
detector = steredeg
languages = fortran
fallback = yes
libraries =
  xmlf90
name = XMLF90
