Skip to content

Route OOP initdt NaN checks through DiffEqBase.NAN_CHECK (#1404) - #4000

Merged
ChrisRackauckas merged 2 commits into
SciML:masterfrom
ChrisRackauckas-Claude:cr/oop-initdt-nan-check
Jul 24, 2026
Merged

ChrisRackauckas merged 2 commits into
SciML:masterfrom
ChrisRackauckas-Claude:cr/oop-initdt-nan-check

Conversation

@ChrisRackauckas-Claude

Copy link
Copy Markdown
Member

Summary

  • OOP initdt used any(x -> any(isnan, x), f₀), which custom array/field types cannot overload.
  • Replace with DiffEqBase.NAN_CHECK (and isnan(d₁) for AD partials), aligning with the IIP intent.
  • Also early-returns tdir * dtmin on NaN (previously only warned and continued).

Fixes #1404

This PR should be ignored until reviewed by @ChrisRackauckas.

Test plan

  • Local: OOP f -> [NaN] exits without MethodError
  • Local: finite OOP still succeeds
  • CI: InterfaceI initdt tests

The OOP Hairer–Wanner path used nested `any(x -> any(isnan, x), f₀)`,
which custom array/field types cannot overload. Replace with
`DiffEqBase.NAN_CHECK` (and `isnan(d₁)` for AD partials), matching the
IIP intent and fixing OrdinaryDiffEq SciML#1404.

Co-Authored-By: Chris Rackauckas <[email protected]>
Master SciML#3989 introduced scc_hom variable names that typos flags as
"hom" → "home". Allow the intentional abbreviation.

Co-Authored-By: Chris Rackauckas <[email protected]>
@ChrisRackauckas-Claude

Copy link
Copy Markdown
Member Author

CI babysit (wave3/ode_ci_a)

PR-caused failures: none found. Local OOP NAN_CHECK test passes (retcode=Unstable as expected). Runic already green on previous head.

Pushed: hom allowlist in .typos.toml (master regression from #3989).

Remaining failures (pre-existing):

  • Downgrade InterfaceI: ArrayInterface resolver unsatisfiable (same on sibling PRs)
  • Spell: fixed via allowlist

This PR should be ignored until reviewed by @ChrisRackauckas.

@ChrisRackauckas
ChrisRackauckas marked this pull request as ready for review July 24, 2026 06:08
@ChrisRackauckas
ChrisRackauckas merged commit b6f8507 into SciML:master Jul 24, 2026
197 of 253 checks passed
ChrisRackauckas-Claude pushed a commit to ChrisRackauckas-Claude/OrdinaryDiffEq.jl that referenced this pull request Jul 24, 2026
1. test/InterfaceI/ode_initdt_tests.jl: close the missing `end` on the
   DAE reversed-tspan @testset introduced by SciML#4001/SciML#4000 merge (ParseError
   on InterfaceI Downgrade).

2. OrdinaryDiffEqAMF tests: use ROS34PW1a(linsolve=KrylovJL()) for dense
   reference solves with operator jac_prototype. Avoids SciMLOperators
   WOperator convert MethodError on AddedOperator/tensor-product graphs
   (upstream SciMLOperators#411 / v1.24.5) without materializing jac to
   Matrix (which hit ForwardDiff Dual Float64 conversion).

Note: BDF vector-abstol CheckInit (SciML#1214 / SciML#4002) still needs SciMLBase
>= 3.39 (unreleased; fix is SciMLBase#1464). TagBot triggered on that PR.

Co-Authored-By: Chris Rackauckas <[email protected]>
ChrisRackauckas added a commit that referenced this pull request Jul 25, 2026
#4004 added `hom` under "Technical variable names" (line 72) and #4000 added it
again at the end of the file (line 149). TOML forbids duplicate keys, so typos
cannot read its own config and bails out before checking anything:

    TOML parse error at line 149, column 1
        |
    149 | hom = "hom"  # scc_hom homotopy abbreviation in NonlinearSolve tests (#3989)
        | ^^^
    duplicate key

Remove the later entry — the line 72 declaration already covers the `scc_hom`
variables — and leave a pointer in its place, matching how the file already
notes the same situation for `Numer`.

Co-authored-by: ChrisRackauckas-Claude <[email protected]>
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.

recursive isnan

2 participants