CUDA: Installing CUDA 5

From Define Wiki
Revision as of 10:11, 17 October 2012 by Michael (talk | contribs) (Created page with "==Verify You Have a CUDA-Capable GPU== <syntaxhighlight> lspci | grep -i nvidia </syntaxhighlight> ==Verify You Have a Supported Version of Linux== <syntaxhighlight> uname -m && cat /etc/*release </syntaxhighlight> ...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

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