If installing pygram11 from conda-forge or via a binary wheel from
PyPI, OpenMP acceleration should be available. If using the source
(from PyPI or GitHub), the
setup.py script tests to see of OpenMP
is available during installation. If you don’t want to use conda-forge
or you can’t use a binary wheel, keep reading.
You can look at the continuous integration configuration files to see how builds are defined (Linux only) to ensure OpenMP acceleration is available. For macOS 10.14, manual tests have shown these setups are OpenMP accelerated:
- Homebrew or pyenv Python3
libompinstalled from Homebrew (Apple LLVM version 10.0.*). This is probably simplest non-conda-forge setup.
- Default (not conda-forge) Anaconda Python3 (3.6.8 and 3.7.3) and
Python2 (2.7.16) distributions with
libompinstalled from Homebrew (you’ll likely need to remove the extra
libiomp5.dylibfrom the Anaconda environment
conda install nomkl, see here).
To check if OpenMP was detected and used while compiling the extension
pygram11._core, try the following:
>>> import pygram11 >>> pygram11.OPENMP True
Needless to say, if you see
False OpenMP acceleration isn’t
The histogramming functions use a named argument (
requesting OpenMP usage. If
omp function argument is ignored.