skip to content

CAUTION!!! This page may be out of date!!!!!!

 

The default C, C++ and Fortran compilers on Ubuntu 16.04 are version 5.4.0 of the GNU cc/gcc, c++/g++ and gfortran compilers. We have several other C/C++ and Fortran compilers available:

  • GNU GCC 7.2.0 C (gcc), C++ (g++) and fortran (gfortran) compilers
  • The Intel icc (C), icpc (C++) and ifort (Fortran) compilers: version 11 and version 13
  • NAg Fortran compiler Release 5.3.1(907)

The module system can be used on Maths Linux to setup an environment in which to compile code.

To see the available compiler environments run the command:

module avail

To load an environment using the module load command. For example for the Intel Fortran compiler (version 13.1.0.146):

GNU GCC 7.2.0 compilers

module load gcc/7.2.0

# check by running
gcc --version
gcc (GCC) 7.2.0
Copyright (C) 2017 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Intel v13 compilers

module load ifort/13.1.0.146

# check by running:
ifort -v
ifort version 13.1.0

To remove a module environment run the module unload command, for example:

module unload ifort/13.1.0.146

Intel v11 compilers

module load ifort/11.01.073

# check by running:
ifort -V
Intel(R) Fortran Intel(R) 64 Compiler Professional for applications running on Intel(R) 64, Version 11.1    Build 20100806 Package ID: l_cprof_p_11.1.073
Copyright (C) 1985-2010 Intel Corporation.  All rights reserved.

 

NAg Fortran

 

module load nagfor
nagfor -V
NAG Fortran Compiler Release 5.3.1(907)
Product NPL6A53NA for x86-64 Linux
Copyright 1990-2012 The Numerical Algorithms Group Ltd., Oxford, U.K.