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

fpe-all

Allows some control over floating-point exception handling for each routine in a program at runtime.

Syntax

Linux:

-fpe-all=n

Windows:

/fpe-all:n

Arguments

n

Specifies the floating-point exception handling level. Possible values are:

0

Floating-point invalid, divide-by-zero, and overflow exceptions are enabled. If any such exceptions occur, execution is aborted. This option sets the [Q]ftz option; therefore underflow results will be set to zero unless you explicitly specify -no-ftz (Linux) or /Qftz- (Windows).

To get more detailed location information about where the error occurred, use option traceback.

1

All floating-point exceptions are disabled.

Underflow results from SSE instructions, as well as x87 instructions, will be set to zero.

3

All floating-point exceptions are disabled. Floating-point underflow is gradual, unless you explicitly specify a compiler option that enables flush-to-zero, such as [Q]ftz, O3, or O2. This setting provides full IEEE support.

Default

-fpe-all=3 or /fpe-all:3 or the setting of fpe that the main program was compiled with

All floating-point exceptions are disabled. Floating-point underflow is gradual, unless you explicitly specify a compiler option that enables flush-to-zero.

Description

This option allows some control over floating-point exception handling for each routine in a program at runtime. This includes whether exceptional floating-point values are allowed and how precisely runtime exceptions are reported.

The fpe-all option affects how the following conditions are handled:

  • When floating-point calculations result in a divide by zero, overflow, or invalid operation.

  • When floating-point calculations result in an underflow.

  • When a subnormal number or other exceptional number (positive infinity, negative infinity, or a NaN) is present in an arithmetic expression.

The current settings of the floating-point exception and status flags are saved on each routine entry and restored on each routine exit. This may incur some performance overhead.

When option fpe-all is applied to a main program, it has the same effect as when option fpe is applied to the main program.

When enabled exceptions occur, execution is aborted and the cause of the abort reported to the user. If compiler option traceback is specified at compile time, detailed information about the location of the abort is also reported.

This option does not enable underflow exceptions, input subnormal exceptions, or inexact exceptions.

Option fpe-all sets option assume ieee_fpe_flags.

IDE Equivalent

None

Alternate Options

None

See Also