CUDA运行时API错误38:未检测到支持CUDA的设备 [英] CUDA Runtime API error 38: no CUDA-capable device is detected
问题描述
情况
我有一个2 gpu服务器(Ubuntu 12.04),我用GTX 670切换Tesla C1060。安装了CUDA 5.0以上的4.2。之后,我编译所有示例execpt为simpleMPI没有错误。但是当我运行 ./ devicequery
时,我收到以下错误信息:
I have a 2 gpu server (Ubuntu 12.04) where I switched a Tesla C1060 with a GTX 670. Than I installed CUDA 5.0 over the 4.2. Afterwards I compiled all examples execpt for simpleMPI without error. But when I run ./devicequery
I get following error message:
foo@bar-serv2:~/NVIDIA_CUDA-5.0_Samples/bin/linux/release$ ./deviceQuery
./deviceQuery Starting...
CUDA Device Query (Runtime API) version (CUDART static linking)
cudaGetDeviceCount returned 38
-> no CUDA-capable device is detected
我尝试过的
为了解决这个问题,我尝试了支持CUDA的设备,但无效:
To solve this I tried all of the thinks recommended by CUDA-capable device, but to no avail:
-
/ dev / nvidia *
是的,权限是666(crw-rw-rw-)和所有者root:root
/dev/nvidia*
is there and the permissions are 666 (crw-rw-rw-) and owner root:root
foo@bar-serv2:/dev$ ls -l nvidia*
crw-rw-rw- 1 root root 195, 0 Oct 24 18:51 nvidia0
crw-rw-rw- 1 root root 195, 1 Oct 24 18:51 nvidia1
crw-rw-rw- 1 root root 195, 255 Oct 24 18:50 nvidiactl
我尝试使用sudo
I tried executing the code with sudo
CUDA 5.0同时安装驱动程式和程式库
CUDA 5.0 installs driver and libraries at the same time
PS 这里是lspci | grep -i nvidia:
PS here is lspci | grep -i nvidia:
foo@bar-serv2:/dev$ lspci | grep -i nvidia
03:00.0 VGA compatible controller: NVIDIA Corporation GK104 [GeForce GTX 670] (rev a1)
03:00.1 Audio device: NVIDIA Corporation GK104 HDMI Audio Controller (rev a1)
04:00.0 VGA compatible controller: NVIDIA Corporation G94 [Quadro FX 1800] (rev a1)
strong> [update]
[update]
foo@bar-serv2:~/NVIDIA_CUDA-5.0_Samples/bin/linux/release$ nvidia-smi -a
NVIDIA: API mismatch: the NVIDIA kernel module has version 295.59,
but this NVIDIA driver component has version 304.54. Please make
sure that the kernel module and all NVIDIA driver components
have the same version.
Failed to initialize NVML: Unknown Error
5.0安装程序来同时安装驱动程序和lib。
How could that be, if I use the CUDA 5.0 installer to install driver and libs at the same time. Could the old 4.2 version, that is still lying around mess things up?
推荐答案
我遇到这个问题,并运行
I came across this issue, and running
nvidia-smi
$ b b
通知我API不匹配。问题是我的Linux发行版安装了需要重新启动系统的更新,所以重新启动解决了问题。
informed me of an API mismatch. The problem was that my Linux distro had installed updates that required a system restart, so restarting resolved the issue.
这篇关于CUDA运行时API错误38:未检测到支持CUDA的设备的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!