Repository navigation
WIP: build implicit DAE Jacobians and sparsity from scalarized array residuals - #5136
ChrisRackauckas wants to merge 4 commits into
Conversation
…residuals Scalarize array residual equations before differentiating so that the DAE Jacobian and its sparsity pattern cover every element, combine the two patterns elementwise, and build the sparse prototype from the sparsity pattern. Work in progress: the regression test errors before the change; the after-run did not complete. Co-Authored-By: Chris Rackauckas <[email protected]> Co-Authored-By: Claude Fable 5.1 <[email protected]> Agent-Harness: Claude Code 2.1.270 Agent-Model: claude-fable-5-1 Agent-Session: local Claude Code session 9b5c3ae5-6a0f-41b8-bd69-03bf3b5e7083
Benchmark Results (Julia v1)Time benchmarks
Memory benchmarks
|
Benchmark Results (Julia vlts)Time benchmarks
Memory benchmarks
|
Stacked on SciML#5049: array *equations* are accepted by the implicit-DAE and nonlinear paths, but the opt-in is a hardcoded `!implicit_dae && !(constructor <: NonlinearFunction)` test in `__process_SciMLProblem` — a codegen flag and a constructor-type check doing capability duty. This treats accepting array equations as a named, per-constructor capability. - `accepts_array_equations(constructor)` gates `__process_SciMLProblem`. `DAEFunction` and `NonlinearFunction` opt in, matching SciML#5049's behavior exactly (`HomotopyProblem` inherits nonlinear support through the same constructor). Every other problem type still needs `mtkcompile`, and opting a new constructor in is a one-line method. - `has_array_equations(eqs)` gets a docstring; it is the shared, shape-based detection predicate behind `check_array_equations` and the Jacobian guards. - `DAEFunction` throws the same `ArgumentError` for `jac = true` / `sparse = true` on array residuals that `NonlinearFunction` gets: today `jac = true` dies inside `executediff` and `sparse = true` silently builds a wrong-shaped `jac_prototype` (one row per equation instead of one per residual row). Related: SciML#4983, SciML#5049, SciML#5131, SciML#5136. Co-Authored-By: Chris Rackauckas <[email protected]> Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com> Agent-Harness: Devin CLI 3000.10.21 Agent-Model: SWE-2 Max Agent-Session: local Devin CLI session, no shareable URL (workspace /home/crackauc/sandbox/tmp_20260913_101544_55869)
…ODE support and MultiObjectiveOptimizationFunction (#5148) * feat: accept array equations on the NonlinearProblem path * fix: keep array-equation downgrade CI on DiffEqBase 7.18.1 Import unwrap explicitly in the new NL tests and raise the DiffEqBase floor so nested AutoDespecialize accepts already-unwrapped parameters. * ci: retrigger checks * Apply suggestion from @ChrisRackauckas * Zero the derivatives of array unknowns before expanding slices * Test that array unknowns carry an array equation * Gate array equations on a per-constructor capability trait Stacked on #5049: array *equations* are accepted by the implicit-DAE and nonlinear paths, but the opt-in is a hardcoded `!implicit_dae && !(constructor <: NonlinearFunction)` test in `__process_SciMLProblem` — a codegen flag and a constructor-type check doing capability duty. This treats accepting array equations as a named, per-constructor capability. - `accepts_array_equations(constructor)` gates `__process_SciMLProblem`. `DAEFunction` and `NonlinearFunction` opt in, matching #5049's behavior exactly (`HomotopyProblem` inherits nonlinear support through the same constructor). Every other problem type still needs `mtkcompile`, and opting a new constructor in is a one-line method. - `has_array_equations(eqs)` gets a docstring; it is the shared, shape-based detection predicate behind `check_array_equations` and the Jacobian guards. - `DAEFunction` throws the same `ArgumentError` for `jac = true` / `sparse = true` on array residuals that `NonlinearFunction` gets: today `jac = true` dies inside `executediff` and `sparse = true` silently builds a wrong-shaped `jac_prototype` (one row per equation instead of one per residual row). Related: #4983, #5049, #5131, #5136. Co-Authored-By: Chris Rackauckas <[email protected]> Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com> Agent-Harness: Devin CLI 3000.10.21 Agent-Model: SWE-2 Max Agent-Session: local Devin CLI session, no shareable URL (workspace /home/crackauc/sandbox/tmp_20260913_101544_55869) * Build `ODEProblem` from array differential equations without `mtkcompile` `complete(sys)` followed by `ODEProblem` rejected array equations such as `D(u[2:n-1]) ~ lap(u)`, forcing the finite-difference use case through the scalarizing `mtkcompile`, whose output and compile time grow with the grid. `DAEProblem` already accepts them, so give the explicit ODE path the same treatment: the right-hand side of an array equation is written to a contiguous block of `du` through `array_residual_maker`, the mass matrix gets one row per element, and the residual form `D(x) .- f ~ 0` emitted by MethodOfLines is rewritten to `D(x) ~ f` first. The generated code is independent of the array length. `full_equations` expands array equations into scalar rows so that the symbolic jacobian, sparsity and initialization paths keep one equation per row, and `ODEFunction` only computes the W sparsity pattern when `sparse` or `sparsity` asks for it. Co-authored-by: Cursor <[email protected]> * Update lib/ModelingToolkitBase/src/utils.jl Co-authored-by: Aayush Sabharwal <[email protected]> * Expect ODEProblem to accept array equations over scalar unknowns in the #2597 test Co-authored-by: Cursor <[email protected]> * Assert the operator type when re-applying a slice derivative to its elements Co-authored-by: Cursor <[email protected]> * Solve the array-equation DAE tests from a consistent du0 instead of BrownFullBasicInit The downgrade CI environment (DiffEqBase 7.15) trips a despecialization wrapper assertion inside BrownFullBasicInit for DAEFunctions, which aborted the InterfaceII group before the new ODEProblem tests could run. The tests only need a solve to compare against the analytic solution, so hand the solver a consistent du0 and skip DAE initialization. Co-authored-by: Cursor <[email protected]> * Share the array-equation predicate and accept them on the ODE path `is_array_equation` (from the ODE array-equation support) and `has_array_equations` were two spellings of the same shape check; keep the per-equation predicate in `utils.jl` and make `has_array_equations` delegate to it. `ODEFunction` opts into `accepts_array_equations`, matching what its `generate_rhs` branch already assembles through `array_residual_maker`. Co-Authored-By: Chris Rackauckas <[email protected]> Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com> Agent-Harness: Devin CLI 3000.10.21 Agent-Model: SWE-2 Max Agent-Session: local Devin CLI session, no shareable URL (workspace /home/crackauc/sandbox/tmp_20260913_101544_55869) * Expect array unknowns to flatten in the ODE array-equation tests Post-#5131 `flat_unknowns` handles the array unknown unconditionally, so an array equation over `u(t)[1:4]` declared as `[u]` constructs and evaluates rather than throwing "array unknowns". Co-Authored-By: Chris Rackauckas <[email protected]> Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com> Agent-Harness: Devin CLI 3000.10.21 Agent-Model: SWE-2 Max Agent-Session: local Devin CLI session, no shareable URL (workspace /home/crackauc/sandbox/tmp_20260913_101544_55869) * Update rejection tests for the ODE array-equation capability `ODEProblem` accepts array equations now, so it no longer belongs in the "still require scalarized equations" testset (`SDEProblem` rejection remains covered in the same file), and a `D(u) ~ -u` system over the array unknown `u` constructs because `flat_unknowns` handles it. Co-Authored-By: Chris Rackauckas <[email protected]> Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com> Agent-Harness: Devin CLI 3000.10.21 Agent-Model: SWE-2 Max Agent-Session: local Devin CLI session, no shareable URL (workspace /home/crackauc/sandbox/tmp_20260913_101544_55869) * Reject residual-form array differential equations on the ODE path The scalar path only accepts `D(x) ~ f` from `complete`; `D(x) - f ~ 0` is a DAE and needs `mtkcompile` or `DAEProblem`. Treat `D(u[2:4]) .- f ~ 0` the same way instead of pattern-matching it back into explicit form in every consumer. Also drop the duplicate InterfaceII include of `array_equation_dae.jl` (InterfaceI already runs it) and scope the docs note about `jac`/`sparse` to array equations. Co-Authored-By: Chris Rackauckas <[email protected]> Co-Authored-By: Claude Fable 5.1 <[email protected]> Agent-Harness: Claude Code Agent-Model: claude-fable-5-1 Agent-Session: https://claude.ai/code/session_01VorhgJYhDasyVLpGNrviga Claude-Session: https://claude.ai/code/session_01VorhgJYhDasyVLpGNrviga * Construct MultiObjectiveOptimizationFunction from a system's cost vector `OptimizationProblem` accepts `f::MultiObjectiveOptimizationFunction` in SciMLBase, but MTK could never produce one: `generate_cost` always folds `get_costs(sys)` through `consolidate` into a scalar. - `costs(sys)` returns the unconsolidated objective vector: the system's own costs plus the consolidated cost of each subsystem, namespaced. - `MultiObjectiveOptimizationFunction(sys)` generates a vector-valued objective over `costs(sys)`. `jac` builds the objective jacobian; `hess` is a vector with one generated hessian function per objective, the shape `OptimizationBase.instantiate_function` iterates. - The constraint fields are assembled by `generate_constraint_fields`, shared with `OptimizationFunction` instead of duplicated. - `OptimizationProblem(sys, op; multiobjective = true)` routes through it. `weights` cannot combine with it. Also drop the `jac`/`sparse` guards on `NonlinearFunction` and `DAEFunction` for array equations: since `full_equations` scalarizes array equations, the symbolic jacobian and sparsity pattern already come out with one row per residual, so both now work and are tested against ForwardDiff and the analytic stencil. The array-residual DAE tests go back to `BrownFullBasicInit`, which runs on the DiffEqBase 7.18.1 floor. Co-Authored-By: Chris Rackauckas <[email protected]> Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com> Co-Authored-By: Claude Fable 5.1 <[email protected]> Agent-Harness: Claude Code Agent-Model: claude-fable-5-1 Agent-Session: https://claude.ai/code/session_01VorhgJYhDasyVLpGNrviga Claude-Session: https://claude.ai/code/session_01VorhgJYhDasyVLpGNrviga * Approve the multi-objective names as ModelingToolkit reexports `costs` and the `generate_multiobjective_*` / `calculate_multiobjective_*` functions are exported from ModelingToolkitBase and therefore reexported by the ModelingToolkit facade; list them in the root QA allow-list. Co-Authored-By: Chris Rackauckas <[email protected]> Co-Authored-By: Claude Fable 5.1 <[email protected]> Agent-Harness: Claude Code Agent-Model: claude-fable-5-1 Agent-Session: https://claude.ai/code/session_01VorhgJYhDasyVLpGNrviga Claude-Session: https://claude.ai/code/session_01VorhgJYhDasyVLpGNrviga --------- Co-authored-by: utkuyilmaz1903 <[email protected]> Co-authored-by: Christopher Rackauckas <[email protected]> Co-authored-by: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com> Co-authored-by: Cursor <[email protected]> Co-authored-by: Aayush Sabharwal <[email protected]> Co-authored-by: Claude Fable 5.1 <[email protected]>
…residuals Resolve conflicts by keeping the residual-based DAE Jacobian approach, adopting master's flat_unknowns rename, and keeping both array-equation DAE test files. Co-Authored-By: Chris Rackauckas <[email protected]> Co-Authored-By: Devin <[email protected]> Agent-Harness: Devin CLI 3000.11.92 Agent-Model: swe-2-max Agent-Session: local Devin CLI session
Check the scalarized residual for emptiness directly instead of matching on the symbolic shape type, which is a Union the QA JET pass can flag. Co-Authored-By: Chris Rackauckas <[email protected]> Co-Authored-By: Devin <[email protected]> Agent-Harness: Devin CLI 3000.11.92 Agent-Model: swe-2-max Agent-Session: local Devin CLI session
Revived this stale PR: resolved the merge conflict with What was wrong
What I changed
The fix is still needed on Validation (Julia 1.12.7, x86_64,
|
Contractor review (ai-requests#58) of this PR, copied by the posting agent without change to its findings: reviewer Codex CLI 0.164.0 / gpt-6.1-sol, session 01a18da8-3a3a-7620-b234-342bf3d4309e, reviewed head b984e00, round 2, verdict CHANGES, risk medium. Risk assessment (independent review, Codex CLI 0.164.0 gpt-6.1-sol, slot 1, head b984e00)
Review round 2, written by the reviewer named above (Codex CLI 0.164.0 / gpt-6.1-sol) in a session other than the PR author's, and copied here by the posting agent without change to its findings. The posting agent did not re-run the reviewer's commands. Summary: Builds implicit DAE Jacobians and sparsity from scalarized array residuals. All 13 current-dependency assertions pass locally, but the supported older stack reproduces the empty-array BoundsError, so the compatibility blocker remains. Blast radius: generate_dae_jacobian, jacobian_dae_sparsity and sparse DAEFunction prototypes. Evidence: Julia 1.13.2: the complete new array_dae_jacobian.jl passes 13/13 on the head with current registered dependencies; its first testset errors on origin/master. With Symbolics 7.45.0, SymbolicUtils 4.46.4, SciMLBase 3.55.0 and DFBDF 2.0.0, the head passes the first 8+3 assertions but the empty-array test errors before its two assertions with a zero-element StepRange BoundsError. The cited downgrade CI is confirmed to be on this exact b984e00 head and uses the same key older versions. G1 analytic Jacobian/exponential references pass where executed; G2 is now directly exercised on both stacks. The supported-floor failure requires a source or compat repair; G3 introduces no shared cache/default mutation. Blocking findings
Non-blocking findingsNone. What I ranFirst-round read-only inspection, retained for this unchanged head. Repository commands below ran in the isolated checkout and exited 0; rev-parse HEAD matched the live head metadata. Base is the fetched target-branch tip at review time, while the three-dot diff uses the merge base. Newest non-merge commit trailers, rather than body attribution, supply AUTHOR_GRADE provenance. git fetch origin +refs/pull/5136/head:refs/remotes/pr/5136 +refs/heads/master:refs/remotes/origin/master
git checkout --detach pr/5136
git rev-parse HEAD
git rev-parse origin/master
git diff --check origin/master...HEAD
git log -1 --no-merges --format=%B
git diff origin/master...HEADRead-only GitHub inspection (PR views exit 0; pr checks exits 1 because failures exist): gh pr view 5136 --repo SciML/ModelingToolkit.jl --json number,url,state,isDraft,headRefOid,baseRefName,baseRefOid,title,files,commits,statusCheckRollup
gh pr view 5136 --repo SciML/ModelingToolkit.jl --json body,closingIssuesReferences
gh pr checks 5136 --repo SciML/ModelingToolkit.jl
gh issue view 5093 --repo SciML/ModelingToolkit.jl --json number,title,body,state,url
gh run view 39040829882 --repo SciML/ModelingToolkit.jl --log-failed
gh run view 39040829899 --repo SciML/ModelingToolkit.jl --log-failed
gh run view 39040829977 --repo SciML/ModelingToolkit.jl --log-failed
gh run view 39040830178 --repo SciML/ModelingToolkit.jl --log-failed
gh run list --repo SciML/ModelingToolkit.jl --branch master --event push --limit 5 --json databaseId,headSha,conclusion,url,name
gh run view 38950292112 --repo SciML/ModelingToolkit.jl --log-failed
gh run view 38950292025 --repo SciML/ModelingToolkit.jl --log-failed
gh run view --repo SciML/ModelingToolkit.jl --job 117430895860 --logCI check rollup at the captured head: {"CANCELLED": 2, "FAILURE": 5, "SKIPPED": 3, "SUCCESS": 101}. Log-retrieval exit codes are retrieval status, not test exit codes: successful retrieved jobs report Current-dependency InterfaceI CI passed 1816 assertions with 5 existing broken markers, while the downgrade lane fails the new test. Failed docs/linkcheck, SII and MTK Forward Mode were compared with historical master 38950292112/38950292025; the new empty-array test is absent from that base and is not covered by those baseline failures. Inspected CI URLs: https://github.com/SciML/ModelingToolkit.jl/actions/runs/39040829882, https://github.com/SciML/ModelingToolkit.jl/actions/runs/39040829899, https://github.com/SciML/ModelingToolkit.jl/actions/runs/39040829977, https://github.com/SciML/ModelingToolkit.jl/actions/runs/39040830178, https://github.com/SciML/ModelingToolkit.jl/actions/runs/39040830181/job/117430895860, https://github.com/SciML/ModelingToolkit.jl/actions/runs/38950292112, https://github.com/SciML/ModelingToolkit.jl/actions/runs/38950292025. Round 2 local execution: All 20 live PRs were checked OPEN with unchanged reviewed heads before Julia execution. Each run checked out the exact detached SHA shown below. Julia 1.13.2 ran directly inside the inherited resource scope, with one Julia invocation at a time, four Julia threads and one BLAS thread. The isolated environment was created with The driver activates that environment, resolves compatible registered dependencies without updating registries, and includes each selected script in a fresh module. It catches only at the test-file boundary to record every selected result, then exits nonzero if any selected case failed. Assertions and tolerances are unchanged.
git -C ModelingToolkit.jl checkout --detach origin/master
REVIEW_CASES='4902,4907,5121,5133,5136,5195,5196,5205,5215' \
JULIA_DEPOT_PATH="$PWD/depot:" JULIA_NUM_THREADS=4 OPENBLAS_NUM_THREADS=1 \
TMPDIR="$PWD/tmp" JULIA_NUM_PRECOMPILE_TASKS=1 JULIA_PKG_PRECOMPILE_AUTO=0 \
timeout 3600 julia --startup-file=no --compiled-modules=existing --depwarn=yes tmp/rerun/driver.jlResolved versions: SymbolicUtils 4.54.0, Symbolics 7.47.0, SciMLBase 3.58.0, JumpProcesses 10.0.1, NonlinearSolve 4.32.0, ModelingToolkit 11.47.0, ModelingToolkitTearing 1.20.7, ModelingToolkitBase 1.79.0, OptimizationBase 5.10.0.
git -C ModelingToolkit.jl checkout --detach pr/5136
REVIEW_CASES='5136' \
JULIA_DEPOT_PATH="$PWD/depot:" JULIA_NUM_THREADS=4 OPENBLAS_NUM_THREADS=1 \
TMPDIR="$PWD/tmp" JULIA_NUM_PRECOMPILE_TASKS=1 JULIA_PKG_PRECOMPILE_AUTO=0 \
timeout 3600 julia --startup-file=no --compiled-modules=existing --depwarn=yes tmp/rerun/driver.jlResolved versions: SymbolicUtils 4.54.0, Symbolics 7.47.0, SciMLBase 3.58.0, JumpProcesses 9.33.1, NonlinearSolve 4.32.0, ModelingToolkit 11.45.4, ModelingToolkitTearing 1.20.7, ModelingToolkitBase 1.77.4, OptimizationBase 5.10.0. Included the exact new Supported older dependency run git -C ModelingToolkit.jl checkout --detach pr/5136
MIN_SCIMLBASE=3.55.0 REVIEW_CASES='5136' \
JULIA_DEPOT_PATH="$PWD/depot:" JULIA_NUM_THREADS=4 OPENBLAS_NUM_THREADS=1 \
TMPDIR="$PWD/tmp" JULIA_NUM_PRECOMPILE_TASKS=1 JULIA_PKG_PRECOMPILE_AUTO=0 \
timeout 3600 julia --startup-file=no --compiled-modules=existing tmp/rerun/setup-min.jl
MIN_SCIMLBASE=3.55.0 REVIEW_CASES='5136' \
JULIA_DEPOT_PATH="$PWD/depot:" JULIA_NUM_THREADS=4 OPENBLAS_NUM_THREADS=1 \
TMPDIR="$PWD/tmp" JULIA_NUM_PRECOMPILE_TASKS=1 JULIA_PKG_PRECOMPILE_AUTO=0 \
timeout 3600 julia --startup-file=no --compiled-modules=existing tmp/rerun/driver-min.jlThe same unchanged file passes its first 8+3 assertions, then the empty-array testset errors before either assertion. Output: What I did not verifyNo whole suite, GPU, Reactant, MPI or exhaustive dependency-version matrix was run. Both the latest registered stack and the specifically supported older stack were executed. The first dependency release fixing empty-array scalarization was not identified; an implementation guard or independently verified lower-bound update is still needed. A clean native-precompile cycle was not verified: the initial batch dependency workload errored during NonlinearSolveFirstOrder AD-backend selection. The recorded test commands use existing caches and JIT-load uncached PR source; no assertion was disabled. 🤖 Posted by an AI agent — harness: Claude Code · model: claude-sonnet-5-5 |
Agent-Harness: Codex CLI 0.154.0 Agent-Model: gpt-6-astra Agent-Session: local session ID 01a099aa-308a-7fd3-91bd-9fb2dc357b91 Co-authored-by: ChrisRackauckas-Claude <[email protected]> Co-authored-by: Codex <[email protected]> Co-authored-by: Grok <[email protected]>
Independent review (Codex CLI 0.166.0 / gpt-6.1-sol), session 01a19809-c5f9-7de3-9462-7ff4037e2554, reviewed head edca42b
Review written by the reviewer named above in a session other than the PR author's, and copied here by the posting agent without change to its findings. The posting agent did not re-run the reviewer's commands. Summary: The PR builds implicit DAE Jacobians and sparse prototypes from scalarized residuals. The targeted fixes pass their nonempty regressions, but an independent probe finds a wrong sparse in-place Jacobian and the added empty-array regression fails on supported dependencies. Blast radius: Implicit DAEFunction/DAEProblem analytic Jacobians and sparse prototypes, including algebraic left-hand sides and array equations. These are peripheral to the rubric's mtkcompile/structural_simplify/System-construction main lanes. Evidence: Julia 1.13.2 with Symbolics 7.45.0 and SymbolicUtils 4.46.4: head regressions 91 passed/1 error; independent probes 106 passed/6 failed. An in-process replay of the exact merge-base versions of all three changed existing methods gives 63 passed/5 failed/4 errors on the same regressions. The nonempty array, prototype-cancellation, and scalar additions fail in that replay and pass at head; the empty-array addition errors in both. This is method-replay evidence, not a fresh process loading the base checkout. GitHub reports no checks or workflow runs on the reviewed head. G1 has independent analytic references, but the sparse probe violates its accuracy expectation; G2's specialized GPU/AD-rule/Reactant/MPI paths and G3's shared-state changes are not introduced here. Blocking findings
Non-blocking findingsNone. What I ranAll work was read-only with respect to upstream and tracked source. Read RULES.md, TARGET.md, repository AGENTS.md and CONTRIBUTING.md, the complete diff and relevant callers. Wrote INITIAL.md and ran Git and GitHub inspection commands (exit 0 unless noted): gh pr view 5136 --repo SciML/ModelingToolkit.jl --json number,url,state,isDraft,headRefOid,baseRefName,baseRefOid
git fetch origin +refs/pull/5136/head:refs/remotes/pr/5136 master
git checkout --detach pr/5136
git fetch origin +refs/heads/master:refs/remotes/origin/master
git rev-parse HEAD origin/master
git merge-base origin/master HEAD
git diff origin/master...HEAD
git diff --check origin/master...HEAD
gh pr view 5136 --repo SciML/ModelingToolkit.jl --json title,body,statusCheckRollup
gh issue view 5093 --repo SciML/ModelingToolkit.jl --json title,body
git log -1 --format=%B edca42bac4c0241498866c9996a5aeb3e581d38f
gh pr checks 5136 --repo SciML/ModelingToolkit.jl
gh run list --repo SciML/ModelingToolkit.jl --commit edca42bac4c0241498866c9996a5aeb3e581d38f --limit 20 --json databaseId,status,conclusion,url,name
gh run list --repo SciML/ModelingToolkit.jl --branch master --event push --limit 5 --json databaseId,status,conclusion,url,name,headSha
Exactly three Julia processes, serially, using plain Julia 1.13.2 on aarch64. In the commands below SHARED_DEPOT denotes the supplied shared depot; path-valued settings are expressed symbolically: JULIA_NUM_THREADS=4 OPENBLAS_NUM_THREADS=1 TMPDIR="$PWD/tmp" JULIA_DEPOT_PATH="$SHARED_DEPOT:" JULIA_PKG_PRECOMPILE_AUTO=0 timeout 3600 julia --startup-file=no --compiled-modules=existing --project=env probes/head_run.jl
JULIA_NUM_THREADS=4 OPENBLAS_NUM_THREADS=1 TMPDIR="$PWD/tmp" JULIA_DEPOT_PATH="$SHARED_DEPOT:" JULIA_PKG_PRECOMPILE_AUTO=0 timeout 3600 julia --startup-file=no --compiled-modules=existing --project=min-env probes/min_run.jl
JULIA_NUM_THREADS=4 OPENBLAS_NUM_THREADS=1 TMPDIR="$PWD/tmp" JULIA_DEPOT_PATH="$SHARED_DEPOT:" JULIA_PKG_PRECOMPILE_AUTO=0 timeout 3600 julia --startup-file=no --compiled-modules=existing --project=min-env probes/min_run.jlThe first process instantiated a temporary environment with The third process used The matrix probe uses the independent numeric residual For the baseline replay, archived commit 9082f85 using What I did not verifyNo fresh Julia process loaded the complete merge-base package; failing-before evidence is the explicitly described method replay. The full array test file does not pass at head because its empty-array test errors. No assertions ran with latest resolved Symbolics 7.48.0 / SymbolicUtils 4.54.0, and I did not test other supported dependency combinations or Julia versions. I did not run the pre-existing Sundials/IDA portion of dae_jacobian.jl, whole package suites, downstream suites, benchmarks, GPU execution, AD integrations, Reactant, MPI, or another platform. No new GPU kernel, framework AD rule, Reactant or MPI implementation is present in this diff. The three-process limit is exhausted; nothing was rerun after the final result. 🤖 Posted by an AI agent — harness: Claude Code · model: claude-sonnet-5-5 |
Work in progress.
jacobian_dae_sparsityand the generated DAE Jacobian differentiated the raw right-hand sides of array equations; this scalarizes the residuals first (skipping empty-shaped equations), combines the two patterns elementwise, and builds the sparseDAEFunctionprototype from that pattern instead of two symbolic Jacobians. Related: #5093.Evidence (Julia 1.12.6, aarch64;
lib/ModelingToolkitBase/test/array_dae_jacobian.jl):Not verified: anything beyond the failing-before run.
🤖 Posted by an AI agent — harness: Claude Code 2.1.270 · model: claude-fable-5-1
Conversation: local Claude Code session
9b5c3ae5-6a0f-41b8-bd69-03bf3b5e7083(no shareable URL available)Risk assessment (independent review, Codex gpt-6.1-sol, head b984e00)
Verdict: CHANGES
Rating: Codex gpt-6.1-sol rated it medium-low (ML1) at head b984e00
Risk: medium-low (ML1: corrects the sparsity returned for already-constructible implicit DAEs whose left-hand sides contain unknowns, changing sparse prototype patterns on a working path; the array-construction fix also matches L6, and added tests match L2).
Blast radius: Symbolic implicit DAE Jacobians and sparse DAEFunction/DAEProblem prototypes, including scalar algebraic left-hand sides and array residuals. This is a peripheral implicit-DAE path rather than System construction or mtkcompile itself.
Evidence: Read the full diff using
git diff origin/HEAD...HEAD, the PR metadata, linked issue and comments, and all risk criteria.git diff --check origin/HEAD...HEADpassed. No new public names, dependency changes, skipped tests or loosened assertions occur in the diff; the helpers are internal and the new dependency calls are publicly exported. No breaking public signature or documented contract change requiring a major bump was identified.Local runs used Julia 1.12.4,
JULIA_NUM_THREADS=4,JULIA_PKG_PRECOMPILE_AUTO=0, the requestedJULIA_DEPOT_PATH, and TMPDIR under scratch. LetSdenote<local path>. Environments and source snapshots were created there; the review checkout was unchanged.timeout 3600 julia --compiled-modules=existing --project=$S/env -e 'include("lib/ModelingToolkitBase/test/array_dae_jacobian.jl")'— exit 0 with Symbolics 7.46.0 / SymbolicUtils 4.51.0. Testset counts: 8/8, 3/3, 2/2 passed.origin/HEADat808a4f13e865cf457396ed72ed7d5e7a9ae2a4f8into scratch and used the same dependency manifest with its ModelingToolkitBase source path changed.timeout 3600 julia --compiled-modules=existing --compile=min -O0 --project=$S/baseenv $S/base_runner.jlincludes the exact PR test file — exit 1, first testset 3 passed / 1 error. Dense assertions passed; sparse construction threwOnly semi-explicit constant mass matrices are currently supported. Faulty equation: (x(t))[3] ~ (x(t))[1] + 2(x(t))[2]. A separate scalar prototype probe in that runner also showed the omitted algebraic left-hand-side entry: indices([1, 2, 1], [1, 1, 2]), missing (2,2).Pkg.add([PackageSpec(name="Symbolics", version="7.45.0"), PackageSpec(name="SymbolicUtils", version="4.46.4")])in scratch/minenv.timeout 3600 julia --compiled-modules=existing --compile=min -O0 --project=$S/minenv $S/min_test.jlruns the unchanged final testset from the PR — exit 1, 0 passed / 1 error,BoundsError: attempt to access 0-element StepRange{Int64, Int64} at index [1]. The same command with--project=$S/minbaseenvagainst the default-branch snapshot also errored identically. Thus the empty-equation limitation predates this PR, but the PR adds a required test that fails on supported versions and does not supply the promised handling. Logs and reproduction environments are in scratch.CI comparison: downloaded failing job logs with read-only
gh run view ... --log-failed/gh api .../logs. The PR downgrade InterfaceI failure is the same empty-array exception confirmed locally. PR SciMLBase indexing errors at comprehensive_indexing.jl:127 and :164 match the current default branch's two BoundsErrors; PR SciMLSensitivity Core8 mtk.jl:216 matches the default branch's time-gradient/3600-element-vector BoundsError. PR documentation and the merge-base documentation run both terminate on Documenter[:linkcheck]. The benchmark lts job failed cloning ModelingToolkit withGitError(Code:EEOF, Class:Net, early EOF)and subsequently lacked handle_caches.jl; the other benchmark job was cancelled. There is no current equivalent default-branch benchmark result establishing performance, and I do not classify those benchmark failures as proven pre-existing failures.Gates: G1 pass — hand-derived Jacobian and exponential analytic solution, exercised locally by all 13 head assertions. G2 not applicable — no GPU kernels, AD rules, Reactant tracing or MPI paths changed; symbolic differentiation is not a new AD rule. G3 not applicable — no shared-state, cache, threading or global-default changes. The supported-version test failure independently blocks merge.
Merge: needs changes (make the newly required empty-array regression pass throughout supported compatibility, including the downgrade configuration).
🤖 Posted by an AI agent — harness: Codex CLI 0.162.1 · model: gpt-6.1-sol
Conversation: local headless review run (no public session URL); transcript kept by the fleet master.