I am building a program using numba in python and I need to use openmp as a numba threading layer. I am struggling to get it up and running.
I have visited the following sites:
- http://numba.pydata.org/numba-doc/latest/user/installing.html#installing-from-source
- https://numba.readthedocs.io/en/stable/user/threading-layer.html
- https://tigress-web.princeton.edu/~jdh4/PyOMPintro.pdf
I have pip installed 'intel-openmp'. However, the following code causes import errors:
import importlib
openmp = importlib.import_module("intel-openmp")
obtaining:
ModuleNotFoundError: No module named 'intel-openmp'
'intel-openmp' appears as a package when I run conda list . What am I missing here?
Additionally, if I try anything like:
from numba import threading_layer
from numba import config, njit, threading_layer
config.THREADING_LAYER = 'omp'
causes:
ImportError: cannot import name 'threading_layer'
Could anyone please help? I am relatively new to Python and Numba so there might be key concepts I am missing.
This is my first post ever, so apologies in case some requirements are not met.
Thank you