Example Programs
Installation
After downloading or cloning the NESSi repository nessi, the example programs are compiled in a similar fashion as the libcntr library. We have prepared a CMake build environment and it is most convenient to write a configuration shell script configure.sh of this type:
CC=[C compiler] CXX=[C++ compiler]
cmake \
-DCMAKE_BUILD_TYPE=[Debug|Release] \
-Domp=[ON|OFF] \
-Dhdf5=[ON|OFF] \
-Dmpi=[ON|OFF] \
-DCMAKE_INCLUDE_PATH=[include directory] \
-DCMAKE_LIBRARY_PATH=[library directory] \
-DCMAKE_CXX_FLAGS="[compiling flags]" \
..
The dependencies for the example programs are the same as for libcntr. The eigen3 library and, optionally (turned on by hdf5=ON), the HDF5 library are required. Make sure the corresponding libraries can be found in the library path CMAKE_LIBRARY_PATH, while the corresponding headers should be placed in CMAKE_INCLUDE_PATH. Furthermore, the examples depend on the libcntr library. Therefore, the library path for libcntr should be provided by CMAKE_LIBRARY_PATH, while the header cntr/cntr.hpp should be found in the include path.
Create a build directory (for instance, cbuild/), navigate there and run the configure script:
sh ../configure.sh
After successful configuration, compile via
make
The executables are then found in the exe/ directory.
The utils/ directory contains useful python driver scripts which simplify the execution of the example programs. In order to run the python script, we need to make sure to set the python path to nessi/libcntr/python and/or nessi/libcntr/python3. The scripts should be run from nessi/examples. In the following table, we summarize the python scripts and the corresponding exe files and provide brief explanations of what is done in the python scripts.
Script |
Description |
|---|---|
|
Runs the execute file |
|
Runs |
|
Runs |
|
Runs |
|
Runs |
|
Runs |
|
Runs |
|
Runs |
The truncated example can be found in DMFT with a memory-truncated time propagation and instructions for the steady-state examples in Steady-State Examples.