Error at driver init: Call to cuInit results in UNKNOWN_CUDA_ERROR (-1)

Hi ,
I am beginner in CUDA. I want to find polar cordinate for millions of points.
I am using the below code:
vectorize([‘float32(float32, float32)’],target=‘cuda’)
def gpu_arctan2(y, x):
theta = math.atan2(y,x)
return theta
But it is failing with an error message
File “/home/g600523/.conda/envs/env_tf_gpu/lib/python3.9/site-packages/numba/cuda/cudadrv/driver.py”, line 258, in ensure_initialized
raise CudaSupportError(f"Error at driver init: {description}")
numba.cuda.cudadrv.error.CudaSupportError: Error at driver init: Call to cuInit results in UNKNOWN_CUDA_ERROR (-1)

I am having CUDA version 11.7.
Here is the output for numba -s
(env_tf_gpu) numba -s
System info:

Time Stamp
Report started (local time) : 2023-11-14 15:20:34.244004
UTC start time : 2023-11-14 09:50:34.244030
Running time (s) : 6.599611

Hardware Information
Machine : x86_64
CPU Name : icelake-server
CPU Count : 64
Number of accessible CPUs : 32
List of accessible CPUs cores : 0-63
CFS Restrictions (CPUs worth of runtime) : None

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

Memory Total (MB) : 515619
Memory Available (MB) : 496690

OS Information
Platform Name : Linux-3.10.0-1160.el7.x86_64-x86_64-with-glibc2.17
Platform Release : 3.10.0-1160.el7.x86_64
OS Name : Linux
OS Version : #1 SMP Mon Oct 19 16:18:59 UTC 2020
OS Specific Version : ?
Libc Version : glibc 2.17

Python Information
Python Compiler : GCC 11.2.0
Python Implementation : CPython
Python Version : 3.9.18
Python Locale : en_IN.ISO8859-1

Numba Toolchain Versions
Numba Version : 0.58.1
llvmlite Version : 0.41.1

LLVM Information
LLVM Version : 14.0.6

CUDA Information
CUDA Device Initialized : False
CUDA Driver Version : ?
CUDA Runtime Version : ?
CUDA NVIDIA Bindings Available : ?
CUDA NVIDIA Bindings In Use : ?
CUDA Minor Version Compatibility Available : ?
CUDA Minor Version Compatibility Needed : ?
CUDA Minor Version Compatibility In Use : ?
CUDA Detect Output:
None
CUDA Libraries Test Output:
None

NumPy Information
NumPy Version : 1.26.2
NumPy Supported SIMD features : (‘MMX’, ‘SSE’, ‘SSE2’, ‘SSE3’, ‘SSSE3’, ‘SSE41’, ‘POPCNT’, ‘SSE42’, ‘AVX’, ‘F16C’, ‘FMA3’, ‘AVX2’, ‘AVX512F’, ‘AVX512CD’, ‘AVX512VPOPCNTDQ’, ‘AVX512VL’, ‘AVX512BW’, ‘AVX512DQ’, ‘AVX512VNNI’, ‘AVX512IFMA’, ‘AVX512VBMI’, ‘AVX512VBMI2’, ‘AVX512BITALG’, ‘AVX512_SKX’, ‘AVX512_CLX’, ‘AVX512_CNL’, ‘AVX512_ICL’)
NumPy Supported SIMD dispatch : (‘SSSE3’, ‘SSE41’, ‘POPCNT’, ‘SSE42’, ‘AVX’, ‘F16C’, ‘FMA3’, ‘AVX2’, ‘AVX512F’, ‘AVX512CD’, ‘AVX512_KNL’, ‘AVX512_KNM’, ‘AVX512_SKX’, ‘AVX512_CLX’, ‘AVX512_CNL’, ‘AVX512_ICL’)
NumPy Supported SIMD baseline : (‘SSE’, ‘SSE2’, ‘SSE3’)
NumPy AVX512_SKX support detected : True

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 : False
±-> Disabled due to Unknown import problem.
OpenMP Threading Layer Available : True
±->Vendor: GNU
Workqueue Threading Layer Available : True
±->Workqueue imported successfully.

Numba Environment Variable Information
None found.

Conda Information
Conda Build : 3.22.0
Conda Env : 22.9.0
Conda Platform : linux-64
Conda Python Version : 3.9.7.final.0
Conda Root Writable : False

