Skip to content

Keep stored SCC subsolutions concrete for uniform return codes - #1401

Draft
ChrisRackauckas-Claude wants to merge 1 commit into
masterfrom
agent/1400-green-ci
Draft

ChrisRackauckas-Claude wants to merge 1 commit into
masterfrom
agent/1400-green-ci

Conversation

@ChrisRackauckas-Claude

@ChrisRackauckas-Claude ChrisRackauckas-Claude commented Nov 22, 2026 •

Copy link
Copy Markdown
Member

🚧 UNREVIEWED — awaiting review by @ChrisRackauckas. Filed by an AI agent running as @ChrisRackauckas; Chris has not seen this.
Harness: Codex CLI 0.170.0 · Model: gpt-6.2-sol
Conversation: local session 01a20341-535d-7732-a8d5-4707576122fc (no session URL)

What changed

SciMLBase v3.57.0 added a return-code type parameter to NonlinearSolution, so the vector-form SCC working buffer can have a non-concrete element type. This follow-up to the existing SCC draft keeps the working buffer and its callback views compatible and narrows the collected subsolutions when store_original = Val(true). The additional tests exercise a closure that forwards to a legacy FunctionWrapper and a solve whose subsolutions have different return-code types. SciMLBase change

The master SCC failures are the same assertion on Julia 1 and Julia LTS.

CUDA dependency failure

The master CUDA job resolved CUDA/CUDACore 6.4.2 and GPUCompiler 2.23.4. Its first in-place solve failed @test_nowarn at test/gpu/cuda_tests__item1.jl:36 with the warning Use of GPUCompiler.compile_hook is deprecated, use run_compile_hook or with_compile_hook instead. The job reported 21 passes and one failure. The deprecated call is in CUDACore 6.4.2. The calling code switched APIs in CUDA.jl's fix, released in CUDA 6.5.0.

In an isolated copy of the CUDA test project, the resolver selected CUDA 6.4.2. Forcing 6.5.1 exposed incompatible KernelAbstractions bounds. The first bound below comes from LinearSolve, and the second comes from CUDACore.

ERROR: Unsatisfiable requirements detected for package KernelAbstractions [63c18a36]:
…
restricted by compatibility requirements with LinearSolve [7ed4a6bd] to versions: 0.9.30 - 0.9.48 or uninstalled
…
restricted by compatibility requirements with CUDACore [bd0ed864] to versions: 0.10.0 - 0.10.8 — no versions left

I developed the pending LinearSolve compat PR in the isolated copy and the same CUDA version request resolved with KernelAbstractions 0.10.8. The resolver result identifies the remaining release work in LinearSolve.jl.

julia +1 --startup-file=no --project=test/gpu -e 'using Pkg; Pkg.develop(path="."); Pkg.status(["CUDA", "GPUCompiler"]; mode=Pkg.PKGMODE_MANIFEST)'
julia +1 --startup-file=no --project=test/gpu -e 'using Pkg; Pkg.add(Pkg.PackageSpec(name="CUDA", version=v"6.5.1"))'
julia +1 --startup-file=no --project=test/gpu -e 'using Pkg; Pkg.develop(path=ENV["LINEARSOLVE_CHECKOUT"]); Pkg.add(Pkg.PackageSpec(name="CUDA", version=v"6.5.1")); Pkg.status(["CUDA", "GPUCompiler", "KernelAbstractions", "LinearSolve"]; mode=Pkg.PKGMODE_MANIFEST)'
[052768ef] CUDA v6.5.1
[61eb1bfa] GPUCompiler v2.23.4
[63c18a36] KernelAbstractions v0.10.8

Local verification

SCC Core on Julia 1.13.3 and 1.10.12 used SciMLBase 3.58.0, the version in the failing CI jobs. The LTS command used the shared SciML CI source setup script in an isolated checkout.

GROUP=Core julia +1 --startup-file=no --project=lib/SCCNonlinearSolve -e 'using Pkg; Pkg.instantiate(); Pkg.pin(Pkg.PackageSpec(name="SciMLBase", version=v"3.58.0")); Pkg.test()'
GROUP=Core julia +lts --startup-file=no --project=lib/SCCNonlinearSolve -e 'using Pkg; include(ENV["DEVELOP_SOURCES"]); develop_sources("lib/SCCNonlinearSolve"); Pkg.pin(Pkg.PackageSpec(name="SciMLBase", version=v"3.58.0")); Pkg.test()'
GROUP=Core julia --startup-file=no --project=lib/SCCNonlinearSolve -e 'using Pkg; Pkg.test()'
GROUP=QA julia +1 --startup-file=no --project=lib/SCCNonlinearSolve -e 'using Pkg; Pkg.test()'
GROUP=QA julia +1 --startup-file=no --project -e 'using Pkg; Pkg.test()'
julia +1.12 --startup-file=no --project=@runic -e 'using Runic; exit(Runic.main(ARGS))' -- --check lib/SCCNonlinearSolve/src/SCCNonlinearSolve.jl lib/SCCNonlinearSolve/test/core_tests__item4.jl
typos lib/SCCNonlinearSolve/src/SCCNonlinearSolve.jl lib/SCCNonlinearSolve/test/core_tests__item4.jl
git diff --check

