Skip to content

relaxing sum check for extremely small values #90

@grnydawn

Description

@grnydawn

We read in some array ('x', for example), and 'x' has a bunch of zero and close-to-zero values (eg, 5E-310). KGEN generates a sum-check of this array, and the value of that sum-check depends on the optimization level being used in the run that generates the kernel - eg, using 'ifort' with -O0, I'll get a sum for 'x' of something like 8E-310, but with optimizations on, I get 0. This value gets saved, along with the full array.

The problem happens when we read this value and this array in on a different compiler/flag set, as the 'sum check' tests for exact equality, so changing optimization levels means our 'sum' is now different, even if just on the order of 1E-300, and it fails.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions