...
Column | |||||||||
---|---|---|---|---|---|---|---|---|---|
| |||||||||
|
...
Code Block |
---|
$ module load openmpi/version<VERSION> $ cc -c main.c $ cc -o main main.o -L/usr/local/mylib/libs -l<library-name> |
...
To compile openACC enabled code or MPI+openACC enabled code, use -fopenmp fopenacc flag during compilation
Code Block |
---|
$ cc -fopenacc -c main.c
$ cc -o main main.o -fopenacc -L/usr/local/mylib/libs -l<library-name> |
...
Code Block |
---|
$ module load rocm/version<VERSION> $ module load craycraype-accel-amd-gxf90agfx90a $ hipcc --offload-arch=gfx90a main.c |
To compile MPI+HIP enabled GPU code on Setonix
Code Block |
---|
$ module load rocm/version<VERSION> $ module load craycraype-accel-amd-gxf90agfx90a $ hipcc --offload-arch=gfx90a main.c -I${MPICH_DIR}/include -L${MPICH_DIR}/lib -lmpi |
...
Code Block |
---|
$ module load rocm/version<VERSION> $ module load craycraype-accel-amd-gxf90agfx90a $ export MPICH_GPU_SUPPORT_ENABLED=1 $ hipcc --offload-arch=gfx90a 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<VERSION> $ nvcc main.c |
Common compiler options
...
Visit the User Guide of the system you want to compile your code on for tailored suggestions.
Related pages
- Pawsey Supercomputing Systems Guides per Supercomputer
- Compiler Options for Debugging
- Serial Optimisation
- How to Manually Build Software
...