Runic, typos, and the whitespace check each exited 0.

Failing before on master using its tracked tests and source. Julia 1.13.3 and 1.10.12 both exited 1.

Julia 1.13.3
  Expression: isconcretetype(eltype(scc_sol_debug.original))
Vector-form SCCNonlinearProblem with FunctionWrappers |   12     1     13  4.6s

Julia 1.10.12
  Expression: isconcretetype(eltype(scc_sol_debug.original))
Vector-form SCCNonlinearProblem with FunctionWrappers |   11     1     12  3.6s

Julia 1.12.4 with the added tests against the master SCC source
  Expression: isconcretetype(eltype(scc_sol_debug.original))
  Expression: isconcretetype(eltype(sol.original))
Vector-form SCCNonlinearProblem with FunctionWrappers |   18     2     20  5.9s
  Forwarding to an explicit FunctionWrapper           |    2     1      3  0.5s

Passing after with the same group commands. All three exited 0.

Julia 1.13.3
Vector-form SCCNonlinearProblem with FunctionWrappers |   20     20  2.4s
     Testing SCCNonlinearSolve tests passed

Julia 1.10.12
Vector-form SCCNonlinearProblem with FunctionWrappers |   19     19  2.1s
     Testing SCCNonlinearSolve tests passed

Julia 1.12.4
Vector-form SCCNonlinearProblem with FunctionWrappers |   20     20  2.9s
     Testing SCCNonlinearSolve tests passed

SCCNonlinearSolve QA, Julia 1.13.3
QA            |   20     20  30.0s
     Testing SCCNonlinearSolve tests passed

NonlinearSolve QA, Julia 1.13.3
QA            |   28     28  4m44.5s
     Testing NonlinearSolve tests passed

SCC Core also passed with SciMLBase 3.56.0 on Julia 1.13.3.

GROUP=Core julia +1 --startup-file=no --project=lib/SCCNonlinearSolve -e 'using Pkg; Pkg.instantiate(); Pkg.pin(Pkg.PackageSpec(name="SciMLBase", version=v"3.56.0")); Pkg.test()'
Vector-form SCCNonlinearProblem with FunctionWrappers |   20     20  2.0s
     Testing SCCNonlinearSolve tests passed

Pull request CI

SCC Core passed on Julia 1 and Julia LTS. The FunctionWrappers testsets passed 20/20 and 19/19 respectively. SCC QA passed 20/20, and the SCC downgrade job passed. The pre-release lane reports that it ran without the Core tests because Julia 1.14.0-beta1 is a beta.

The Dependabot workflow reported a startup failure with zero jobs, as on an earlier pull request. This run, earlier run.

The root downgrade, benchmarks, and documentation build passed. All eight integration jobs passed.

The full sublibrary downgrade workflow passed, including the NonlinearSolveFirstOrder job. At completion the PR check rollup showed 32 passing, one skipped, and zero pending or failed checks.

Verification gaps and review

The CUDA test group requires an NVIDIA GPU. The CUDA investigation covers the job log, source call, and dependency resolution. GPU, downstream, and prerelease suites were outside local coverage.

Review the extra vector allocation when debug storage is enabled and the working element type is non-concrete. Mixed return-code types can give the stored vector a common abstract element type.

Closes #1400

Risk assessment

  • Risk — low
  • Blast radius — the optional original vector returned by vector-form SCC solves
  • Evidence — locally reproduced the master assertion and ran the SCC Core group with the patch
  • Independent review — prior draft reviews document the callback and return-code compatibility cases. This revision awaits fresh review. Earlier draft
  • Merge — needs human review

🤖 Posted by an AI agent — harness: Codex CLI 0.170.0 · model: gpt-6.2-sol
Conversation: local session 01a20341-535d-7732-a8d5-4707576122fc (no session URL)

Narrow the collected vector only when saving it as original so
parameter callbacks keep their existing solution view types. Cover
forwarding FunctionWrappers and mixed subsolution return-code types.

Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>
Co-Authored-By: Codex <noreply@openai.com>
Agent-Harness: Codex CLI 0.170.0
Agent-Model: gpt-6.2-sol
Agent-Job: 1400-codex
Agent-Session: local session 01a20341-535d-7732-a8d5-4707576122fc (no session URL)

This branch has not been deployed

No deployments
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.

Default-branch CI is red: get the tests green

2 participants