question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

TBB can't be loaded

See original GitHub issue

Reporting a bug

I am still experiencing the problem I first described in #5371. I have installed numba and tbb via pip. Numba reports that TBB is available:

$ numba -s | grep TBBBB
TBB Threading Layer Available                 : True
+-->TBB imported successfully.

However, when trying to run this code:

#!/usr/bin/env python
import numpy as np
import numba
numba.config.THREADING_LAYER = 'safe'

@numba.jit(nopython=True, parallel=True)
def add(a, b):
    for i in numba.prange(len(a)):
        a[i] += b[i]


a = np.ones(4)
b = np.ones(4)
add(a, b)
print(a)

I get this error:

Traceback (most recent call last):
  File "/home/bmerry/work/sdp/env3/lib/python3.8/site-packages/numba/core/errors.py", line 745, in new_error_context
    yield
  File "/home/bmerry/work/sdp/env3/lib/python3.8/site-packages/numba/core/lowering.py", line 273, in lower_block
    self.lower_inst(inst)
  File "/home/bmerry/work/sdp/env3/lib/python3.8/site-packages/numba/core/lowering.py", line 486, in lower_inst
    func(self, inst)
  File "/home/bmerry/work/sdp/env3/lib/python3.8/site-packages/numba/parfors/parfor_lowering.py", line 271, in _lower_parfor_parallel
    call_parallel_gufunc(
  File "/home/bmerry/work/sdp/env3/lib/python3.8/site-packages/numba/parfors/parfor_lowering.py", line 1398, in call_parallel_gufunc
    _launch_threads()
  File "/home/bmerry/work/sdp/env3/lib/python3.8/site-packages/numba/np/ufunc/parallel.py", line 486, in _launch_threads
    raise_with_hint(requirements)
  File "/home/bmerry/work/sdp/env3/lib/python3.8/site-packages/numba/np/ufunc/parallel.py", line 431, in raise_with_hint
    raise ValueError(errmsg % hint)
ValueError: No threading layer could be loaded.
HINT:
Intel TBB is required, try:
$ conda/pip install tbb

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "tbbtest.py", line 14, in <module>
    add(a, b)
  File "/home/bmerry/work/sdp/env3/lib/python3.8/site-packages/numba/core/dispatcher.py", line 434, in _compile_for_args
    raise e
  File "/home/bmerry/work/sdp/env3/lib/python3.8/site-packages/numba/core/dispatcher.py", line 367, in _compile_for_args
    return self.compile(tuple(argtypes))
  File "/home/bmerry/work/sdp/env3/lib/python3.8/site-packages/numba/core/compiler_lock.py", line 32, in _acquire_compile_lock
    return func(*args, **kwargs)
  File "/home/bmerry/work/sdp/env3/lib/python3.8/site-packages/numba/core/dispatcher.py", line 808, in compile
    cres = self._compiler.compile(args, return_type)
  File "/home/bmerry/work/sdp/env3/lib/python3.8/site-packages/numba/core/dispatcher.py", line 78, in compile
    status, retval = self._compile_cached(args, return_type)
  File "/home/bmerry/work/sdp/env3/lib/python3.8/site-packages/numba/core/dispatcher.py", line 92, in _compile_cached
    retval = self._compile_core(args, return_type)
  File "/home/bmerry/work/sdp/env3/lib/python3.8/site-packages/numba/core/dispatcher.py", line 105, in _compile_core
    cres = compiler.compile_extra(self.targetdescr.typing_context,
  File "/home/bmerry/work/sdp/env3/lib/python3.8/site-packages/numba/core/compiler.py", line 603, in compile_extra
    return pipeline.compile_extra(func)
  File "/home/bmerry/work/sdp/env3/lib/python3.8/site-packages/numba/core/compiler.py", line 339, in compile_extra
    return self._compile_bytecode()
  File "/home/bmerry/work/sdp/env3/lib/python3.8/site-packages/numba/core/compiler.py", line 401, in _compile_bytecode
    return self._compile_core()
  File "/home/bmerry/work/sdp/env3/lib/python3.8/site-packages/numba/core/compiler.py", line 381, in _compile_core
    raise e
  File "/home/bmerry/work/sdp/env3/lib/python3.8/site-packages/numba/core/compiler.py", line 372, in _compile_core
    pm.run(self.state)
  File "/home/bmerry/work/sdp/env3/lib/python3.8/site-packages/numba/core/compiler_machinery.py", line 341, in run
    raise patched_exception
  File "/home/bmerry/work/sdp/env3/lib/python3.8/site-packages/numba/core/compiler_machinery.py", line 332, in run
    self._runPass(idx, pass_inst, state)
  File "/home/bmerry/work/sdp/env3/lib/python3.8/site-packages/numba/core/compiler_lock.py", line 32, in _acquire_compile_lock
    return func(*args, **kwargs)
  File "/home/bmerry/work/sdp/env3/lib/python3.8/site-packages/numba/core/compiler_machinery.py", line 291, in _runPass
    mutated |= check(pss.run_pass, internal_state)
  File "/home/bmerry/work/sdp/env3/lib/python3.8/site-packages/numba/core/compiler_machinery.py", line 264, in check
    mangled = func(compiler_state)
  File "/home/bmerry/work/sdp/env3/lib/python3.8/site-packages/numba/core/typed_passes.py", line 442, in run_pass
    NativeLowering().run_pass(state)
  File "/home/bmerry/work/sdp/env3/lib/python3.8/site-packages/numba/core/typed_passes.py", line 370, in run_pass
    lower.lower()
  File "/home/bmerry/work/sdp/env3/lib/python3.8/site-packages/numba/core/lowering.py", line 179, in lower
    self.lower_normal_function(self.fndesc)
  File "/home/bmerry/work/sdp/env3/lib/python3.8/site-packages/numba/core/lowering.py", line 233, in lower_normal_function
    entry_block_tail = self.lower_function_body()
  File "/home/bmerry/work/sdp/env3/lib/python3.8/site-packages/numba/core/lowering.py", line 259, in lower_function_body
    self.lower_block(block)
  File "/home/bmerry/work/sdp/env3/lib/python3.8/site-packages/numba/core/lowering.py", line 273, in lower_block
    self.lower_inst(inst)
  File "/usr/lib/python3.8/contextlib.py", line 131, in __exit__
    self.gen.throw(type, value, traceback)
  File "/home/bmerry/work/sdp/env3/lib/python3.8/site-packages/numba/core/errors.py", line 752, in new_error_context
    reraise(type(newerr), newerr, tb)
  File "/home/bmerry/work/sdp/env3/lib/python3.8/site-packages/numba/core/utils.py", line 81, in reraise
    raise value
numba.core.errors.LoweringError: Failed in nopython mode pipeline (step: nopython mode backend)
No threading layer could be loaded.
HINT:
Intel TBB is required, try:
$ conda/pip install tbb

File "tbbtest.py", line 8:
def add(a, b):
    for i in numba.prange(len(a)):
    ^

During: lowering "id=0[LoopNest(index_variable = parfor_index.4, range = (0, a_size0.1, 1))]{18: <ir.Block at tbbtest.py (8)>}Var(parfor_index.4, tbbtest.py:8)" at tbbtest.py (8)

Full output of numba -s:

__Time Stamp__
Report started (local time)                   : 2020-08-11 09:53:47.260933
UTC start time                                : 2020-08-11 07:53:47.261020
Running time (s)                              : 0.497355

__Hardware Information__
Machine                                       : x86_64
CPU Name                                      : skylake
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 bmi bmi2
                                                clflushopt cmov cx16 cx8 f16c fma
                                                fsgsbase fxsr invpcid lzcnt mmx
                                                movbe mpx pclmul popcnt prfchw
                                                rdrnd rdseed sahf sgx sse sse2
                                                sse3 sse4.1 sse4.2 ssse3 xsave
                                                xsavec xsaveopt xsaves

Memory Total (MB)                             : 32065
Memory Available (MB)                         : 27934

__OS Information__
Platform Name                                 : Linux-5.4.0-42-generic-x86_64-with-glibc2.29
Platform Release                              : 5.4.0-42-generic
OS Name                                       : Linux
OS Version                                    : #46-Ubuntu SMP Fri Jul 10 00:24:02 UTC 2020
OS Specific Version                           : ?
Libc Version                                  : glibc 2.31

__Python Information__
Python Compiler                               : GCC 9.3.0
Python Implementation                         : CPython
Python Version                                : 3.8.2
Python Locale                                 : en_GB.UTF-8

__LLVM Information__
LLVM Version                                  : 9.0.1

__CUDA Information__
CUDA Device Initialized                       : True
CUDA Driver Version                           : 11000
CUDA Detect Output:
Found 1 CUDA devices
id 0     b'GeForce GTX 1070'                              [SUPPORTED]
                      compute capability: 6.1
                           pci device id: 0
                              pci bus id: 1
Summary:
	1/1 devices are supported

CUDA Librairies Test Output:
Finding cublas from System
	named  libcublas.so.11.1.0.229
	trying to open library...	ok
Finding cusparse from System
	named  libcusparse.so.11.1.0.218
	trying to open library...	ok
Finding cufft from System
	named  libcufft.so.10.2.0.218
	trying to open library...	ok
Finding curand from System
	named  libcurand.so.10.2.1.218
	trying to open library...	ok
Finding nvvm from System
	named  libnvvm.so.3.3.0
	trying to open library...	ok
Finding libdevice from System
	searching for compute_20...	ok
	searching for compute_30...	ok
	searching for compute_35...	ok
	searching for compute_50...	ok


__ROC information__
ROC Available                                 : False
ROC Toolchains                                : None
HSA Agents Count                              : 0
HSA Agents:
None
HSA Discrete GPUs Count                       : 0
HSA Discrete GPUs                             : None

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

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

__Numba Environment Variable Information__
None found.

__Conda Information__
Conda not available.

__Installed Packages__
Package                         Version                                      Location
------------------------------- -------------------------------------------- ----------------------------------------------
addict                          2.2.1
aioconsole                      0.2.1
aiohttp                         3.6.2
aiohttp-jinja2                  1.2.0
aiokatcp                        0.8.1.dev265+master.ebd139e                  /home/bmerry/work/sdp/git/aiokatcp
aiomonitor                      0.4.5
aioredis                        1.3.1
aioresponses                    0.6.4
aiozk                           0.26.0
alabaster                       0.7.12
ansible                         2.9.11
ansicolors                      1.1.8
APLpy                           2.0.3
appdirs                         1.4.3
argon2-cffi                     20.1.0
astLib                          0.11.4
astro-kittens                   1.4.3
astro-tigger                    1.5.0
astro-tigger-lsm                1.6.0
astroid                         2.4.2
astropy                         4.0.1.post1
astropy-healpix                 0.5
async-timeout                   3.0.1
asynctest                       0.13.0
attrs                           19.3.0
Babel                           2.8.0
backcall                        0.2.0
bcrypt                          3.1.7
bleach                          3.1.5
bokeh                           2.1.1
boto                            2.49.0
botocore                        1.17.38
breathe                         4.19.2
Brotli                          1.0.7
CacheControl                    0.12.6
cached-property                 1.5.1
certifi                         2019.11.28
cffi                            1.14.1
cfgv                            3.2.0
chardet                         3.0.4
cityhash                        0.2.3.post9
click                           7.1.2
cloudpickle                     1.5.0
colorama                        0.4.3
configparser                    5.0.0
contextlib2                     0.6.0
coverage                        5.2.1
cryptography                    3.0
cycler                          0.10.0
Cython                          0.29.21
dash                            1.14.0
dash-core-components            1.10.2
dash-dangerously-set-inner-html 0.0.2
dash-html-components            1.0.3
dash-renderer                   1.6.0
dash-table                      4.9.0
dask                            2.22.0
decorator                       4.4.2
defusedxml                      0.6.0
distlib                         0.3.1
distributed                     2.22.0
distro                          1.5.0
docker                          4.2.2
docker-compose                  1.26.2
dockerpty                       0.4.1
docopt                          0.6.2
docutils                        0.15.2
entrypoints                     0.3
ephem                           3.7.7.0
fakeredis                       1.4.2
filelock                        3.0.12
flake8                          3.8.3
Flask                           1.1.2
Flask-Compress                  1.5.0
future                          0.18.2
graphviz                        0.14.1
h5py                            2.10.0
HeapDict                        1.0.1
hiredis                         1.1.0
html5lib                        1.0.1
http-parser                     0.9.0
humanfriendly                   8.2
identify                        1.4.25
idna                            2.8
imageio                         2.9.0
imagesize                       1.2.0
iniconfig                       1.0.1
ipaddr                          2.2.0
ipdb                            0.13.3
ipdbplugin                      1.5.0
ipykernel                       5.3.4
ipython                         7.17.0
ipython-genutils                0.2.0
ipywidgets                      7.5.1
isort                           4.3.21
itsdangerous                    1.1.0
jedi                            0.17.2
jeepney                         0.4.3
Jinja2                          2.11.2
jmespath                        0.10.0
joblib                          0.16.0
jsonschema                      3.2.0
jupyter                         1.0.0
jupyter-client                  6.1.6
jupyter-console                 6.1.0
jupyter-core                    4.6.3
katcbfsim                       0.1.dev372+master.139cf02                    /home/bmerry/work/sdp/git/katcbfsim
katdal                          0.16.dev1411+master.4898eaf                  /home/bmerry/work/sdp/git/katdal
katpoint                        0.10.dev454+master.65f7a18                   /home/bmerry/work/sdp/git/katpoint
katportalclient                 0.2.2
katsdpcal                       0.1.dev1625+master.72cd55c                   /home/bmerry/work/sdp/git/katsdpcal
katsdpcontroller                0.1.dev2163+master.57f0782                   /home/bmerry/work/sdp/git/katsdpcontroller
katsdpdatawriter                0.1.dev246+master.f4bc4ff                    /home/bmerry/work/sdp/git/katsdpdatawriter
katsdpimager                    1.4.dev881+profiling.ffa79ba8                /home/bmerry/work/sdp/git/katsdpimager
katsdpingest                    0.1.dev1722+no.telstate.delays.9d84381.dirty /home/bmerry/work/sdp/git/katsdpingest
katsdpmetawriter                0.1.dev91+master.b2e5d22                     /home/bmerry/work/sdp/git/katsdpmetawriter/src
katsdpmodels                    0.1.dev122+master.0431f9b                    /home/bmerry/work/sdp/git/katsdpmodels/src
katsdpservices                  1.1.dev106+telstate.endpoint.55198aa         /home/bmerry/work/sdp/git/katsdpservices
katsdpsigproc                   1.2.dev724+master.e55b1b0                    /home/bmerry/work/sdp/git/katsdpsigproc
katsdptelstate                  0.11.dev519+memory.monitor.93dc68d           /home/bmerry/work/sdp/git/katsdptelstate
katversion                      1.1
kazoo                           2.8.0
keyring                         21.3.0
kiwisolver                      1.2.0
lazy-object-proxy               1.4.3
linecache2                      1.0.0
llvmlite                        0.33.0
lockfile                        0.12.2
lupa                            1.9
Mako                            1.1.3
manhole                         1.6.0
MarkupSafe                      1.1.1
matplotlib                      3.3.0
mccabe                          0.6.1
mistune                         0.8.4
mock                            4.0.2
more-itertools                  8.4.0
msgpack                         0.6.2
multidict                       4.7.6
mypy                            0.782
mypy-extensions                 0.4.3
nbconvert                       5.6.1
nbformat                        5.0.7
netifaces                       0.10.9
networkx                        2.4
nodeenv                         1.4.0
nose                            1.3.7
nose-ignore-docstring           0.2
notebook                        6.1.1
ntsh                            1.1
numba                           0.50.1
numpy                           1.19.1
omnijson                        0.1.2
open-mock-file                  1.0.2
packaging                       20.3
pandas                          1.1.0
pandocfilters                   1.4.2
paramiko                        2.7.1
parso                           0.7.1
pep517                          0.8.2
pexpect                         4.8.0
pickleshare                     0.7.5
Pillow                          7.2.0
pip                             20.2.1
pkg-resources                   0.0.0
pkgconfig                       1.5.1
pkginfo                         1.5.0.1
plotly                          4.9.0
pluggy                          0.13.1
pre-commit                      2.6.0
progress                        1.5
prometheus-async                19.2.0
prometheus-client               0.3.1
prompt-toolkit                  3.0.5
psutil                          5.7.2
ptyprocess                      0.6.0
py                              1.9.0
py3nvml                         0.2.6
PyAVM                           0.9.5
pybind11                        2.5.0
pycodestyle                     2.6.0
pycparser                       2.20
pycuda                          2019.1.2
pydotplus                       2.0.2
pyephem                         3.7.7.0
pyflakes                        2.2.0
pygelf                          0.3.6
Pygments                        2.6.1
PyJWT                           1.7.1
pylint                          2.5.3
pymesos                         0.3.15
PyNaCl                          1.4.0
pyopencl                        2020.2
pyparsing                       2.4.6
pyregion                        2.0
pyrsistent                      0.16.0
pytest                          6.0.1
pytest-asyncio                  0.14.0
pytest-cov                      2.10.0
pytest-forked                   1.3.0
pytest-mock                     3.2.0
python-casacore                 3.3.1
python-dateutil                 2.8.1
python-dotenv                   0.14.0
python-lzf                      0.2.4
pytoml                          0.1.21
pytools                         2020.3.1
pytz                            2020.1
PyWavelets                      1.1.1
PyYAML                          5.3.1
pyzmq                           19.0.2
qtconsole                       4.7.5
QtPy                            1.9.0
rdbtools                        0.1.15
readme-renderer                 26.0
redis                           3.5.3
reproject                       0.7.1
requests                        2.22.0
requests-toolbelt               0.9.1
responses                       0.10.16
retrying                        1.3.3
rfc3986                         1.4.0
rfc3987                         1.3.8
scikit-cuda                     0.5.3
scikit-image                    0.17.2
scikits.fitting                 0.7
scipy                           1.5.2
SecretStorage                   3.1.2
Send2Trash                      1.5.0
setuptools                      49.2.1
setuptools-git                  1.2
Shapely                         1.7.0
six                             1.14.0
snowballstemmer                 2.0.0
sortedcontainers                2.2.2
spead2                          2.1.1                                        /home/bmerry/work/sdp/git/spead2
Sphinx                          3.1.2
sphinx-rtd-theme                0.5.0
sphinxcontrib-applehelp         1.0.2
sphinxcontrib-devhelp           1.0.2
sphinxcontrib-htmlhelp          1.0.3
sphinxcontrib-jsmath            1.0.1
sphinxcontrib-qthelp            1.0.3
sphinxcontrib-serializinghtml   1.1.4
SQLAlchemy                      1.3.18
strict-rfc3339                  0.7
tbb                             2020.0.133
tblib                           1.7.0
terminado                       0.8.3
terminaltables                  3.1.0
testpath                        0.4.4
texttable                       1.6.2
tifffile                        2020.7.24
toml                            0.10.1
toolz                           0.10.0
tornado                         6.0.4
tqdm                            4.48.2
traceback2                      1.4.0
traitlets                       4.3.3
twine                           3.2.0
typed-ast                       1.4.1
typing-extensions               3.7.4.2
ujson                           3.1.0
unittest2                       1.1.0
urllib3                         1.25.10
virtualenv                      20.0.30
wcwidth                         0.2.5
webencodings                    0.5.1
websocket-client                0.57.0
Werkzeug                        1.0.1
wheel                           0.34.2
widgetsnbextension              3.5.1
wrapt                           1.12.1
xmltodict                       0.12.0
yarl                            1.5.1
zict                            2.0.0

No errors reported.


__Warning log__
Warning (roc): Error initialising ROC: No ROC toolchains found.
Warning (roc): No HSA Agents found, encountered exception when searching: Error at driver init: 
NUMBA_HSA_DRIVER /opt/rocm/lib/libhsa-runtime64.so is not a valid file path.  Note it must be a filepath of the .so/.dll/.dylib or the driver:
Warning: Conda not available.
 Error was [Errno 2] No such file or directory: 'conda'

Issue Analytics

  • State:open
  • Created 3 years ago
  • Reactions:1
  • Comments:13 (13 by maintainers)

github_iconTop GitHub Comments

1reaction
sklamcommented, Aug 11, 2020

@bmerry can you try to pip install numba==0.51.0rc1? pip defaults to avoid pre-releases.

0reactions
esccommented, Aug 20, 2020

It seems like we may be leaving this open. I will pro-actively move it out of the 0.51.0 milestone, so that the milestone can be closed.

Read more comments on GitHub >

github_iconTop Results From Across the Web

trouble linking INTEL tbb library - c++ - Stack Overflow
1 Answer 1 · Download the Intel libraries from here · Extract the folder and rename it to tbb · Move that folder...
Read more >
Could not determine path to TBB libraries - Intel Communities
Try to open developer command prompt for Visual Studio (see "To open a Developer Command Prompt window" section), run tbbvars.bat and then run ......
Read more >
tbb.dll free download - DLL‑files.com
Download tbb.dll below to solve your dll problem. ... The program can't start because tbb.dll is missing from your computer. ... Error loading...
Read more >
Error loading prophet library in R - How can I fix it?
Try Homebrew tbb package. This assumes you have homebrew installed. There is a homebrew tbb package and I think that gets installed from...
Read more >
Tridion ECL provider package referenced in a TBB : Could not ...
And of course we have the following error : Could not load file or assembly 'KeepeekProvider, Version=1.0.0.0, Culture=neutral, PublicKeyToken= ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found