Compiling CTSEG from source

Prerequisites

  1. The TRIQS library, see TRIQS installation instruction. In the following, we assume that TRIQS is installed in the directory path_to_triqs.

Installation steps

  1. Download the source code of the latest stable version by cloning the TRIQS/ctseg repository from GitHub:

    $ git clone https://github.com/TRIQS/ctseg ctseg.src
    
  2. Create and move to a new directory where you will compile the code:

    $ mkdir ctseg.build && cd ctseg.build
    
  3. Ensure that your shell contains the TRIQS environment variables by sourcing the triqsvars.sh file from your TRIQS installation:

    $ source path_to_triqs/share/triqsvarsh.sh
    
  4. In the build directory call cmake, including any additional custom CMake options, see below:

    $ cmake ../ctseg.src
    
  5. Compile the code, run the tests and install the application:

    $ make
    $ make test
    $ make install
    

Version compatibility

Keep in mind that the version of ctseg must be compatible with your TRIQS library version, see TRIQS website. In particular the Major and Minor Version numbers have to be the same. To use a particular version, go into the directory with the sources, and look at all available versions:

$ cd ctseg.src && git tag

Checkout the version of the code that you want:

$ git checkout 2.1.0

and follow steps 2 to 4 above to compile the code.

Custom CMake options

The compilation of ctseg can be configured using CMake-options:

cmake ../ctseg.src -DOPTION1=value1 -DOPTION2=value2 ...
Options Syntax
Specify an installation path other than path_to_triqs -DCMAKE_INSTALL_PREFIX=path_to_ctseg
Build the functionality depenedent on the NFFT library -DUSE_NFFT=ON
Build in Debugging Mode -DCMAKE_BUILD_TYPE=Debug
Disable testing (not recommended) -DBuild_Tests=OFF
Build the documentation -DBuild_Documentation=ON