Installation¶
Requirements¶
| Component | Requirements |
|---|---|
| Build | CMake ≥ 3.20, C99 compiler, zlib |
| CPU backend | OpenMP, LP64 BLAS/LAPACK |
| CUDA backend | CUDA Toolkit ≥ 12.4 with NVCC; compatible NVIDIA GPU to run |
| Python bindings | C++17 compiler, Python ≥ 3.8, NumPy ≥ 1.21, SciPy ≥ 1.8 |
| Multi-GPU (optional) | MPI, NCCL, C++17 compiler |
Backend build choices and runtime selection are documented together in Devices.
Python Package¶
CVXPY¶
For the optional CVXPY integration:
From Source¶
Verify the installation:
Continue with the Python quick start.
Command-Line Executable¶
The same source build provides the native library and executable:
git clone https://github.com/pdhcg/PDHCG.git
cd PDHCG
cmake -S . -B build
cmake --build build
./build/pdhcg --help
See Command line for file solving and C API for linking an application. For backend options and multi-GPU builds, see Devices.
CUDA Compiler¶
To select a CUDA toolchain explicitly, set CUDACXX before configuring:
The same environment variable applies to pip install . source builds.
Development Installation¶
From a checkout:
The hooks run Ruff, clang-format, and file consistency checks.