cuda 5.5 or 5.0 fails deviceQuery on fedora19

after installation of cuda toolkit either in 5.5 or 5.0 , I can compile deviceQuery, but it fails to detect my nvidia GPU

./deviceQuery

cudaGetDeviceCount returned 35
→ CUDA driver version is insufficient for CUDA runtime version
Result = FAIL

However nvidia driver is loaded and operational

lspci -v | grep nvidia

Kernel driver in use: nvidia

cat /proc/driver/nvidia/version

NVRM version: NVIDIA UNIX x86_64 Kernel Module 319.32 Wed Jun 19 15:51:20 PDT 2013
GCC version: gcc version 4.8.1 20130603 (Red Hat 4.8.1-1) (GCC)

I use rpmfusion nvidia driver on fedora19
akmod-nvidia-319.32-2.fc19.x86_64

I used installer from http://developer.download.nvidia.com/compute/cuda/5_5/rel/installers/cuda_5.5.22_linux_64.run

nvcc -V

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

what could be wrong ? which version of cuda toolkit should I work with ?

I would recommend you use the RPM drivers from the Nvidia RPM repository, or the driver included in the run file. I believe you need at least 319.37 (rather than 319.32 which is what you have).

I updated my akmod-nvidia to akmod-nvidia-325.15-1.fc19.1.x86_64 as available from rpmfusion non-free repo . so now I have

cat /proc/driver/nvidia/version

NVRM version: NVIDIA UNIX x86_64 Kernel Module 325.15 Wed Jul 31 18:50:56 PDT 2013
GCC version: gcc version 4.8.1 20130603 (Red Hat 4.8.1-1) (GCC)

325.15 being much higher than the “at least 319.37” you recommended , I though that would work now

unfortunatly deviceQuery still fails :-(

./deviceQuery

./deviceQuery Starting…

CUDA Device Query (Runtime API) version (CUDART static linking)

cudaGetDeviceCount returned 35
→ CUDA driver version is insufficient for CUDA runtime version
Result = FAIL

I’ve search in deviceQuery.cpp for which version that program is searching for, it is not explicitly written there, probably in a header file somewhere …

How can I know which version deviceQuery is searching for ?
thanks .

PS: cannot find a yum repo in nvidia site, is there one ? would it be better to use nvidia rpm instead of rpmfusion ones ?

I found a solution myself

not only there was a need to update akmod-nvidia 319.32 to 325.15
but also I notice that building the sample deviceQueryDrv failed because of -lcuda wasn’t found (ld collect error …), there do is a :
/usr/lib64/nvidia/libcuda.so.1
but no .so ! so I created the link /usr/lib64/nvidia/libcuda.so → /usr/lib64/nvidia/libcuda.so.1
then it compiled fine , I also had to manually start ldconfig so that dynamic lib are rescaned.
Then deviceQueryDrv does compile and returns correct result :

./deviceQueryDrv

Device 0: “Quadro 2000”
CUDA Driver Version: 5.5

Result = PASS

on my system /usr/lib64/nvidia/libcuda.so.1 comes from xorg-x11-drv-nvidia-libs-325.15-1.fc19.x86_64 (rpmfusion non-free package), it’s probably up to that package to create the link, but it didn’t, so I had to created myself .

Hence, it finally works ;-)

Awesome that you found a solution!

I should note (for people that stumble onto this thread with similar issues) that the driver RPMs provided in NVIDIA’s repository create the appropriate symbolic links for libcuda.so.

Even with the .so links correct, compilation of the CUDA 5.5 samples failed for me on Fedora 19 x86_64 because the nvcc -L path was not being set owing to a bug in the findcudalib.mk makefiles (or perhaps an “interesting feature” of Gnu make 3.82). To fix this, at line 50 (and ideally also 55 and 219)

ifeq (“$(DISTRO)”,‘’)

replace the single quotes with double ones. Otherwise the ifeq fails even when $(DISTRO) is empty: given the following, make 3.82 follows case 2…

X =
ifeq (“$(X)”,‘’)
$(warning “case 1”)
else ifeq (“$(X)”,“”)
$(warning “case 2”)
else
$(warning “case 3”)
endif