Options Used for Both IA-32 and ItaniumŪ Architectures

The options described in this section all provide optimizations with varying degrees of precision in floating-point (FP) arithmetic for IA-32 and ItaniumŪ architectures.

The -mp1 (IA-32 only) and -mp options improve floating-point precision, but also affect the application performance.  See more details about these options in Improving/Restricting FP Arithmetic Precision.

The FP options provide optimizations with varying degrees of precision in floating-point arithmetic. The option that disables these optimizations is -O0.

-mp Option

Use -mp to limit floating-point optimizations and maintain declared precision. For example, the IntelŪ Fortran Compiler can change floating-point division computations into multiplication by the reciprocal of the denominator. This change can alter the results of floating point division computations slightly. The -mp switch may slightly reduce execution speed. For more information, see Improving/Restricting FP Arithmetic Precision.

-mp1 Option

Use the -mp1 option to restrict floating-point precision to be closer to declared precision  with less impact to performance than with the -mp option. The option will ensure the out-of-range check of operands of transcendental functions and improve accuracy of floating-point compares.

Flushing to Zero Denormal Values, -ftz[-]

Option -ftz[-] flushes denormal results to zero when the application is in the gradual underflow mode. Flushing the denormal values to zero with -ftz may improve performance of your application.

The default status of is OFF (-ftz-). By default, the compiler lets results gradually underflow. With the default -O2 option, -ftz[-] is OFF.

-ftz[-] on Itanium-based systems

On Itanium-based systems only, the -O3 option turns on -ftz.

If the -ftz option produces undesirable results of the numerical behavior of your program, you can turn the flush-to-zero (FTZ) mode off by using -ftz- in the command line while still benefiting from the -O3 optimizations:

ifort -O3 -ftz- myprog.f


The -ftz[-] option affects the results of floating underflow as follows:

On IA-32, setting abrupt underflow by -ftz may improve performance of SSE/SSE2 instructions, while it does not affect either performance or numerical behavior of x87 instructions. Thus, -ftz will have no effect unless you select the -x or -ax options, which activate instructions of the more recent IA-32 Intel processors.

On Itanium-based processors, gradual underflow to 0 can degrade performance. Using higher optimization levels to get the default abrupt underflow or explicitly setting -ftz improves performance.
may improve performance on ItaniumŪ 2 processor, even in the absence of actual underflow, most frequently for single-precision code.

Using the Floating-point Exception Handling, -fpen

Use the -fpen option to control the handling of exceptions. The -fpen option controls floating-point exceptions according to the value of n.

The following are the kinds of floating-point exceptions:

The -fpen option allows some control over the results of floating-point exception handling at run time for the main program.

The -fpen only affects the Fortran main program. The floating-point exception behavior set by the Fortran main program is in effect throughout the execution of the entire program. If the main program is not Fortran, you can use the Fortran intrinsic FOR_SET_FPE to set the floating-point exception behavior.

When compiling different routines in a program separately, you should use the same value of n in -fpen.

For more information, refer to the Intel Fortran Compiler User's Guide for Linux* Systems, Volume I, section "Controlling Floating-point Exceptions."