KADATH SPECTRAL SOLVER

Getting the sources :

This is done via a git server. The following command is used :
git clone https://gitlab.obspm.fr/grandcle/Kadath.git
This will create a Kadath directory on the local computer.
Please note that users are currently NOT allowed to push changes to Kadath.

Compiling the library using Cmake

  • Go to the Kadath repository.
  • Create a build repository (mkdir build for instance).
    You can have several of them, that will contain the result of different compilation options (one build-release and one build-debug for instance).
  • Go to the build repository.
  • Invoke cmake (options) .. (the CMakeList.txt file is in ..)
  • The available main cmake options are the following (the value in parentheses corresponds to the default settings) :
    • -DPAR_VERSION = On/Off (On)
      Set to On to build the MPI parallel version of the library, Off for a sequential version. The MPI parallel version requires ScaLAPack or the Intel Math Kernel Library (MKL).
    • -DMKL_VERSION = On/Off (Off)
      Set to On to use the Intel MKL library instead of Scalapack.
    • -DENABLE_GPU_USE = On/Off (Off)
      Set to On to build a version of the library that will use a GPU to solve linear problems when one is available, based on the MAGMA library.
    • -DUSE_CXX_STANDARD_14 = On/Off (Off)
      Allows to downgrade the version of the C++ standard required for the compilation of the library to 14 instead of the default C++-17.
    • -DCMAKE_BUILD_TYPE
      Specifies the build type (essentially Release or Debug)
    • -DMPI_CXX_COMPILER
      Path to the MPI C++ wrapper (when not automatically detected by cmake)
    • -DMPI_C_COMPILER
      Path to the MPI C wrapper (when not automatically detected by cmake)
  • Example of line command using MKL and intel compilers :
    cmake -DCMAKE_BUILD_TYPE=Release -DPAR_VERSION=On -DMKL_VERSION=On -DMPI_CXX_COMPILER=/shared/apps/intel/compilers_and_libraries_2019/linux/mpi/intel64/bin/mpiicpc -DMPI_C_COMPILER=/shared/apps/intel/compilers_and_libraries_2019/linux/mpi/intel64/bin/mpiicc ..
  • In the cases where cmake could not find some required external libraries, one must pass them manually through the Kadath/Cmake/CMakeLocal.cmake file (the fftw and scalapack libraries must usually be provided in that way). Some templates are provided for that file in this directory.
  • Once cmake has been successfully invoked, use make to start the compilation.

Compiling the library installer.sh

A script installer.sh is also provided that can be used to facilitate the installation process. It has to be invoked with the right options.
Please use installer.sh --help for the various possibilities.