Building and Testing¶
Compiler Support¶
SQUINT leverages modern C++ features and requires a C++23 compliant compiler. Currently supported compilers include:
GCC (g++) version 14 or later
Clang version 18 or later
Note
MSVC is partially supported but lacks support for multidimensional subscript operators.
Build Instructions¶
Ensure you have CMake version 3.28 or later and a supported compiler installed.
Optionally install MKL if you intend to use it as a BLAS backend.
If you want to use GPU support, ensure you have CUDA installed on your system.
Build the project using the following commands:
mkdir build && cd build
cmake ..
cmake --build .
CMake Configuration¶
SQUINT provides several CMake options to customize the build:
-DSQUINT_BLAS_BACKEND
: Choose the BLAS backend (MKL, OpenBLAS, or NONE)-DSQUINT_BUILD_DOCUMENTATION
: Build the documentation files (ON/OFF)-DSQUINT_BUILD_TESTS
: Enable/disable building tests (ON/OFF)-DCMAKE_BUILD_TYPE
: Set the build type (Debug, Release, etc.)-DSQUINT_USE_CUDA
: Enable/disable CUDA support for GPU tensors (ON/OFF)
BLAS Backends¶
SQUINT supports three BLAS backends to cater to different performance needs and system configurations:
Intel MKL: Optimized for high performance on Intel processors
cmake -DSQUINT_BLAS_BACKEND=MKL ..
OpenBLAS: An open-source alternative that’s portable across different architectures
cmake -DSQUINT_BLAS_BACKEND=OpenBLAS ..
NONE: A limited fallback implementation for maximum portability
cmake -DSQUINT_BLAS_BACKEND=NONE ..
Note
For the OpenBLAS backend, SQUINT will automatically fetch the source code from GitHub and build it from source along with the library if you use the provided CMakeLists.txt file.
Enabling CUDA Support¶
To enable CUDA support for GPU tensors, use the following CMake option:
cmake -DSQUINT_USE_CUDA=ON ..
Ensure that you have CUDA installed on your system before enabling this option.
Serving Documentation¶
If SQUINT was built with documentation, you can serve it locally using:
python -m http.server -d ./build/sphinx