Processor-specific Run-time Checks for IA-32 Systems

Optimizations take effect at run-time. For IA-32 systems, the compiler enhances processor-specific optimizations by inserting in the main routine a code segment that performs run-time checks described below.

Check for Supported Processor

To prevent from execution errors, the compiler inserts code in the main routine of the program to check for proper processor usage.

Programs compiled with the options -xN, -xB, or -xP (Linux*) or /QxK, /QxW, /QxN, /QxB or /QxP (Windows*) check, at run-time, whether they are being executed on associated processor, or a compatible Intel processor. If the program is not executed on one of these processors, the program terminates with an error.

The following example demonstrates how to optimize a program for an IntelŪ PentiumŪ 4 processor with Streaming SIMD Extensions 3 (SSE3) instruction support.

Platform

Example

Linux

ifort -xP prog.f90 -o foo.exe

Windows

ifort /QxP prog.f90 /exe:foo.exe

The resulting program aborts if it is executed on a processor that is not validated to support the IntelŪ PentiumŪ 4 processor with Streaming SIMD Extensions 3 (SSE3) instruction support, to account for the fact that this processor may have some additional feature enabling.

If you intend to run your programs on multiple IA-32 processors, do not use the -x (Linux) or /Qx (Windows) options that optimize for processor-specific features; consider using the -ax (Linux) or /Qax (Windows) option to attain processor-specific performance and portability among different processors.

Setting FTZ and DAZ Flags

Previously, the values of the flags flush-to-zero (FTZ) and denormals-as-zero (DAZ) for IA-32 processors were off by default. However, even at the cost of losing IEEE compliance, turning these flags on significantly increases the performance of programs with denormal floating-point values in the gradual underflow mode run on the most recent IA-32 processors.

Therefore, for the IntelŪ Pentium III, Pentium 4, Intel PentiumŪ M, IntelŪ PentiumŪ 4 processor with Streaming SIMD Extensions 3 (SSE3) instruction support, and compatible IA-32 processors, the compiler's default behavior is to turn these flags on.

The compiler inserts code in the program to perform a run-time check for the processor on which the program runs to verify it is one of the previously mentioned Intel processors.

These flags are only turned on by Intel processors that have been validated to support them.

For non-Intel processors, the flags can be set manually by calling the following Intel Fortran intrinsic:

Example

RESULT = FOR_SET_FPE (FOR_M_ABRUPT_UND)