Intel compilers
Intel compilers
Section titled “Intel compilers”The Intel compoler suite includes front ends for the C (icc), C++
(icx), and Fortran (ifort) programming languages.
Choose a version
Section titled “Choose a version”The Intel compilers are available from the intel module. This
module loads the default version of the compiler.
$ module load intelIf you wish to use an older or newer version, you can list the available version with
$ module spider inteland then switch to the desired version using
$ module swap intel intel/<version>OpenMP Support
Section titled “OpenMP Support”OpenMP is turned off by default. You can turn it on using the -qopenmp flag.
Optimization options
Section titled “Optimization options”:material-help-circle-outline: man icc - man ifort
The default optimization level of the Intel compiler is -O2 -fp-model=fast. Therefore the most essential optimization flags are set by default:
-O2 -fp-model=fast-
the
-O2option performs nearly all supported optimizations -
the
-fp-model=fastrelax the IEEE specifications for math functions. This option can produce incorrect results, don’t use this flag if your code is sensitive to floating-point optimizations.
Compiler Feedback
Section titled “Compiler Feedback”Debugging
Section titled “Debugging”To ease a debugging process, it is useful to generate an executable containing
debugging information. For this purpose, you can use the -g option.
Most of the time, the debug information works best at low levels of code
optimization, so consider using the -O0 level. The -g options can be
specified on a per-file basis so that only a small part of your application
incurs the debugging penalty.