Repository navigation
Make the test programs exit non-zero when an error check fails - #15
Merged
Merged
Conversation
Each cuSZp_test_* program printed 'Fail error check!' but always returned 0, so ctest reported success whatever the result. Count the failed checks and return non-zero if there were any.
Collaborator
|
Thanks for identifying this issue! The changes look good to me. I agree that the tests should return a non-zero exit status when the error-bound checks fail. I just merged it into main branch. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Each
cuSZp_test_*program printsFail error check! Exceeding data count: Nwhen a result is out of bound, butmainalways returns 0. Soctestreports every test as passed whatever the outcome. I noticed it by running the tests on a machine with no GPU: the output was full ofFail error checklines andcteststill said 100% passed.This counts the failed checks in each of the six programs and returns non-zero if there were any.
What I ran, after building with CUDA 13.0 for compute_80 and installing:
cuSZp_test_f32_1Dprints threePass error checklines and exits 0. The other five tests also print onlyPassthere, but I ran them before this change, so I didn't re-run them with it.ctestnow fails all 6 tests. Before this change it passed all 6.The coverage workflow runs
ctest -V || true, so nothing changes there. If you'd like it to fail when a test fails, drop the|| true, though that needs a runner with a GPU.I wrote PantheonSim, which is the simulator I used to run these on a machine without a GPU.