Turing: Commands for the compilation system

The available commands are as follows:

  • To generate an executable file for the front-end machine
  • To generate a parallel executable file containing MPI calls for the Blue Gene/Q compute nodes
Languages Front-end Blue Gene/Q Source file
suffixes
Fortran xlf, xlf_r ou f77
(for Fortran 77 in fixed source form)

xlf90, xlf90_r or f90
(for Fortran 90 in free source form)

xlf95, xlf95_r or f95
(for Fortran 95 in free source form)

xlf2003, xlf2003_r or f2003
(for Fortran 2003 in free source form)

xlf2008, xlf2008_r or f2008
(for Fortran 2008 in free source form)
mpixlf77 or mpixlf77-r
(for Fortran 77 in fixed source form)

mpixlf90 or mpixlf90_r (for Fortran 90 in free source form)

mpixlf95 or mpixlf95_r
(for Fortran 95 in free source form)

mpixlf2003 or mpixlf2003_r
(for Fortran 2003 in free source form)
.f, .F,
.f77,.F77,

.f90, .F90


.f95, .F95,


.f03, .F03



.f08, .F08
C xlc or xlc_r mpixlc or mpixlc_r .c
C++ xlC, xlC_r, xlc++ or xlc++_r mpixlcxx or mpixlcxx_r .C, .cxx, .c++, .cc, .cp, .cpp

Examples of executable files created for Blue Gene/Q:

$ mpixlf95 prog.f95 -o prog 
$ mpixlc_r prog.c -o prog 
$ mpixlcxx_r prog.C -o prog 

Comments

Compilation of multi-threaded and OpenMP applications

Multithreaded applications or those using OpenMP directives must imperatively be compiled with the command suffixes in _r; in fact, it is necessary to use thread-safe commands and the standard libraries.

Notes about the Fortran source code form

The Fortran 77 commands (mpixlf77_r, xlf_r, …) assume that the source code is written in fixed form, while all the others assume the opposite:  free form. The source code form can be defined explicitly by using the option -qfixed (fixed form) or -qfree=f90 (free form). It should be noted, however, that since the Fortran 95 norm was established, the fixed form has been considered as obsolete.

In the following examples, prog.f90 contains a source code written in free form:

 $ mpixlf90_r prog.f90 -o prog 
$ mpixlf77_r -qfree=f90 prog.f90 -o prog

File suffix containing the Fortran code source

The source files can be suffixed with .f03, .f95, .f90 or just .f.  The same suffixes, but in uppercase letters, implies that a prerequisite call to the preprocessor must be made. The option -qsuffix=f=desired_suffix allows you to specify another suffix for the source file.