Compiler Usage

Compiler usage

[GNU Compiler Collection (GCC) Compilers | Intel Compilers | PathScale Compilers | Portland Group (PGI) Compilers ]

Compilers are preferrably loaded as part of compiler toolchains. Read our page "Installed Compilers" for more about that.

To list all compiler toolchains, either do

module avail

or

ml av

OpenMP: All compilers has this included, so it is enough to load the module for a specific compiler toolchain and then add the appropriate flag (see Flags).

Note that instead of using the compiler names for the specific compiler (Intel, GCC, PGI) you can instead load the buildenv module after loading the compiler toolchain

ml buildenv

and then use

ml show buildenv

to get the environment variables that can be used in place of the compiler name.

GNU Compiler Collection (GCC)

To get all compiler modules and compiler toolchains, do: 

ml av

The ones that are using the GCC compilers:

  • GCC: GCC only
  • foss: GCC, OpenMPI, OpenBLAS/LAPACK, FFTW, ScaLAPACK
  • gompi: GCC, OpenMPI
  • gompic: GCC, OpenMPI, CUDA
  • goolfc: gompic, OpenBLAS/LAPACK, FFTW, ScaLAPACK

Remember to load a specific version (see with ml av <toolchain module>).

For more information about loading the compilers and other versions of the compilers, read "Installed Compilers".

Compiling, Abisko and Kebnekaise (remember to load the right toolchain module first)

Language Compiler name MPI
Fortran77 gfortran mpif77
Fortran90 gfortran mpif90
Fortran95 gfortran N/A
C gcc  mpicc
C++ g++ mpiCC

There are more information to find on the man pages which can be found by typing:

man <compiler name>

Note that you need to load the compiler module first. 

Here is a link to a place with more information:

Intel Compilers

The Intel compilers are installed on both Abisko and Kebnekaise. Note that we only have a limited number of licences. Because of this, you may sometimes experince that there is none available. Wait for a little while and try again. 

Abisko:

To get all compiler modules and compiler toolchains: 

ml av

The ones that are using the Intel compilers are:

  • iccifort: icc, ifort
  • iccifortcuda: iccifort, CUDA
  • iimpi: icc, ifort, IntelMPI
  • intel: icc, ifort, IntelMPI, IntelMKL
  • intelcuda: intel, CUDA

Remember to load a specific version (see with ml av <module>).

For more information about loading the compilers and other versions of the compilers, read "Installed Compilers".

Compiling, Abisko and Kebnekaise (remember to load the right toolchain module first!)

Language Compiler name MPI
Fortran77 ifort mpiifort
Fortran90 ifort mpiifort
Fortran95 ifort N/A
C icc  mpiicc
C++ icpc mpiicc

There are more information to find on the man pages which can be found by typing 

man <compiler name>

Remember that you need to load the module first!

Here are some links to places with more information:

PathScale compilers

This compiler is currently not installed.

Here is a link to a place with more information:

Portland group (PGI) compilers

To get all compiler modules and compiler toolchains: 

ml av

The ones that are using the PGI compilers:

  • PGI: pgcc, pgc++, pgf77, pgf90, pgf95
  • pompi: pgcc, pgc++, pgf77, pgf90, pgf95, OpenMP
  • pomkl: pgcc, pgc++, pgf77, pgf90, pgf95, OpenMPI, Intel MKL

Remember to load a specific version (see with ml av <module>).

For more information about loading the compilers and other versions of the compilers, read "Installed Compilers".

Compiling on Abisko and Kebnekaise (remember to load the right toolchain module first!)

Language Compiler name MPI
Fortran77 pgf77 mpif77
Fortran90 pgf90 mpif90
Fortran95 pgf95 N/A
C pgcc  mpicc
C++ pgc++ mpiCC

There is also a High Performance Fortran compiler: pghpf.

There are more information to find on the man pages which can be found by typing 

man <compiler name>

Here is a link to a place with more information:

Updated: 2017-11-24, 17:02