General Information

Top of Page

Compiler Invocation on NY Blue/P

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, as described on the Compiler Invocation page.

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. For information about running threaded programs on NY Blue/P see Running Threaded Programs On NY Blue/P. You can run either threaded or non-threaded programs there.

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, C, and C++ cross compilers can be found under /opt/ibmcmp in

xlf/bg/11.1/bin (Fortran 77, 90, 95, and 2003),
vacpp/bg/9.0/bin (C)
vacpp/bg/9.0/bin (C++).

The various invocation names for these compilers and their meanings are described in the Compiling Programs section of the Using the XL Compilers for Blue Gene manual. Note that all cross compiler invocation names begin with the prefix bg, e.g. bgxlc.

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 you can look at the wrapper mpixlf77.

Top of Page

IBM Cross Compilers - MPI Wrappers

In place of

bgxlf, bgxlf90, bgxlf95, bgxlf2003, bgxlc, and bgxlC

you can use

mpixlf77, mpixlf90, mpixlf95, mpixlf2003, mpixlc, and mpixlcxx respectively

located in

/bgsys/drivers/ppcfloor/comm/bin.

These are mpich wrappers for those compilers. Usage is very similar to other mpich wrapper use. Environment variables can optionally be used to set compiler and linker flags.

Invocation examples for Bash shell:

  • mpixlc -qsource -o helloc.exe hello.c
  • export CFLAGS="-qsource"
    export LDFLAGS="-o helloc.exe"
    mpixlc hello.c

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.

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

/opt/ibmcmp/xlf/bg/11.1/bin,

and the native C (xlc) and C++ compilers ( xlc++ and xlC) are in

/opt/ibmcmp/vacpp/bg/9.0/bin.

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 Compiler Reference describe these.

Top of Page

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/ppcfloor/gnu-linux/bin

For example: powerpc-bgp-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 g77 you can look at the wrapper mpif77.

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/bin. These are mpich wrappers for those compilers. Notice there is also mpif77.

Usage is very similar to other mpich wrapper use. Environment variables can optionally be used to set compiler and linker flags.

Invocation examples for Bash shell:

  • mpicc -qsource -o helloc.exe hello.c
  • export CFLAGS="-qsource"
    export LDFLAGS="-o helloc.exe"
    mpicc hello.c

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.

Top of Page