Skip to content

Add discontinuity-controller state to DDE integrators - #4071

Open
ChrisRackauckas-Claude wants to merge 2 commits into
SciML:masterfrom
ChrisRackauckas-Claude:agent/fix-delay-disco-integrator-state
Open

Add discontinuity-controller state to DDE integrators#4071
ChrisRackauckas-Claude wants to merge 2 commits into
SciML:masterfrom
ChrisRackauckas-Claude:agent/fix-delay-disco-integrator-state

Conversation

@ChrisRackauckas-Claude

@ChrisRackauckas-Claude ChrisRackauckas-Claude commented Jul 29, 2026

Copy link
Copy Markdown
Member

Ignore until reviewed by @ChrisRackauckas.

Summary

  • add is_disco_step and disco_checkpoint to DDEIntegrator, matching the state required by OrdinaryDiffEqCore's shared autonomous-discontinuity controller
  • initialize the state from the runtime time value and clear it in reinit!
  • require OrdinaryDiffEqCore 4.12, the first release line that contains the corresponding DISCO controller behavior
  • cover the public init / solve! / reinit! path with discontinuity detection enabled, plus Unitful DDEs

Root cause

OrdinaryDiffEqCore's shared DISCO/controller code assumes that each compatible integrator carries is_disco_step and disco_checkpoint. ODEIntegrator gained that state as the DISCO implementation evolved, but DDEIntegrator did not. An owner-clean current dependency stack therefore reaches DDEIntegrator and throws type DDEIntegrator has no field is_disco_step; the same shared path needs disco_checkpoint once that first field exists.

A fixed-dependency parent/child check and git bisect identify 408a7a30fe0989a55b446240a18fb2a8c5c30993 (disco optimizations; parent c538565b25ff19e661e5bf788fe1953a154d64e9) as the first commit that made the shared DISCO path incompatible with DDEIntegrator. With the same historical dependency manifest, a QNDF DDE reaches Success at the parent and the child fails on the earlier shared-controller field curr_discontinuity. The evolved current-master path first exposes the missing is_disco_step field instead.

disco_checkpoint is initialized with zero(t0), preserving units and other runtime time metadata. reinit! clears both values so a reused integrator cannot carry transient DISCO state from its previous solve.

Version boundary

General currently ends at OrdinaryDiffEqCore 4.11.0, while the monorepo's next version is 4.12.0. DelayDiffEq must therefore require OrdinaryDiffEqCore = "4.12"; allowing the previous broad "4" range could pair the new DelayDiffEq integrator assumptions with an older Core controller.

The branch is rebased onto current master, including #4069's time-value checkpoint initialization. #4066 is not part of this branch. Because current monorepo source requires SciMLBase 3.40 while General still provides 3.39.1, the final package test used an ignored manifest with a clean local SciMLBase 3.40.1 checkout and showed OrdinaryDiffEqCore 4.12.0 in the test environment.

Validation

  • clean current-source QNDF DDE reproduction: fails before this patch with missing is_disco_step
  • final commit e13f39aa3b, official DelayDiffEq GROUP=Interface: package test passed; discontinuities 48/48, mass matrix 7/7, Unitful 21/21, and multi-algorithm 28/28
  • Runic passes on all five changed Julia files
  • git diff --check passes

Whole-tree Runic still reports only the three pre-existing DISCO formatting files handled by #4064. The earlier GROUP=QA run reached an independent existing ExplicitImports public-ownership cluster; none of its names or files are touched here.

@ChrisRackauckas
ChrisRackauckas marked this pull request as ready for review July 29, 2026 21:33
@ChrisRackauckas

Copy link
Copy Markdown
Member

This needs a minimum version on ordinarydiffeqcore for when it was added there

@ChrisRackauckas-Claude

Copy link
Copy Markdown
Member Author

CI audit after completion:

  • All 13 failing DelayDiffEq matrix jobs stopped before test execution: 4 failed while developing in-repo sources and 9 failed in julia-buildpkg. Representative LTS and Julia 1 logs show the same SciMLBase resolver conflict: registered/in-tree packages constrain SciMLBase to 3.39 while OrdinaryDiffEqNonlinearSolve 2.6.0 requests 3.40. Restore SciMLBase 3.39 compatibility for owner imports #4066 is the focused compatibility prerequisite for that conflict.
  • Across the root, sublibrary, downgrade-sublibrary, and downstream workflows, the 125 failing jobs all stopped in setup, resolution, build, downgrade resolution, or downstream loading; none reached a test body. The documentation job stopped on the same SciMLBase resolution conflict.
  • Runic reported only lib/OrdinaryDiffEqCore/src/disco.jl, lib/OrdinaryDiffEqCore/src/integrators/controllers.jl, and test/Integrators_I/disco_tests.jl, which are the pre-existing formatting debt isolated in Run Runic on the disco-optimizations files #4064. All five files changed by this PR were marked formatted by the CI Runic scan.

Local validation on the exact PR commit with a locally resolved SciMLBase 3.40.1 environment did execute the official DelayDiffEq GROUP=Interface suite: discontinuities 48/48, mass matrix 7/7, units 21/21, and multi-algorithm 28/28 passed. No assertions were skipped or changed.

The shared autonomous-discontinuity controller reads is_disco_step and disco_checkpoint, but DDEIntegrator did not carry either field. Initialize the state from the runtime time value, reset it during reinit!, and cover discontinuity-enabled and unitful public solver paths.

Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>
The autonomous-discontinuity controller state used by DDEIntegrator ships with OrdinaryDiffEqCore 4.12. Prevent DelayDiffEq 6.1 from resolving against an older Core release that does not provide the required controller behavior.

Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>
@ChrisRackauckas-Claude
ChrisRackauckas-Claude force-pushed the agent/fix-delay-disco-integrator-state branch from 947469d to e13f39a Compare July 29, 2026 23:28
@ChrisRackauckas-Claude

Copy link
Copy Markdown
Member Author

Addressed in e13f39aa3b: DelayDiffEq now requires OrdinaryDiffEqCore = "4.12", the first release line containing the shared DISCO controller behavior used by these fields. General currently ends at Core 4.11.0.

I rebased the branch onto current master and reran the official DelayDiffEq GROUP=Interface package test with local SciMLBase 3.40.1/Core 4.12.0. It passed, including discontinuities 48/48, mass matrix 7/7, Unitful 21/21, and multi-algorithm 28/28. The PR dependency note and validation section are updated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants