Skip to content

Intel Compilers

Intel C, C++, and Fortran Compilers


Intel Compilers requires an environment module

In order to use Intel Compilers, you must first load the appropriate environment module:

module load intel

The HPC provides the Intel C/C++ and Fortran compilers. These are the compilers that most applications use.

Supported languages#

Below are the compiler commands for C, C++, and Fortran:

1
2
3
4
5
6
7
8
# C compiler
$ icc

# C++ compiler
$ icpc

# Fortran compiler
$ ifort

Intel compiler tips#

  • To generate highly optimized code, compile using the -03 or -fast flags
  • Supply the -w flag to disable all warnings; use the -Wall flag to enable all warnings
  • Supply the openmp flag to generate code based on OpenMP directives.

Alternative versions#

The HPC provides multiple versions of the Intel compilers via environment modules. To see the versions of the Intel compiler that are available, run the following:

$ module avail intel

To load an alternative version of the compiler, run the following:

$ module load intel/16

Debugging#

The Intel compilers include a debugger:

$ gdb-ia

More Information#

For a quick reference of how to use the Intel compilers, add the --help flag to any command:

$ icc --help
$ ifort --help

More detailed information is available on the compilers' manual pages. To access these pages, use the man command:

$ man icpc
$ man ifort

For a comprehensive guide to using the Intel compilers, refer to the official documentation.