CUDA 6.5 not performing any computation under Ubuntu 14.04 64bit

I’ve installed CUDA 6.5 on my system (I did not want to use 5.5 since there are some features after version 6 that I need).

My system is a Notebook with an NVIDIA GPU, namely

 lspci | grep -i  
 nvidia 03:00.0 3D controller: NVIDIA Corporation
 GM108M [GeForce 840M] (rev a2)

I assume, that I installed CUDA correctly since I did not get any errors during the installation, and this seems to be correct

 nvcc --version
 nvcc: NVIDIA (R) Cuda compiler driver Copyright (c) 2005-2014 NVIDIA
 Corporation Built on Thu_Jul_17_21:41:27_CDT_2014 Cuda compilation
 tools, release 6.5, V6.5.12

NSight is also there.

I am able to compile simple examples and run them, however, there is no GPU computation performed and also no device detected ( cudaGetDeviceCount=0 ). I’m using the example presented [here][The real "Hello World!" for CUDA!]. But instead of printing “Hello World”, I get “Hello Hello”. This lets me assume, that the computation on the kernel simply does not happen.

I don’t know if this is strange:

Sun Aug 24 13:00:55 2014       
| NVIDIA-SMI 340.32     Driver Version: 340.32         |                       
| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|   0  GeForce 840M        Off  | 0000:03:00.0     N/A |                  N/A |
| N/A   48C    P0    N/A /  N/A |    480MiB /  2047MiB |     N/A      Default |
| Compute processes:                                               GPU Memory |
|  GPU       PID  Process name                                     Usage      |
|    0            Not Supported                                               |

Why does it say Not Supported for Compute processes?

I would like to know if I forgot to configure something for CUDA to work properly.

I REALLY want to avoid reinstalling NVIDIA drivers for my GPU since this has caused a lot of problems in the past. I’m afraid I could destroy something.

Here’s an image of my NVIDIA settings.


and additionally

uname -a
Linux Zenbook 3.13.0-34-generic #60-Ubuntu SMP Wed Aug 13 15:45:27 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux

If you need further information, please let me know. Thank you very much!

Can you paste log here for CUDA sample devicequery? Meanwhile, please check the permission of /dev/nvidia* by commands “sudo ls -l /dev/nvidia*”. If the permission isn’t 0666, please see steps following to change permission.

  1. Create a script named nvidiactl_start as below.
/sbin/modprobe nvidia 

if [ "$?" -eq 0 ]; then 
	# Count the number of NVIDIA controllers found. 
	NVDEVS=`lspci | grep -i NVIDIA` 
	N3D=`echo "$NVDEVS" | grep "3D controller" | wc -l` 
	NVGA=`echo "$NVDEVS" | 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 
	mknod -m 666 /dev/nvidiactl c 195 255 

		exit 1

/sbin/modprobe nvidia-uvm
if [ "$?" -eq 0 ]; then
	# Find out the major device number used by the nvidia-uvm driver 
	D=`grep nvidia-uvm /proc/devices | awk '{print $1}'` 

	mknod -m 666 /dev/nvidia-uvm c $D 0 
	exit 1 
  1. chmod +x nvidiactl_start
  2. mv nvidiactl_start /etc/init.d
  3. update-rc.d nvidiactl_start defaults
  4. Reboot system

You can refer to cuda document CUDA Toolkit Documentation.