CUDA

Compile CUDA Code
PBS Example

 

CUDA is the compute engine in NVIDIA graphics processing units or GPUs,that is accessible to software developers through industry standard programming languages. Programmers use C for CUDA using the nvcccompiler.

Compiling with CUDA

Load the CUDA Module

module load cuda

Use module show cuda to see variables the module set to make compiling simpler.

For details on CUDA as a programming tool see our CUDA page.

PBS Example

To use CUDA, jobs must request GPUs in their PBS script; CUDA will not run correctly without a GPU. You must request nodes that have GPUs by including in your PBS file the option 'nodes=1:gpus=X' (note you must use 'nodes' and not 'procs' in your #PBS -l line; X is the number of GPUs you want for this job.). Here is an example of asking for one node with one GPU per node:

#PBS -N cuda-test
#PBS -l nodes=1:gpus=1,mem=1gb,walltime=00:15:00
#PBS -m abe
#PBS -V

cat $PBS_NODEFILE

#run our app, which is assigned a GPU by the CUDA library

./a.out