Skip to content

Bisect is not tested with NaNs and infinity #323

@mikebentley15

Description

@mikebentley15

Bug Report

Describe the problem
It is unclear if FLiT Bisect works with NaN and infinity return values. For this reason, we should have automated regression tests. It may be that it is not currently handled correctly.

This is not a fringe feature. Imagine the following user story:

  • Dan has code he wants to test with FLiT.
  • He has found when he compiles with -O3, he gets NaN values.
  • He uses FLiT Bisect to find out which function is causing the divergence (not necessarily where the NaN is generated)

I think it's handled properly, but it might not be. We have actually seen a situation where NaNs were generated from the code. I believe at that point, we checked for NaN in the compare() function and returned a canned 12345 value. But that is a kludge that should be designed away.

Suggested Fix
Create an automated test that has NaN as an output from the optimized code. Perhaps this can be added to that already existing FLiT Bisect example. We'd also want to consider NaN as a larger comparison value than any other finite value, because it is such a bad thing in code.

Once we have a test, we can identify if the code does the right thing, and if not, fix it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    pythonInvolves touching python codetestsInvolves touching tests

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions