In this exercise you can have a first taste about using GPUs.
-
Use the provided batch job script job_gpu.sh for running the
rocm-smi
command in GPU node. Investigate output.Submit the batch job again, but request now more GPUs, i.e. increase the value in
--gpus-per-node
Slurm option. How does the output look now?Hint:
rocm-smi
can be useful also with real applications. While a GPU job is running, one can start a shell in compute node, and by issuing therocm-smi
command there one can get first hint how the application is utilizing GPUs. -
Try to build and run a simple "GPU hello world" program. In order to build application for GPUs, a proper modules need to be loaded:
module load PrgEnv-cray module load rocm module load craype-accel-amd-gfx90a
Once the modules are loaded, build the code with the provided Makefile. Finally, run the program
hello_gpu
in a GPU node, try to request different number of GPUs.