Repository navigation
Give the Newton-Krylov round-off test explicit tolerances - #4337
Closed
singhharsh1708 wants to merge 1 commit into
Closed
singhharsh1708 wants to merge 1 commit into
singhharsh1708 wants to merge 1 commit into
Conversation
Member
Author
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.
Fixes #4293. Test only, no library change, per @ChrisRackauckas on #4301.
newton_krylov_roundoff.jlcalledsolvewith no tolerances. The linear solve inheritsreltol, so the Krylov solve ran at the default 1e-3 and returned a Newton direction accurateonly to 1e-3, which cannot drive the stage to 1e-3.
dtcollapses and both methods returnUnstable.The part worth checking is that the test had stopped discriminating. At the default tolerance it
fails identically whether the warm start is the guarded one that #4040 shipped or the
unpredictive reuse that #4034 reported, so it was not testing anything:
reltol = abstol = 1e-12WarmStart.Previous, regression proxyAt 1e-12 the good configuration passes and the bad one still fails, so the gate protects what it
was written to protect.
On picking 1e-12, measured on this DAE with
maxiters = 10_000left as it was:Hairer4Hairer421e-7 through 1e-9 complete but sit at or above the 1e-5 gate, so they would not be a working
test. 1e-12 clears the gate by a factor of 16 and uses 1211 and 1326 of the 10,000 step budget.
The non-monotonic MaxIters at 1e-10 and 1e-11 is the chaotic step sequence the file's comment
already describes.
The comment block is updated to say why the tolerances are explicit and to quote the drift
actually measured, since the old text described a 1e-15 to 1e-7 band that no longer matches.
Verified by running the file against unmodified
masterat 13da423: 3/3 and 3/3, exit 0.AI Disclosure
Claude assisted with this work.