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 :
  • 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