m (Uninstallation added) |
|||
Line 1: | Line 1: | ||
[[Category:Documentation]][[Category:Tutorials]] | [[Category:Documentation]][[Category:Tutorials]] | ||
{{autolang|base=yes}} | {{autolang|base=yes}} | ||
{{Admon/warning | Note these instructions *only* apply to Fedora 16 and later releases.}} | {{Admon/warning | Note these instructions *only* apply to Fedora 16 and later releases.}} | ||
{{Admon/note | To be reviewed, my english may be bad.}} | {{Admon/note | To be reviewed, my english may be bad.}} | ||
This document provides instructions to install Cuda 4.2 on Fedora. The final goal will be to be able to run GPUGRID applications. | This document provides instructions to install/remove Cuda 4.2 on Fedora. The final goal will be to be able to run GPUGRID applications. | ||
== Prerequisites == | |||
First, be sure your GPU is compatible with Cuda. Refer to this page: http://developer.nvidia.com/cuda-gpus. | First, be sure your GPU is compatible with Cuda. Refer to this page: http://developer.nvidia.com/cuda-gpus. | ||
Then, install required packages: | Then, install required packages: | ||
Line 14: | Line 14: | ||
</pre> | </pre> | ||
== Downloads == | |||
You will have to download two programs: "'''CUDA Toolkit'''" and "'''GPU Computing SDK'''". | You will have to download two programs: "'''CUDA Toolkit'''" and "'''GPU Computing SDK'''". | ||
Line 32: | Line 32: | ||
</pre> | </pre> | ||
== Installation == | |||
=== CUDA Toolkit === | |||
Go to "Desktop", add execution permissions of the cudatoolkit downloaded file, and execute it with root permissions: | Go to "Desktop", add execution permissions of the cudatoolkit downloaded file, and execute it with root permissions: | ||
<pre> | <pre> | ||
Line 47: | Line 47: | ||
type '''/opt'''. | type '''/opt'''. | ||
=== GPU Computing SDK === | |||
As before, go to "Desktop", add execution permissions of the gpucomputingsdk downloaded file, and execute it '''without''' root permissions: | As before, go to "Desktop", add execution permissions of the gpucomputingsdk downloaded file, and execute it '''without''' root permissions: | ||
<pre> | <pre> | ||
Line 114: | Line 114: | ||
Now we can use GPUGRID applications with Boinc. | Now we can use GPUGRID applications with Boinc. | ||
=== Useful links | == Uninstallation == | ||
If you want to totally remove Cuda, juste delete the '''/opt/cuda''' and '''~/NVIDIA_GPU_Computing_SDK''' folders: | |||
<pre> | |||
rm -r ~/NVIDIA_GPU_Computing_SDK | |||
su -c 'rm -r /opt/cuda' | |||
</pre> | |||
and remove the ''<code>export PATH=$PATH:/opt/cuda/bin</code>'' and ''<code>export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/cuda/lib:/opt/cuda/lib64</code>'' lines of the '''~/.bash_profile''' file. | |||
== Useful links == | |||
* http://developer.nvidia.com/cuda-toolkit | * http://developer.nvidia.com/cuda-toolkit | ||
* http://developer.download.nvidia.com/compute/DevZone/docs/html/C/doc/CUDA_Getting_Started_Linux.pdf | * http://developer.download.nvidia.com/compute/DevZone/docs/html/C/doc/CUDA_Getting_Started_Linux.pdf |
Revision as of 09:03, 8 June 2012
This document provides instructions to install/remove Cuda 4.2 on Fedora. The final goal will be to be able to run GPUGRID applications.
Prerequisites
First, be sure your GPU is compatible with Cuda. Refer to this page: http://developer.nvidia.com/cuda-gpus. Then, install required packages:
su -c 'yum install make gcc-c++ freeglut-devel libXi-devel libXmu-devel mesa-libGLU-devel'
Downloads
You will have to download two programs: "CUDA Toolkit" and "GPU Computing SDK".
Let's download and save them on the Desktop.
32bits :
cd ~/Desktop wget http://developer.download.nvidia.com/compute/cuda/4_2/rel/toolkit/cudatoolkit_4.2.9_linux_32_fedora14.run wget http://developer.download.nvidia.com/compute/cuda/4_2/rel/sdk/gpucomputingsdk_4.2.9_linux.run
64bits :
cd ~/Desktop wget http://developer.download.nvidia.com/compute/cuda/4_2/rel/toolkit/cudatoolkit_4.2.9_linux_64_fedora14.run wget http://developer.download.nvidia.com/compute/cuda/4_2/rel/sdk/gpucomputingsdk_4.2.9_linux.run
Installation
CUDA Toolkit
Go to "Desktop", add execution permissions of the cudatoolkit downloaded file, and execute it with root permissions:
cd ~/Desktop chmod +x cudatoolkit_4.2.9_linux_* su -c './cudatoolkit_4.2.9_linux_*'
When it will ask you:
Enter install path (default /usr/local/cuda, '/cuda' will be appended):
type /opt.
GPU Computing SDK
As before, go to "Desktop", add execution permissions of the gpucomputingsdk downloaded file, and execute it without root permissions:
cd ~/Desktop chmod +x gpucomputingsdk_4.2.9_linux.run ./gpucomputingsdk_4.2.9_linux.run
When it will ask you:
Enter install path (default ~/NVIDIA_GPU_Computing_SDK):
press [enter] (to use default path), and type /opt when it will ask you:
Enter CUDA install path (default /usr/local/cuda):
Preparation
Update variables, and this on every boot:
export PATH=$PATH:/opt/cuda/bin export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/cuda/lib:/opt/cuda/lib64 echo 'export PATH=$PATH:/opt/cuda/bin' >> ~/.bash_profile echo 'export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/cuda/lib:/opt/cuda/lib64' >> ~/.bash_profile
Compilation
Fedora 16
We finally compile:
32bits:
cd ~/NVIDIA_GPU_Computing_SDK/C LINKFLAGS=-L/usr/lib/nvidia/ make
64bits:
cd ~/NVIDIA_GPU_Computing_SDK/C LINKFLAGS=-L/usr/lib64/nvidia/ make
Fedora 17
Some compatibility problems appeared with gcc-4.7. You will have to install a compatibility version:
su -c 'yum install compat-gcc-34'
Create a symbolic link to make Cuda point to gcc-3.4:
su -c 'ln -s /usr/bin/gcc34 /opt/cuda/bin/gcc'
Now, you can compile.
32bits:
cd ~/NVIDIA_GPU_Computing_SDK/C LINKFLAGS=-L/usr/lib/nvidia/ make cuda-install=/opt/cuda
64bits:
cd ~/NVIDIA_GPU_Computing_SDK/C LINKFLAGS=-L/usr/lib64/nvidia/ make cuda-install=/opt/cuda
Test
Now, let's test if Cuda is working great. Type:
~/NVIDIA_GPU_Computing_SDK/C/bin/linux/release/./fluidsGL
As you can see on the following picture, it works !
Now we can use GPUGRID applications with Boinc.
Uninstallation
If you want to totally remove Cuda, juste delete the /opt/cuda and ~/NVIDIA_GPU_Computing_SDK folders:
rm -r ~/NVIDIA_GPU_Computing_SDK su -c 'rm -r /opt/cuda'
and remove the export PATH=$PATH:/opt/cuda/bin
and export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/cuda/lib:/opt/cuda/lib64
lines of the ~/.bash_profile file.