Preserve scalar arithmetic for small GenericLU systems - #1211
Closed
ChrisRackauckas-Claude wants to merge 1 commit into
Closed
Preserve scalar arithmetic for small GenericLU systems#1211ChrisRackauckas-Claude wants to merge 1 commit into
ChrisRackauckas-Claude wants to merge 1 commit into
Conversation
Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>
Member
Author
|
CI equivalence audit I compared all three failing downstream jobs with the clean
The ModelingToolkit missing-import failure and SciMLSensitivity tracked-array conversion are the two remaining existing clusters. Neither is caused by this LinearSolve patch. |
Member
|
No change the NonlinearSolve.jl test, just skip it if it's sensitive to this. |
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.
What changed
For matrices of order at most eight, make the blocked GenericLU entry point use the same update arithmetic as the vendored scalar
generic_lufact!implementation. This avoids the architecture-sensitive Broyden trajectory regression tracked in SciML/NonlinearSolve.jl#1158 while retaining the blocked kernel for larger matrices.This also adds a focused comparison against the scalar implementation and bumps LinearSolve from 5.10.0 to 5.10.1.
Please ignore this PR until it has been reviewed by @ChrisRackauckas.
Failure before the fix
Clean NonlinearSolve master fails deterministically on macOS aarch64 with LinearSolve 5.7.0 or later:
The same focused LinearSolve test added here fails before the source change on Linux x86_64, Julia 1.12.6:
The failing assertion is exact factor equality between the small strided path and the vendored scalar implementation.
Boundary
The last green NonlinearSolve macOS run resolved LinearSolve 5.6.0. The first failing run resolved LinearSolve 5.7.0 with the other relevant dependencies unchanged. A formal source bisect identified 6bbb233 as the first trajectory-changing commit.
With current NonlinearSolve sources on Linux x86_64, the Wood problem changes from 1,014 function evaluations on LinearSolve 5.6.0 to 325 on 5.7.0. Both converge on Linux, but macOS aarch64 stops at residual
0.00487307057804981. The test tolerance is unchanged.Verification after the fix
Focused LinearSolve tests, Julia 1.12.6:
Focused NonlinearSolve Wood problem with this checkout:
Full local validation:
The following checks also exited successfully with no output:
julia +1.12 --startup-file=no -e 'using Runic; exit(Runic.main(["--check", "src/blocked_lufact.jl", "test/Core/blocked_lufact.jl"]))' typos src/blocked_lufact.jl test/Core/blocked_lufact.jl Project.toml git diff --checkI could not execute macOS aarch64 locally. The macOS failing-before evidence comes from clean-master GitHub Actions; the new arithmetic-equivalence test fails before and passes after on Linux.
Links