Versionen im Vergleich

Schlüssel

  • Diese Zeile wurde hinzugefügt.
  • Diese Zeile wurde entfernt.
  • Formatierung wurde geändert.

CUDA (Compute Unified Device Architecture) is an interface to program Nvidia GPUs. It offers support to the languages such as C, C++, and Fortran.

To build and execute code on the GPU A100 cluster, please login to

  • a GPU A100 login node, like bgnlogin.nhr.zib.de.
  • see also Quickstart

Code build

For code generation we recommend the software package NVIDIA hpcx which is a combination of compiler and powerful libraries, like e.g. CUDA, blas, and MPI.

Codeblock
languagetext
titlePlain OpenMP for GPUCUDA
bgnlogin1 $ module load nvhpc-hpcx/23.1
bgnlogin1 $ module list
Currently Loaded Modulefiles: ... 4) hpcx   5) nvhpc-hpcx/23.1
bgnlogin1 $ nvc -mpcuda -target=gpu openmp_gpu.cgpu=cc8.0 -o openmp_gpu.bincuda.bin cuda.c

CUDA offers a blas library for the GPU and it can be used in combination with MPI.

Codeblock
languagetext
titleMPI + OpenMP for GPUCUDA with cublas
bgnlogin1 $ module load nvhpc-hpcx/23.1
bgnlogin1 $ module list
Currently Loaded Modulefiles: ... 4) hpcx   5) nvhpc-hpcx/23.1
bgnlogin1 $ mpiccnvc -mpcuda -target=gpu mpi_openmp_gpu.cgpu=cc8.0 -o cuda_cublas.bin cuda_cublas.c
bgnlogin1 $ nvc -cuda -gpu=cc8.0 -cudalib=cublas -o cuda_cublas.bin cuda_cublas.c
bgnlogin1 $ mpicc -cuda -gpu=cc8.0 -cudalib=cublas -o cuda_cublas_mpi.bin cuda_openmpcublas_gpumpi.binc

Code execution

All available slurm partitions for the A100 GPU partition you can see on Slurm partitions GPU A100.

...