Installation¶
Prerequisites¶
Dependency |
Notes |
|---|---|
MPI (OpenMPI / MPICH) |
|
libfabric |
Required for the RDMA backends ( |
Python ≥ 3.9 |
|
NumPy, Cython |
Python build dependencies |
mpi4py |
Runtime dependency of an MPI build (installed with it); not needed to build |
PyTorch (optional) |
For |
Building and installing¶
# Install Python build dependencies
pip install numpy mpi4py Cython
# Build in-place (use with PYTHONPATH=$PWD/src:$PYTHONPATH)
CC=mpicc CXX=mpicxx python setup.py build_ext --inplace
# Or install into the active virtual environment
CC=mpicc CXX=mpicxx pip install .
CC=mpicc CXX=mpicxx pip install ".[torch]" # also pulls PyTorch, for pyddstore.torch
# Or install in editable/development mode
CC=mpicc CXX=mpicxx pip install -e .
# Or install directly from GitHub
CC=mpicc CXX=mpicxx pip install git+https://github.com/ORNL/DDStore.git
To build against the environment’s own packages (e.g. an mpi4py built for Cray MPICH), disable build isolation:
CC=cc CXX=CC pip install --no-build-isolation --no-deps -e .
If that fails with No module named 'distutils.msvccompiler' (new setuptools with an old system NumPy, e.g. cray-python/3.11.7 on Frontier), use the standard-library distutils:
SETUPTOOLS_USE_DISTUTILS=stdlib CC=cc CXX=CC pip install --no-build-isolation --no-deps -e .
Building without MPI¶
DDSTORE_MPI=0 builds without MPI (no mpi.h, library or mpi4py), with a plain compiler:
DDSTORE_MPI=0 CC=gcc CXX=g++ pip install .
Methods 1 and 2 only; ranks exchange records through files (Without MPI) and are launched with srun. pyddstore.HAVE_MPI is False; a communicator or method=0 raises. Both builds share the generated _core.cpp, so switching only rebuilds the extension.
Notes¶
Package
pyddstore(compiledpyddstore._core, pluspyddstore.torch). After updating from 1.x, rebuild; leftoversrc/pyddstore.cpython-*.so/src/pyddstore.cppcan be deleted.src/pyddstore/_core.cppis shared by every environment building from the checkout;setup.pyregenerates it when the NumPy major version changes.