GPU Offloading¶
The accelerated partition of the HoreKa cluster consists of nodes that draw their computing power mainly from the installed GPUs. To leverage these devices, the computing operations must be transferred from the host CPU to the GPUs, which is referred to as offloading.
In recent years, four main programming approaches have emerged that can be used to perform this offloading. The following sections show how these can be used on HoreKa:
In order for the compilers to apply the appropriate optimizations, it is recommended to compile directly on the target architecture. I.e. it usually makes sense to compile programs with GPU offloading on compute nodes equipped with GPUs. On the HoreKa cluster you can start an interactive job on the GPU development partition for this purpose:
$ salloc -p <partition_name> --gres=gpu:1 -t 60