An overview of the various compilers (GNU, Intel, PGI) and debuggers (gdb, Alliena ddt, PGI) available on Faculty of Environment Linux systems
The Faculty Linux systems have access to the GNU (gcc), Intel
and PGI
compilers.
The default setting is to use the system version of the GNU compilers (/usr/bin/gcc
, /usr/bin/gfortran
, /usr/bin/g++
).
The compilers are loaded using the Environment Modules software.
The default setting on the Faculty Linux machines is to use the system version of the GNU compilers, found in /usr/bin
.
There will generally be at least one (more recent) version of the GNU compilers available in the modules, which can be found with:
module avail gnu
On the Faculty systems:
module load gcc
will load the most recent version of the GNU compilers available on the system, and:
module load gnu
will load the default / system version.
The following variables will be set when using the GNU compilers:
gcc
g++
gfortran
gfortran
gfortran
The Faculty Linux systems continue (at present) to provide the g77
compiler (/usr/bin/g77
), mostly to allow the compilation of code which only compiles with g77
...
g77
has not been updated in many years, may be removed from the systems in the future, and is not recommended for general use.
If you have / have to use code which will only compile with g77
, be prepared for it to stop working at any time!
The Intel compilers are a licensed product, for which the University has a number of licenses available for use on Linux systems only - the University does not have licenses available for the Windows or Apple versions of the compilers.
The intel compilers can be loaded with:
module load intel
The following variables will be set when using the Intel compilers:
icc
icpc
ifort
ifort
ifort
The Intel compilers have access to the Intel Math Kernel Library, which can be linked in at compilation time with the
mkl
option:
ifort -mkl -o program source.f90
The PGI compilers are a licensed product, for which the University has a number of licenses available for use on Linux systems. The intel compilers can be loaded with:
module load pgi
The following variables will be set when using the PGI compilers:
pgcc
pgc++
pgf95
pgf77
pgf95
The Faculty Linux systems have versions of the Open MPI and MPICH
MPI libraries available.
By default, the OpenMPI libraries will be loaded at login to the Linux systems. To load the OpenMPI libraries:
module load openmpi
To load the MPICH libraries:
module load mpich
When the compiler is changed (e.g. module load intel
), the MPI libraries will automatically be switched to version that is compatible with the compiler:
% echo ${CC} gcc % mpicc -v Using built-in specs. COLLECT_GCC=/usr/bin/gcc ... % module load intel % echo ${CC} icc % mpicc -v icc version 17.0.0 (gcc version 4.8.5 compatibility)
The Faculty Linux systems have access to the GNU gdb debugger, the ArmDDT (formally Allinea DDT) debugger (as part of the Arm Forge package), as well as the PGI debugger which is provided with the compiler suite.
Detailed usage of debuggers is beyond the scope of these notes, but some information on accessing the various debuggers is included below.
The default version of gdb
will be installed at /usr/bin/gdb
, and can be accessed by simply running:
gdb
gdb
is a purely command line program, though the DDD graphical front end is also installed on the Faculty Linux systems, and can be launched with:
ddd
The Armddt
debugger is a licensed product for which the University has a number of Licenses.
The Arm software (formally Allinea) can be loaded with:
module load allinea
The ddt
debugger can then be loaded with:
ddt
This will launch the Arm Forge graphical program, from which the debugging process can be started.
The Arm Forge software is very powerful, and compatible with various compilers and MPI environments.
Allinea documentation can be found at:
https://developer.arm.com/docs/101136/1910/ddt/getting-started
The ArmForge software also includes access to the MAP profiler, which can be used to closely inspect programs and their activity, and can be a great help in optimising code.
Once the ArmForge software has been loaded:
module load allinea
The MAP profiler, which is a graphical application, can be launched with:
map
When the PGI compilers are in use / have been loaded with:
module load pgi
The PGI debugger can be launched with:
pgdbg
This will launch a graphical application by default.