Installation
February 26, 2026 · View on GitHub
PDX needs:
- Clang 17, CMake 3.26
- OpenMP
- A BLAS implementation
- Python 3 (only for Python bindings)
Once you have these requirements, you can install the Python Bindings
Installing Python Bindings
git clone https://github.com/cwida/PDX
cd PDX
git submodule update --init
# Create a venv if needed
python -m venv ./venv
source venv/bin/activate
# Set proper clang compiler if needed
export CXX="/usr/bin/clang++-18"
pip install .
Step by Step
- Installing Clang
- Installing CMake
- Installing OpenMP
- Installing BLAS
- Installing FFTW [optional]
- Troubleshooting
Installing Clang
We recommend LLVM
Linux
sudo bash -c "$(wget -O - https://apt.llvm.org/llvm.sh)" -- 18
MacOS
brew install llvm
Installing CMake
Linux
sudo apt update
sudo apt install make
sudo apt install cmake
MacOS
brew install cmake
Installing OpenMP
Linux
Most distributions come with OpenMP, or you can install it with:
sudo apt-get install libomp-dev
MacOS
brew install libomp
Installing BLAS
BLAS is extremely important to achieve high performance. We recommend OpenBLAS.
Linux
Most distributions come with OpenBLAS, or you may have already installed OpenBLAS via apt. THIS IS SLOW. We recommend installing OpenBLAS from source with the commands below.
git clone https://github.com/OpenMathLib/OpenBLAS.git
cd OpenBLAS
make -j$(nproc) DYNAMIC_ARCH=1 USE_OPENMP=1 NUM_THREADS=128
make -j$(nproc) PREFIX=/usr/local install
ldconfig
MacOS
Silicon Chips (M1 to M5): You don't need to do anything special. We automatically detect Apple Accelerate that uses the AMX unit.
Intel Chips (older Macs): Install OpenBLAS as detailed above.
Installing FFTW
FFTW will give you better performance in very high-dimensional datasets (d > 1024).
wget https://www.fftw.org/fftw-3.3.10.tar.gz
tar -xvzf fftw-3.3.10.tar.gz
cd fftw-3.3.10
./configure --enable-float --enable-shared --enable-openmp
sudo make -j$(nproc)
sudo make install
ldconfig
Troubleshooting
Python bindings installation fails
Error:
Could NOT find Python (missing: Development.Module)
Reason given by package:
Development: Cannot find the directory "/usr/include/python3.12"
Solution: Install python-dev package:
sudo apt install python3-dev
I get a bunch of warnings when compiling PDX
If you see a lot of warnings like this one:
warning: ignoring ‘#pragma clang loop’
You are using GCC instead of Clang. If you installed Clang, you can set the correct compiler by doing the following:
export CXX="/usr/bin/clang++-18" # Linux
export CXX="/opt/homebrew/opt/llvm/bin/clang++" # MacOS
Does PDX use SIMD?
Yes. We have optimizations for AVX512, AVX2, and NEON. You don't need to do anything special to activate these. If your machine doesn't have any of these, we rely on scalar code.