Intel

This describes how to use the IntelĀ® compilers. The compilers available on the cluster are the open source GNU Compiler Collection and the proprietary Intel compilers. The Intel compiler often compiles to a slightly faster executable as Intel knows more in-depth information about optimisation of code on its processors.

This table lists the compilers available.

Compiler The Intel Option The GNU Option
C Compiler icc gcc
C++ Compiler icpc g++
Fortran Compiler ifort gfortran

The GNU compilers are already on your PATH and ready to go. To use the Intel compiler you need to set a number of environment variables. To do that source the Intel supplied script compilervars.sh with the following values for architecture and platform:

$ source /shared/opt/intel/compilers_and_libraries_2018/linux/bin/compilervars.sh intel64

You will now find that your environment has been changed to use the Intel compilers:

$ which icc
/shared/opt/intel/compilers_and_libraries_2018.5.274/linux/bin/intel64/icc

$ which ifort
/shared/opt/intel/compilers_and_libraries_2018.5.274/linux/bin/intel64/ifort

$ which icpc
/shared/opt/intel/compilers_and_libraries_2018.5.274/linux/bin/intel64/icpc

To see what has been added to your environment run:

$ env | grep intel