This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
|
guide:gpu [2018/09/17 15:52] kgovender |
guide:gpu [2025/08/07 12:51] (current) kevin |
||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | GPU applications on LENGAU: | + | ======GPU Nodes====== |
| + | |||
| + | **Upgraded: more GPUs added.** | ||
| + | |||
| + | The Lengau cluster at the CHPC includes 9 GPU compute nodes with a total of 30 Nvidia V100 GPU devices. | ||
| + | |||
| + | |||
| + | ^ GPU Node ^ CPU Cores ^ GPU Devices | ||
| + | | '' | ||
| + | | '' | ||
| + | | '' | ||
| + | | '' | ||
| + | | '' | ||
| + | | '' | ||
| + | | '' | ||
| + | | '' | ||
| + | | '' | ||
| + | |||
| + | > Jobs that require 1, 2 or 3 GPUs can be allocated to any node, and will share the node if the job does not use all the GPU devices on that node. Jobs that require 4 GPUs can only be allocated to '' | ||
| + | |||
| + | |||
| + | |||
| + | |||
| + | |||
| + | =====Policies===== | ||
| + | |||
| + | ====Access==== | ||
| + | |||
| + | Principle Investigators apply for GPU access for their Research Programme members through the CHPC [[https:// | ||
| + | |||
| + | ====Allocation===== | ||
| + | |||
| + | Research programme allocations will be depleted by a factor of the wallclock time and the number of GPUs (1, 2, or 4) requested by the job. | ||
| + | |||
| + | gpu_allocation_used = 40 * runtime * ngpus | ||
| + | |||
| + | ======Usage====== | ||
| + | |||
| + | =====GPU applications on Lengau===== | ||
| + | |||
| + | Some pre-built applications have automated scripts that you can use to launch them: | ||
| * [[howto: | * [[howto: | ||
| * [[howto: | * [[howto: | ||
| * [[howto: | * [[howto: | ||
| + | |||
| + | =====GPU Job Scripts===== | ||
| + | |||
| + | ====GPU Queues==== | ||
| + | |||
| + | There are four queues available in PBSPro which access the GPU nodes: | ||
| + | |||
| + | ^ Queue name ^ Max. CPUs ^ Max. GPUs ^ PBSPro options | ||
| + | | **gpu_1** | ||
| + | | **gpu_2** | ||
| + | | **gpu_3** | ||
| + | | **gpu_4** | ||
| + | |||
| + | Note the '' | ||
| + | |||
| + | ====GPU Queue Limits==== | ||
| + | |||
| + | The maximum wall clock time on all GPU queues is 12 hours. | ||
| + | <code bash> | ||
| + | #PBS -l walltime=12: | ||
| + | </ | ||
| + | |||
| + | > It is better to specify a shorter walltime if your code executes in less time: this allows the scheduler a better chance of running your job sooner. | ||
| + | |||
| + | ====Interactive Job on a GPU Node==== | ||
| + | |||
| + | A single // | ||
| + | |||
| + | <code bash> | ||
| + | qsub -I -q gpu_1 -P PRJT1234 -l select=1: | ||
| + | </ | ||
| + | **NB:** Replace //'' | ||
| + | |||
| + | The default time for an interactive session is 1 hour. | ||
| + | |||
| + | ====Example Job Script==== | ||
| + | |||
| + | <code bash> | ||
| + | #!/bin/bash | ||
| + | #PBS -N nameyourjob | ||
| + | #PBS -q gpu_1 | ||
| + | #PBS -l select=1: | ||
| + | #PBS -P PRJT1234 | ||
| + | #PBS -l walltime=4: | ||
| + | #PBS -m abe | ||
| + | #PBS -M your.email@address | ||
| + | |||
| + | cd / | ||
| + | |||
| + | echo | ||
| + | echo `date`: executing CUDA job on host ${HOSTNAME} | ||
| + | echo | ||
| + | echo Available GPU devices: $CUDA_VISIBLE_DEVICES | ||
| + | echo | ||
| + | |||
| + | # Run program | ||
| + | ./ | ||
| + | </ | ||
| + | |||
| + | As usual, replace '' | ||
| + | |||
| + | ====GPU Memory==== | ||
| + | |||
| + | Most of the V100 GPUs only have 16GiB of memory. | ||
| + | |||
| + | #PBS -l select=1: | ||
| + | |||
| + | or | ||
| + | |||
| + | #PBS -l select=1: | ||
| + | |||
| + | > Note that asking for a specific node is likely to lead to longer queue times as your job has to wait until that node becomes available. | ||
| + | | ||
| + | |||
| + | =====Compiling GPU Code===== | ||
| + | |||
| + | The Nvidia V100 GPUs are programmed using the **CUDA** development tools. | ||
| + | |||
| + | To build a CUDA code (library or application) for the GPU nodes requires loading the appropriate CUDA module before compiling. | ||
| + | |||
| + | < | ||
| + | chpc/ | ||
| + | chpc/ | ||
| + | chpc/ | ||
| + | chpc/ | ||
| + | chpc/ | ||
| + | chpc/ | ||
| + | </ | ||
| + | |||
| + | with version 12.0 the most recent version. | ||
| + | |||
| + | Note that the 11.x version modules are available in two types: | ||
| + | * the '' | ||
| + | * the '' | ||
| + | |||
| + | |||
| + | |||
| + | ====Further Reading==== | ||
| + | |||
| + | * Detailed [[https:// | ||
| + | * Nvidia [[http:// | ||
| + | * CUDA Toolkit [[https:// | ||
| + | |||
| + | |||
| + | |||