Installing CUDA Toolkit 5.0 on Fedora 16 Linux

http://www.r-tutor.com/gpu-computing/cuda-installation/cuda5.0-fc16


http://reset.etsii.upm.es/en/users/peque/installing-cuda-in-fedora-16/


http://www.eefocus.com/pengwr/blog/2012-02/235057_baf52.html


http://tieba.baidu.com/p/1952725413



The following explains how to install CUDA Toolkit 5.0 on 64-bit Fedora 16 Linux. Ihave tested it on a self-assembled desktop with AMD Phenom II X4 CPU, 4GBRAM, 500GB hard drive, 650W power supply, and NVIDIA GeForce GTX 460graphics card. The instruction assumes you have the necessary CUDA compatiblehardware support and know how to use sudo. Depending on your systemconfiguration, your mileage may vary.

Proprietary Video Driver

The built-in video driver in Fedora 16 is incompatible with the CUDA Toolkit, andyou need to replace it with the proprietary NVIDIA driver. If you have not alreadydone so, you should first configure your system with the RPM Fusion repository.Then install the proprietary driver in a terminal as follows.

$ sudo yum install akmod -nvidia xorg -x11 -drv -nvidia -libs

Next, you should rebuild the kernel image.

$ sudo dracut /boot/initramfs -$(uname  -r).img $(uname  -r)

And you can reboot the system at this point for the change to take effect.

Linux Development Tools

After you have successfully configured Fedora Linux with the proprietary NVIDIAdriver, you can install the Linux development tools.

$ 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 haveto install the OpenGL developer environment.

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

OpenMPI Developer Driver

Since there is a new MPI sample in the CUDA SDK, you will have to install theOpenMPI environment as well.

$ sudo yum install openmpi -devel

CUDA Toolkit

Download the CUDA Toolkit from the CUDA download site. The graphical displaymanager must not be running during the CUDA video driver install. Henceyou should switch into console mode with the Alt+Ctrl+F2 keystroke. Thenlogin the text console, and stop the graphical display manager with thefollowing:

$ sudo systemctl stop prefdm.service

You may have to enter the same Alt+Ctrl+F2 keystroke again to resume the textconsole. Now install the CUDA Toolkit.

$ sudo sh cuda_5.0.35_linux_64_fedora16.run

And reboot afterward:

$ sudo reboot

Environment Variables

Assuming you have accepted the default install locations, you should add thefollowing in the .bashrc file of your home folder.

export OPENMPI_HOME=/usr/lib64/openmpi 
 
export CUDA_HOME=/usr/local/cuda -5.0 
export LD_LIBRARY_PATH=${CUDA_HOME}/lib64 
 
PATH=${CUDA_HOME}/bin:${OPENMPI_HOME}/bin:${PATH} 
export PATH

CUDA SDK Samples

Now you can copy the SDK samples into your home directory, and proceed with thebuild process.

$ cp  -r /usr/local/cuda -5.0/samples ~/NVIDIA_CUDA -5.0_Samples 
$ cd ~/NVIDIA_CUDA -5.0_Samples 
$ make

If everything goes well, you should be able to verify your CUDA installation byrunning the deviceQuery sample in bin/linux/release.



你可能感兴趣的:(Installing CUDA Toolkit 5.0 on Fedora 16 Linux)