De Wiki de Calcul Québec
Aller à : Navigation, rechercher
Cette page est une traduction de la page Intel et la traduction est complétée à 100 % et à jour.

Autres langues :anglais 100% • ‎français 100%

The Intel compiler suite is a set of compilers for C (icc), C++ (icpc) and Fortran (ifort) developped and maintained by Intel.


Advantages and disadvantages

The Intel compiler suite is a proprietary software requiring a license to use. As a processor manufacturer, Intel is sometimes able to support faster hardware optimizations than other compilers. This is especially true on recent architectures. Intel compilers therefore often (but not always) yield better performances than those of other compilers, especially when running on Intel processors. Given the often better performances, all of Calcul Québec's supercomputers make this suite available to users.

Compiling options

A list of generic options is available on the page Compiling Code.

Options specific to Intel compilers

Option Description Example
-xHost Enables optimizations specific to the architecture on which the code is compiled, such as SSE instructions.
icc -xHost ...
-static, -Bstatic Link binaries (objects and libraries) statically to the executable.
icc -static ...
-ipo Enables Interprocedural Optimization.
icc -ipo ...
-openmp Enables support for OpenMP.
icc -openmp ...
-no-prec-div Enables agressive optimizations for division, which may improve performance significantly, but which do not respect IEEE standard for divisions.
icc -no-prec-div ...

Options specific to Fortran compiler

Option Description Example
-72, -80, -132 Sets the maximal length of lines to 72, 80 or 132 characters when fixed format is used (Fortran 77)
ifort -132 ...
-FI, -fixed Explicitely enables fixed format.
ifort -fixed ...
-FR, -free Explicitely enables free format.
ifort -free ...
-u Forces explicit declaration of all variables.
ifort -u ...

Recommended options

We recommend using the -O2 -xHost options. -O2 may be replaced by -O3, which adds some more optimizations. While -O2 is almost always better than -O1, -O3 sometimes perform worse than -O2.

Interprocedural Optimization

Softwares are generally compiled one source file at a time, and intermediate binaries are linked together to procude the executable. L'Interprocedural Optimization allows the compiler to optimize using the full syntaxic tree of all source files. To do so, optimization of intermediate representations is done at linking time [1] [2] [3] [4]

To enable interprocedural optimizations with Intel compilers, use the -ipo option:

[name@server $] icc -ipo -xHost -O2 -Wall f1.c f2.c  -o f.out

Compiling OpenMP code

To enable OpenMP threading, you need to add the -openmp option. For example:

[name@server $] icc -ipo -xHost -O3 -Wall -openmp f1.c f2.c -o f.out


Outils personnels
Espaces de noms

Ressources de Calcul Québec