GPUs on Grid5000: Difference between revisions

From Grid5000
Jump to navigation Jump to search
Line 14: Line 14:
= Compiling examples =
= Compiling examples =


GPU are available in Grenoble, Lyon and Lille.<br />
GPU are available in Grenoble, Lyon and Lille. NVIDIA drivers 304.54 and CUDA 5.0 are installed by default on nodes.<br />
You can reserve a node with GPU using OAR GPU property. For Grenoble and Lyon:  
You can reserve a node with GPU using OAR GPU property. For Grenoble and Lyon:  
{{Term|location=frontend|cmd=<code class="command">oarsub</code> -I -p "GPU='YES'"}}  
{{Term|location=frontend|cmd=<code class="command">oarsub</code> -I -p "GPU='YES'"}}  
Line 21: Line 21:


{{Warning|text=Please note that Lille GPU are shared between nodes and the oarsub command will differ from Grenoble or Lyon. When using GPUs at Lille, you may encounterer some trouble, you can read more about Lille GPU on [[Lille:GPU]].}}
{{Warning|text=Please note that Lille GPU are shared between nodes and the oarsub command will differ from Grenoble or Lyon. When using GPUs at Lille, you may encounterer some trouble, you can read more about Lille GPU on [[Lille:GPU]].}}
We will then download CUDA 5.0 samples and install them.
{{Term|location=frontend|cmd=<code class="command">wget</code> http://git.grid5000.fr/sources/cuda-samples_5.0.35_linux.run -P /tmp/ && cd /tmp}}
{{Term|location=frontend|cmd=<code class="command">sh</code> cuda-samples_5.0.35_linux.run -cudaprefix=/usr/local/cuda-5.0/}}
You will be prompt to accept the EULA and for a installation path, we suggest you to use /tmp/samples/.<br />
Then you can go to installation path, in our case /tmp/samples/. If you list the folder, you will see a lot of folder starting with a number, these are CUDA examples. CUDA examples are describe in this document. You might also want to have a look to "doc" directory.

Revision as of 17:50, 2 December 2013


Purpose

This page presents how to use GPUs on Grid'5000 and how to install your own NVIDIA drivers and CUDA installation.
In this tutorial, we will first compile and use CUDA examples and in the second part, we will install NVIDIA drivers and compile CUDA 5 from a simple wheezy-x64-base environment.

Pre-requisite

  • A basic knowledge of Grid'5000 is require, we suggest you to read Getting Started tutorial first.
  • Information about hardware information and GPUs availability can be found on Special:G5KHardware.

Compiling examples

GPU are available in Grenoble, Lyon and Lille. NVIDIA drivers 304.54 and CUDA 5.0 are installed by default on nodes.
You can reserve a node with GPU using OAR GPU property. For Grenoble and Lyon:

Terminal.png frontend:
oarsub -I -p "GPU='YES'"

or for Lille:

Terminal.png lille:
oarsub -I -p "GPU='SHARED'"
Warning.png Warning

Please note that Lille GPU are shared between nodes and the oarsub command will differ from Grenoble or Lyon. When using GPUs at Lille, you may encounterer some trouble, you can read more about Lille GPU on Lille:GPU.

We will then download CUDA 5.0 samples and install them.

Terminal.png frontend:
sh cuda-samples_5.0.35_linux.run -cudaprefix=/usr/local/cuda-5.0/

You will be prompt to accept the EULA and for a installation path, we suggest you to use /tmp/samples/.
Then you can go to installation path, in our case /tmp/samples/. If you list the folder, you will see a lot of folder starting with a number, these are CUDA examples. CUDA examples are describe in this document. You might also want to have a look to "doc" directory.