Installation

Docker

A Docker image including the latest version of SOM as well as other TRIQS applications is available here.

Compiling SOM from source

Prerequisites

The TRIQS toolbox version 3.3.x (see TRIQS installation instructions). In the following, we will assume that it is installed in the directory path_to_triqs.

Installation steps

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

$ git clone -b 2.1.0 https://github.com/krivenko/som.git som.src
  1. Create and move to a new directory where you will compile the code:

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

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

    $ cmake ../som.src
    
  4. Compile the code, run the unit tests and install the application:

    $ make
    $ make test
    $ make install
    

Custom CMake options

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

cmake ../som.src -DOPTION1=value1 -DOPTION2=value2 ...

Options

Syntax

Specify an installation path other than path_to_triqs

-DCMAKE_INSTALL_PREFIX=path_to_som

Build in Debugging Mode

-DCMAKE_BUILD_TYPE=Debug

Enable compilation of shared libraries

-DBUILD_SHARED_LIBS=ON

Build a Debian package

-DBUILD_DEBIAN_PACKAGE=ON

Disable testing (not recommended)

-DBuild_Tests=OFF

Build the documentation locally

-DBuild_Documentation=ON

Build without Python support

-DPythonSupport=OFF

Initial size of the cache to store computed LHS

-DCache_Size=0x4000

Enable extended debugging output (developers only)

-DANALYZE_SOURCES=ON

Run static analyzer tools (clang-tidy and cppcheck) as part of compilation process (developers only)

-DANALYZE_SOURCES=ON

Compile SOM library with LLVM Address Sanitizer (developers only)

-DASAN=ON

Compile SOM library with LLVM Undefined Behavior Sanitizer (developers only)

-DUBSAN=ON