NESSI  v1.1.2
The NonEquilibrium Systems SImulation Library
Getting started with NESSI

Installation

The libcntr along with a number of utilities is available in the following bitbucket repository:

libcntr

The library libcntr depends on the following two libraries:

eigen3 required
HDF5 optional, recommended

For compling and installing the libcntr library, we use the CMake building environment to generate system specific make files. Several CMake variables need to be set to install libcntr; their are passed as -Dvar=[value]. CMake can be called directly from the terminal; however, it is more convenient to create a configure script with all variables and compile options. We suggest a script of the following structure:

CC=[C compiler] CXX=[C++ compiler]
cmake \
-DCMAKE_INSTALL_PREFIX=[install directory] \
-DCMAKE_BUILD_TYPE=[Debug|Release] \
-Domp=[ON|OFF] \
-Dhdf5=[ON|OFF] \
-Dmpi=[ON|OFF] \
-DBUILD_DOC=[ON|OFF] \
-DCMAKE_INCLUDE_PATH=[include directory] \
-DCMAKE_LIBRARY_PATH=[library directory] \
-DCMAKE_CXX_FLAGS="[compiling flags]" \
..

In the first line, the C and C++ compiler are set. We have tested the full library for both the GNU compilers (CC=gcc CXX=g++) as well as the Intel compilers (CC=icc CXX=icpc). The install directory (for instance /home/opt) is defined by the CMake variable CMAKE_INSTALL_PREFIX. Debugging tools are switched on by setting CMAKE_BUILD_TYPE=Debug; otherwise, all assertions and sanity checks are turned off. The code is significantly faster in release mode (CMAKE_BUILD_TYPE=Release) and thus recommended for a production run. The debug mode, on the other hand, turns on assertions (implemented as C++ standard assertions) of the consistency the input of all major routines. The following three lines trigger optional (but recommended) functionalities. Setting omp=ON turns on the compilation of routines parallelized with openMP, while setting mpi=ON is required for compiling distributed-memory routines based on MPI. In this case, MPI compilers have to be specified in the first line. Finally, hdf5=ON activates the usage of the hdf5 library. The path to the libraries that libcntr depends upon (eigen3 and, optionally, hdf5) are provided by specifying the include directory CMAKE_INCLUDE_PATH and the library path CMAKE_LIBRARY_PATH. Finally, the compilation flags are specified by CMAKE_CXX_FLAGS. To compile libcntr, the flags should include

-std=c++11 -fpermissive

if the GNU C++ compiler is used. No special flags are required when using the Intel C++ compiler. As the next step, create a build directory (for instance cbuild). Navigate to this directory and run the configure script:

sh ../configure.sh

After successful configuration (which generates the make files), compile the library by

make

and install it to the install directory by

make install

Test suite and documenation

We also provide a test suite for checking the functionality of every major routine in libcntr based on the Catch library. For running the tests, simply run

make test

After completing all test, the message All tests passed indicates that the compiled version of libcntr is fully functional. If compiled with MPI support, the MPI-based functions can be tested by running

make test_mpi

The C++ code is fully document using the automatic documentation tool doxygen. For generating the documentation, specify BUILD_DOC=ON in the configure script. The documentation is then generated automatically along the compilation.

previous page main pagenext page Physics background