GNU

Category: Program Dev-Compilers

Description

Cray provides the GNU compilers as part of several programming environments. GNU versions 4.4.x and 4.3.x are available as part of the PrgEnv-gnu environment, and gcc 4.1.2 in /usr/bin.

Note that Jaguar has two kinds of nodes:

  1. Compute nodes running the CNL OS.
  2. Service and login nodes running Linux.

The Cray wrappers cc, CC, and ftn will automatically link against MPI (-lmpi) and SciLib (-lsci). This is not true when calling the GNU compilers directly. See the cc, CC, and ftn man pages for more information on their usage.

To see man pages on GNU compilers with a full list of compiler options, first make sure the "PrgEnv-gnu" module is loaded, and then do a man on any of the following:

For more detailed information, see GNU documentation and Cray's documentation.

Use

It is best to review the gcc, g++, and gfortran man pages for a list of their options.

To use the Cray wrappers with the GNU compilers, the PrgEnv-gnu module should be loaded:

  module avail PrgEnv
  module swap PrgEnv-pgi PrgEnv-gnu        # this loads some version of gcc, currently 4.2.0.quadcore
To just use the GNU compilers directly, just load the gcc module you want:
  module avail gcc
  module load gcc/4.2.1           # Note that this does not change/update the Cray wrappers.
It is possible to use the GNU compiler versions directly without loading the Cray Programming Environments, but note that the Cray wrappers will probably not work as expected if you do that.

Also note that with CNL 2.0.49 and above, the following options are set automatically by the xtpe-quadcore module (loaded by default):

jaguar12> module display xtpe-quadcore
-------------------------------------------------------------------
/opt/xt-asyncpe/1.0/modulefiles/xtpe-quadcore:

prepend-path     PE_PRODUCT_LIST XTPE_QUADCORE
setenv           XTPE_QUADCORE_ENABLED ON
setenv           LIBSCI_PRE_LINK_OPTS  -lsci_quadcore
setenv           PGI_POST_COMPILE_OPTS   -tp barcelona-64
setenv           PATHSCALE_POST_COMPILE_OPTS  -march=barcelona
setenv           GNU_POST_COMPILE_OPTS  -march=barcelona
setenv           LLVM_AMD_10H 1
-------------------------------------------------------------------

However, be aware that the "barcelona" option only works with certain versions of the compiler.
Versionbarcelona support
4.2.0.quadcoreyes
4.2.0-4no
4.1.2no

Support

This package has the following support level : Supported

Available Versions

All versions of this software are provided by the system vendor and are not installed by NICS staff.