Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bisect is not tested with NaNs and infinity #323

Open
mikebentley15 opened this issue Feb 26, 2020 · 0 comments
Open

Bisect is not tested with NaNs and infinity #323

mikebentley15 opened this issue Feb 26, 2020 · 0 comments
Labels
python Involves touching python code tests Involves touching tests

Comments

@mikebentley15
Copy link
Collaborator

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.

@mikebentley15 mikebentley15 added python Involves touching python code tests Involves touching tests labels Feb 26, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
python Involves touching python code tests Involves touching tests
Projects
None yet
Development

No branches or pull requests

1 participant