Commit ec0cfda7 authored by Paulo Medeiros's avatar Paulo Medeiros
Browse files

Explicitly set numba's threading layer to omp

To get rid of TBB version warnings. See
<https://numba.discourse.group/t/suppress-tbb-warning/80> and
<http://numba.pydata.org/numba-doc/latest/user/threading-layer.htm>.
parent d3209a92
#!/usr/bin/env python3
"""Common definitions."""
import numba
try:
# From python3.8
from importlib.metadata import version
......@@ -11,3 +13,8 @@ try:
__version__ = version(__name__)
except ModuleNotFoundError:
__version__ = "?"
# Set the threading layer before any parallel target compilation.
# Picking "omp" specifically to avoid warnings about old TBB versions.
# See <http://numba.pydata.org/numba-doc/latest/user/threading-layer.html>
numba.config.THREADING_LAYER = "omp"
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment