CUDA
CUDA
NVIDIA's CUDA programming language is based on C++, and allows relatively simple programming of NVIDIA GPUs to attain significant speed-ups of scientific code. A good starting point is either the lecture course given as part of the MPhil in Scientific Computing, or the NVIDIA website.
At the time of writing, drivers for CUDA 11.7 are installed on
most machines on the LSC network and the toolkit can be found
under /lsc/opt/cuda-11.7
. The nvcc
compiler
should work correctly. Documentation can be found at NVIDIA's website.
CUDA machines
As a first start, the LSC system list will show you which machines have CUDA capability. However, most of these cards are only consumer-grade GPUs, not production-grade compute cards. The differences are that the production-grade cards have more memory (typically 4GB as opposed to 1GB), and it is ECC-enabled. Further, these are dedicated for computing, rather than being part-used for actual graphical display.
If you use the display-GPU of any machine, note that issues such as buffer-overflows/seg-faults may adversely affect your display, and in extreme cases may require a reboot.
The following is a list of production-grade NVIDIA GPUs:
Machine | Card(s) | Compute capability | RAM (per card) |
---|---|---|---|
tycho | 2 x Kepler K20c | 3.5 | 5GB |
hex | 4 x Kepler K20c | 3.5 | 5GB |
philonis/atalanta/melete | 2 x NVIDIA A4000 | 8.6 | 16GB |
lovelace | 2 x NVIDIA A30 | 8.0 | 24GB |
The other cards installed in these machines are consumer-grade and are used for graphical display.
CUDA Examples
CUDA demo codes can be found at /lsc/opt/cuda-11.7/extras/demo_suite/
and the deviceQuery program will give technicial specifications of the local GPU(s).
The nvidia-smi
tool can also be used to monitor current GPU usage.