CUDA: Installing CUDA 5

From Define Wiki
Revision as of 12:00, 14 December 2012 by Michael (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Installing dependencies

kernel-devel

yum install kernel-devel

Freeglut

  • RHEL 6 / PCM 3
wget http://mirror.centos.org/centos/6/os/x86_64/Packages/freeglut-2.6.0-1.el6.x86_64.rpm
rpm -ivh freeglut-2.6.0-1.el6.x86_64.rpm 
yum install mesa-libGL-devel mesa-libGLU-devel libXfixes-devel libXdamage-devel   libdrm-devel libXxf86vm-devel
wget http://mirror.centos.org/centos/6/os/x86_64/Packages/freeglut-devel-2.6.0-1.el6.x86_64.rpm
rpm -ivh freeglut-devel-2.6.0-1.el6.x86_64.rpm


Verify You Have a CUDA-Capable GPU

lspci | grep -i nvidia

Verify You Have a Supported Version of Linux

uname -m && cat /etc/*release

Verify the System Has gcc Installed

gcc --version

Download the NVIDIA CUDA Toolkit

Download the toolkit for the OS you are using. eg for redhat 64 bit:

wget http://developer.download.nvidia.com/compute/cuda/5_0/rel/installers/cuda_5.0.35_linux_64_rhel6.x.run

Install the Toolkit and drivers

sudo sh cuda_5.0.24_linux_32_rhel5.x.run

Define Enviroment Variables

export PATH=/usr/local/cuda-5.0/bin:$PATH
export LD_LIBRARY_PATH=/usr/local/cuda-5.0/lib64:$LD_LIBRARY_PATH

Verify the Installation

cat /proc/driver/nvidia/version

Compile Examples

cd ~/NVIDIA_CUDA-5.0_Samples/C/bin/linux/release
make
cd ~/NVIDIA_CUDA-5.0_Samples/C/bin/linux/release 
./devicequery