Preserve triangular solves for Broyden Jacobian inversion - #1057
Preserve triangular solves for Broyden Jacobian inversion#1057ChrisRackauckas-Claude wants to merge 2 commits into
Conversation
|
Commit 17d95c4 completes the focused fix. Local evidence recorded for this commit:
The separate root-Core Brown unexpected-pass result remains tracked in #1056; this commit does not alter broken-test bookkeeping. |
|
The red root |
|
The three failed downgrade-sublibrary jobs are the same clean-base compatibility cluster, also introduced before this branch. Clean |
|
CI audit update for the red root Core / Julia 1 / Ubuntu check:
This is therefore a reproducible clean-master Core regression, independent of the Broyden triangular-solve patch in #1057. Per the repository audit rules, I am assigning a separate reproduce/bisect/fix investigation. PR job: https://github.com/SciML/NonlinearSolve.jl/actions/runs/29250644943/job/86820153277 |
|
CI audit update for the red NonlinearSolveBase QA check: PR job
Neither site is changed by #1057. The existing draft #1055 touches the ForwardDiff extension for a separate singular implicit-sensitivity fix but does not remove or publicize the |
|
Additional CI classification:
Thus neither new red check indicates a #1057 code failure. Bounds job: https://github.com/SciML/NonlinearSolve.jl/actions/runs/29250644943/job/86820153551 ; prerelease Core job: https://github.com/SciML/NonlinearSolve.jl/actions/runs/29250644943/job/86820153071 |
|
Substantive target CI is green across the full Julia matrix:
This independently exercises the changed triangular Jacobian solve utility and the Broyden regression coverage on all three supported Julia lanes. The remaining red checks are the separately documented clean-master downgrade, Base-QA, and root homotopy-allocation clusters, plus the macOS action-download service outage. |
|
The newly red Wrappers / Julia 1 / macOS check is the same GitHub Actions service outage as the previously classified Bounds/macOS job. It never checks out or runs package code: action metadata resolution receives |
|
Additional CI classification: the macOS/current Core job (Julia 1.12.6 ARM64) fails the same clean-main homotopy allocation assertions already reproduced locally, not the Broyden change in this PR. |
|
The macOS/pre-release Core lane independently repeats the same clean-main homotopy allocation cluster: on Julia pre ARM64, |
17d95c4 to
b6a3f4e
Compare
|
Rebase and local verification update:
The rebased branch was pushed with an exact |
|
CI classification update:
This comment only classifies observed logs; it does not suppress or alter any failing test. |
|
Targeted CI result for this PR:
These CI results agree with the local Base and QuasiNewton test runs recorded above. |
|
CI has now reached a terminal state: 85 checks passed, 3 matrix placeholders were skipped, and the 7 failures are the already-classified clean-main NonlinearSolveBase QA / root Core / downgrade failures tracked separately. Every intended NonlinearSolveQuasiNewton Core lane passed on Julia LTS, current, prerelease, and downgrade, along with QuasiNewton QA and the local 594/594 Broyden regression coverage. No additional #1057-specific failure appeared. |
b6a3f4e to
3a0b031
Compare
|
Rebased onto current master at Post-rebase local validation on Julia 1.12 and the current resolved graph:
No tests or broken-test annotations were changed to accommodate the separate Brown result. |
|
The two immediate downgrade failures are pre-test resolver failures, not failures in this branch's code:
Both jobs exit during |
|
Current functional CI failures are all separately tracked clean-master issues; the target triangular Broyden regression is not failing:
No allocation threshold or broken-test annotation is changed in this PR. The full current-graph |
|
Scheduled CI follow-up at 2026-07-13 18:47 EDT: the target NonlinearSolveQuasiNewton matrix remains green on Julia LTS, current, and prerelease; QuasiNewton QA and downgrade are also green. The six completed failures are the already-classified clean-master resolver/ExplicitImports, homotopy-allocation (#1061), and generalized-Rosenbrock (#1058/#1057 dependency-chain) failures. No new #1057-specific failure appeared. Twenty-one macOS/GPU jobs are still queued, so this is not yet a terminal CI state. |
3a0b031 to
8ff2f09
Compare
|
Rebased validation update (2026-07-15):
The PR body now contains the full commands/results summary. New CI run: https://github.com/SciML/NonlinearSolve.jl/actions/runs/29402824369 |
8ff2f09 to
30613e6
Compare
|
Rebased the two focused commits onto current upstream
The branch update used an exact |
Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>
Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>
30613e6 to
e1e5599
Compare
|
Rebased the two focused commits onto current upstream
The update used |
|
Exact LinearSolve-downstream validation (2026-07-17):
No assertion, tolerance, broken-list, or skip change was used. This confirms that the downstream failure seen against clean LinearSolve main is pre-existing NonlinearSolve behavior, and that this PR addresses the Rosenbrock half without masking Brown. |
Important
Ignore this PR until it has been reviewed by @ChrisRackauckas.
Summary
Root cause
The current master Core suite at
247a8bfcbfails generalized Rosenbrock with:A clean adjacent-commit reproduction and
git bisectidentified6a7687f542cde52b4bfeef5b473c6156c8d453a1(#1039) as the first bad commit:d616cd994(its parent):Success, 17 iterations, residual 0.06a7687f542and affected master:Unstable, 24 iterations, residual 4.4The persistent workspace itself was not the cause. The true Jacobian is dense lower triangular, and the generic pivoted-LU solve introduced different roundoff than the previous structure-preserving triangular inverse. Bad Broyden is sensitive to that perturbation. Solving the identity RHS through
LowerTriangularrestores the prior trajectory without reinstating matrix-sized allocations.The fast path is restricted to
StridedMatrixinputs with a nonzero diagonal. GPU/non-strided inputs, general matrices, and singular triangular matrices retain the existing LinearSolve route. The workspace-owned coefficient buffer handles the case where a prior triangular result aliases the identity RHS during reset.This implementation uses exported
LinearAlgebraAPI only:diagind,istriu,istril,UpperTriangular,LowerTriangular, andldiv!. It does not add, remove, or change any public NonlinearSolve API.Verification
The branch was safely rebased onto current master at
247a8bfcb, after re-fetching the remote branch and verifying that its two commits still contained no intervening contributor work. The following commands were then run locally on Julia 1.10.11 with current compatible dependencies, including LinearSolve 5.0.0:ReturnCode.Unstable; the Broyden block reported 94 passed, 1 failed, 1 errored, and 19 broken.ReturnCode.Success, and the original 17-iteration trajectory.GROUP=CoreforNonlinearSolveBasepassed. The expandedlinsolve_identity!!workspace/reset/alias block passed 53/53, routing 12/12, operator-Jacobian 1/1, and dense-LU 14/14.GROUP=CoreforNonlinearSolveQuasiNewtonpassed in full: Broyden 810/810, iterator 2/2, termination 27/27; Klement 297/297, iterator 2/2, termination 27/27; LimitedMemoryBroyden 135/135, iterator 2/2, termination 27/27; and the new triangular true-Jacobian regression 2/2.git diff --checkpassed and the tracked worktree was clean.No assertions were loosened, and no tests were skipped, disabled, silenced, deleted, or converted to broken.
Investigation/process log
I reproduced the failure on a clean detached checkout of current master with the latest compatible graph, reproduced its immediate good and bad revisions on a common historical dependency graph, and ran an actual
git bisect. I compared the old structure-preserving inversion with the reusable LinearSolve workspace, checked the first step and inverse numerics, and tested generic LU, SVD, pseudoinverse, and triangular identity solves. That reduced the fix to the CPU-strided nonsingular triangular path. I then adopted the existing focused draft rather than opening a duplicate, rebased it onto current master, reran the exact target and both affected sublibrary Core groups, ran the root Core group through the known unrelated Brown stop, checked the LinearAlgebra exports, and ran Runic.