Installed Packages
_libgcc_mutex 0.1 main
_openmp_mutex 5.1 1_gnu
absl-py 2.0.0 pypi_0 pypi
astunparse 1.6.3 pypi_0 pypi
ca-certificates 2023.08.22 h06a4308_0
cachetools 5.3.2 pypi_0 pypi
certifi 2023.7.22 pypi_0 pypi
charset-normalizer 3.3.2 pypi_0 pypi
contourpy 1.2.0 pypi_0 pypi
cycler 0.12.1 pypi_0 pypi
flatbuffers 23.5.26 pypi_0 pypi
fonttools 4.44.0 pypi_0 pypi
gast 0.5.4 pypi_0 pypi
google-auth-oauthlib 1.0.0 pypi_0 pypi
google-pasta 0.2.0 pypi_0 pypi
grpcio 1.59.2 pypi_0 pypi
h5py 3.10.0 pypi_0 pypi
idna 3.4 pypi_0 pypi
importlib-metadata 6.8.0 pypi_0 pypi
importlib-resources 6.1.1 pypi_0 pypi
keras 2.14.0 pypi_0 pypi
kiwisolver 1.4.5 pypi_0 pypi
ld_impl_linux-64 2.38 h1181459_1
libclang 16.0.6 pypi_0 pypi
libffi 3.4.4 h6a678d5_0
libgcc-ng 11.2.0 h1234567_1
libgomp 11.2.0 h1234567_1
libstdcxx-ng 11.2.0 h1234567_1
llvmlite 0.41.1 pypi_0 pypi
markdown 3.5.1 pypi_0 pypi
markupsafe 2.1.3 pypi_0 pypi
matplotlib 3.8.1 pypi_0 pypi
ml-dtypes 0.2.0 pypi_0 pypi
ncurses 6.4 h6a678d5_0
numba 0.58.1 pypi_0 pypi
numpy 1.26.2 pypi_0 pypi
nvidia-cublas-cu11 11.11.3.6 pypi_0 pypi
nvidia-cuda-cupti-cu11 11.8.87 pypi_0 pypi
nvidia-cuda-nvcc-cu11 11.8.89 pypi_0 pypi
nvidia-cuda-runtime-cu11 11.8.89 pypi_0 pypi
nvidia-cudnn-cu11 8.7.0.84 pypi_0 pypi
nvidia-cufft-cu11 10.9.0.58 pypi_0 pypi
nvidia-curand-cu11 10.3.0.86 pypi_0 pypi
nvidia-cusolver-cu11 11.4.1.48 pypi_0 pypi
nvidia-cusparse-cu11 11.7.5.86 pypi_0 pypi
nvidia-nccl-cu11 2.16.5 pypi_0 pypi
oauthlib 3.2.2 pypi_0 pypi
openssl 3.0.12 h7f8727e_0
opt-einsum 3.3.0 pypi_0 pypi
packaging 23.2 pypi_0 pypi
pillow 10.1.0 pypi_0 pypi
pip 23.3 py39h06a4308_0
protobuf 4.25.0 pypi_0 pypi
pyasn1 0.5.0 pypi_0 pypi
pyasn1-modules 0.3.0 pypi_0 pypi
pyparsing 3.1.1 pypi_0 pypi
python 3.9.18 h955ad1f_0
python-dateutil 2.8.2 pypi_0 pypi
readline 8.2 h5eee18b_0
requests 2.31.0 pypi_0 pypi
requests-oauthlib 1.3.1 pypi_0 pypi
rsa 4.9 pypi_0 pypi
setuptools 68.0.0 py39h06a4308_0
six 1.16.0 pypi_0 pypi
sqlite 3.41.2 h5eee18b_0
tensorboard 2.14.1 pypi_0 pypi
tensorboard-data-server 0.7.2 pypi_0 pypi
tensorflow 2.14.0 pypi_0 pypi
tensorflow-estimator 2.14.0 pypi_0 pypi
tensorflow-io-gcs-filesystem 0.34.0 pypi_0 pypi
tensorrt 8.5.3.1 pypi_0 pypi
termcolor 2.3.0 pypi_0 pypi
tk 8.6.12 h1ccaba5_0
typing-extensions 4.8.0 pypi_0 pypi
tzdata 2023c h04d1e81_0
urllib3 2.1.0 pypi_0 pypi
werkzeug 3.0.1 pypi_0 pypi
wheel 0.41.2 py39h06a4308_0
wrapt 1.14.1 pypi_0 pypi
xz 5.4.2 h5eee18b_0
zipp 3.17.0 pypi_0 pypi
zlib 1.2.13 h5eee18b_0

No errors reported.

Warning log
Warning (cuda): CUDA device initialisation problem. Message:Error at driver init: Call to cuInit results in UNKNOWN_CUDA_ERROR (-1)
Exception class: <class ‘numba.cuda.cudadrv.error.CudaSupportError’>
Warning (psutil): psutil cannot be imported. For more accuracy, consider installing it.

If requested, please copy and paste the information between
the dashed (----) lines, or from a given specific section as
appropriate.

=============================================================
IMPORTANT: Please ensure that you are happy with sharing the
contents of the information present, any information that you
wish to keep private you should remove before sharing.

(env_tf_gpu)

Surprisingly, if I use,
jit(target_backend=‘cuda’) it is working for a simple function like addition, but even jit is also failing for finding Polar cordinate.

@dguhanus thank you for your post. May I suggest to reformat the post to use synatx highlighting. You can find more information about it here: