Intel® Fortran Compiler Classic and Intel® Fortran Compiler Developer Guide and Reference

ID 767251
Date 6/24/2024
Public

A newer version of this document is available. Customers should click here to go to the newest version.

Document Table of Contents

fopenmp, Qopenmp

Enables recognition of OpenMP* features and tells the parallelizer to generate multi-threaded code based on OpenMP* directives.

Syntax

Linux:

-fopenmp

-fno-openmp

Windows:

/Qopenmp

/Qopenmp-

Arguments

None

Default

OFF

No OpenMP* multi-threaded code is generated by the compiler.

Description

This option enables recognition of OpenMP* features and tells the parallelizer to generate multi-threaded code based on OpenMP* directives. The code can be executed in parallel on both uniprocessor and multiprocessor systems.

This option sets option auto.

This option works with any optimization level. Specifying no optimization (-O0 on Linux* or /Od on Windows*) helps to debug OpenMP applications.

To ensure that a threadsafe and/or reentrant runtime library is linked and correctly initialized, the same option should also be used for the link step and for the compilation of the main routine

CAUTION:

Files compiled with option -fopenmp or /Qopenmp should also be linked with the same option, or the link step may fail.

NOTE:

Options that use OpenMP* API are available for both Intel® microprocessors and non-Intel microprocessors, but these options may perform additional optimizations on Intel® microprocessors than they perform on non-Intel microprocessors.

The list of major, user-visible OpenMP constructs and features that may perform differently on Intel® microprocessors versus non-Intel microprocessors include: locks (internal and user visible), the SINGLE construct, barriers (explicit and implicit), parallel loop scheduling, reductions, memory allocation, thread affinity, and binding.

Product and Performance Information

Performance varies by use, configuration and other factors. Learn more at www.Intel.com/PerformanceIndex.

Notice revision #20201201

IDE Equivalent

Visual Studio: Language > Process OpenMP Directives

Alternate Options

Linux: -qopenmp

Windows: /Qopenmp

Examples

The following enables OpenMP parallelization of OpenMP constructs such as PARALLEL and LOOP (ifx):

ifx -fopenmp foo.f90   

See Also