Skip to content

Use converged solves for QNDF/QBDF in the GPU DAE comparison - #4869

Merged
ChrisRackauckas merged 1 commit into
SciML:masterfrom
ChrisRackauckas:fix/ode-gpu-qndf-mass
Oct 14, 2026
Merged

ChrisRackauckas merged 1 commit into
SciML:masterfrom
ChrisRackauckas:fix/ode-gpu-qndf-mass

Conversation

@ChrisRackauckas

Copy link
Copy Markdown
Member

🚧 UNREVIEWED — awaiting review by @ChrisRackauckas. Filed by an AI agent running as @ChrisRackauckas; Chris has not seen this.
Harness: Devin CLI 3000.11.3 (diagnosis and fix), Claude Code 2.1.285 (PR) · Model: fusion-claude-opus-5-5-high-sidekick-swe-2-medium
Conversation: local Claude session 3c311569-dda6-4687-bc9f-65febb212c33 (fleet master)

This fixes a failure on the default branch's CI. The diagnosis and the evidence below come from the investigating agent's report; "confirmed by running" and "read in logs" are kept apart there.

tests / GPU (julia 1, self-hosted Linux X64 gpu) / Tests - GPU (Julia 1) failing on PRs 4605/4611/4612/4613

The error (read in logs)

Each failing job ends with Some tests did not pass: 170 passed, 3 failed, 0 errored, 12 broken. The three failures are all in test/gpu/dae_tests.jl:481 (r.status === :pass, evaluated gpu_mismatch === pass):

Solver / jac / mass    class     cpu_abs   cpu_rel   gpu_abs   gpu_rel   status
QNDF / none / diag_cu  suitable  1.45e-03  6.79e-03  2.10e-03  7.51e-03  ✗ gpu mismatch
QNDF / CSC  / diag_cu  suitable  6.36e-04  2.68e-03  2.25e-03  6.29e-03  ✗ gpu mismatch
QNDF / CSR  / diag_cu  suitable  1.45e-03  6.79e-03  2.10e-03  7.51e-03  ✗ gpu mismatch

The QNDF solution on the GPU differs from the CPU QNDF solution by about 2e-3. The test's gate is GPU_MATCH_TOL = (atol = 1e-3, rtol = 1e-3). The numbers are bit-identical in every failing run listed below: the four PRs, unrelated PRs, and master. That holds across both V100 and T4 runners.

Failing runs on the affected PRs:

Evidence for PREEXISTING

Read in logs

Confirmed by running (local, CPU only, Julia 1.13.0, repo master libs)

I ran scratch/qndf_sensitivity.jl (output in scratch/qndf_sensitivity.out). It solves the same DAE as dae_tests.jl on the CPU twice, the second time with a perturbation of 1e-14 relative, and applies the test's own gate:

solver tolerances u0·(1+1e-14) p·(1+1e-14)
QNDF default 2.38e-3 FAIL 2.38e-3 FAIL
QNDF + GMRES default 2.20e-3 FAIL 1.64e-3 FAIL
QBDF default 8.3e-4 pass 1.44e-3 pass (edge)
FBDF / QNDF2 default ≤ 2e-7 ≤ 2e-7
QNDF reltol=1e-8, abstol=1e-6 1.2e-5 pass 8.4e-6 pass
QBDF reltol=1e-8, abstol=1e-6 6.5e-6 pass 3.5e-6 pass

At default tolerances (reltol=1e-3), QNDF's variable-order controller turns roundoff into O(reltol) differences on this problem: 30 vs. 33 accepted steps. A gate of 1e-3 cannot pass reliably, and the GPU mismatch is that roundoff sensitivity. A GPU code bug would not explain this, because the CPU alone fails the same gate under a 1e-14 perturbation. I could not run the GPU test itself (no NVIDIA GPU here).

Fix

