BlueGene Homepage BlueGene Homepage BlueGene Homepage BlueGene Homepage

Compiler Invocation on BNL Blue Gene/Q

Overview

IBM Cross Compilers - Unwrapped

IBM Cross Compilers - MPI Wrappers

IBM Native Compilers

GNU Cross Compilers - Unwrapped

GNU Cross Compilers - MPI Wrappers

GNU Native Compilers

Back to BNL Blue Gene/Q User Guide

Overview

To run a code on the compute nodes you must compile and link it using a "cross-compiler" on the front-end (login node). A cross-compiler produces an executable that will run on the compute nodes.

If you instead use a native compiler, the resulting executable will run on the front-end but not on the remote nodes. Also, you can use the native compilers to compile and link only serial code because there are no mpich libraries on the front-end.

Currently you should run your applications on the compute nodes only. The native compilers can be used for compiling and linking the serial portion of your parallel application.

The locations and names of the "unwrapped" cross compilers appear below. For each such there is a description of the corresponding mpich-wrapper cross compiler, which is just a wrapper script that makes the cross compiler a bit easier for the user to invoke.

If there is a Thread-safe version of a compiler, its invocation name will have a _r suffix, for example bgxlc_r is the thread-safe version of the unwrapped IBM C cross compiler bgxlc.

Back to Top of Page

IBM Cross Compilers - Unwrapped

Unless and until you develop expertise with the IBM cross compilers, rather than use the unwrapped version, you're better off using the IBM cross compilers with mpi wrappers.

The unwrapped XL Fortran 77, Fortran 90, Fortran 95, Fortran 2003, Fortran 2008, C, and C++ cross compilers can be found under /opt/ibmcmp in

xlf/bg/14.1/bin (Fortran 77, 90, 95,2003, and 2008),
vac/bg/12.1/bin (C)
vacpp/bg/12.1.0/bin (C++).

The various invocation names for these compilers and their meanings are described in the IBM XL C/C++ for Blue Gene/Q, V12.1 Compiler Reference for C/C++ and the IBM XL Fortran for Blue Gene/Q, V14.1 Compiler Reference for Fortran. Note that all cross compiler invocation names begin with the prefix bg, e.g. bgxlc_r .

For a given unwrapped ibm cross compiler, you can look at the corresponding wrapped version to see how you would link required libraries and incorporate required include files, for example for the unwrapped bgxlf_r you can look at the wrapper mpixlf77_r.

Back to Top of Page

IBM Cross Compilers - MPI Wrappers

In place of

bgxlf_r, bgxlf90_r, bgxlf95_r, bgxlf2003_r, bgxlc_r, and bgxlC_r

you can use

mpixlf77_r, mpixlf90_r, mpixlf95_r, mpixlf2003_r, mpixlc_r, and mpixlcxx_r respectively

located in

/bgsys/drivers/ppcfloor/comm/xl/bin.

These are mpich wrappers for porting and application development for those compilers.

IMPORTANT NOTE: There are also subdirectories xl.legacy, xl.legacy.ndebug, and xl.ndebug under /bgsys/drivers/ppcfloor/comm . See the "Compiling MPI Programs on the Blue Gene/Q System" section of the Blue Gene/Q Application Development redbook at the IBM redbook web site for guidance as to which subdirectory's MPI wrappers to use depending upon your stage of development and other factors .

Back to Top of Page

IBM Native Compilers

You would use these to compile and link serial code portions only of your application on the front-end, as the first step of a larger objective of compiling and linking your parallel application to run on the compute nodes.

The native compiler invocation names do not begin with the bg prefix, for example the native IBM Fortran 77 invocation is xlf_r .

The native Fortran 77 (xlf), Fortran 90, Fortran 95, Fortran 2003, and Fortran 2008 compilers are located in

/opt/ibmcmp/xlf/bg/14.1/bin,

and the native C (xlc_r) and C++ compilers ( xlc++_r and xlC_r) are in

/opt/ibmcmp/vac/bg/12.1/bin and

/opt/ibmcmp/vacpp/bg/12.1/bin respectively.

Regarding the invocation names to use, the Compiling XL Fortran Programs section of the IBM XL Fortran for Linux Compiler Reference and the Invoking the Compiler section of the IBM XL C/C++ for Linux Version 12.1 Compiler Reference describe these.

GNU Cross Compilers - Unwrapped

Unless and until you develop expertise with the GNU cross compilers, rather than use the unwrapped version, you're better off using the GNU cross compilers with mpi wrappers.

The GNU Fortran, C, and C++ cross compilers can be found under
/bgsys/drivers/toolchain/V1R1M1/gnu-linux/bin

For example powerpc64-bgq-linux-gcc is gcc. Note that /usr/bin/gcc should not be used for cross-compiling, it does not cross compile, it is the native gcc compiler.

For a given unwrapped gnu cross compiler, you can look at the corresponding wrapped version to see how you would link the libraries and incorporate the include files, for example for the unwrapped gfortran you can look at the wrapper mpif90.

Back to Top of Page

GNU Cross Compilers - MPI Wrappers

In place of

gfortran, gcc, and g++

you can use

mpif90, mpicc, and mpicxx respectively

located in /bgsys/drivers/ppcfloor/comm/gcc/bin. These are mpich wrappers for those compilers. Notice there is also mpif77.

Invocation example for Bash shell:

Back to Top of Page

GNU Native Compilers

The GNU native compilers gfortran, gcc and g++ are located in /usr/bin . You would use the GNU native compilers to compile and link the serial portion only of your application on the front-end, as the first step of a larger objective of compiling and linking your parallel application to run on the compute nodes.

Back to Top of Page


This site maintained by: bgwebmaster@bnl.gov

One of ten national laboratories overseen and primarily funded by the Office of Science of the U.S. Department of Energy (DOE), Brookhaven National Laboratory conducts research in the physical, biomedical, and environmental sciences, as well as in energy technologies and national security. Brookhaven Lab also builds and operates major scientific facilities available to university, industry and government researchers. Brookhaven is operated and managed for DOE's Office of Science by Brookhaven Science Associates, a limited-liability company founded by Stony Brook University, the largest academic user of Laboratory facilities, and Battelle, a nonprofit, applied science and technology organization.
Privacy and Security Notice