Reputation: 4718
I have CUDA version I have is 5.5 as evidenced by the output of nvcc
which is:
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2013 NVIDIA Corporation
Built on Wed_Jul_17_18:36:13_PDT_2013
Cuda compilation tools, release 5.5, V5.5.0
I am not yet using 6.5 since my NVIDIA driver is 331.113 (it is the Kubuntu 14.04 repo version which is how I installed everything).
I got the 6.5 examples and, for example, if I make the 2_graphics/Mandelbrot
example, there are no compilation errors but when I run it, I get
[CUDA Mandelbrot/Julia Set] - Starting...
CUDA error at ../../common/inc/helper_cuda.h:1032 code=35(cudaErrorInsufficientDriver) "cudaGetDeviceCount(&device_count)"
Now, if I just go into the examples/5.5/2_graphics/Mandelbrot
directory and make
the code, when I run it everything works fine.
What is happening when I get the cudaErrorInsufficientDriver
error and what is the difference between these two Mandelbrot
packages that would cause this error but not cause a compilation error?
Upvotes: 1
Views: 490
Reputation: 151849
The app that you ran: 2_graphics/Mandelbrot
was apparently compiled with CUDA 6.5 tools, i.e. nvcc
, and most importantly it was linked against the CUDA 6.5 runtime library (cudart).
This library will, at initialization, check the driver version that is currently installed. If it is not a sufficient driver for CUDA 6.5, it will return an error on CUDA API calls.
If you had only CUDA 5.5 installed, and built the 2_graphics/Mandelbrot
sample code only with CUDA 5.5 tools and libraries (even if the sample code itself came from the CUDA 6.5 distribution) most likely it would just work.
Upvotes: 2