Intel Compilers

Intel C, C++, and Fortran Compilers

The HPC and Spear provide the Intel C/C++ and Fortran Compilers. These are the compilers that most applications will wish to use.

Before using the Intel compilers or running batch jobs compiled with the Intel compiler, you must load the correct modules.

$ module load intel

Supported languages:

C

$ icc

C++

$ icpc

Fortran

$ ifort

Debugging

The Intel compilers include a debugger:

$ module load intel
$ gdb-ia

Intel Compiler Tips

  • To generate highly optimized code, try compiling with the -03 or -fast flags.
  • Add the -w flag to disable all warnings; use the -Wall flag to enable all warnings.
  • Add the -openmp flag to generate code based on OpenMP directives
  • Add the -static flag to prevent linking with shared libraries (everything will be statically linked)

More Information

For a quick reference, add the --help flag to any compiler command. For example:

$ icc --help

The Intel compiler man pages contain very descriptive documentation for each compiler. For example:

$ man icpc

In addition, the Intel Compiler website provides comprehensive documentation for Intel compilers.