KADATH SPECTRAL SOLVER

There is an pre-optimized version of Kadath which should be about four times slower than the optimized one. It is mentionned here mainly for historical reasons.

Getting the sources :

This is done via a git server. The following command is used :
git clone --branch deprecated https://gitlab.obspm.fr/grandcle/Kadath.git
This will create a Kadath directory on the local computer.

Compiling the library

  • Environment variable :

    $HOME_KADATH must be set to the location of the KADATH directory (using your favorite shell)
  • Installation :

    try to launch one of the installation scripts (install_seq.sh for the sequential version or install_par.sh for the parallel one).
  • Finding the various librairies :

    Kadath is compiled using the Cmake tool.
    In the repository $HOME_KADATH/Cmake there are some scripts that try to locate the required libraries automatically.
    If some fail, the paths can be set "by hand" in the file $HOME_KADATH/Cmake/Cmake.local
    The variables that can be set are :
    GSL_LIBRARIES, FFTW_LIBRARIES, LAPACK_LIBRARIES, SCALAPACK_LIBRARIES, PGPLOT_LIBRARIES
    Some templates are given and can be used directly by copying them to Cmake.local
  • Once Cmake.local is set up, launch again the installation script.
  • Results :

    two versions of the libraries should be produced (debug and release), stored in $HOME_KADATH/lib
    The documentation is also generated and stored in $HOME_KADATH/doc
  • Generating executables

    Some examples of codes (both parallel and sequential) can be found in $HOME_KADATH/codes It is better to use also Cmake to compile codes.
  • Create a repository $MY_PROG
  • Create a repository $MY_PROG/src
  • Put the various source files myprog1.cpp, myprog2.cpp etc in $MY_PROG/src. Currently each *cpp file should have its own and independant main function.
  • Copy the template file $HOME_KADATH/code/CmakeLists.txt to your repository $MY_PROG
  • Edit CmakeLists.txt:
    • Replace “myproject” by your project name
    • Replace “myprog*” by the name(s) of your program(s).
  • To configure:
    • For a sequential code type :
      cmake -DPAR_VERSION=OFF .
    • For a parallel version :
      cmake -DPAR_VERSION=ON .
    • For a debug version one can use the option :
      -CMAKE_BUILD_TYPE=Debug
  • Then "make" for compiling all the programs. They can also be compiled independently using make myprog* . This is the only step that needs to be done if you change the content of the source files.
  • Your executable(s) should be in $MY_PROG/bin