This page was translated by an AI (LLM) with a cursory human check and is awaiting full review.
Intel Compilers (Fortran, C/C++)
The different versions of the Intel compilers available on Jean Zay can be activated
using the module command.
Example of loading:
$ module avail intel-compilers
---------------------- /lustre/fshomisc/sup/hpe/pub/module-rh/modulefiles ----------------------
intel-compilers/16.0.4 intel-compilers/19.0.2 intel-compilers/19.1.0 intel-compilers/19.1.3
intel-compilers/18.0.1 intel-compilers/19.0.4 intel-compilers/19.1.1 intel-compilers/2021.9.0
intel-compilers/18.0.5 intel-compilers/19.0.5 intel-compilers/19.1.2
$ module load intel-compilers/19.0.4
$ module list
Currently Loaded Modulefiles:
1) intel-compilers/19.0.4
Here are the compilation commands for Fortran, C and C++:
| Languages | Command | Source file suffixes |
|---|---|---|
| Fortran | ifort | .f90: free format; .F90: free format, pre-compiled by fpp .f, .for, or .ftn: fixed format; .fpp, .F, .FOR, .FTN, or .FPP: fixed format, pre-compiled by fpp |
| C | icc | .c, .i |
| C++ | icpc | .C, .cxx, .c++, .cc, .cp, .cpp |
Examples of executable generation:
After loading the desired version of the Intel compilers, simply call the corresponding command to generate your executable:
ifort prog.f90 -o prog
icc prog.c -o prog
icpc prog.C -o prog
Notes on the format of the Fortran source code
By default, the Intel compilers determine the format of the source code
based on the file name suffix.
However, the format of the source code can be explicitly specified using the option -free (free format) or -nofree (fixed format). It should be noted that the fixed format is considered obsolete since the Fortran 95 standard.
For example:
- if
prog.f90contains source code written in free format :ifort prog.f90 -o prog - if
prog.f90contains source code written in fixed format :ifort -nofree prog.f90 -o prog - if
prog.fcontains source code written in fixed format :ifort prog.f -o prog - if
prog.fcontains source code written in free format :ifort -free prog.f -o prog