Trouble getting CUDA Core Compute Libraries to work with Python

This is not directly about Numba—please forgive me. I thought maybe somebody using Numba would know the answer.

I’m trying to use CCCL with Numba. I’ve installed. the Python package using

pip install ‘cuda-cccl[cu12]’

because I am running Cuda 12.4. The install seems to work, and I can import stuff in the module from Python. I have tried some of the example programs provided at the CCCL github site. Some work, e.g. merge_sort_basic.py. However, for most (e.g. scans and reductions and unary transform), I get an error message

EXCEPTION in cccl_device_scan_build(): nvJitLink error: 6
EXCEPTION in cccl_device_scan_cleanup(): CUDA error: invalid resource handle
Return code 999 encountered during scan result cleanup

I would greatly appreciate advice/guidance.

I suspect there’s some inconsistency in the versions of packages installed in your environment - can you run

numba -s

and provide the output here please?

Thank you for your reply. I suspect you are right. Trying it on a completely different system succeeded.

% numba -s

System info:

<frozen importlib.\_bootstrap_external>:1301: FutureWarning: The cuda.cuda module is deprecated and will be removed in a future release, please switch to use the cuda.bindings.driver module instead.

\--------------------------------------------------------------------------------

\__Time Stamp_\_

Report started (local time)                   : 2025-11-28 03:32:54.100903

UTC start time                                : 2025-11-28 03:32:54.100922

Running time (s)                              : 3.321332

\__Hardware Information_\_

Machine                                       : x86_64

CPU Name                                      : broadwell

CPU Count                                     : 32

Number of accessible CPUs                     : 32

List of accessible CPUs cores                 : 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31

CFS Restrictions (CPUs worth of runtime)      : None

CPU Features                                  : 64bit adx aes avx avx2 bmi bmi2

                                                cmov crc32 cx16 cx8 f16c fma

                                                fsgsbase fxsr invpcid lzcnt mmx

                                                movbe pclmul popcnt prfchw rdrnd

                                                rdseed rtm sahf sse sse2 sse3

                                                sse4.1 sse4.2 ssse3 xsave xsaveopt

Memory Total (MB)                             : 245609

Memory Available (MB)                         : 239303

\__OS Information_\_

Platform Name                                 : Linux-5.10.245-241.976.amzn2int.x86_64-x86_64-with-glibc2.26

Platform Release                              : 5.10.245-241.976.amzn2int.x86_64

OS Name                                       : Linux

OS Version                                    : #1 SMP Tue Oct 21 22:10:53 UTC 2025

OS Specific Version                           : ?

Libc Version                                  : glibc 2.26

\__Python Information_\_

Python Compiler                               : Clang 20.1.4 

Python Implementation                         : CPython

Python Version                                : 3.12.11

Python Locale                                 : en_US.UTF-8

\__Numba Toolchain Versions_\_

Numba Version                                 : 0.62.1

llvmlite Version                              : 0.45.1

\__LLVM Information_\_

LLVM Version                                  : 20.1.8

\__CUDA Information_\_

CUDA Target Implementation                    : NVIDIA

CUDA Device Initialized                       : True

CUDA Driver Version                           : 12.4

CUDA Runtime Version                          : 12.9

CUDA NVIDIA Bindings Available                : True

CUDA NVIDIA Bindings In Use                   : True

CUDA Minor Version Compatibility Available    : False

CUDA Minor Version Compatibility Needed       : True

CUDA Minor Version Compatibility In Use       : False

CUDA Detect Output:

Found 4 CUDA devices

id 0    b'Tesla V100-SXM2-16GB'                              \[SUPPORTED\]

                      Compute Capability: 7.0

                           PCI Device ID: 27

                              PCI Bus ID: 0

                                    UUID: GPU-59ece125-ee15-e3c4-d471-697ba4477c4d

                                Watchdog: Disabled

             FP32/FP64 Performance Ratio: 2

id 1    b'Tesla V100-SXM2-16GB'                              \[SUPPORTED\]

                      Compute Capability: 7.0

                           PCI Device ID: 28

                              PCI Bus ID: 0

                                    UUID: GPU-cac4f6d8-88f3-c02a-9466-e0579357fec8

                                Watchdog: Disabled

             FP32/FP64 Performance Ratio: 2

id 2    b'Tesla V100-SXM2-16GB'                              \[SUPPORTED\]

                      Compute Capability: 7.0

                           PCI Device ID: 29

                              PCI Bus ID: 0

                                    UUID: GPU-be80128a-105f-01d8-4f40-f1d3700e97e9

                                Watchdog: Disabled

             FP32/FP64 Performance Ratio: 2

id 3    b'Tesla V100-SXM2-16GB'                              \[SUPPORTED\]

                      Compute Capability: 7.0

                           PCI Device ID: 30

                              PCI Bus ID: 0

                                    UUID: GPU-802f3d8a-3ab9-b18c-3acf-d2490c6f0fd1

                                Watchdog: Disabled

             FP32/FP64 Performance Ratio: 2

