CUDA ERROR: no CUDA-capable device

I was wondering if anyone had any experience with cudamemtest. I can compile it, but when I execute it, I get :ERROR: CUDA error: no CUDA-capable device is detected, line 284, file cuda_memtest.cu. I hope someone can assist me with this issue. It would be greatly appreciated.

  1. Check that you have a CUDA capable GPU: /sbin/lspci |grep -y nvidia

    This should report a VGA or 3D controller

  2. Check that the nvidia module is loaded and it is the right version: cat /proc/driver/nvidia/version

    For CUDA 4.1, it should report 285.05.33

  3. Check that you have the right permissions for the /dev/nvidia* files: ls -l /dev/nvidia*

    The output should be similar to this if you are using the script in the release notes to load the module( 4.1 omitted it by mistake, look for an old one)
    crw-rw-rw- 1 root root 195, 0 Jan 10 16:11 /dev/nvidia0
    crw-rw-rw- 1 root root 195, 255 Jan 10 16:11 /dev/nvidiactl

    or if you are the only user on the machine and are running X, the files should belong to you

What is your configuration?

  1. reports:

02:00.0 VGA compatible controller: nVidia Corporation Device 1096 (rev a1)

84:00.0 VGA compatible controller: nVidia Corporation Device 1096 (rev a1)

  1. reports:

NVRM version: NVIDIA UNIX x86_64 Kernel Module 285.05.33 Thu Jan 19 14:07:02 PST 2012

GCC version: gcc version 4.4.6 20110731 (Red Hat 4.4.6-3) (GCC)

  1. I don’t have a /dev/nvidia directory but a nvram, which includes

crw-r----- 1 root kmem 10, 144 Feb 2 15:33 nvram

what do you mean by configuration?

It is not a directory, there should be 3 files ( since you have 2 GPUs):
/dev/nvidiactl
/dev/nvidia0
/dev/nvidia1

Is X running?

I don’t see those files, and I don’t have X running.

Thanks

Ok, you need to use this script ( it used to be in the release notes but it is missing in the 4.1, we are working to put it back in the online version)

In order to run CUDA applications, the CUDA module must be
loaded and the entries in /dev created. This may be achieved
by initializing X Windows, or by creating a script to load the
kernel module and create the entries.

An example script (to be run at boot time):

#!/bin/bash

/sbin/modprobe nvidia

if [ “$?” -eq 0 ]; then

Count the number of NVIDIA controllers found.

N3D=/sbin/lspci | grep -i NVIDIA | grep "3D controller" | wc -l
NVGA=/sbin/lspci | grep -i NVIDIA | grep "VGA compatible controller" | wc -l

N=expr $N3D + $NVGA - 1
for i in seq 0 $N; do
mknod -m 666 /dev/nvidia$i c 195 $i;
done

mknod -m 666 /dev/nvidiactl c 195 255

else
exit 1
fi

Do you have a laptop or a Desktop computer? Which nvidia card card do you have? Which nvidia driver and which version of the cuda toolkit?

Just to make a comparison your question is like this. I have a headache, I painkillers, but it did not go away.

Thanks a lot! I can see the files

/dev/nvidiactl

/dev/nvidia0

/dev/nvidia1

but, I still get the following error:

[02/03/2012 10:44:02][d001][0]:Running cuda memtest, version 1.2.2

[02/03/2012 10:44:02][d001][0]:ERROR: CUDA error: no CUDA-capable device is detected, line 284, file cuda_memtest.cu

[02/03/2012 10:44:02][d001][0]:ERROR: CUDA error: no CUDA-capable device is detected, line 284, file cuda_memtest.cu

Should I execute cuda memtest as root? Its odd because I can execute other cuda applications without issue.

I apologize. After looking closely, I see the files

/dev/ncidia0

/dev/ncidia1

/dev/nvidiactl

Are they comparable to:

/dev/nvidiactl

/dev/nvidia0

/dev/nvidia1

No, the names need to be nvidia0 and nvidia1.
You probably have a typo in the script.

OK! I corrected the files. But, I am still getting the

02/03/2012 14:35:49][d001][0]:ERROR: CUDA error: no CUDA-capable device is detected, line 284, file cuda_memtest.cu

[02/03/2012 14:35:49][d001][0]:ERROR: CUDA error: no CUDA-capable device is detected, line 284, file cuda_memtest.cu

errors. Its strange how I can’t execute cudamem test, but I can run other cuda applications. Should I execute as root?

If you are able to execute other CUDA codes, it may be an application specific bug.

I am not familiar with cuda-memtest.

If the file permissions are the one in the script, you don’t need to be root.

OK! It could be an application issue. Do you know of any GPU memory stress tests I can perform?

Thanks -