...
To compile HIP enabled GPU code or MPI+HIP enabled GPU code on Setonix
Code Block |
---|
$ module load rocm/version $ module load cray-accel-amd-gxf90a $ hipcc main.c |
To compile CUDA enabled GPU code or MPI+CUDA HIP enabled GPU code on Setonix
Code Block |
---|
$ module load rocm/version
$ module load cray-accel-amd-gxf90a
$ hipcc main.c -I${MPICH_DIR}/include -L${MPICH_DIR}/lib -lmpi |
To compile MPI+HIP enabled GPU code on Setonix with GPU-enabled MPI transfers (note the environment variable is also needed at runtime):
Code Block |
---|
$ module load rocm/version
$ module load cray-accel-amd-gxf90a
$ export MPICH_GPU_SUPPORT_ENABLED=1
$ hipcc main.c -I${MPICH_DIR}/include -L${MPICH_DIR}/lib -lmpi -L${CRAY_MPICH_ROOTDIR}/gtl/lib -lmpi_gtl_hsa |
To compile CUDA enabled GPU code or MPI+CUDA enabled GPU code on Topaz or Garrawarla
Code Block |
---|
$ module load cuda/version $ nvcc main.c |
...