Louhi User's Guide, the 2nd Edition > Program development > Using MPI > Compiling and linking MPI programs
Tehdyt toimenpiteet

Compiling and linking MPI programs

In this subsection compiling and linking MPI programs is described.

No additional linking options are required to be given for the Cray wrappers ftn, f77, cc and CC when building MPI programs. For example, MPI programs written in Fortran 90, C and C++ can be built as follows:

ftn my_fortran_mpi_code.f90
cc my_c_mpi_code.c
CC my_C_mpi_code.C

You should, however, use all the applicable and recommended single-processor code optimization flags of the underlying compiler. These options can be given to the Cray wrappers. For more information see the sections General usage of PGI compilers, GNU Compiler Collection, and Optimization.