Reuse analytic Jacobians for line-search JVPs - #1062
Reuse analytic Jacobians for line-search JVPs#1062ChrisRackauckas-Claude wants to merge 2 commits into
Conversation
|
Investigation scratchpad for commit
Next step is CI monitoring; any follow-up commit and its local verification will be recorded in a new comment. |
|
Verification correction: I am withdrawing the previously reported full Core result after a process-path audit found a separate active |
|
Follow-up commit The out-of-place analytic fallback reshaped Final local verification:
|
a5a889a to
44dd823
Compare
|
I split the rectangular analytic-JVP fix out of this PR into prerequisite #1063. The branch now contains only the line-search change plus the NonlinearSolveFirstOrder 2.2.1 / SciMLJacobianOperators 0.1.16 release floor. Post-split verification used the exact #1063 checkout and asserted both version and package path before running the regression: 5/5 tests passed on Julia 1.12.6. The previous combined full-Core and downstream results remain applicable because they ran the same two source changes together. I fetched the remote branch and confirmed that it contained only the two agent-authored commits before replacing the duplicated SciMLJacobianOperators commit with the dependency-floor commit. The update used |
|
The post-split CI run reached the expected release-order gate: every package-resolving job stopped immediately because SciMLJacobianOperators 0.1.16 is not registered yet. Runic and spell checks passed. There is no runtime test failure to debug in this revision; I will rerun the package jobs after #1063 merges and 0.1.16 is tagged. |
|
Version-order note: draft #1060 independently uses the same provisional next versions (SciMLJacobianOperators 0.1.16 and NonlinearSolveFirstOrder 2.2.1). If #1060 merges first, this branch must rebase to NonlinearSolveFirstOrder 2.2.2 and require the post-#1063 SciMLJacobianOperators 0.1.17 release. The current floors are valid only if #1063/#1062 land first; they are not evidence that #1060 contains the residual-shape fix. |
Let line-search JVP preparation reuse a supplied analytic Jacobian when no derivative backend was explicitly selected. This avoids differentiating residuals that already provide exact derivatives. Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>
Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>
44dd823 to
ad591a3
Compare
|
Rebased onto current master at Final post-rebase validation used the exact #1063 source overlay and asserted local paths plus versions ( The temporary #1063 source overlay was removed before committing; this PR contains only its intended FirstOrder changes and declares the released-version dependency. |
|
The five immediate failures are all prerequisite-resolution failures before tests run:
This is the declared #1063 merge/release dependency. All five jobs stop during environment resolution before loading or running branch code. The exact #1063 0.1.17 source was developed locally for the final full Core run, which passed with path and version assertions; no CI failure is being bypassed or hidden here. |
|
Scheduled CI follow-up at 2026-07-13 18:59 EDT: I fetched and inspected all 37 completed failing job logs. All 37 stop during dependency resolution on the unreleased SciMLJacobianOperators 0.1.17 floor (Unsatisfiable requirements / empty 0.1.16-vs-0.1.17 intersection); none reached this branch's runtime tests. Fourteen checks pass, three matrix placeholders are skipped, and twenty jobs remain queued. The actionable gate remains merging/releasing prerequisite #1063; no #1062 code fix is indicated by this run. |
|
Local downstream verification on BoundaryValueDiffEq master With the released dependency set, MIRK reported: With this PR at All three line-search Dual regressions are gone:
The two remaining failures are unchanged The Shooting Core group also exited 0 with the same combined sources: This confirms the analytic-Jacobian line-search path fixes both BoundaryValueDiffEq downstreams while preserving the non-line-search baseline results. |
Important
Ignore this PR until it has been reviewed by @ChrisRackauckas.
Requires #1063 to merge and release SciMLJacobianOperators 0.1.17 first.
Summary
SciMLJacobianOperatorsform the line-search JVP from a supplied analytic Jacobian.Root cause and investigation
This follows the direct
ModelingToolkitBaseInterfaceII failures reported while working on ModelingToolkit.jl#4742. A cleanModelingToolkitBasemaster run reproduced exactly two errors:Both errors entered a boundary residual with
ForwardDiff.Dualvalues from the nonlinear line-search JVP. Commitc6b26f4abegan always passing the automatically selected forward-mode JVP backend toLineSearch, bypassing the existing analytic-Jacobian fallback inSciMLJacobianOperators.prepare_jvp.The exact introducing boundary was checked with the minimal reproducer:
c6b26f4a^(d21952c3): exits successfully.c6b26f4a: errors because the residual receivesVector{ForwardDiff.Dual}.The fix passes
nothingonly when the problem has an analytic Jacobian and no JVP, VJP, or reverse backend was explicitly selected. This preserves the explicit-backend behavior added byc6b26f4awhile restoring the analytic derivative path.The first CI run exposed a separate rectangular-output bug in the analytic JVP implementation. That owning-package fix and regression are split into prerequisite #1063 so this PR stays focused and consumes the corrected public package version.
Local verification
The branch was rebased onto master at 41681c5 (#1060). All commands below were run locally; no test was skipped, disabled, silenced, or reclassified.
NonlinearSolveFirstOrderCore suite ran on Julia 1.12.6 with explicit path/version assertions for local NonlinearSolveFirstOrder 2.2.2 and the exact Preserve residual shape in analytic JVPs #1063 SciMLJacobianOperators 0.1.17 source. The package harness exited 0, including:ModelingToolkitBase/test/bvproblem.jlfile exited 0 on ModelingToolkit master (34ee918290) and Julia 1.12.6:git diff --checkpassed.Downgrade CI cannot resolve the unreleased 0.1.17 floor until #1063 is merged and tagged; that is an explicit release-order dependency, not a test bypass.