Overview of the installation and usage of the GCC on LRZ platforms

The GNU Compiler Collection provides front ends for C, C++, Objective-C, Fortran, Java, Go and Ada, as well as libraries for these languages. For details on GCC, please refer to the GCC home page. This document provides an overview of the GCC installations on LRZ platforms as well as documentation and additional hints for the installed releases. 

The GCC is free software distributed under the terms of the GNU General Public License.

Accessing the compilers

A default version of the GCC is installed on all Linux-based systems. However, more recent releases of the GCC are separately installed and therefore can only be accessed by loading a suitable environment module:

module load gcc/<version>

(where <version> refers to one of the available release numbers). The command module avail gcc will give you an overview over available versions.

Support for parallel programming

MPI support

For the various MPI variants available on LRZ HPC systems, some also support the GCC. You typically need to load an environment module of the form

module load mpi.<flavor>/<version>_gcc 

to make use of this functionality. Since the accessed installation depends on the used GCC version, you need to do this after the desired gcc module has been loaded.

OpenMP support

The Fortran, C and C++ compilers support the OpenMP standard, which provides directives and a small API for shared memory parallelization. Please study the compiler documentation of the GCC release you want to use for the level of support for this programming model.

PGAS: Partitioned Global Address Space

Please consult the LRZ PGAS page for details on this programming model.

C and C++ compilers

Invocation of the C compiler is via the gcc command, and of the C++ compiler via the g++ command.

Fortran compiler

The Fortran compiler is invoked via the gfortran command.

GNU Java

The GCC supports compiling Java code via the gcj front end.

The Go programming language

Starting with version 4.6 of the GCC, the Go programming language is supported. The Go compiler is invoked via gccgo.

Ada 95 on LRZ platforms

This very powerful language with excellent development support and error detecting facilities within the compiler itself is also available within the GCC. The Ada compiler is invoked via gnatmake or gnat.


Documentation for the various compilers is available on the GCC online docs page.

Please note that the Copyright for all information in this section belongs to the Free Software Foundation.

  • No labels