Exercise - Compiling
In this exercise we will use Vista's default setup to compile a couple of C codes that have been parallelized with OpenMP and MPI.
The first code is a simple, pure OpenMP code, ompsumtest.c. This code can be compiled as if it were a purely serial code, or it can be compiled so that the OpenMP pragmas take effect. To verify this claim, try compiling it both ways on a login node, with the Intel compiler:
You can verify that only the second executable is multithreaded by setting OMP_NUM_THREADS=2 and checking the output from running each one:
The second code is a hybrid OpenMP/MPI code, ompipi.c. It must be compiled with a suitable MPI wrapper, which is mpicc, no matter whether the GNU C compiler or the NVIDIA Compiler is used:
Since this is an MPI code, it can only be run on a compute node; the way to do this is covered in a later exercise.
CVW material development is supported by NSF OAC awards 1854828, 2321040, 2323116 (UT Austin) and 2005506 (Indiana University)