Repository navigation
Fix GPUKvaerno3/5 nonsingular mass-matrix explicit stages - #565
ChrisRackauckas-Claude wants to merge 3 commits into
Conversation
…rices. ESDIRK first-stage and FSAL caches used f(u,p,t) as du/dt; solve M*du=f instead and reject singular mass matrices (DAEs) with a clear ArgumentError. Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com> Co-Authored-By: Cursor Agent <noreply@cursor.com> Agent-Harness: Cursor Agent CLI 2026.09.28-64d2043 Agent-Model: auto Agent-Session: local session, transcript at /home/crackauc/sandbox/goals/issue-backlog/ibd/DiffEqGPU.jl/jobs/530-cursor/log.txt on amdci2.julia.csail.mit.edu
Covers the issue SciML#530 analytic check (M=2I) for fixed/adaptive GPUKvaerno3/5 and updates singular-mass DAE tests to expect ArgumentError. Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com> Co-Authored-By: Cursor Agent <noreply@cursor.com> Agent-Harness: Cursor Agent CLI 2026.09.28-64d2043 Agent-Model: auto Agent-Session: local session, transcript at /home/crackauc/sandbox/goals/issue-backlog/ibd/DiffEqGPU.jl/jobs/530-cursor/log.txt on amdci2.julia.csail.mit.edu
…in-kernel guard. Rewrite Kvaerno mass-matrix tests in Float32 for Metal/oneAPI; reject singular M before device transfer; remove dead in-kernel det/throw; treat false*I as singular. Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com> Co-Authored-By: Cursor Agent <noreply@cursor.com> Agent-Harness: Cursor Agent CLI 2026.09.28-64d2043 Agent-Model: auto Agent-Session: local session, transcript at /home/crackauc/sandbox/goals/issue-backlog/ibd/DiffEqGPU.jl/jobs/530-cursor/log.txt on amdci2.julia.csail.mit.edu
Independent review (Devin CLI 3000.11.3, model fusion-claude-opus-5-5-high-sidekick-swe-2-medium): CHANGES, risk medium. Full reviewVERDICT: CHANGES The numerical fix itself is correct, and I confirmed that by running it: solving Blocking findings
Non-blocking findings
What I ranAll runs used the CPU KernelAbstractions backend with Julia 1.12.7. There were two scratch envs with identical Manifests:
What I did not verify
🤖 Posted by an AI agent — harness: Devin CLI 3000.11.3 (review), Claude Code 2.1.285 (posting) · model: fusion-claude-opus-5-5-high-sidekick-swe-2-medium |
Please ignore until reviewed by @ChrisRackauckas.
GPUKvaerno3/5 treated
f(u,p,t)asdu/dtin the explicit first stage and FSAL cache even when a nonsingular mass matrix was present, while the Newton residual already usedM. This PR solvesM * du = f(u,p,t)for those evaluations. User-visible behaviour change: Kvaerno3/5 on singular mass matrices (DAEs) now throwArgumentErrorwhere they previously ran, matching Chris's issue comment "These should error on DAEs".Fail before / pass after (Float32, CPU)
Negative control (master
perform_stepsources; Float32 issue reproducer):After fix (same Float32 command):
Review round-1 follow-ups
2.0f0*I, etc.) so Metal/oneAPI CI can run them.batch_solve_up_kernelbefore_kernel_transfer(also kept invectorized_*for the lower-level API).iszero(det(M))+throwremoved; host check is the sole DAE rejection path.UniformScaling{Bool}withλ == false(false*I) is now treated as singular viaiszero(M.λ).Verification
Runic
--checkandtyposclean on touched files.Not verified
@test_throwschange.Reviewer pushback
t(pre-existing; out of scope).Fixes #530
Please ignore this draft until reviewed by @ChrisRackauckas.
Risk assessment
ArgumentError0f0*IthrowsArgumentErrorbefore transferHarness: Cursor Agent CLI 2026.09.28-64d2043; model: auto; transcript: /home/crackauc/sandbox/goals/issue-backlog/ibd/DiffEqGPU.jl/jobs/530-cursor/log.txt on amdci2.julia.csail.mit.edu