LinkerError: [222] Call to cuLinkAddData results in UNKNOWN_CUDA_ERROR

I am getting the LinkerError when trying to use Numba. I have originally posted my problem at Call to cuLinkAddData results in UNKNOWN_CUDA_ERROR · Issue #7006 · numba/numba · GitHub (today’s comment) where I have received advice on how to proceed.

I have followed the advice and installed 11.0 toolkit version & set the $CUDA_HOME environmental variable to /usr/local/cuda-11.0/. However, when I checked the output of numba -s, it was still trying to get the 11.3 cuda toolkit instead of 11.0:

CUDA Libraries Test Output:
Finding nvvm from System
named libnvvm.so.4.0.0
trying to open library… ok
Finding cudart from System
named libcudart.so.11.3.58
trying to open library… ok
Finding cudadevrt from System
named libcudadevrt.a
Finding libdevice from System
searching for compute_20… ok
searching for compute_30… ok
searching for compute_35… ok
searching for compute_50… ok

So, I have tried to move 11.3 driver somewhere else so it is not on the path. The result is:

CUDA Libraries Test Output:
Finding nvvm from <unknown>
        named  libnvvm.so
        trying to open library...       ERROR: failed to open nvvm:
libnvvm.so: cannot open shared object file: No such file or directory
Finding cudart from <unknown>
        named  libcudart.so
        trying to open library...       ok
Finding cudadevrt from <unknown>
        named  libcudadevrt.a
        ERROR: failed to find cudadevrt:
libcudadevrt.a not found
Finding libdevice from <unknown>
        searching for compute_20...     ERROR: can't open libdevice for compute_20
        searching for compute_30...     ERROR: can't open libdevice for compute_30
        searching for compute_35...     ERROR: can't open libdevice for compute_35
        searching for compute_50...     ERROR: can't open libdevice for compute_50

When I try to run !numba -s in Jupyterlab cells where I am working, I get the expected output:

CUDA Libraries Test Output:
Finding nvvm from CUDA_HOME
	named  libnvvm.so.3.3.0
	trying to open library...	ok
Finding cudart from CUDA_HOME
	named  libcudart.so.11.0.221
	trying to open library...	ok
Finding cudadevrt from CUDA_HOME
	named  libcudadevrt.a
Finding libdevice from CUDA_HOME
	searching for compute_20...	ok
	searching for compute_30...	ok
	searching for compute_35...	ok
	searching for compute_50...	ok

But it does not work outside of the Jupyterlab.

Moreover, when (in Jupyterlab) I am calling the function which uses Numba, the LinkedError persists, indicating that it is not using 11.0 version as expected.

What can be done about it? Thank you for any help.

The output from the terminal appears as though Numba still isn’t seeing the environment variable there.

If you run

CUDA_HOME=/usr/local/cuda-11.0 numba -s

on the terminal, does it then find the CUDA 11.0 libraries? (if not, can you paste the complete output here please?)