Category: Program Dev-Compilers
Cray provides the GNU compilers as part of several programming environments. There are several GNU versions: gcc 4.2.x as part of the PrgEnv-gnu environment, and gcc 3.3.3 in /usr/bin.
Note that Kraken has two kinds of nodes:
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.
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.1To just use the GNU compilers directly, just load the gcc module you want:
module avail gcc module load gcc/4.21 # Note that this does not changed 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):
kraken1> 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 -------------------------------------------------------------------
This package has the following support level : Supported
All versions of this software are provided by the system vendor and are not installed by NICS staff.