Summary:

4/4 devices are supported

CUDA Libraries Test Output:

Finding driver from candidates:

libcuda.so

libcuda.so.1

/usr/lib/libcuda.so

/usr/lib/libcuda.so.1

/usr/lib64/libcuda.so

/usr/lib64/libcuda.so.1

Using loader <class 'ctypes.CDLL'>

Trying to load driver... ok

Loaded from libcuda.so

Mapped libcuda.so paths:

/usr/lib64/libcuda.so.550.144.03

Finding nvvm from NVIDIA NVCC Wheel

Located at /local/home/pnklein/programming/nonbrazil/myenv/lib/python3.12/site-packages/nvidia/cuda_nvcc/nvvm/lib64/libnvvm.so

Trying to open library... ok

Finding nvrtc from NVIDIA NVCC Wheel

Located at /local/home/pnklein/programming/nonbrazil/myenv/lib/python3.12/site-packages/nvidia/cuda_nvrtc/lib/libnvrtc.so.12

Trying to open library... ok

Finding cudadevrt from NVIDIA NVCC Wheel

Located at /local/home/pnklein/programming/nonbrazil/myenv/lib/python3.12/site-packages/nvidia/cuda_runtime/lib/libcudadevrt.a

Checking library... ok

Finding libdevice from NVIDIA NVCC Wheel

Located at /local/home/pnklein/programming/nonbrazil/myenv/lib/python3.12/site-packages/nvidia/cuda_nvcc/nvvm/libdevice/libdevice.10.bc

Checking library... ok

Include directory configuration variable:

CUDA_INCLUDE_PATH=/usr/local/cuda/include

Finding include directory from NVIDIA NVCC Wheel

Located at /local/home/pnklein/programming/nonbrazil/myenv/lib/python3.12/site-packages/nvidia/cuda_runtime/include

Checking include directory... ok

\__NumPy Information_\_

NumPy Version                                 : 2.3.4

NumPy Supported SIMD features                 : ('MMX', 'SSE', 'SSE2', 'SSE3', 'SSSE3', 'SSE41', 'POPCNT', 'SSE42', 'AVX', 'F16C', 'FMA3', 'AVX2')

NumPy Supported SIMD dispatch                 : ('SSSE3', 'SSE41', 'POPCNT', 'SSE42', 'AVX', 'F16C', 'FMA3', 'AVX2', 'AVX512F', 'AVX512CD', 'AVX512_KNL', 'AVX512_KNM', 'AVX512_SKX', 'AVX512_CNL')

NumPy Supported SIMD baseline                 : ('SSE', 'SSE2', 'SSE3')

NumPy AVX512_SKX support detected             : False

\__SVML Information_\_

SVML State, config.USING_SVML                 : False

SVML Library Loaded                           : False

llvmlite Using SVML Patched LLVM              : False

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 not available.

\__Installed Packages_\_

Package                  Version

\------------------------ -----------

airium                   0.2.7

annotated-types          0.7.0

boto3                    1.40.74

botocore                 1.40.74

cuda-bindings            12.9.4

cuda-cccl                0.3.4

cuda-core                0.4.2

cuda-pathfinder          1.3.2

cuda-python              12.9.4

cuda-toolkit             12.9.1

cupy-cuda12x             13.6.0

Cython                   3.2.1

docstring_parser         0.17.0

duckdb                   1.4.2

fastrlock                0.8.3

iniconfig                2.3.0

jmespath                 1.0.1

llvmlite                 0.45.1

mypy_extensions          1.1.0

narwhals                 2.11.0

numba                    0.62.1

numba-cuda               0.20.1

numpy                    2.3.4

nvidia-cuda-cccl-cu12    12.9.27

nvidia-cuda-nvcc-cu12    12.9.86

nvidia-cuda-nvrtc-cu12   12.9.86

nvidia-cuda-runtime-cu12 12.9.79

nvidia-nvjitlink-cu12    12.9.86

packaging                25.0

pandas                   2.3.3

pip                      25.3

plotly                   6.4.0

pluggy                   1.6.0

psutil                   7.1.3

pyarrow                  20.0.0

pydantic                 2.12.4

pydantic_core            2.41.5

Pygments                 2.19.2

pytest                   9.0.1

python-dateutil          2.9.0.post0

pytz                     2025.2

PyYAML                   6.0.3

s3transfer               0.14.0

schema                   0.7.8

setuptools               80.9.0

six                      1.17.0

typed-argument-parser    1.11.0

typing_extensions        4.15.0

typing-inspect           0.9.0

typing-inspection        0.4.2

tzdata                   2025.2

urllib3                  2.5.0

No errors reported.

\__Warning log_\_

Warning: Conda not available.

 Error was \[Errno 2\] No such file or directory: 'conda'

I can’t see anything wrong with the versions in the numba -s output you have provided - is that from the working machine?

That is from the machine where things are not working.