|
TRIQS/nda 2.0.0
Multi-dimensional array library for C++
|
nda supports the usual installation procedure using CMake.
If you want to skip the installation step, you can go directly to Integration in C++ projects to see how you can integrate nda into your own C++ project by using CMake's FetchContent.
Note: To guarantee reproducibility in scientific calculations, we strongly recommend the use of a stable release version.
The required dependencies of the C++ nda library are:
We do not provide explicit version requirements. Instead, we refer the user to the nda CI builds on GitHub Actions, where recent OS and compiler versions are tested.
The following dependencies are optional and enabled by default. They can be turned off via the corresponding CMake option (see Custom CMake options):
nda also depends on the following TRIQS libraries, which are fetched and built automatically (unless the user explicitly tells CMake to use local installations instead):
Download the source code of the latest stable version by cloning the TRIQS/nda repository from GitHub:
Create and move to a new directory where you will compile the code:
In the build directory, call cmake including any additional custom CMake options (see below):
Note that it is required to specify CMAKE_INSTALL_PREFIX, otherwise CMake will stop with an error.
Compile the code, run the tests and install the application:
Replace N with the number of cores you want to use to build the library.
To choose a particular version, go into the directory with the sources, and look at all available versions:
Checkout the version of the code that you want:
and follow steps 2 to 4 above to compile the code.
The compilation of nda can be configured by calling cmake with additional command line options
The following options are available:
Install and build basics
| Option | Description | Default |
|---|---|---|
| CMAKE_INSTALL_PREFIX=path | Installation path (required) | — |
| CMAKE_BUILD_TYPE=type | Build type (Release, Debug, RelWithDebInfo, …) | Release |
| BUILD_SHARED_LIBS=ON/OFF | Build shared libraries | OFF |
Optional features
| Option | Description | Default |
|---|---|---|
| HDF5Support=ON/OFF | Build with HDF5 support | ON |
| MPISupport=ON/OFF | Build with MPI support | ON |
| OpenMPSupport=ON/OFF | Build with OpenMP support | ON |
| PythonSupport=ON/OFF | Build Python bindings | OFF |
| CudaSupport=ON/OFF | Build with CUDA (GPU) support | OFF |
| Use_Magma=ON/OFF | Enable batched GEMM via MAGMA | OFF |
Tests, benchmarks and documentation
| Option | Description | Default |
|---|---|---|
| Build_Tests=ON/OFF | Build the unit tests (not recommended to disable) | ON |
| Build_SSO_Tests=ON/OFF | Build the SSO / custom-allocator test variants | OFF |
| Build_c2py_clair_Tests=ON/OFF | Build cpp2py/clair converter tests | OFF |
| Build_Benchs=ON/OFF | Build the benchmarks | OFF |
| Build_Documentation=ON/OFF | Build the Doxygen documentation | OFF |
Static analysis and sanitizers (developer use; require Clang/LLVM)
| Option | Description | Default |
|---|---|---|
| ANALYZE_SOURCES=ON/OFF | Run static analyzers (clang-tidy, cppcheck) during build | OFF |
| ASAN=ON/OFF | Build with LLVM Address Sanitizer | OFF |
| UBSAN=ON/OFF | Build with LLVM Undefined Behavior Sanitizer | OFF |
| MSAN=ON/OFF | Build with LLVM Memory Sanitizer | OFF |
| TSAN=ON/OFF | Build with LLVM Thread Sanitizer | OFF |