Installed Compilers

Installed Compilers

There are compilers available for Fortran 77, Fortran 90, Fortran 95, C, and C++. The compilers can produce both general-purpose code and architecture-specific optimized code to improve performance (loop-level optimizations, inter-procedural analysis and cache optimizations).

Compilers and Compiler Toolchains

The compilers are arranged in 'Compiler toolchains', which are bundles of software making up a complete environment for compiling or using a specific prebuilt software. A toolchain usually includes a compiler suite, an MPI version, BLAS, LAPACK, ScaLapack, and FFTW. It may also be just a compiler, like GCC alone, or something in between.

If you do

ml av

or

module avail

when you have logged in, you will get a list of (mainly) the compiler toolchains and their respective versions. You should always specify the full version when loading a compiler or software package.

Currently available toolchains:

  • GCC: GCC C/C++/Fortran compilers only
  • foss: GCC, OpenMPI, OpenBLAS/LAPACK, FFTW, ScaLAPACK
  • gompi: GCC, OpenMPI
  • gompic: GCC, OpenMPI, CUDA
  • gcccuda: GCC, CUDA
  • goolfc: gompic, OpenBLAS/LAPACK, FFTW, ScaLAPACK
  • gimkl: GCC, IntelMPI, IntelMKL
  • iccifort: Intel C/C++/Fortran compilers only
  • iccifortcuda: iccifort, CUDA
  • iimpi: iccifort, IntelMPI
  • intel: iccifort, IntelMPI, IntelMKL
  • intelcuda: intel, CUDA
  • PGI: PGI C/C++/Fortran compilers only
  • pompi: PGI, OpenMPI
  • pomkl: PGI, OpenMPI, IntelMKL

Use

ml av <compiler toolchain>

to see which versions are available.

In order to be able to use compiler toolchain, you need to load it with

ml <compiler toolchain>

You can get more information/description about a toolchain with

ml spider <compiler toolchain>

For more information, go to our page about the module system.

Example, foss/2016b (Containing GCC, OpenMPI, OpenBLAS/LAPACK, FFTW, ScaLAPACK)

Loading:

ml foss/2016b

Unloading:

ml -foss/2016b

Example, gompic/2016.10 (Containing GCC, OpenMPI, CUDA)

Loading:

ml gompic/2016.10

Here you also now have access to the CUDA toolkit, including the CUDA compilers (nvcc).

Unloading:

ml -gompic/2016.10

Example, intel/2017.01 (icc, ifort, IntelMPI, IntelMKL)

Loading:

ml intel/2017.01

Unloading:

ml -intel/2017.01

Build environment

Using a compiler toolchain by itself is possible but requires a fair bit of manual work, figuring out which paths to add to -I or -L for include files and libraries, and similar.

To make life as a software builder easier there is a special module available, buildenv, that can be loaded on top of any toolchain. If it is missing for some toolchain, send a mail to support@hpc2n.umu.se and let us know.

This module defines a large number of environment variables with the relevant settings for the used toolchain. Among other things it sets CC, CXX, F90, FC, MPICC, MPICXX, MPIF90, CFLAGS, FFLAGS, and much more.

To see all of them do, after loading a toolchain

ml show buildenv

Depending on the software one can use these environment variables to set related makefile variables or cmake defines, or just use them for guidelines on what to use in makefiles etc.

Exactly how to use them depends on the softwares build system.

Updated: 2024-03-08, 14:54