Optimizations to Discontinuity Detection Scheme - #3720
Merged
oscardssmith merged 17 commits intoJul 29, 2026
Conversation
oscardssmith
reviewed
Jun 8, 2026
oscardssmith
reviewed
Jun 8, 2026
Shreyas-Ekanathan
force-pushed
the
disco-optimizations
branch
from
June 8, 2026 18:10
931262d to
c11227a
Compare
| is_disco = integrator.is_disco_step | ||
| if is_disco | ||
| integrator.is_disco_step = false | ||
| cache.nconsteps = 0 |
Contributor
Author
There was a problem hiding this comment.
because it's not a standard timestep BDF shouldn't really count this step towards its order selection logic right?
Member
There was a problem hiding this comment.
@ChrisRackauckas thoughts on this? I don't know how we want disco to interact with BDF well enough here.
Shreyas-Ekanathan
force-pushed
the
disco-optimizations
branch
from
June 15, 2026 18:45
ee7c874 to
31da61e
Compare
Member
|
is this ready to merge? |
Contributor
Author
yes should be |
Member
|
any idea why so much CI is failing? |
Contributor
Author
Honestly not sure, it seems pretty random. I pushed another small fix for what I could see that is disco's fault, the remainder appears unrelated |
oscardssmith
approved these changes
Jul 29, 2026
4 tasks
ChrisRackauckas-Claude
pushed a commit
to ChrisRackauckas-Claude/OrdinaryDiffEq.jl
that referenced
this pull request
Jul 30, 2026
The disco-optimizations merge (SciML#3720) landed three files that Runic rejects, so format-check has been failing on master for every PR since. Whitespace and line wrapping only; `runic --check .` is clean across the repo afterwards. Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com> Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DKB6v14nZHZPYtKiLsPLDT
ChrisRackauckas
added a commit
to ChrisRackauckas-Claude/OrdinaryDiffEq.jl
that referenced
this pull request
Jul 31, 2026
Six floors on master permit dependency versions that lack symbols the code references. AutoMerge has been rejecting the OrdinaryDiffEqBDF 2.4.1 and OrdinaryDiffEqSDIRK 2.8.2 registrations since 2026-07-29 for two of them. DiffEqBase floors (Core, Differentiation, NonlinearSolve) All three require SciMLBase = "3.40", but the first DiffEqBase permitting SciMLBase 3.40 is 7.10.0. With a DiffEqBase floor of "7"/"7.8" the resolver has no solution at all — `Pkg.instantiate()` on any of the three fails with an unsatisfiable DiffEqBase. Raised to "7.10". OrdinaryDiffEqBDF and OrdinaryDiffEqFIRK -> OrdinaryDiffEqCore "4.12" Both read integrator.is_disco_step and integrator.disco_checkpoint. Those ODEIntegrator fields arrived with the DISCO work merged 2026-07-29 (SciML#3720) and are not in any released Core; the first to carry them is 4.12.0. Against Core 4.11.0 BDF fails to load with FieldError: type OrdinaryDiffEqCore.ODEIntegrator has no field `is_disco_step` FIRK's master tree already diverges from the registered 2.5.0 (which predates the field use), so it is bumped to 2.5.1 to make the corrected floor releasable. OrdinaryDiffEqSDIRK -> OrdinaryDiffEqNonlinearSolve "2.6" Imports can_smooth_est, added in SciML#3823. The version carrying it was never registered (ONLS goes 2.5.0 -> master 2.6.0), so against any released ONLS SDIRK fails to load with UndefVarError: `can_smooth_est` not defined in `OrdinaryDiffEqSDIRK` Audit method, since this class keeps recurring (SciML#2600, SciML#4078, SciML#4079) Diffed the ODEIntegrator struct between the registered Core 4.11.0 tree and master for added fields, then grepped every sublibrary for accesses to them; and cross-referenced every qualified access and explicit import name against the registered OrdinaryDiffEqCore 4.11.0 and OrdinaryDiffEqNonlinearSolve 2.5.0 trees. No sublibrary references a Core *name* absent at 4.11.0 — the only Core gaps are the two struct fields — and can_smooth_est is the only NonlinearSolve gap. Verified locally: SDIRK loads against the in-tree ONLS, and BDF loads and solves (FBDF on a scalar decay problem returns 0.36790983175798864). Metadata-only apart from the FIRK version bump. Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com> Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017ZqxphdTA1MydR1WXye9Jc
ChrisRackauckas
added a commit
that referenced
this pull request
Jul 31, 2026
…es (#4084) * Correct dependency floors blocking the pending base and solver releases Six floors on master permit dependency versions that lack symbols the code references. AutoMerge has been rejecting the OrdinaryDiffEqBDF 2.4.1 and OrdinaryDiffEqSDIRK 2.8.2 registrations since 2026-07-29 for two of them. DiffEqBase floors (Core, Differentiation, NonlinearSolve) All three require SciMLBase = "3.40", but the first DiffEqBase permitting SciMLBase 3.40 is 7.10.0. With a DiffEqBase floor of "7"/"7.8" the resolver has no solution at all — `Pkg.instantiate()` on any of the three fails with an unsatisfiable DiffEqBase. Raised to "7.10". OrdinaryDiffEqBDF and OrdinaryDiffEqFIRK -> OrdinaryDiffEqCore "4.12" Both read integrator.is_disco_step and integrator.disco_checkpoint. Those ODEIntegrator fields arrived with the DISCO work merged 2026-07-29 (#3720) and are not in any released Core; the first to carry them is 4.12.0. Against Core 4.11.0 BDF fails to load with FieldError: type OrdinaryDiffEqCore.ODEIntegrator has no field `is_disco_step` FIRK's master tree already diverges from the registered 2.5.0 (which predates the field use), so it is bumped to 2.5.1 to make the corrected floor releasable. OrdinaryDiffEqSDIRK -> OrdinaryDiffEqNonlinearSolve "2.6" Imports can_smooth_est, added in #3823. The version carrying it was never registered (ONLS goes 2.5.0 -> master 2.6.0), so against any released ONLS SDIRK fails to load with UndefVarError: `can_smooth_est` not defined in `OrdinaryDiffEqSDIRK` Audit method, since this class keeps recurring (#2600, #4078, #4079) Diffed the ODEIntegrator struct between the registered Core 4.11.0 tree and master for added fields, then grepped every sublibrary for accesses to them; and cross-referenced every qualified access and explicit import name against the registered OrdinaryDiffEqCore 4.11.0 and OrdinaryDiffEqNonlinearSolve 2.5.0 trees. No sublibrary references a Core *name* absent at 4.11.0 — the only Core gaps are the two struct fields — and can_smooth_est is the only NonlinearSolve gap. Verified locally: SDIRK loads against the in-tree ONLS, and BDF loads and solves (FBDF on a scalar decay problem returns 0.36790983175798864). Metadata-only apart from the FIRK version bump. Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com> Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017ZqxphdTA1MydR1WXye9Jc * Also floor Differentiation and NonlinearSolve on Core 4.12 / Differentiation 3.6 Same rule as the DiffEqBase floors in the previous commit, applied to the sibling dependencies rather than DiffEqBase: a package requiring SciMLBase = "3.40" cannot resolve against any sibling version whose own compat caps SciMLBase below 3.40. OrdinaryDiffEqDifferentiation -> OrdinaryDiffEqCore "4.12" OrdinaryDiffEqNonlinearSolve -> OrdinaryDiffEqCore "4.12" OrdinaryDiffEqNonlinearSolve -> OrdinaryDiffEqDifferentiation "3.6" The released Core tops out at 4.11.0, which declares SciMLBase = "3.39", and the released Differentiation at 3.5.0. With the old "4" / "4.6" / "3" floors both packages are unresolvable: Unsatisfiable requirements detected for package OrdinaryDiffEqCore: restricted to versions 4 by OrdinaryDiffEqDifferentiation, leaving 4.0.0 - 4.11.0 restricted by compatibility requirements with SciMLBase to versions: uninstalled Exactly four packages on master require SciMLBase 3.40 — DiffEqBase, OrdinaryDiffEqCore, OrdinaryDiffEqDifferentiation, OrdinaryDiffEqNonlinearSolve — so only their sibling floors need this treatment. Packages that still allow SciMLBase 3.39 resolve fine against the older siblings and are left alone. This fixes the release order: DiffEqBase 7.10.0 (registered), then OrdinaryDiffEqCore 4.12.0, then OrdinaryDiffEqDifferentiation 3.6.0, then OrdinaryDiffEqNonlinearSolve 2.6.0, then the blocked BDF and SDIRK. Verified locally: Core 4.12.0 with [sources] stripped resolves against registry-only dependencies (picking DiffEqBase 7.10.0) and loads; ONLS and Differentiation instantiate and load in-tree. Their registry-only check has to wait until Core 4.12.0 is actually registered. Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com> Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> --------- Co-authored-by: ChrisRackauckas-Claude <accounts@chrisrackauckas.com> Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
ChrisRackauckas
added a commit
that referenced
this pull request
Aug 1, 2026
The disco-optimizations merge (#3720) landed three files that Runic rejects, so format-check has been failing on master for every PR since. Whitespace and line wrapping only; `runic --check .` is clean across the repo afterwards. Claude-Session: https://claude.ai/code/session_01DKB6v14nZHZPYtKiLsPLDT Co-authored-by: ChrisRackauckas-Claude <accounts@chrisrackauckas.com> Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
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.
Checklist
contributor guidelines, in particular the SciML Style Guide and
COLPRAC.
Additional context
Optimizations:
tstopon the first identification of a discontinuity to help with step-resizing and prevent excessively large steps after finding a discontinuity. This should help us not take unreasonable steps, as Oscar suggested, and helps with error resetting after passing a discontinuity (since we are effectively in a new regime) to begin stepping anew._ode_addsteps!out of the zero_func_struct call and only call it once per discontinuity detection run