Ada: Compilation of a hybrid MPI/OpenMP parallel code in Fortran, C/C++

The compiling and linking steps of an MPI program containing OpenMP directives is carried out by using one of the following command lines, depending on the nature of the source code :

 $ mpiifort -openmp source.f90
 $ mpiicc -openmp source.c
 $ mpiicpc -openmp source.C

The compilation commands mpiifort, mpiicc and mpiicpc refer respectively to the INTEL ifort, icc, and icpc compilers. They automatically include the paths for the Fortran MPI module mpif.h and the paths for the libraries necessary to MPI.

The -openmp option causes the compilers to interpret the OpenMP directives contained in the source program and to link with the appropriate libraries.

The execution of a hybrid MPI/OpenMP program can be done in interactive as well as in batch mode.