No accelerators found

Hi,

My CUDA installation does not recognize the Tesla P4 card. Here is the output for nvaccelinfo -v

$ nvaccelinfo -v

NVRM version:                  NVIDIA UNIX x86_64 Kernel Module  535.104.05  Sat Aug 19 01:15:15 UTC 2023
could not initialize CUDA runtime, error code=34
No accelerators found.
Check the permissions on your CUDA device

nvidia-smi does recognize the correct card. nvaccelinfo -v, however, doesn’t.

As per the advice in one of the prior posts, I have blacklisted nouveau and set LD_LIBRARY_PATH so that libcuda.so may be found

$ echo $LD_LIBRARY_PATH 
/usr/local/cuda-12.2/lib64:/opt/nvidia/hpc_sdk/Linux_x86_64/23.7/REDIST/cuda/12.2/targets/x86_64-linux/lib/stubs:/opt/nvidia/hpc_sdk/Linux_x86_64/23.7/cuda/12.2/targets/x86_64-linux/lib/stubs

I have installed the NVIDIA driver, CUDA Toolkit and the HPC SDK

$ nvcc --version
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2023 NVIDIA Corporation
Built on Tue_Aug_15_22:02:13_PDT_2023
Cuda compilation tools, release 12.2, V12.2.140
Build cuda_12.2.r12.2/compiler.33191640_0

$ inxi -G
Graphics:
  Device-1: NVIDIA GP104GL [Tesla P4] driver: nvidia v: 535.104.05
  Device-2: Matrox Systems G200eR2 driver: mgag200 v: kernel
  Display: server: X.Org v: 1.21.1.4 driver: X: loaded: modesetting,nvidia
    unloaded: fbdev,nouveau,vesa gpu: mgag200 resolution: 2048x1152~60Hz
  OpenGL: renderer: N/A v: N/A

Any ideas?

Cheers,
Jyoti

You’re correct in that the issue is likely that our runtime can’t find the CUDA driver (libcuda.so). However libcuda.so is a separate install and not part of the CUDA or NVHPC SDKs.

By default it usually gets install in “/usr/lib64”, but you’ll need to look where it’s installed on your system and set LD_LIBRARY_PATH appropriately.

If you can’t find it, then the CUDA driver may not be installed. You can download it at: Official Drivers | NVIDIA

Hope this helps,
Mat

Hi Mat,

Thanks for the help. As you said libcuda.so was in “/usr/lib/x86_64-linux-gnu/” and setting LD_LIBRARY_PATH to that fixed it. Previously I was setting it to “/opt/nvidia/hpc_sdk/Linux_x86_64/23.7/cuda/12.2/targets/x86_64-linux/lib/stubs”.

Cheers,
Jyoti

Ah, the stub libraries are only there so folks can link CUDA binaries on systems without a GPU or CUDA driver installed. To run, a real CUDA driver is needed.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.