Jean Zay: Compilation of an OpenMP parallel code in Fortran, C/C++

Compilation of an OpenMP program with the Intel compilers is done by specifying the -qopenmp option as shown in the examples below:

$ ifort -qopenmp source.f90
$ icc -qopenmp source.c
$ icpc -qopenmp source.C

If you do the compiling and linking separately, you should again specify the -qopenmp option at the linking. For example:

$ ifort -c -qopenmp source1.f
$ ifort -c source2.f
$ icc -c source3.c
$ ifort -qopenmp source1.o source2.o source3.o

The execution of an OpenMP program can be done in batch or in interactive.