Main Navigation

Secondary Navigation

Page Contents

Contents

Requesting and Using GPUs

Overview

The cluster offers a couple of different GPUs. Best overview offers the site resources. For batch processing we have grouped the GPUs in the partition gpu - see command

scontrol show partition gpu
To get a view on all available GPUs:
scontrol show nodes | grep Gres | grep -v null

To select GPUs so called generic resource scheduling (Gres) is used

Using GPUs in Batch Processing

Before using a GPU a corresponding module for the software environment has to be loaded:

module load nvidia/latest
Depending on your needs you may select one or more GPUs:
#SBATCH --gres=gpu:V100:1
will select one GPU of type V100,
#SBATCH --gres=gpu:V100:2
will select two Volta GPUs. Normally the GPUs are restricted for exclusive usage by a single CPU Task. Threads, like Python Threads or workers, may share a GPU. In some cases you might want to start several tasks - especially if you are using MPI - on a shared GPU. In that case the following line may be added:
#SBATCH --gpu_cmode=<shared|exclusive|prohibited>
Exclusive is the default behaviour.