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

ID 767251
Date 7/13/2023
Public

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

Document Table of Contents

fimf-force-dynamic-target, Qimf-force-dynamic-target

Instructs the compiler to use runtime dispatch in calls to math functions. This feature is only available for ifort.

Syntax

Linux:

-fimf-force-dynamic-target[=funclist]

macOS:

-fimf-force-dynamic-target[=funclist]

Windows:

/Qimf-force-dynamic-target[:funclist]

Arguments

funclist

Is an optional list of one or more math library functions to which the attribute should be applied. Do not specify the standard Fortran name of the math function; you must specify the actual math library name. If you specify more than one function, they must be separated with commas.

Precision-specific variants like sin and sinf are considered different functions, so you would need to use -fimf-dynamic-target=sin,sinf (or /Qimf-dynamic-target:sin,sinf) to specify runtime dispatch for both the single-precision and double-precision sine functions.

You also can specify the symbol /f to denote single-precision divides, symbol / to denote double-precision divides, symbol /l to denote extended-precision divides, and symbol /q to denote quad-precision divides. For example, you can specify -fimf-dynamic-target=/ or /Qimf-dynamic-target:/.

Default

OFF

Runtime dispatch is not forced in math libraries calls. The compiler can choose to call a CPU-specific version of a math function if one is available.

Description

This option instructs the compiler to use runtime dispatch in calls to math functions. When this option set to ON, it lets you force runtime dispatch in math libraries calls.

By default, when this option is set to OFF, the compiler often optimizes math library calls using the target CPU architecture-specific information available at compile time through the [Q]x and arch compiler options.

If you want to target multiple CPU families with a single application or you prefer to choose a target CPU at runtime, you can force runtime dispatch in math libraries by using this option.

NOTE:

The standard Fortran names for the various math intrinsic functions do not match the math library names of the math intrinsic functions. You must find the actual math library name that is generated for the relevant Fortran math intrinsic.

One way to do this is to generate assembly code by using one of the following options:

Linux and macOS

-S

Windows

/Fa or /S

The assembly code will show the actual math library name.

For example, if you create a program that contains a call to SIN(x) where x is declared as REAL(KIND=4) and then use option S to produce assembly code for the program, the assembly code will show a call to sinf.

To use runtime dispatch in calls to the single-precision sine function, you should specify:

Linux and macOS

-fimf-force-dynamic-target=sinf

Windows

/Qimf-force-dynamic-target:sinf

NOTE:

This option only applies to host compilation. When offloading is enabled, it does not impact device-specific compilation. Offloading can only be enabled when using ifx.

Product and Performance Information

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

Notice revision #20201201

IDE Equivalent

None

Alternate Options

None

See Also