To build and execute code on the GPU A100 clusterpartition, please login to
- a GPU A100 login node, like bgnlogin.nhr.zib.de.
- see also QuickstartGPU A100 partition
Code build
For code generation we recommend the software package NVIDIA hpcx which is a combination of compiler and powerful libraries, like e.g. MPI.
...
Codeblock |
---|
language | text |
---|
title | MPI + OpenMP for GPU |
---|
|
bgnlogin1 $ module load nvhpc-hpcx/23.1
bgnlogin1 $ module list
Currently Loaded Modulefiles: ... 4) hpcx 5) nvhpc-hpcx/23.1
bgnlogin1 $ mpicc -mp -target=gpu mpi_openmp_gpu.c -o mpi_openmp_gpu.bin |
...
Codeblock |
---|
language | text |
---|
title | Job script for plain OpenMP |
---|
linenumbers | true |
---|
|
#!/bin/bash
#SBATCH --partition=gpu-a100:shared
#SBATCH --gres=gpu:41
#SBATCH --nodes=1
#SBATCH --ntasks-per-node=72
./openmp_gpu.bin
|
Codeblock |
---|
language | text |
---|
title | Job script for MPI + OpenMP | linenumbers | true |
---|
|
#!/bin/bash
#SBATCH --partition=gpu-a100
#SBATCH --gres=gpu:4
#SBATCH --nodes=2
#SBATCH --ntasks-per-node=72
module load nvhpc-hpcx/23.1
mpirun --np 8 --map-by ppr:2:socket:pe=1 ./mpi_openmp_gpu.bin
|
...