Getting Started
Dependencies
The C++ code depends on:
- BLAS and LAPACK
- MPI
- OpenMP
- Boost
- GSL
- GMP
- HDF5
The nrginit side additionally depends on Mathematica. In normal workflows Mathematica is used to generate the data file consumed by the C++ executable.
Build
Configure and build with CMake:
cmake -S . -B build -DCMAKE_INSTALL_PREFIX=$HOME/nrgljubljana/
cmake --build build --parallel
cmake --install build
For a debug build:
cmake -S . -B build -DCMAKE_INSTALL_PREFIX=$HOME/nrgljubljana/ -DCMAKE_BUILD_TYPE=Debug
Useful configure options:
-DTEST_LONG=ONenables long-running tests-DASAN=ON -DUBSAN=ONenables sanitizer builds-DANALYZE_SOURCES=ONturns on static analysis hooks-DBuild_Documentation=ON -DSphinx_Only=ONbuilds the legacy Sphinx docs
Test
Run the default test suite with:
ctest --test-dir build --output-on-failure
Some tests depend on Mathematica and are only configured when Mathematica is available.
Useful focused runs from CONTRIBUTING.md:
ctest --test-dir build --output-on-failure -R '^(store|test_clean|test0_clean)$'
ctest --test-dir build --output-on-failure -R '^(adapt|nrgchain)$'
ctest --test-dir build --output-on-failure -R '^(test_dmnrg_only|test_fdm_only|test65_algorithms_mats)$'
Running The Code
The runtime executable is nrg. It expects param and data in the working directory.
Typical workflow:
- generate
datawith the Mathematica-side initialization path - prepare
param - run
nrg - inspect the generated workdir outputs and tool postprocessing results
The executable also creates a temporary workdir for iteration artifacts and density-matrix files.
Legacy Documentation
The older Sphinx documentation remains in doc/ while this MkDocs tree is being expanded. Use this new tree for contributor-facing structure and code-orientation material.