Repository navigation
tests: pin #1342's two rounding-law models, fixed by #1302 - #1404
Merged
Merged
Conversation
At rtol 1e-8 their answer moved with the output grid by up to 1e3x the tolerance (4.9e-5 and 8.4e-3 of the peak on 161 points), and the trunc model failed with CV_CONV_FAILURE at rtol 1e-12. Bisected to lanl#1302: at 7f3e784, where the generator drew them, these fail; from aedadd8 on they hold to their tolerance on either grid.
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.
Closes #1342. It was fixed by #1302; this pins it.
What I found
Both of the issue's models are within tolerance on current main, on either grid, and model 174 runs at rtol 1e-12. They were broken at 7f3e784, the commit #1306's generator (#1317) drew them on.
I bisected over the three C++ changes between that commit and the issue's filing (
Simulator(method="ode").run(t_span=(0, 10), n_points=n, rtol=rtol, atol=rtol*1e-2), against a run at rtol 1e-12 (1e-11 for model 174), read at the same 21 times, as a part of the peak; macOS arm64):The first row is the issue's own numbers, to the digit. #1302 ("fix/1002-run-starts-on-jump") is what moved them; the 21-point grid was right throughout. On current main the answers are the same with
codegen=Trueand withjacobian="fd".The test
test_rounding_law_grid.py, 5 tests: the issue's two models, written verbatim with only their long laws split across string literals, and each law checked equal to the issue's text.At 7f3e784, 3 of the 5 fail, exactly the issue's three cases. The two 21-point cases pass there, as controls.
Test-only;
ci/changelog.py requiredpasses without a fragment, and pre-commit is clean.Not checked
Linux. These are rounding switches crossed or stepped over depending on where the output stops fall, the kind of answer an ulp can move, so a Linux run is worth having. This PR's CI is that run.