Turing : Compilation of MPI Code

To compile and link an MPI program, it is necessary to use the scripts prefixed by mpi : mpixlf90_r, mpixlc_r, mpixlcxx_r, …

Examples of MPI executable files generated for Blue Gene/Q :

$ mpixlf90_r prog.f90 -o prog 
$ mpixlc_r prog.c -o prog 
$ mpixlcxx_r prog.C -o prog

Changing the MPI version

To detect potential MPI problems, or alternatively, to improve the performance of MPI communications, it is possible to modify the MPI library version by using the module command. Three MPI versions are available:

  • mpi/gcc.legacy : This version can detect errors in MPI calls. It is used for verifying the correct behaviour of the code during the first porting on BG/Q.
  • mpi/xl : This version can also detect errors but with better performance than mpi/gcc.legacy. This is the MPI version which IBM positions on BG/Q.
  • mpi/xl.ndebug : In this version, the error-verification is deactivated but it should give better performance than mpi/xl. This is the MPI default version positioned on Turing by IDRIS.

If you want to access the mpi/xl version for example, you must position the module command before calling the scripts mpixlf90_r, mpixlc_r, mpixlcxx_r:

$ module load mpi/xl
$ mpixlf90_r prog.f90 -o prog

The Blue Gene/Q Application Development document describes the differences between the MPI versions on BG/Q.