Skip to content

Fix MOL_Interface2 downgrade overflow - #601

Merged
ChrisRackauckas merged 3 commits into
SciML:masterfrom
ChrisRackauckas-Claude:agent/fix-mol-interface2-downgrade-overflow
Jul 21, 2026
Merged

ChrisRackauckas merged 3 commits into
SciML:masterfrom
ChrisRackauckas-Claude:agent/fix-mol-interface2-downgrade-overflow

Conversation

@ChrisRackauckas-Claude

Copy link
Copy Markdown
Member

Important

Ignore this PR until it has been reviewed by @ChrisRackauckas.

Summary

  • raise the ModelingToolkit floor from 11.26.8 to 11.31.2
  • assert that the affected boundary-coupled discretization constructs an ODEProblem

This is an independent follow-up to the failure exposed by the downgrade job on #599; it does not modify or duplicate that PR.

Root cause

The exact LTS minimum-compatible graph failed in MOL_Interface2 with:

OverflowError: -600000000 * -25974000000 overflowed for type Int64

The exception came from StateSelection's checked Bareiss update while ModelingToolkit compiled the initialization problem for Another boundaries appearing in equations case.

A symptom-focused bisect identified adfbff645ad09df9724e014d9822edc399df025b (#594) as the first bad MethodOfLines commit. Its PDEBase 0.1.29 floor enabled the ModelingToolkit initialization path for this problem. The prior graph did not reach this overflow, though it has separate old-PDEBase initialization errors.

ModelingToolkitTearing 1.16 introduced deterministic canonical variable ordering, which avoids the overflowing pivot sequence. ModelingToolkit 11.31.2 is the first registered ModelingToolkit release that both requires a post-fix tearing implementation and contains the corrected genuine-downgrade floors for SciMLBase and OrdinaryDiffEqCore. Earlier candidate floors removed the overflow but produced an invalid minimum precompile graph.

MOL_Interface2 remains outside the normal grouped matrix because the previous workflow explicitly disabled it after lts/pre runs stalled for 6+ hours. The downgrade workflow already reaches it through the default All harness, which is how this regression surfaced.

Investigation process

  1. Reproduced the fix: remove deprecated IfElse.jl dependency to resolve Downgrade test failure #599 downgrade job locally with Julia 1.10.11 and the exact julia-downgrade-compat resolver.
  2. Reproduced the clean-master overflow with MTK 11.26.8 / MTKBase 1.42.2 / MTKTearing 1.15.0 / StateSelection 1.11.0 / PDEBase 0.1.29.
  3. Ran the same group at the parent of fix: use MTK initialization via PDEBase 0.1.29 #594 and confirmed the specific boundary case does not overflow there.
  4. Ran git bisect across the transition and identified fix: use MTK initialization via PDEBase 0.1.29 #594 as the first bad commit.
  5. Inspected StateSelection and ModelingToolkitTearing history, then tested the 1.16 tearing boundary directly.
  6. Tested candidate ModelingToolkit floors with the genuine minimum resolver and selected 11.31.2.
  7. Re-ran the full group on latest-compatible and minimum-compatible graphs.

Local verification

Julia 1.10.11, latest-compatible graph:

Test Summary:  | Pass  Broken  Total      Time
MOL_Interface2 |    5       8     13  10m21.3s
     Testing MethodOfLines tests passed

Julia 1.10.11, genuine minimum-compatible graph after the downgrade action (MTK 11.31.2 / MTKBase 1.51.1 / MTKTearing 1.18.3 / StateSelection 1.11.0 / PDEBase 0.1.29):

Test Summary:  | Pass  Broken  Total     Time
MOL_Interface2 |    5       8     13  7m09.9s
     Testing MethodOfLines tests passed

Additional checks:

  • pinned MTKTearing 1.16.0 affected-case reproduction: passed
  • Runic --check .: passed
  • actionlint: passed
  • git diff --check: passed

Require the first ModelingToolkit release with compatible downgrade floors and assert the affected boundary-coupled discretization constructs an ODEProblem.

Co-Authored-By: Chris Rackauckas <[email protected]>
Use explicit solver tolerances so the conservation assertion measures the spatial discretization instead of integrator error.

Co-Authored-By: Chris Rackauckas <[email protected]>
@ChrisRackauckas-Claude
ChrisRackauckas-Claude force-pushed the agent/fix-mol-interface2-downgrade-overflow branch from 632a927 to efb1a41 Compare July 16, 2026 22:20
@ChrisRackauckas-Claude

Copy link
Copy Markdown
Member Author

Follow-up validation after rebasing this PR onto current master:

  • The exact downgraded graph still passed MOL_Interface2: 5 passed, 8 broken, 13 total.
  • The same graph initially missed the Diffusion conservation tolerance on the edge-aligned grid by about 1.97e-10 (1.1971e-9 integration drift versus atol=1e-9).
  • A clean current-master exact Diffusion run passed 289/289, so this was graph-sensitive solver error rather than a base-branch test failure.
  • A controlled check showed the spatial discretization conserves correctly: with explicit abstol=reltol=1e-10, the maximum drift was about 1.24e-15 on the center grid and 3.64e-15 on the edge grid. The assertion and its 1e-9 tolerance are unchanged.

The follow-up commit therefore makes the solver tolerances explicit for this conservation test. Final local results on Julia 1.10.11:

Test Summary: | Pass  Total     Time
Diffusion     |  289    289  8m53.3s
     Testing MethodOfLines tests passed

Test Summary:  | Pass  Broken  Total     Time
MOL_Interface2 |    5       8     13  7m03.9s
     Testing MethodOfLines tests passed

Runic --check . and git diff --check also passed.

@ChrisRackauckas-Claude

Copy link
Copy Markdown
Member Author

Current hosted CI classification:\n\n- The exact Downgrade job passed.\n- Canonical Runic and Runic Suggestions passed.\n- The ordinary QA job did not report a test failure; its self-hosted runner lost communication after 30 minutes while the test step was still in progress.\n- I attempted a job-only retry through the Actions API, but the current token received HTTP 403 (admin rights required).\n\nNo source change is justified for that runner-loss result; it needs an authorized CI retry.

@ChrisRackauckas-Claude

Copy link
Copy Markdown
Member Author

CI timer follow-up:

  • The exact Downgrade job, canonical Runic check, downstream check, and every completed functional test lane are green.
  • The QA job ended after 30 minutes with its test step still recorded as in_progress; it did not report a test failure.
  • The Documentation job likewise ended with Build and Deploy Documentation still recorded as in_progress after about 57 minutes; it did not complete a failing step.
  • Job-only retries for these infrastructure terminations require repository-admin rights; the Actions API returned HTTP 403.

No source change is justified by either incomplete runner result. An authorized job retry is the remaining CI action.

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

Copy link
Copy Markdown
Member Author

Verified the fork head still matched efb1a41 exactly and the branch is current with master. Runic passed locally, then I pushed empty co-authored retry commit e725794 to rerun the QA and docs jobs that previously lost their self-hosted runners; the retry commit has no tree changes.

@ChrisRackauckas
ChrisRackauckas marked this pull request as ready for review July 21, 2026 14:09
@ChrisRackauckas
ChrisRackauckas merged commit 72ba448 into SciML:master Jul 21, 2026
63 of 65 checks passed
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