Turing: Compilation of a hybrid MPI/OpenMP parallel code

The compiling and linking of an MPI program containing OpenMP directives is carried out by using one of the following command lines:

mpixlf95_r -qsmp=omp source.f95
mpixlc_r -qsmp=omp source.c
mpixlcxx_r -qsmp=omp source.C
  • The compilation commands mpixlf95_r, mpixlc_r and mpixlcxx_r refer respectively to the Fortran, C and C++ IBM compilers. They include all the paths for the include files (Fortran mpi module, mpi.h and omp.h files, …) and the libraries necessary to MPI and OpenMP.
  • The -qsmp=omp option causes the compiler to interpret the OpenMP directives contained in the source program and to link with the appropriate libraries.