# general preparation
python -m pip install -U pip setuptools wheel
python -m pip install -U pybind11 numpy
sudo apt install -y build-essential
# install package
python setup.py install
Before running the benchmark, you need to configure openmp to make sure each thread will be bind to each physical CPU core.
All we need to do is to simply export
some environment variables:
# env
export OMP_NUM_THREADS=<your physical CPU core> # 8 recommended
export OMP_PLACES=cores # mapping to physical cores
export OMP_PROC_BIND=spread # spread to different places
export OMP_DYNAMIC=FALSE # disallow dynamic changing threads
Then running the benchmark:
python main.py
For more details, ref: