Compilers – GNU

Overview

The GNU Compiler Collection supports a number of programming languages.

Several versions are available on the iCSF – please see the table below.

Advice on programming in Fortran or C is currently beyond the scope of this webpage.

Restrictions on use

None, the compilers are open source.

Set up procedure

This depends on which version you require.

Version Commands/compilers available Module required Additional Notes
14.2.0 gcc, gfortran module load compilers/gcc/14.2.0
11.5.0 gcc, gfortran None This is now the system default in EL9
11.2.0 gcc, gfortran module load compilers/gcc/11.2.0
8.3.0 gcc, gfortran module load compilers/gcc/8.3.0
8.2.0 gcc, gfortran module load compilers/gcc/8.2.0
6.4.0 gcc, gfortran module load compilers/gcc/6.4.0
4.9.0 gcc, gfortran module load compilers/gcc/4.9.0
4.7.0 gcc, gfortran module load compilers/gcc/4.7.0
4.6.2 gcc, gfortran module load compilers/gcc/4.6.2
4.4.6 gcc, gfortran None This was the system default in EL7

By loading/swapping modules, the correct LD_LIBRARY_PATH will be set.

Running the application

Example Code Compilations

   gcc hello_world.c -o hello
       #
       # ...produces executable binary called "hello"...
       #

   gfortran hello_fworld.f77 -o f77hello
   gfortran hello_fworld.f95 -o f95hello
       #
       # ...produce executable binary called "f77hello" or "f95hello"...
       #

To run your code:

   ./f95hello

Further info

  • Online manuals available from the command line:
     man gcc
         # for the C/C++ compiler

     man gfortran
         # for the fortran compiler

Last modified on September 3, 2025 at 4:16 pm by Abhijit Ghosh