titan

Up since 11/8/17 02:45 pm

eos

Up since 11/14/17 11:20 pm

rhea

Up since 10/17/17 05:40 pm

hpss

Up since 11/20/17 09:15 am

atlas1

Up since 11/15/17 07:25 am

atlas2

Up since 11/27/17 10:45 am
OLCF User Assistance Center

Can't find the information you need below? Need advice from a real person? We're here to help.

OLCF support consultants are available to respond to your emails and phone calls from 9:00 a.m. to 5:00 p.m. EST, Monday through Friday, exclusive of holidays. Emails received outside of regular support hours will be addressed the next business day.

gcc

Description

Description

Website: http://gcc.gnu.org/

The GNU Compiler Collection (GCC) includes front ends for C, C++, Objective-C, Fortran, Java, Ada, Go, and libraries for many more. GCC was originally written as the compiler for the GNU operating system. The GNU system was developed to be 100% free software, free in the sense that it respects the user’s freedom.

Cray provides the GNU compilers as part of several programming environments. Titan has GNU versions as part of the PrgEnv-gnu environment, and gcc in /usr/bin.

Note that Cray Systems have two different types of nodes, with implications to compiling code on each.

  1. Compute nodes running the CNL OS.
    • To build code for the compute nodes, you should use the Cray wrappers cc, CC, and ftn.
    • The wrappers will call the appropriate GNU compiler which will use the appropriate header files and link against the appropriate libraries.
  2. Service and login nodes running Linux.
    • To build code for the Linux service nodes, you can call the GNU compilers directly. (See list below.)
    • We strongly suggest that you don’t call the GNU compilers directly if you are building code to run on the compute 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:

  • gcc
  • g++
  • gfortran

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

Usage

Usage

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 the current version of gcc

To just use the GNU compilers directly, just load the gcc module you want:

module avail gcc
module load gcc/4.5.3  # 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.

The following information is available by running module help gcc

----------- Module Specific Help for 'gcc/4.9.0' ------------------

gcc 4.9.0
=========

Release Date:
-------------
June 5, 2014

Purpose:
--------
The gcc 4.9.0 release. 
The additional cray-set-gcc-libs rpm sets up the 
linking infrastructure for gnu shared libraries.

The following bug is fixed in the gcc 4.9.0 release.
  808706  NAMD GPU version segfaults when compiled with gcc/4.8.2 [GCC Bug 58800]

Product and OS Dependencies:
----------------------------
The gcc 4.9.0 release is supported on the following Cray systems:
* Cray XE and XK systems with CLE 4.2 and CLE 5.2.
* Cray XC systems with CLE 5.1 and CLE 5.2.

Limitations:
--------------
gcc 4.9.0 is not supported with Cuda 5.5. 
The Cuda runtime header will show an error when compiling with nvcc. 
It is recommended to only install gcc 4.9.0 as non-default on 
XK systems for this reason.

Documentation:
--------------
http://gcc.gnu.org/gcc-4.9

Modulefile:
---------------------
module load gcc/4.9.0

This modulefile defines the system paths and environment variables 
needed to use gcc, gfortran and g++ on Cray systems. The gcc modulefile 
can be swapped for other gcc versions. This modulefile may be loaded 
as a standalone modulefile or as part of the GNU Programming Environment, 
PrgEnv-gnu. The CrayPE drivers, cc, CC, and gfortran, are recommended for 
use with PrgEnv-gnu to generate compilation and link lines.

The following modulefiles support the GNU 4.9.0 based Programming Environment:
For Cray XE and XK systems:
  xt-asyncpe               5.27    or later
For Cray XC systems:
  craype                   2.1.2   or later
For Cray XE, XK, and XC systems:
  cray-mpich               7.0.0   or later
  cray-libsci             13.0.0   or later
  libsci_acc               3.0.2   or later
  cray-tpsl                1.4.1   or later
  cray-petsc               3.4.4.0 or later
  cray-trilinos           11.8.1.0 or later
  cray-hdf5                1.8.13  or later
  cray-hdf5-parallel       1.8.13  or later
  cray-netcdf              4.3.2   or later
  cray-netcdf-hdf5parallel 4.3.2   or later
  cray-parallel-netcdf     1.4.1   or later
  cray-ga                  5.1.0.5 or later
  fftw2                    2.1.5.7 or later
  fftw                     3.3.4.0 or later

Installation instructions:
--------------------------
rpm -ihv cray-set-gcc-libs-1.0.0-02.x86_64.rpm
rpm -ihv cray-gcc-4.9.0-09.x86_64.rpm

To change the product version to default after installation:
   /opt/cray/admin-pe/set_default_files/set_default_gcc_4.9.0

Certain components, files or programs contained within this package or product are Copyright -2014 Cray Inc. All rights reserved.

===================================================================
To re-display gcc/4.9.0 release information,
type:    less /opt/gcc/4.9.0/release_info
===================================================================

Versions

Available Versions

System Application/Version
Titan gcc/4.6.1
Titan gcc/4.8.1
Titan gcc/4.8.2
Titan gcc/4.9.0 (default)
Titan gcc/4.9.1
Titan gcc/4.9.2
Titan gcc/4.9.3
Titan gcc/5.1.0
Titan gcc/5.2.0
Rhea gcc/4.3.3
Rhea gcc/4.4.4
Rhea gcc/4.4.7
Rhea gcc/4.6.3
Rhea gcc/4.7.1
Rhea gcc/4.8.2
Eos gcc/4.8.1
Eos gcc/4.8.2(default)
Eos gcc/4.9.0
Eos gcc/4.9.2
Eos gcc/4.9.3
Eos gcc/5.1.0