KADATH SPECTRAL SOLVER

Generating executables

Some examples of codes (both parallel and sequential) can be found in 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 independent main function.
  • Copy the template file tutorial/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).
  • Invoke "cmake (options) ." (the CMakeList.txt is in the current repository).
    Compared to the options used for compiling the library, there are two more that you MUST pass :
    • -DKADATH_SOURCES_DIRECTORY
      Path to the Kadath repository
    • -DKADATH_BUILD_DIRECTORY
      Path to the Kadath build repository
  • Example of line command :
    cmake -DCMAKE_BUILD_TYPE=Release -DPAR_VERSION=OFF -DKADATH_SOURCES_DIRECTORY=~/Kadath/ -DKADATH_BUILD_DIRECTORY=~/Kadath/build-seq-release .
  • Then make to compile 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