Nvidia-Cuda

reference

pre-requis drivers nvidia

il faut avant tout disposer des drivers nvidia sur le systeme

ref: http://www.if-not-true-then-false.com/2013/fedora-19-nvidia-guide/

avec l'arrivée de nouveaux kernels, il faut s'assurer que la le driver se compile bien

eventuellement aller chercher les derniers packages nvidia directment sur le repo rpmfusion

[root@b313-08 yum.repos.d]# yum localinstall --nogpgcheck http://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm http://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-$(rpm -E %fedora).noarch.rpm

[root@b313-08 yum.repos.d]# yum update akmod-nvidia

Verifier la bonne compilation du driver “akmod”

[root@b313-08 ~]# ls -ltr /var/cache/akmods/nvidia/
total 5396
-rw-r--r-- 1 root root   64883 22 janv. 11:13 325.15-1.1-for-3.12.8-200.fc19.x86_64.failed.log
-rw-r--r-- 1 root root 3922208 22 janv. 17:38 kmod-nvidia-3.12.8-200.fc19.x86_64-331.20-10.fc19.x86_64.rpm
-rw-r--r-- 1 root root 1261080 22 janv. 17:38 nvidia-kmod-debuginfo-331.20-10.fc19.x86_64.rpm
-rw-r--r-- 2 root root  273155 22 janv. 17:38 331.20-10-for-3.12.8-200.fc19.x86_64.log

[root@b313-08 ~]# tail -3 /var/cache/akmods/nvidia/331.20-10-for-3.12.8-200.fc19.x86_64.log
22 janv. 17:38:37 akmodsbuild: + exit 0
22 janv. 17:38:37 akmods: Installing newly built rpms
22 janv. 17:38:49 akmods: Successful.

nvidia-settings

[root@b313-08 ~]# lspci -v 

02:00.0 VGA compatible controller: NVIDIA Corporation GF106GL [Quadro 2000] (rev a1) (prog-if 00 [VGA controller])
	Kernel driver in use: nvidia

CUDA installation manuelle 'runfile'

[root@b313-06 ~]#  wget http://developer.download.nvidia.com/compute/cuda/5_5/rel/installers/cuda_5.5.22_linux_64.run
[root@b313-06 ~]# chmod 750 cuda_5.5.22_linux_64.run
[root@b313-06 ~]# ./cuda_5.5.22_linux_64.run --extract=/root/cuda-src
[root@b313-06 ~]# cd cuda-src/
[root@b313-06 cuda-src]# ls
cuda-linux64-rel-5.5.22-16488124.run  cuda-samples-linux-5.5.22-16488124.run  NVIDIA-Linux-x86_64-319.37.run

install toolkit

[root@b313-06 cuda-src]# ./cuda-linux64-rel-5.5.22-16488124.run
...
-------------------------------------------------------------
Do you accept the previously read EULA? (accept/decline/quit): accept

Enter install path [ default is /usr/local/cuda-5.5 ]: 
« src » -> « /usr/local/cuda-5.5/src »

Would you like to add desktop menu shortcuts? ((y)es/(n)o/(a)ll users) [ default is all users ]:
Would you like to create a symbolic link /usr/local/cuda pointing to /usr/local/cuda-5.5? ((y)es/(n)o/(a)bort) [ default is yes ]:

environement utilisateur

[root@b313-06 ~]# echo "export PATH=/usr/local/cuda-5.5/bin:$PATH" >> ~/.bash_profile 
[root@b313-06 ~]# echo "export LD_LIBRARY_PATH=/usr/local/cuda-5.5/lib64:$LD_LIBRARY_PATH" >> ~/.bash_profile 
[root@b313-06 ~]# source ~/.bash_profile

fichiers samples

[root@b313-06 cuda-src]# ./cuda-samples-linux-5.5.22-16488124.run
* To uninstall the NVIDIA CUDA Samples, please delete /usr/local/cuda-5.5/samples

Verication de l'installation

driver

[root@d012-03 cuda]# 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) 

cuda toolkit

[root@d012-03 cuda]# 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

compilation

Attention, le packahe ne fait pas le lien

[root@b313-11 ~]# ln -s /usr/lib64/nvidia/libcuda.so.1 /usr/lib64/nvidia/libcuda.so

il faut l'ajouter, autrment les compilations ”-lcuda” echouent sir ld:collect !

[root@b313-06 samples]# cd 1_Utilities/deviceQuery
[root@b313-06 deviceQuery]# make
"/usr/local/cuda-5.5"/bin/nvcc -ccbin g++ -I../../common/inc  -m64    -gencode arch=compute_10,code=sm_10 -gencode arch=compute_20,code=sm_20 -gencode arch=compute_30,code=sm_30 -gencode arch=compute_35,code=\"sm_35,compute_35\" -o deviceQuery.o -c deviceQuery.cpp
"/usr/local/cuda-5.5"/bin/nvcc -ccbin g++   -m64        -o deviceQuery deviceQuery.o 
mkdir -p ../../bin/x86_64/linux/release
cp deviceQuery ../../bin/x86_64/linux/release
[root@b313-06 deviceQuery]# ./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

ce FAIL n'est pas rassurant !, poutant le divers est bien là et chargé, cf nvidia-settings et :

[root@b313-06 ~]# lspci -v | grep nvidia
	Kernel driver in use: nvidia
documentation/postes_linux/nvidia_cuda_b313.txt · Dernière modification: 2014/01/22 16:48 par procacci
CC Attribution-Share Alike 3.0 Unported
www.chimeric.de Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0