Skip to content

Building with strict floating point operations for testing purposes #622

@sbryngelson

Description

@sbryngelson

A --strict build flag that passes compile options that enforce floating point consistency. This would be used for generating goldenfiles and on the runners.

These need to be documented for the relevant compilers. GCC, CCE, Intel, and NVHPC.

In practice, the compilers that seem to need many flags may actually not need so many, since one flag could automatically trigger the others.

The default is -Knoieee and the compiler does not provide special compilation semantics.

-K<flag>

ieee 
Perform floating-point operations in strict conformance with the IEEE 754 standard.
Some optimizations are disabled, and on some systems a more accurate math library is
linked if -Kieee is used during the link step.

and

[no]fprelaxed[=option] 
Perform certain floating point intrinsic functions using
relaxed precision.
-fp-strict
-ffloat-store

and from here https://docs.oracle.com/cd/E19059-01/stud.10/819-0492/3_options.html#75972 we have (update: this one doesn't work)

-fsimple=0

and from here https://gcc.gnu.org/wiki/FloatingPointMath

-frounding-math -fsignaling-nans

would have to add all these to be sure they all work on an x86 CPU for typical GNU compilers.

-h flex_mp=intolerant

and

-hp0 -hfp0

and

-h vector0

and

-fp0

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions