Installation

HLR contains programs which use frameworks for implementing algorithms. Compilation is therefore mostly oriented towards such programs and frameworks. Programs are automatically detected by the compilation subsystem but the user needs to define, which program (together with which framework) shall be compiled.

Repository

Source code for HLR is available from the official repository via

git clone https://gitlab.mis.mpg.de/rok/hlr

Please note, that only the default branch is considered stable, e.g., most example programs will run. However, since HLR is still under heavy development, API changes should be expected.

Prerequisites

A C++17 compiler is needed for compiling HLR (some code may require C++20 compatibility). This is also a prerequisite for some of the parallelization frameworks. HLR is tested with GCC version ≥ 9, and Clang version ≥ 10. Recommended is at least GCC-10.

Download HLIBcore, which contains the basic definitions (classes, functions, etc.) of HLIBpro for HLR to compile and run. Set the path for HLIBcore via

scons hpro_dir=<...>

Alternatively, download HLIBpro, unpack and set the prefix variable in the file bin/hlib-config to the directory where you have installed HLIBpro (this is standard HLIBpro installation).

Install all wanted frameworks according to the corresponding installation instructions. Please note, that if no framework is available, HLR can still be used in sequential mode.

Important

Currently, only the sequential and the TBB framework support the major programs!

Set the frameworks via scons, e.g.,

scons frameworks=seq,tbb

For MPI, it is assumed that at least MPI_THREAD_SERIALIZED is supported (optimal is MPI_THREAD_MULTIPLE).

For compilation, the scons make replacement is needed.

Optionally, you may install one of the supported malloc libraries (jemalloc, mimalloc, tbbmalloc and tcmalloc). I recommend to use jemalloc.

Compilation

Set compiler and compiler flags in the top section of the SConstruct file.

Various options are available for scons to alter the default set of programs or frameworks used during compilation.

By default, all programs together with all frameworks are used. To limit both sets, use the options programs and frameworks

The available programs are automatically detected in the programs subdirectory. For this, the naming scheme programname-framework.cc, e.g., dag-lu-tbb.cc with dag-lu being the program and tbb the framework, is assumed with the latter being one of the supported frameworks.

Option Values Description
programs tlr, hodlr, tileh, tiled-h, tiled-hca, tiled-hodlr, dag-lu, dag-gauss, dag-inv, dag-waz, dag-hodlr, uniform, uniform-mm, uniform-lu, approx-mm, approx-lu, dpt, polykern, cuda comma separated list of programs to build
frameworks seq, omp, tbb, tf, hpx, mpi, gpi2, cuda comma separated list of frameworks to use
Installation Paths of external Libraries
hpro installation path of HLIBpro
tbb installation path of TBB
tf installation path of C++-TaskFlow
hpx installation path of HPX
gpi2 installation path of GPI-2
mkl base directory of Intel MKL
cuda base directory of CUDA
jemalloc installation path of jemalloc
mimalloc installation path of mimalloc
tcmalloc installation path of tcmalloc
Compilation Options
malloc default, system, jemalloc, mimalloc, tbbmalloc, tcmalloc specify malloc library to use
likwid 0/1 use LikWid library
optimise 0/1 disable/enable optimisation options
debug 0/1 disable/enable debug options
fullmsg 0/1 disable/enable full output of compiler call
color 0/1 disable/enable colorized compilation output

An example for the options:

scons debug=1 programs=dag-lu,tlr frameworks=seq,tbb,hpx hpro=/home/user/hlibcore

The chosen options are saved. To recompile with the same options, you just need to enter

scons