An R Introduction to Statistics

Installing CUDA Toolkit 4.1 on Fedora 14 Linux

The following explains how to install CUDA Toolkit 4.1 on 64-bit Fedora 14 Linux. I have tested it on a self-assembled desktop with AMD Phenom II X4 CPU, 4GB RAM, 500GB hard drive, 650W power supply, and NVIDIA GeForce GTX 460 graphics card. The instruction assumes you have the necessary CUDA compatible hardware support, understand using sudo, and know how to edit Linux kernel boot options. Depending on your system configuration, your mileage may vary.

Basic Video Driver

Boot the Fedora 14 Live CD for a fresh Linux install. During the initial boot screen, you should interrupt the automatic boot sequence by pressing the keyboard. You can press the TAB key at the first boot menu, and add the extra kernel parameters "xdriver=vesa nomodeset". Alternatively, you can use the arrow key to select the second boot menu item with the Basic Video option. Now resume the boot process by pressing the Enter key. This enables the installed system to be configured with only the bare basic video driver, and avoids conflicts with the CUDA developer video driver that you will install later.

Linux Development Tools

After you have successfully installed Fedora Linux with the basic video driver, you can install the Linux development tools. Login your freshly installed system and setup sudo. Then enter the following commands in a terminal. Reboot the system after the kernel update.

$ sudo yum update 
$ sudo yum install gcc-c++ kernel-devel

OpenGL Developer Driver

To prepare for compiling the OpenGL code samples in the CUDA SDK, you will have to install the OpenGL developer environment.

$ sudo yum install freeglut-devel libXi-devel libXmu-devel

CUDA Developer Driver

Download the CUDA developer driver from the CUDA download site. The graphical display manager must not be running during the CUDA video driver install. Hence you should either boot into runlevel 3 by editing the kernel boot option, or logout your Linux desktop and switch to console mode with the Alt+Ctrl+F2 keystroke. For the latter option, you can login the text console, and stop the graphical display manager with either one of the following commands:

$ sudo stop prefdm

or:

$ sudo service gdm stop

You may have to enter the same Alt+Ctrl+F2 keystroke again to resume the text console. Now install the CUDA developer video driver:

$ sudo sh NVIDIA-Linux-x86_64-285.05.33.run

And reboot afterward:

$ sudo reboot

CUDA Toolkit

Download the CUDA Toolkit from the CUDA site, and run the following:

$ sudo sh cudatoolkit_4.1.28_linux_64_fedora14.run

Assuming you have accepted the default install location /usr/local/cuda, you should add the following in the .bashrc file of your home folder.

export CUDA_HOME="/usr/local/cuda" 
export LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:${CUDA_HOME}/lib64:${CUDA_HOME}/lib" 
export PATH=${CUDA_HOME}/bin:${PATH}

CUDA SDK Samples

Download and install the CUDA SDK:

$ sh gpucomputingsdk_4.1.28_linux.run

With the default install location NVIDIA_GPU_Computing_SDK in your home folder, you can now build the SDK samples.

$ cd ~/NVIDIA_GPU_Computing_SDK/C/ 
$ make

If everything goes well, you should be able to verify your CUDA installation by running the deviceQuery sample in the NVIDIA_GPU_Computing_SDK/C/bin/linux/release folder of your home directory.