Skip to main content

Using the Intel Compilers on ACRES


Overview

This page documents the steps to access Intel compilers on ACRES, and the various settings and options required for a successful compilation.

Loading an Intel Module

To use the intel compilers, the first step is to load a module that provides access to them. Running the "module spider intel" or "module spider iccifort" command reveals there are several options. ( For more info on the module system, see: How to find Software (introduction to the module system))

Some available modules that contain intel compilers are:

  • intel/19.1.3.304

  • intel/2019b

  • intel/2020a

  • intelcuda/2020a

  • iccifort/2019.5.281

  • iccifort/2020.1.217

  • iccifortcuda/2020a

  • iimpi/2019b

  • iimpi/2020a

  • iimpic/2020a

The "iccifort" modules only include the basic Intel compilers themselves, and the "iimpi" modules include the basic Intel compilers with Intel MPI (IMPI), whereas the "intel" modules contain the basic compilers, Intel MPI, and also Intel Math Kernel Libraries (IMLK). For this reason, "intel/2020a" sufficient for most purposes, which can be loaded with "module load intel/2020a". If support for the CUDA GPU programming API is required, one of the modules with "cuda" should be loaded, such as intelcuda/2020a. The "iimpic/2020a" module contains the Intel MPI compilers with Intel MPI and CUDA, but without Intel MKL.

More information about which software packages are included in each of these toolchain modules can be found in the EasyBuild documentation at the links below:

Common Toolchains

List of Known Toolchains

Choosing the Right Compiler Executables

Intel provides a variety of compiler executables with different names. See Intel's Compiler Command Reference for more information. Once an intel toolchain module is loaded (e.g. module load intel ), these compiler executables will be accessible from the command line. However, a particular compiler executable may need to be used in order to successfully compile your code. For example, if dependencies were compiled using "icc" and "mpiicc", then trying to compile the main code with "mpicc" will result in cross-compilation issues, since "mpicc" defaults to using "gcc", as shown in the Compiler Command Reference. To expressly use the intel compilers, do the following:

Set the following environment variables before compiling:

export CC=icc

export CXX=icpc

And use the following MPI compiler executables to compile your code:

mpiicc

mpiicpc

Using Intel MPI: Divide by Zero or Floating Point Exception Error

When using Intel MPI, an unexpected "divide by zero" error, or "floating point exception" may occur at runtime. To resolve this issue, the following environment variable needs to be set in the SLURM submit script before running the code:

export I_MPI_HYDRA_TOPOLIB=ipl

For some info on this, see: https://www.hlrn.de/doc/display/PUB/Floating+point+exception+with+Intel+MPI+2019.x+using+one+task+per+node

Intel MPI Library Developer Reference for Linux

The documentation at the following link contains information on settings, options, and environment variables that are available for the Intel compilers:

Developer Reference