Skip to main content
⚠ INFORMATION
This page was translated by an AI (LLM) with a cursory human check and is awaiting full review.

Compilation of parallel OpenMP code (Fortran, C/C++)

Compiling an OpenMP program with Intel compilers is done by specifying the option -qopenmp as shown in the example below:

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

If you compile and link separately, you must specify the option -qopenmp again during linking. For example:

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

The execution of an OpenMP program must be done in batch (via the command srun or a SLURM job) to avoid saturating the login node.

Your opinion matters!

To give your feedback, report an error, or suggest an improvement, click here:

quick anonymous questionnaire

This questionnaire is temporary and will take less than a minute, so take the opportunity!