test/gpu/dae_tests.jl: solve_kwargs now gives QNDF and QBDF the same converged-solve tolerances (reltol = 1e-8, abstol = 1e-6) that the Hairer4/Hairer42 CSC cases already use (the #4437 precedent). The pass gate GPU_MATCH_TOL is unchanged. QBDF is included because at default tolerances it sits at 0.9–1.4e-3 and would be the next case to flip.

  • Runic: clean. typos: clean. The file parses.
  • Not verified on a GPU. The "fails before, passes after" evidence is the CPU sensitivity table above, not a GPU run. Before merging, someone has to run the GPU test group on this branch (CI on a PR will do it) and confirm that the QNDF rows show ✓ with gpu_abs well under 1e-3.

Affected PRs and how

PR Effect
#4605 Not caused by the PR. Same 3 QNDF mismatches as master. (Its other failures, DelayDiffEq Regression and NonlinearSolve Core, are separate and not investigated here.)
#4611 Not caused by the PR. Same 3 QNDF mismatches. (NonlinearSolve Core 1 failure is separate.)
#4612 Not caused by the PR. Same 3 QNDF mismatches; this is its only failing check.
#4613 Not caused by the PR. Same 3 QNDF mismatches. (NonlinearSolve Core 1 failure is separate.)

Recommended action

  • Merge checker: don't count this check as a regression for these PRs. Master's baseline for it has been red since 2026-09-25 (https://github.com/SciML/OrdinaryDiffEq.jl/actions/runs/38153846182). The checker should compare against master's actual latest run of the same check, which here is a failure with identical output, not assume master is green.
  • All four PRs (one group): no change is needed in the PRs for this check. Once the fix lands on master, merge or rebase master into them to make the check green. Treat their other red checks (NonlinearSolve Core, DelayDiffEq Regression) separately.
  • Master: open a PR from fix/ode-gpu-qndf-mass and confirm on the self-hosted GPU runner. If QNDF still mismatches with converged tolerances, the residual would point to a real GPU-path difference in QNDF and would need further investigation.

Links


🤖 Posted by an AI agent — harness: Devin CLI 3000.11.3 (fix), Claude Code 2.1.285 (PR) · model: fusion-claude-opus-5-5-high-sidekick-swe-2-medium / claude-opus-5-5
Conversation: local Claude session 3c311569-dda6-4687-bc9f-65febb212c33 (fleet master)

🤖 Generated with Claude Code

At default tolerances QNDF's variable-order controller amplifies roundoff
to O(reltol) on this DAE: on CPU alone, perturbing u0 or p by 1e-14
relative moves the QNDF solution by 2.4e-3 and fails GPU_MATCH_TOL, and
QBDF sits at 0.8-1.4e-3. Any CUDA/CUDSS/LinearSolve roundoff change
therefore flips "QNDF [*, diag_cu]" to gpu_mismatch; it has failed on
every master push since 2026-09-25. With reltol=1e-8, abstol=1e-6 the
same perturbations stay at ~1e-5. The match gate is unchanged.

Co-Authored-By: Chris Rackauckas <[email protected]>
Co-Authored-By: Devin <[email protected]>
Agent-Harness: Devin CLI 3000.11.3
Agent-Model: fusion-claude-opus-5-5-high-sidekick-swe-2-medium
Agent-Session: local headless run, log /Users/chrisrackauckas/sandbox/master/fusion-invest/ode-gpu-qndf-mass/log.txt
@ChrisRackauckas
ChrisRackauckas marked this pull request as ready for review October 14, 2026 12:04
@ChrisRackauckas
ChrisRackauckas merged commit 59ba40e into SciML:master Oct 14, 2026
128 checks passed
xtalax added a commit to xtalax/OrdinaryDiffEq.jl that referenced this pull request Oct 17, 2026
xtalax added a commit to xtalax/OrdinaryDiffEq.jl that referenced this pull request Oct 17, 2026
xtalax added a commit to xtalax/OrdinaryDiffEq.jl that referenced this pull request Oct 17, 2026
xtalax added a commit to xtalax/OrdinaryDiffEq.jl that referenced this pull request Oct 17, 2026
xtalax added a commit to xtalax/OrdinaryDiffEq.jl that referenced this pull request Oct 17, 2026
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.

1 participant