Repository navigation
Import alg_adaptive_order / alg_can_repeat_jac in Feagin and StabilizedIRK (#4811) - #4812
Conversation
…edIRK The Feagin10/14 alg_adaptive_order and IRKC alg_can_repeat_jac methods were defined without importing the names, so they created local functions that OrdinaryDiffEqCore never dispatches to. Import them, and drop IRKC's alg_adaptive_order, which equals Core's fallback. Fixes SciML#4811 Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com> Co-Authored-By: Devin <noreply@cognition.ai> Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Agent-Harness: Devin CLI devin 3000.11.3 (9c803229faa4) (source edits) / Claude Code (tests, verification) Agent-Model: swe-2-high / claude-opus-5-5[1m] Agent-Session: https://claude.ai/code/session_015tNYhuzygK9z8yhh6MNCAz ; Devin local log ~/.local/share/devin/cli/logs/devin_20261007-230500_3918525.log
Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com> Co-Authored-By: Devin <noreply@cognition.ai> Agent-Harness: Devin CLI 3000.11.3 (conflict resolution), Claude Code 2.1.285 (orchestration) Agent-Model: fusion-claude-opus-5-5-high-sidekick-swe-2-medium Agent-Session: local Claude session 3c311569-dda6-4687-bc9f-65febb212c33 (fleet master); Devin log /Users/chrisrackauckas/sandbox/master/fusion-fixes/SciML_OrdinaryDiffEq.jl-4812/log.txt
Merged the default branch into this PR (clean merge, no conflicts; head af19755) so CI runs on current master. Its earlier failures in SciMLSensitivity Core1 and the downgrade jobs were fixed on master after this PR's last CI run. 🤖 Posted by an AI agent — harness: Devin CLI 3000.11.3 (merge), Claude Code 2.1.285 (posting) · model: fusion-claude-opus-5-5-high-sidekick-swe-2-medium |
Independent review (Codex CLI 0.166.0 / gpt-6.1-sol), session 01a19791-98e2-7201-bf7b-19f6c7633e4a, reviewed head fbc267e
Review written by the reviewer named above in a session other than the PR author's, and copied here by the posting agent without change to its findings. The posting agent did not re-run the reviewer's commands. Summary: Corrects the core dispatch of Feagin10/14 adaptive-order traits and IRKC's Jacobian-reuse trait, and removes a redundant local IRKC method. The added assertions fail on the unfixed base and pass at head, both focused test files pass at head, and the default PI trajectories match. Blast radius: Feagin10/14 adaptive stepping with I/PID controllers and the declared IRKC Jacobian-reuse trait. The only ODE-subpackage consumer of the latter trait is FIRK, so IRKC execution currently does not consume it. No default algorithm selection, default PI gains, public signatures, dependencies, or existing tests change. Evidence: Added assertions: head 3/3 pass; base 3/3 fail (9 versus 8, 13 versus 12, true versus false). Both focused files pass at head, including convergence and matrix-exponential references. Default PI saved time/value arrays are identical for both Feagin methods on an exponential-decay problem. The final independent controller-factor probe passed 2 PID assertions and failed 2 overly strict I-controller precision assertions; its planned trajectory tests did not execute. CI: 131 successful checks, 3 skipped matrix placeholders, 1 failing SciMLSensitivity check with the exact same failure independently found on master. Blocking findingsNone. Non-blocking findingsNone. What I ranLocal artifact locations in these command records are represented by environment-variable placeholders; source references are repository-relative. Julia was 1.13.2 on aarch64 Linux. Exactly three Julia runs completed; no test was rerun.
What I did not verifyThe planned analytic logistic trajectory checks under I/PID did not run because the final probe stopped at its I-controller precision assertions. Thus no end-to-end adaptive-trajectory accuracy claim is made for those non-default controllers beyond the independently checked factor formulas and existing solver accuracy tests. No full package suites or Pkg.test(), local QA/docs builds, hardware GPU execution, AD transformations, Reactant, MPI, or local downstream suites were run. The diff introduces no GPU kernel, AD rule, Reactant, or MPI implementation. PredictiveController execution was not exercised locally; source inspection shows it reads the corrected adaptive-order trait, but its generic execution also expects nonlinear-solver cache fields absent from Feagin. Numerical base tests beyond the deliberately failing new assertions were not executed. Equality of default PI output was checked on the stated scalar decay problem, not every possible input. IRKC's declaration test verifies the corrected trait; there is no active IRKC reuse call site to exercise. 🤖 Posted by an AI agent — harness: Claude Code · model: claude-sonnet-5-5 |
Please ignore until reviewed by @ChrisRackauckas.
Fixes #4811.
What changed and why
alg_adaptive_order(::Feagin10) = 8,alg_adaptive_order(::Feagin14) = 12andalg_can_repeat_jac(::IRKC) = falsewere defined without importing the names from OrdinaryDiffEqCore, so they were local functions that Core never calls. This PR imports them. IRKC'salg_adaptive_order(alg::IRKC) = 1is deleted rather than imported, because Core's fallbackalg_order - 1already returns 1.Behavioural effect: Feagin10/14 now report adaptive orders 8/12 instead of 9/13. Only
IController,PIDControllerandPredictiveControllerread this. The defaultPIControllertakes its gains fromalg_orderand is unchanged. Nothing in the ODE sublibraries readsalg_can_repeat_jacfor IRKC (the only reader isOrdinaryDiffEqFIRK), so the IRKC change only corrects the declared value.Verification (Julia 1.12.7, master cceca42 + this commit)
New assertions with the
srcchanges stashed (unfixed):With the fix:
julia +1.12 --project=lib/<Lib> -e 'using Pkg; Pkg.test()'(GROUP=ALL: Core + QA):Runic (
--check) is clean on all five files, andtyposreports nothing on the diff.Not verified locally
UndefVarError: IRBuilder not defined in GPUCompiler) before any QA test runs. This PR does not touch dependencies, and CI'slib/OrdinaryDiffEqFeagin [QA](Julia 1) job passes on this PR. All Feagin and StabilizedIRK CI jobs (Core lts/1/pre, QA, downgrade) pass. The four failing checks are SciMLSensitivity downstream, GPU, and the DiffEqBase/OrdinaryDiffEqDifferentiation downgrade jobs, none of which this PR touches.Risk assessment
alg_can_repeat_jac, which nothing in the ODE sublibraries currently reads for IRKC. No signature changes. The return values of two documented public traits (alg_adaptive_order,alg_can_repeat_jac) change to the values their authors wrote.Source edits were written by Devin CLI 3000.11.3 (model swe-2-high), which had no working shell. The test fix (IRKC test importing
OrdinaryDiffEqCore), the verification and this PR are from Claude Code.🤖 Generated with Claude Code (model: claude-opus-5-5[1m]) and Devin CLI (model: swe-2-high)
https://claude.ai/code/session_015tNYhuzygK9z8yhh6MNCAz
Fleet master's independent risk assessment
0f2da219has 128 passing checks and four failures, all pre-existing onmastercceca424:SciMLSensitivity.jl/Core1/1 / Downstream Tests - Core1has the same MooncakeAdjoint constructor error;tests / GPU (julia 1, self-hosted Linux X64 gpu) / Tests - GPU (Julia 1)has the same three QNDF failures;downgrade-sublibraries / test (lib/DiffEqBase)has the same identity assertion and three callback errors;downgrade-sublibraries / test (lib/OrdinaryDiffEqDifferentiation)has the same ScalarOperatordiagerror. No observed test regressions. No review comments exist.🤖 Risk assessment posted by an AI agent (fleet master) — harness: Codex CLI 0.156.1 / gpt-6-astra; dispatched by Devin CLI 3000.11.3 fleet-master head, model Fusion (claude-opus-5-5 medium + swe-2 medium)
Conversation: local transcript (no session URL)