Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NumbaWarning: [1mThe TBB threading layer requires TBB version 2021 update 1 or later i.e., TBB_INTERFACE_VERSION >= 12010. Found TBB_INTERFACE_VERSION = 11102. The TBB threading layer is disabled.[0m warnings.warn(problem) #7531

Closed
aa694849243 opened this issue Nov 3, 2021 · 5 comments
Labels
more info needed This issue needs more information needtriage stale Marker label for stale issues.

Comments

@aa694849243
Copy link

Reporting a bug

@njit(fastmath=True,parallel=True,)
def ident_np(x):
    return np.cos(x) ** 2 + np.sin(x) ** 2

#%%

%timeit ident_np(np.arange(1.e8))

I'm getting warning when I run above code, I download tbb by conda install tbb,but the problem still exists.
The output of numba -s

System info:
--------------------------------------------------------------------------------
__Time Stamp__
Report started (local time)                   : 2021-11-03 11:44:58.609531
UTC start time                                : 2021-11-03 03:44:58.609531
Running time (s)                              : 1.539527

__Hardware Information__
Machine                                       : AMD64
CPU Name                                      : tigerlake
CPU Count                                     : 8
Number of accessible CPUs                     : 8
List of accessible CPUs cores                 : 0 1 2 3 4 5 6 7
CFS Restrictions (CPUs worth of runtime)      : None

CPU Features                                  : 64bit adx aes avx avx2
                                                avx512bitalg avx512bw avx512cd
                                                avx512dq avx512f avx512ifma
                                                avx512vbmi avx512vbmi2 avx512vl
                                                avx512vnni avx512vp2intersect
                                                avx512vpopcntdq bmi bmi2
                                                clflushopt clwb cmov cx16 cx8 f16c
                                                fma fsgsbase fxsr gfni invpcid
                                                lzcnt mmx movbe movdir64b movdiri
                                                pclmul popcnt prfchw rdpid rdrnd
                                                rdseed sahf sha shstk sse sse2
                                                sse3 sse4.1 sse4.2 ssse3 vaes
                                                vpclmulqdq xsave xsavec xsaveopt
                                                xsaves

Memory Total (MB)                             : 15931
Memory Available (MB)                         : 7590

__OS Information__
Platform Name                                 : Windows-10-10.0.19041-SP0
Platform Release                              : 10
OS Name                                       : Windows
OS Version                                    : 10.0.19041
OS Specific Version                           : 10 10.0.19041 SP0 Multiprocessor Free
Libc Version                                  : ?

__Python Information__
Python Compiler                               : MSC v.1916 64 bit (AMD64)
Python Implementation                         : CPython
Python Version                                : 3.8.3
Python Locale                                 : zh_CN.cp936

__Numba Toolchain Versions__
Numba Version                                 : 0.54.1
llvmlite Version                              : 0.37.0

__LLVM Information__
LLVM Version                                  : 11.1.0

__CUDA Information__
CUDA Device Initialized                       : False
CUDA Driver Version                           : ?
CUDA Runtime Version                          : ?
CUDA Detect Output:
None
CUDA Libraries Test Output:
None

__SVML Information__
SVML State, config.USING_SVML                 : True
SVML Library Loaded                           : True
llvmlite Using SVML Patched LLVM              : True
SVML Operational                              : True

__Threading Layer Information__
TBB Threading Layer Available                 : False
+--> Disabled due to Unknown import problem.
OpenMP Threading Layer Available              : True
+-->Vendor: MS
Workqueue Threading Layer Available           : True
+-->Workqueue imported successfully.

__Numba Environment Variable Information__
None found.

__Conda Information__
Conda Build                                   : 3.21.4
Conda Env                                     : 4.10.3
Conda Platform                                : win-64
Conda Python Version                          : 3.8.8.final.0
Conda Root Writable                           : True

__Installed Packages__
aenum                     3.1.0                    pypi_0    pypi
altgraph                  0.17               pyhd8ed1ab_0    conda-forge
app                       0.0.1                    pypi_0    pypi
argon2-cffi               20.1.0           py38h2bbff1b_1
argparse                  1.4.0                    pypi_0    pypi
async_generator           1.10               pyhd3eb1b0_0
atomicwrites              1.4.0                    pypi_0    pypi
attrs                     21.2.0             pyhd3eb1b0_0
autopep8                  1.5.7                    pypi_0    pypi
backcall                  0.2.0              pyhd3eb1b0_0
blas                      1.0                         mkl
bleach                    4.0.0              pyhd3eb1b0_0
brotli                    1.0.9                ha925a31_2
brotlipy                  0.7.0           py38h2bbff1b_1003
ca-certificates           2021.10.26           haa95532_2
cached-property           1.5.2                hd8ed1ab_1    conda-forge
cached_property           1.5.2              pyha770c72_1    conda-forge
certifi                   2021.10.8        py38haa95532_0
cffi                      1.14.6                   pypi_0    pypi
chardet                   3.0.4           py38h9bdc248_1008    conda-forge
charset-normalizer        2.0.4                    pypi_0    pypi
click                     7.1.2              pyh9f0ad1d_0    conda-forge
cloudpickle               2.0.0                    pypi_0    pypi
colorama                  0.4.4              pyh9f0ad1d_0    conda-forge
cors                      1.0.1                    pypi_0    pypi
cryptography              35.0.0           py38h71e12ea_0
cycler                    0.10.0                     py_2    conda-forge
cython                    0.29.24                  pypi_0    pypi
debugpy                   1.4.1            py38hd77b12b_0
decorator                 5.1.0              pyhd3eb1b0_0
defusedxml                0.7.1              pyhd3eb1b0_0
entrypoints               0.3                      py38_0
et-xmlfile                1.1.0                    pypi_0    pypi
filelock                  3.0.12             pyh9f0ad1d_0    conda-forge
flask                     1.1.2              pyh9f0ad1d_0    conda-forge
flask-cors                3.0.10             pyhd8ed1ab_0    conda-forge
fonttools                 4.25.0             pyhd3eb1b0_0
freetype                  2.11.0               ha860e81_0
future                    0.18.2           py38haa244fe_3    conda-forge
gevent                    21.8.0                   pypi_0    pypi
greenlet                  1.1.1                    pypi_0    pypi
icc-rt                    2019.0                   pypi_0    pypi
icc_rt                    2020.2                intel_254    numba
icu                       58.2                 ha925a31_3
idna                      3.2                      pypi_0    pypi
importlib-metadata        4.8.1            py38haa95532_0
importlib_metadata        4.8.1                hd3eb1b0_0
iniconfig                 1.1.1                    pypi_0    pypi
intel-openmp              2021.4.0                 pypi_0    pypi
ipykernel                 6.4.1            py38haa95532_1
ipython                   7.27.0           py38hd4e2768_0
ipython_genutils          0.2.0              pyhd3eb1b0_1
ipywidgets                7.6.5              pyhd3eb1b0_1
itsdangerous              1.1.0                      py_0    conda-forge
jedi                      0.18.0           py38haa95532_1
jinja2                    2.11.3             pyh44b312d_0    conda-forge
joblib                    1.1.0                    pypi_0    pypi
jpeg                      9d                   h2bbff1b_0
jsonschema                3.2.0              pyhd3eb1b0_2
jupyter                   1.0.0            py38haa244fe_6    conda-forge
jupyter_client            7.0.1              pyhd3eb1b0_0
jupyter_console           6.4.0              pyhd3eb1b0_0
jupyter_core              4.8.1            py38haa95532_0
jupyterlab_pygments       0.1.2                      py_0
jupyterlab_widgets        1.0.0              pyhd3eb1b0_1
kiwisolver                1.3.1            py38hbd9d945_1    conda-forge
lcms2                     2.12                 h83e58a3_0
libpng                    1.6.37               h2a8f88b_0
libtiff                   4.2.0                hd0e1b90_0
llvmlite                  0.37.0           py38h23ce68f_1
lz4-c                     1.9.3                h2bbff1b_1
m2w64-gcc-libgfortran     5.3.0                         6    conda-forge
m2w64-gcc-libs            5.3.0                         7    conda-forge
m2w64-gcc-libs-core       5.3.0                         7    conda-forge
m2w64-gmp                 6.1.0                         2    conda-forge
m2w64-libwinpthread-git   5.0.0.4634.697f757               2    conda-forge
macholib                  1.14               pyhd3eb1b0_1
markupsafe                1.1.1            py38h294d835_3    conda-forge
matplotlib                3.4.3            py38haa95532_0
matplotlib-base           3.4.3            py38h49ac443_0
matplotlib-inline         0.1.2              pyhd3eb1b0_2
mayplotlib                0.0.1                    pypi_0    pypi
mistune                   0.8.4           py38he774522_1000
mkl                       2021.4.0           haa95532_640
mkl-service               2.4.0            py38h2bbff1b_0
mkl_fft                   1.3.1            py38h277e83a_0
mkl_random                1.2.2            py38hf11a4ad_0
mosqito                   0.3.3                    pypi_0    pypi
mosquito                  0.3.2                    pypi_0    pypi
msys2-conda-epoch         20160418                      1    conda-forge
munkres                   1.1.4                      py_0
nbclient                  0.5.3              pyhd3eb1b0_0
nbconvert                 6.1.0            py38haa95532_0
nbformat                  5.1.3              pyhd3eb1b0_0
nest-asyncio              1.5.1              pyhd3eb1b0_0
nidaqmx                   0.5.7                    pypi_0    pypi
nixnet                    0.3.2                    pypi_0    pypi
notebook                  6.4.5            py38haa95532_0
numba                     0.54.1           py38hf11a4ad_0
numpy                     1.19.3                   pypi_0    pypi
numpy-base                1.20.1           py38haf7ebc8_0
olefile                   0.46               pyhd3eb1b0_0
openjpeg                  2.4.0                h4fc8c34_0
openpyxl                  3.0.9                    pypi_0    pypi
openssl                   1.1.1l               h2bbff1b_0
packaging                 21.0               pyhd3eb1b0_0
pandas                    1.3.3                    pypi_0    pypi
pandocfilters             1.4.3            py38haa95532_1
parso                     0.8.2              pyhd3eb1b0_0
pefile                    2019.4.18                  py_0    conda-forge
pep8                      1.7.1                    pypi_0    pypi
pickleshare               0.7.5           pyhd3eb1b0_1003
pillow                    8.2.0            py38h9273828_1    conda-forge
pip                       21.2.2           py38haa95532_0
pluggy                    1.0.0                    pypi_0    pypi
prometheus_client         0.11.0             pyhd3eb1b0_0
prompt-toolkit            3.0.20             pyhd3eb1b0_0
prompt_toolkit            3.0.20               hd3eb1b0_0
psutil                    5.8.0                    pypi_0    pypi
py                        1.10.0                   pypi_0    pypi
pyaudio                   0.2.11                   pypi_0    pypi
pycallgraph               1.0.1                    pypi_0    pypi
pycodestyle               2.7.0                    pypi_0    pypi
pycparser                 2.20               pyh9f0ad1d_2    conda-forge
pycryptodome              3.10.1           py38h2bbff1b_0
pycryptodomex             3.10.1                   pypi_0    pypi
pygments                  2.10.0             pyhd3eb1b0_0
pyinstaller               3.6              py38h8cc25b3_6
pyinstrument              4.0.4                    pypi_0    pypi
pyopenssl                 21.0.0             pyhd3eb1b0_1
pyparsing                 2.4.7              pyh9f0ad1d_0    conda-forge
pyqt                      5.9.2            py38ha925a31_4
pyrsistent                0.17.3           py38he774522_0
pysocks                   1.7.1            py38haa244fe_3    conda-forge
pytest                    6.2.5                    pypi_0    pypi
python                    3.8.3                he1778fa_2
python-can                3.3.4                    pypi_0    pypi
python-dateutil           2.8.1                      py_0    conda-forge
python-graphviz           0.17                     pypi_0    pypi
python_abi                3.8                      2_cp38    conda-forge
pytz                      2021.3                   pypi_0    pypi
pyuff                     2.0                      pypi_0    pypi
pywin32                   300              py38h294d835_0    conda-forge
pywin32-ctypes            0.2.0           py38haa244fe_1003    conda-forge
pywinpty                  0.5.7                    py38_0
pyzmq                     22.2.1           py38hd77b12b_1
qt                        5.9.7            vc14h73c81de_0
qtconsole                 5.1.1              pyhd3eb1b0_0
qtpy                      1.10.0             pyhd3eb1b0_0
requests                  2.26.0                   pypi_0    pypi
requests-file             1.5.1              pyh9f0ad1d_0    conda-forge
scidatatool               1.4.12                   pypi_0    pypi
scikit-learn              1.0                      pypi_0    pypi
scipy                     1.7.1            py38hbe87c03_2
send2trash                1.8.0              pyhd3eb1b0_1
setuptools                58.0.4           py38haa95532_0
sip                       4.19.13          py38ha925a31_0
six                       1.16.0                   pypi_0    pypi
sqlite                    3.36.0               h2bbff1b_0
tbb                       2021.2.0             h59b6b97_0
terminado                 0.9.4            py38haa95532_0
testpath                  0.5.0              pyhd3eb1b0_0
threadpoolctl             3.0.0                    pypi_0    pypi
tk                        8.6.11               h2bbff1b_0
tldextract                3.1.1                    pypi_0    pypi
toml                      0.10.2                   pypi_0    pypi
tornado                   6.1              py38h2bbff1b_0
tqdm                      4.62.3                   pypi_0    pypi
traitlets                 5.1.0              pyhd3eb1b0_0
urllib3                   1.26.6                   pypi_0    pypi
vc                        14.2                 h21ff451_1
vs2015_runtime            14.27.29016          h5e58377_2
wcwidth                   0.2.5              pyhd3eb1b0_0
webencodings              0.5.1                    py38_1
werkzeug                  1.0.1              pyh9f0ad1d_0    conda-forge
wheel                     0.37.0             pyhd3eb1b0_1
widgetsnbextension        3.5.1                    py38_0
win_inet_pton             1.1.0            py38haa95532_0
wincertstore              0.2              py38haa95532_2
windows-curses            2.2.0                    pypi_0    pypi
winpty                    0.4.3                         4
wmi                       1.5.1                    pypi_0    pypi
wrapt                     1.12.1                   pypi_0    pypi
xlrd                      2.0.1              pyhd8ed1ab_3    conda-forge
xnet                      0.3.0.3                  pypi_0    pypi
xz                        5.2.5                h62dcd97_0
zipp                      3.6.0              pyhd3eb1b0_0
zlib                      1.2.11               h62dcd97_4
zope.event                4.5.0              pyh9f0ad1d_0    conda-forge
zope.interface            5.4.0            py38h294d835_0    conda-forge
zstd                      1.4.9                h19a0ad4_0
@esc esc added more info needed This issue needs more information needtriage labels Nov 3, 2021
@esc
Copy link
Member

esc commented Nov 3, 2021

@aa694849243 thank you for reporting this. I would recommend setting up a new conda environment and re-installing Numba. You can also try to include the packages tbb and tbb-devel.

What is strange about the warning you receive, is that the tbb package appears to be present in the correct version.

@github-actions
Copy link

github-actions bot commented Dec 4, 2021

This issue is marked as stale as it has had no activity in the past 30 days. Please close this issue if no further response or action is needed. Otherwise, please respond with any updates and confirm that this issue still needs to be addressed.

@github-actions github-actions bot added the stale Marker label for stale issues. label Dec 4, 2021
@esc
Copy link
Member

esc commented Dec 6, 2021

Closing this issue as no new information has been provided. It is assumed that the above resolved the reported issue, if this is not the case please reopen the issue with new information. Many thanks.

@esc esc closed this as completed Dec 6, 2021
@99991
Copy link

99991 commented Jun 30, 2023

I had a similar warning:

NumbaWarning: The TBB threading layer requires TBB version 2021 update 6 or later i.e., TBB_INTERFACE_VERSION >= 12060. Found TBB_INTERFACE_VERSION = 12050. The TBB threading layer is disabled.

The problem was that I have two different versions of libtbb:

  • ~/.local/lib/libtbb.so ← want this
  • /usr/lib/x86_64-linux-gnu/libtbb.so ← actually loading this

I am not sure whether it would be safe to simply delete one of them or change the order in which libraries are discovered, so I simply hardcoded the path:

libtbb_name = os.path.expanduser("~/.local/lib/libtbb.so")

in line 356 of ~/.local/lib/python3.10/site-packages/numba/np/ufunc/parallel.py.

Note that this is just a dirty hack to make the warning go away instead of a proper fix. Note that if the library can not be found at all, for example because the path has been misspelled, the exception will be silently discarded!

If the library lives somewhere else, the path has to be changed. I found it with the command find / -name libtbb.so 2>/dev/null. You can check the version with:

  • echo ~/.local/lib/libtbb.so | python3 -c 'import ctypes;print(ctypes.CDLL(input()).TBB_runtime_interface_version())'
    • Version 12090 on my computer
  • echo /usr/lib/x86_64-linux-gnu/libtbb.so | python3 -c 'import ctypes;print(ctypes.CDLL(input()).TBB_runtime_interface_version())'
    • Version 11103 on my computer

See also #6350 (comment) for other solutions, for example

pip install --upgrade tbb

or

conda install tbb

@ejamezquita
Copy link

ejamezquita commented Nov 3, 2023

The problem was that I have two different versions of libtbb:

* `~/.local/lib/libtbb.so` ← want this

* `/usr/lib/x86_64-linux-gnu/libtbb.so` ← actually loading this

That is exactly my case! It seems that numba has trouble recognizing a pip installed version of tbb whenever there is a system-wide tbb version as well. This is especially puzzling because numba -s is able to detect and load the pip installed tbb but then fails to use it. There are several github threads on this direction but I'm a newbie so I have no clue what is the best approach. People seem to report that numba has a better time locating the right tbb whenever you work with conda and virtual environments but I haven't tried it myself.

In the meantime, I simply exported the appropriate LD_LIBRARY_PATH and the warning went away (without changing any code lines)

$ export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib/:/usr/lib/:/usr/lib64/:/home/eah4d/.local/lib/`
$ numba -s | grep TBBBB
$ 

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
more info needed This issue needs more information needtriage stale Marker label for stale issues.
Projects
None yet
Development

No branches or pull requests

4 participants