Skip to content

Drop the unused init(ssprob, DynamicSS) from the comprehensive indexing test - #1635

Merged
ChrisRackauckas merged 1 commit into
masterfrom
claude/project-thread-zp96nn
Oct 10, 2026
Merged

ChrisRackauckas merged 1 commit into
masterfrom
claude/project-thread-zp96nn

Conversation

@ChrisRackauckas

Copy link
Copy Markdown
Member

Requested by Chris · project thread

Before: Run Tests on master fails in both SymbolicIndexingInterface jobs (run). The failure is at test/downstream/comprehensive_indexing.jl:103 with FieldError: type SciMLBase.SCCNonlinearProblem has no field u0.

After: the line is removed. It created ssint, which no assertion used because ssint was never added to integrators.

Why the line failed: SteadyStateDiffEq defines no init for DynamicSS. The call fell through to NonlinearSolve's __init(::AbstractSteadyStateProblem, ::Nothing, args...) (src/default.jl:59), which built a default nonlinear polyalgorithm cache and ignored DynamicSS. Since #1603, MTK stores an SCCNonlinearProblem as lowered_problem. NonlinearProblem(ssprob) now returns that SCC problem. Because AbstractSteadyStateProblem is an alias of AbstractNonlinearProblem, the same NonlinearSolve method then catches the SCC problem and calls NonlinearProblem(::SCCNonlinearProblem), which reads prob.u0.

How: this deletes one unused setup line. No assertion is removed. Two upstream bugs remain and are not fixed here:

  • NonlinearSolve's AbstractSteadyStateProblem default-alg __init/__solve methods match every AbstractNonlinearProblem.
  • init(::SteadyStateProblem, ::DynamicSS) has never really been supported.

Not verified locally: Julia could not be installed in this environment, so CI is the check.

🤖 Generated with Claude Code

https://claude.ai/code/session_01DvrkppVVQKnQTGGgmLXhJh


Generated by Claude Code

ssint was never added to the integrators list, so no assertion used it.
SteadyStateDiffEq defines no init for DynamicSS: the call fell through to
NonlinearSolve's default-algorithm init, which silently ignored DynamicSS.
With the SCC lowered_problem that MTK now stores, that fallback converts the
SCCNonlinearProblem with NonlinearProblem(prob) and fails reading prob.u0.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01DvrkppVVQKnQTGGgmLXhJh
@ChrisRackauckas ChrisRackauckas self-assigned this Oct 6, 2026

Copy link
Copy Markdown
Member Author

ModelingToolkit.jl/Extended / Downstream Tests - Extended fails, and the cause is outside this PR. The failure is in MTK's own test at downstream/lib/ModelingToolkitBase/test/ccompile.jl:11:

ArgumentError: CTarget with expression=Val{false} is not supported. CTarget emits C source code, not Julia; use expression=Val{true} ... (raised at Symbolics build_function.jl:836)

A newer Symbolics release now rejects build_function(...; target = CTarget(), expression = Val{false}). That call lives in ModelingToolkit's test, and this PR changes only one line of a SciMLBase test, so it cannot affect it. No fix exists yet. The fix belongs in ModelingToolkit: switch ccompile.jl to expression = Val{true} and compile the emitted C itself. ModelingToolkit is not in this session's repos, so I'm leaving it for whoever owns that test. I can't re-run jobs from this session.


Generated by Claude Code

Copy link
Copy Markdown
Member Author

The SymbolicIndexingInterface job (lts) now gets past the removed init line. It then fails on the next real problem: Non-timeseries indexing SciMLBase.NonlinearSolution, specifically State indexing and Observed for sssol = solve(ssprob, DynamicSS(Tsit5())), with BoundsError: attempt to access 1-element Vector{Float64} at index [[1, 2]] at comprehensive_indexing.jl:127/164.

Cause: SteadyStateDiffEq's __solve(::AbstractSteadyStateProblem, ::DynamicSS) first calls __solve_scc_lowering. When the problem has an SCC lowered_problem, it returns the SCCNonlinearSolve solution built on the lowering. That solution's state is the lowered system's (one unknown here; the other became an explicit function), not osys's [X, Y]. The test indexes it with osys indices, so it goes out of bounds. Before #1603 this solution carried osys's two states.

The behavior change sits in SteadyStateDiffEq (DynamicSS routing through the SCC lowering), not in this PR's diff. Fixing it means choosing one of two things:

  • SteadyStateDiffEq: DynamicSS stops using the SCC lowering, or maps the SCC solution back onto the steady-state problem's states.
  • This test: index sssol through its own symbolic container.

I've put that choice to the maintainer and am not guessing here. I can't re-run jobs from this session.


Generated by Claude Code

Copy link
Copy Markdown
Member Author

Catalyst/All/1 fails, but the cause is outside this PR. It dies while Catalyst's test harness is loading its test environment, before any test body runs:

SystemError: opening file "/home/runner/.julia/packages/Catalyst/Xx6ZO/test/extensions/Project.toml": Permission denied

Catalyst's runtests tries to open a Project.toml inside the read-only package directory under ~/.julia/packages. This is a bug in Catalyst's test setup. During triage I saw the same permission error on SciMLBase master's downstream Catalyst job. This PR only removes one line from a SciMLBase test, so it cannot cause this. No fix exists yet. The fix belongs in Catalyst: copy the test environment to a temp directory before activating or writing to it. Catalyst is not one of this session's repos, and I can't re-run jobs from here.


Generated by Claude Code

Copy link
Copy Markdown
Member Author

SciMLSensitivity.jl/Core1 / Downstream Tests - Core1 fails with 241 passed, 1 errored and 6 broken. The cause is outside this PR. The single error is in Concrete Solve Derivatives / Struct-Based Loss Functions / Mooncake with MooncakeAdjoint, and its stack trace runs through Mooncake's derived rules (Mooncake/src/interpreter/reverse_mode.jl:2812, differentiating Base.ht_keyindex on a Dict{Any, Any}). The job log is too large for this session's tooling to fetch the head of the error, so I can't quote the exception text. This PR only removes one unused init line from a SciMLBase test, so it cannot reach a Mooncake reverse-mode rule inside SciMLSensitivity. I don't know of an existing fix for this specific test. Note that it is a different test from the Mooncake HVP failure that SciMLSensitivity #1698 addresses. I can't re-run jobs from this session.


Generated by Claude Code

@ChrisRackauckas
ChrisRackauckas marked this pull request as ready for review October 10, 2026 20:50
@ChrisRackauckas
ChrisRackauckas merged commit c8ea9ca into master Oct 10, 2026
69 of 74 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