Skip to content

Document solving the stiff Brusselator on the GPU with a sparse Jacobian - #908

Open
AJ0070 wants to merge 4 commits into
SciML:masterfrom
AJ0070:gpu-sparse-jacobian-section
Open

AJ0070 wants to merge 4 commits into
SciML:masterfrom
AJ0070:gpu-sparse-jacobian-section

Conversation

@AJ0070

@AJ0070 AJ0070 commented Sep 12, 2026 •

Copy link
Copy Markdown
Member

Adds a GPU section to the advanced ODE tutorial, after the preconditioner section, since it uses the same Brusselator and the same sparse Jacobian setup.

Two things have to change to run that problem on a device: the right-hand side has to broadcast over an index set that lives on the device, because brusselator_2d_loop uses a scalar for loop, and the jac_prototype has to be a CuSparseMatrixCSR so the Jacobian is built on the device too. Preconditioners work through precs with kp_ilu0 from KrylovPreconditioners.jl.

Checked on a T4 at the tutorial's own (32, 32, 2) state and sparsity prototype: TRBDF2 and FBDF both match the CPU reference, unpreconditioned GMRES to 8e-10 and kp_ilu0 through precs to 6e-8. The blocks run in the docs build on the GPU runner, with CUDA, CUDSS and KrylovPreconditioners (MPL-2.0) added to the docs environment only.

Requested in SciML/OrdinaryDiffEq.jl#1566, replacing SciML/OrdinaryDiffEq.jl#4453. Needs SciML/OrdinaryDiffEq.jl#4452, which is merged.

AI Disclosure: Used Opus 5

`for` loop, and that cannot run on a device. Writing the same stencil as one broadcast
puts the work on whichever device the index set lives on:

```julia

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This doesn't build / run the example.

@ChrisRackauckas

Copy link
Copy Markdown
Member

🤖 Automated review from an AI agent running as @ChrisRackauckas — not written or reviewed by Chris. It is posted so that you can act on it. Chris or a maintainer may disagree.

Verdict: changes needed before merge (reviewed at c34c882).

Adds executable GPU Brusselator examples using a sparse Jacobian, CUDSS, and ILU-preconditioned GMRES. The execution request is addressed and technical checks passed, but the new MPL-2.0 dependency requires an explicit decision under your copyleft-dependency rule before merging.

Risk assessment

  • Risk: medium
  • Blast radius: Advanced ODE tutorial and documentation environment; no solver implementation or public API changes. KrylovPreconditioners becomes a direct documentation dependency in this MIT-licensed repository.
  • Evidence: All head checks passed: Documentation (30m28s), Runic / Runic Format Check, Spell Check with Typos / Spell Check with Typos, and runic-suggestions / Runic Suggestions. Latest master Documentation and Format Check also passed at ba65857; there are no failing head checks to classify. Read the head documentation log: the V100 runner evaluated all five new GPU blocks, including both solves, without example errors; warnonly does not include :example_block. CI resolved CUDA 6.2.0, CUDSS 0.7.0, and KrylovPreconditioners 0.3.8. Locally, julia --startup-file=no --project=repo check_rhs.jl compared the exact tutorial RHS definitions on the host for initial/random states at four times: Broadcast RHS agrees with tutorial CPU stencil | 8 / 8. Runic 1.11.1 --check --diff gpu_blocks.jl passed (exit 0) on the extracted new example blocks. No local GPU solve or full documentation build: nvidia-smi and /dev/nvidia* are absent. The author's numerical solution-error claims were not independently reproduced. No tests are skipped or weakened; kp_ilu0 is exported and documented in its owning package. No SemVer bump is needed for these tutorial changes.
  • Merge: needs changes (resolve the dependency-policy finding below).

Findings

  1. docs/Project.toml:37 — The new KrylovPreconditioners dependency is MPL-2.0, as verified in the exact v0.3.8 license used by CI; the PR body does not disclose this. Your instructions require new copyleft dependencies to be raised explicitly rather than included silently in routine changes. Document the license and docs-only scope, and obtain Chris's explicit acceptance or choose a permissible alternative before merging. This is a repository-policy gate, not a claim that MPL automatically relicenses DiffEqDocs or that this use is legally incompatible. CUDA.jl and CUDSS.jl themselves declare MIT licenses.

Chris is the only reviewer on this PR; no other maintainer is currently reviewing it. His request to build/run the examples is addressed by the current @example blocks and GPU CI execution. The PR description's statement that the blocks are not executed is stale.

Push a fix and the PR is reviewed again automatically at the new head.


🤖 Posted by an AI agent — harness: Claude Code · model: claude-opus-5-5[1m] (fleet master); review by Codex CLI 0.157.1 / gpt-6-astra
Conversation: local Claude Code session 3cd6500a-1f81-46b5-ac0b-c466e15b6a53 on Chris's Mac (session ID, no URL)

@ChrisRackauckas

Copy link
Copy Markdown
Member

🤖 Automated comment from an AI agent running as @ChrisRackauckas — not written or reviewed by Chris.

PR: #908

Reviewed head: c34c882
Raw SHA-256: 9ed04463b552f2a2af71c2eea4a3bfa0fd0a2eaddaed5222fb1ca7c8ab226c2e
Source SHA-256: 7d8339ab20e3e99b4b67de2102160e62daf9ae6040f559f43196f50c858369ba
Source: standard-review-v1 (harness-log)
Reviewer session: 01a1d150-770e-7d13-92e2-8fc39a6ff587
Slot: 1
Confidence: unknown
Own risk fixed before author rating/discussion: yes

Risk assessment

  • Risk: low (L1)
  • Verdict: MERGE
  • Reviewed head: c34c882

Review report

VERDICT: MERGE
Round: 1
Head: c34c882
Slot: 1
CI: green
Session: 01a1d150-770e-7d13-92e2-8fc39a6ff587

Risk

low (L1: tutorial documentation and docs build dependencies; package runtime APIs are unchanged).

Blocking findings

None confirmed.

  • Verdict: MERGE
  • Round: 1
  • Blocking priorities: none
  • Deferred P2 issues: none

Non-blocking findings

  • docs/src/tutorials/advanced_ode_example.md:405 — Inspection: the RHS comparison only displays a Boolean; neither solve checks its return code. A future mismatch or unsuccessful solve could therefore leave the docs build green. Suggest asserting RHS agreement, including at t = 1.1 when forcing is active, and asserting successful return codes and the final time. The current RHS and preconditioned solve passed the corresponding reviewer probes.

What I ran

  • Reviewer: codex-cli 0.164.0, model gpt-6.1-sol; actual session ID above, no session URL available. Review remained blind to PR text and other reviews. Newest commit has no Agent-Harness/Agent-Model trailers.
  • git diff origin/master...HEAD, git diff --check origin/master...HEAD: no whitespace errors. Final git status --short was empty; head matched the requested SHA.
  • uv run --locked python --version: Python 3.15.0. This Julia repository has no Python project or uv.lock; uv warned that --locked has no effect outside a project. julia --version: 1.13.2; no checked-in Julia Manifest was present.
  • In an archived scratch copy, preserving JULIA_DEPOT_PATH: julia --startup-file=no --project=docs -e 'using Pkg; Pkg.develop(PackageSpec(path=pwd())); Pkg.instantiate(); Pkg.status()' exited 0. Resolved CUDA 6.4.2, CUDSS 0.8.1, KrylovPreconditioners 0.3.8, LinearSolve 5.18.3, OrdinaryDiffEqSDIRK 2.9.8. Inspected dependency licenses: CUDA/CUDSS MIT; KrylovPreconditioners MPL-2.0.
  • CUDA_VISIBLE_DEVICES=1 julia --startup-file=no --project=docs ../gpu_probes.jl: CUDA functional, physical GPU 1, capability 12.0; scalar indexing disabled. Passed 1 GPU smoke assertion, 24 CPU-parity/independent periodic-balance assertions across initial/random/constant states and forcing-switch times, and 2 analytic discrete-Fourier assertions. The documented direct solve then exited 1 with Out of GPU memory; reported effective usage was 100%. The inference service already occupied 96,492 MiB on that card.
  • CUDA_VISIBLE_DEVICES=1 julia --startup-file=no --project=docs ../gpu_ilu_probes.jl: exited 0; repeated those 27 assertions and executed the documented ILU/GMRES solve. Observed ILU_RETCODE=Success t=11.5; asserted success and endpoint.
  • CUDA_VISIBLE_DEVICES=1 julia --startup-file=no --project=docs ../convergence.jl: exited 0; four CPU/GPU comparisons asserted successful return codes. Against the CPU solution at both tolerances 1e-10 with tstops=[1.1], GPU final-state relative differences decreased from 0.0588151 to 0.00175489 when reltol decreased from 1e-3 to 1e-6 (abstol=reltol/1000). CPU differences also decreased, from 0.206866 to 0.00898926. Adding the forcing stop likewise gave decreasing errors. These are diagnostic convergence observations, not an analytic trajectory error bound.
  • julia --startup-file=no --project=. -e 'using Pkg; Pkg.instantiate(); Pkg.test(; julia_args=["--threads=2"])' in the scratch copy: exited 0; ExplicitImports 2/2, Documenter errors 3/3, DiffEqDocs tests passed. Julia jobs used memory scopes, two Julia threads, and four precompile tasks.

What I did not verify

  • Completion of the direct CUDSS solve: local GPU capacity prevented it; this is an environment limitation, not a confirmed PR defect.
  • Full-site Documenter build, V100 hardware, older supported dependency combinations, or an analytic full-trajectory reference. CI green is supplied task metadata, not a CI run I independently inspected.

AUTHOR_GRADE: {"task":"docs","score":4,"difficulty":3,"rounds":1,"author_harness":"unknown","author_model":"unknown","note":"GPU RHS passed parity, periodic balance and analytic Fourier probes; documented ILU solve completed successfully and tighter tolerances reduced error. Package tests passed. Direct CUDSS completion was blocked by local GPU memory; displayed correctness checks could be strengthened into assertions."}

Head link: c34c882


🤖 Posted by an AI agent — harness: codex-cli 0.164.0 · model: gpt-6.1-sol
Conversation: local session 01a1d150-770e-7d13-92e2-8fc39a6ff587 (no session URL)

@ChrisRackauckas

Copy link
Copy Markdown
Member

🤖 Automated comment from an AI agent running as @ChrisRackauckas — not written or reviewed by Chris.

This PR now conflicts with master, which blocks the merge tooling ("base overlap on 'master'"). Could you merge or rebase the current master into the branch and push? The branch allows maintainer edits, so a maintainer can also do it.

The earlier review comment that the example did not build or run was addressed by c34c882, and the latest independent review at that head rated the change low risk with a MERGE verdict. A new push will need a fresh review at the new head before it can merge.


🤖 Posted by an AI agent — harness: Claude Code · model: claude-sonnet-5-5
Conversation: local session 3878b54e-28f2-4a01-a176-a8f5468d1997 (no session URL)

@ChrisRackauckas

Copy link
Copy Markdown
Member

🤖 Automated comment from an AI agent running as @ChrisRackauckas — not written or reviewed by Chris.

PR: #908

Reviewed head: 73b2ed6
Raw SHA-256: 43efdbb80760c20860819daf615d470f181707955e93fe0bce83439306b60201
Source SHA-256: 69c014386b6ae3ee7e9be20008b3939fe087b4dbcb1431fa275535290ceb51c4
Source: standard-review-v1 (harness-log)
Reviewer session: 36ebace4-8db1-4d6a-a286-931f5d2944bc
Slot: 1
Confidence: unknown
Own risk fixed before author rating/discussion: yes
Redaction: ran (substitutions=0)

Risk assessment

  • Risk: low (L1)
  • Verdict: CHANGES
  • Reviewed head: 73b2ed6

Review report

VERDICT: CHANGES
Round: 9
Head: 73b2ed6
Slot: 1
CI: green
Session: 36ebace4-8db1-4d6a-a286-931f5d2944bc
Reviewer: Antigravity CLI 1.5.10; model: gemini-4-carbon-high

Risk

low (L1: tutorial prose, @example blocks, and docs/Project.toml build dependencies only; no package code or public API changed)

Blocking findings

  • Blocking priorities: P2, P2
  1. [P2] docs/src/tutorials/advanced_ode_example.md:437-441 (contradicts :392-393) — False and self-contradictory diagnostic claim for omitting CUDSS (confirmed by running)

    • Observed evidence: Lines 392-393 state about CUDSS: "Without it the solve falls back to a Krylov method." Forty-five lines later, lines 437-441 claim: "All three mistakes above report the same Scalar indexing is disallowed, so the stack trace is what separates them. ... and frames in lu_instance mean CUDSS is not loaded." Running the tutorial's exact GPU setup (prob_gpu, TRBDF2()) in a fresh Julia 1.13.2 session without import CUDSS (CUDA v6.4.2, LinearSolve v5.18.3, OrdinaryDiffEq v7.8.1) confirms lines 392-393 and refutes lines 437-441: LinearSolveCUDAExt.defaultalg logs Warning: CUDSS.jl is required for LU Factorizations on CuSparseMatrixCSR. Please load this library. Falling back to Krylov and solves to ReturnCode.Success (723 RHS evaluations, 45 accepted steps) without calling lu_instance or raising scalar indexing. Even explicitly forcing TRBDF2(; linsolve = LUFactorization()) without CUDSS does not hit scalar indexing in lu_instance: LinearSolve.init_cacheval guards lu_instance behind LinearSolve.cudss_loaded(A) (returning nothing), so solve! raises MethodError: no method matching lu!(::Nothing, ::CuSparseMatrixCSR{Float64, Int32}; check::Bool). In addition, "All three mistakes above" sits immediately below a fourth mistake at lines 434-435 (passing raw CUSPARSE.ilu02 as a preconditioner), which throws an explicit ErrorException("A CuSparseMatrixCSR cannot be used as a preconditioner: ...") in LinearSolve._check_preconditioner_support rather than Scalar indexing is disallowed.
    • Suggested fix: Rewrite lines 437-441 so they refer only to the two host-vs-device setup mistakes that actually raise Scalar indexing is disallowed (passing host CartesianIndices in make_brusselator, which surfaces frames in bruss_point!/Base.Broadcast, and passing a host SparseMatrixCSC jac_prototype, which surfaces FirstAutodiffJacError wrapping Scalar indexing is disallowed with frames in jacobian!/calc_J!), and keep the accurate explanation from lines 392-393 that omitting CUDSS warns and falls back to GMRES.
  2. [P2] docs/src/tutorials/advanced_ode_example.md:413-415 — Inaccurate precs callback argument type description (confirmed by running)

    • Observed evidence: Lines 413-415 state: "The precs callback receives the concrete W, which on this path is a CuSparseMatrixCSR, so the preconditioner has to be one that can be built from and applied to that." Instrumenting gpu_ilu0(W, p) during DE.solve(prob_gpu, TRBDF2(; linsolve = KrylovJL_GMRES(precs = gpu_ilu0), concrete_jac = true); save_everystep = false) shows that typeof(W) is SciMLOperators.WOperator{true, Float64, ...}, not CuSparseMatrixCSR; only convert(AbstractMatrix, W) (called at line 423) returns CuSparseMatrixCSR{Float64, Int32}. Passing W directly to kp_ilu0(W) without convert(AbstractMatrix, W) fails with a MethodError, and this claim also contradicts lines 241 and 273-275 earlier on the same tutorial page (which explain that precs receives the W = I - γJ operator and uses convert(AbstractMatrix, W) to obtain the concrete sparse matrix).
    • Suggested fix: Clarify at lines 413-415 that precs(W, p) receives a WOperator whose underlying matrix (obtained via convert(AbstractMatrix, W), because concrete_jac = true was set) is a CuSparseMatrixCSR, so the preconditioner must support CuSparseMatrixCSR.

Non-blocking findings

  • docs/src/tutorials/advanced_ode_example.md:400-411, 426-432 — Unasserted RHS equivalence check at t = 0.0 (where forcing is zero) and discarded GPU solve return codes (confirmed by running):
    • Observed evidence: At line 405, Array(du_gpu) ≈ du_cpu is a bare boolean expression rather than @assert Array(du_gpu) ≈ du_cpu, so a broken GPU stencil returning false would still pass Documenter.makedocs. Moreover, evaluating at t = 0.0 leaves brusselator_f(x, y, t) (line 81, gated by t >= 1.1) identically zero everywhere, so a coordinate bug in the forcing term (such as swapping x and y) goes undetected at t = 0.0. Similarly, both GPU DE.solve(...) blocks (lines 409-410 and 426-431) discard the returned ODESolution via nothing # hide without checking SciMLBase.successful_retcode(sol), meaning a non-throwing solver failure (MaxIters, DtLessThanMin, Unstable) would not fail the docs build.
    • Suggested fix: Evaluate the RHS comparison at t >= 1.1 (e.g., t = 1.5), assert @assert Array(du_gpu) ≈ du_cpu, and bind sol = DE.solve(...) with @assert DE.SciMLBase.successful_retcode(sol) (or compare Array(sol.u[end]) against the CPU solve).
  • docs/src/tutorials/advanced_ode_example.md:393-395 — Outdated rationale for FullSpecialize on current DiffEqBase (confirmed by running):
    • Observed evidence: Lines 393-395 state that FullSpecialize is needed because default FunctionWrappers wrapping has a compiled signature "too narrow for some GPU solver caches". With the resolved docs environment (DiffEqBase v7.21.6, SciMLBase v3.58.0, OrdinaryDiffEq v7.8.1), DiffEqBaseForwardDiffExt._make_fww uses FunctionWrappersWrappers SingleCacheStorage() + AllowNonIsBits, and omitting FullSpecialize (DE.ODEFunction(gpu_rhs!; jac_prototype = jac_prototype_gpu)) solves to ReturnCode.Success across TRBDF2(), TRBDF2(; linsolve = KrylovJL_GMRES(precs = gpu_ilu0), concrete_jac = true), KenCarp47(), FBDF(), and Rodas5P().
    • Suggested fix: Either drop FullSpecialize to keep the setup minimal, or note that FullSpecialize avoids FunctionWrappers type-erasure and dynamic fallback-cache dispatch on non-default AD chunk signatures rather than implying default specialization fails to run.
  • docs/src/tutorials/advanced_ode_example.md:380, 385 — Redundant intermediate CuSparseMatrixCSC allocation (confirmed by running):
    • Observed evidence: Line 385 builds CuSparseMatrixCSR(CuSparseMatrixCSC(float.(jac_sparsity))), allocating a temporary device CSC matrix before converting to CSR. Running CuSparseMatrixCSR(float.(jac_sparsity)) directly constructs the identical CuSparseMatrixCSR{Float64, Int32} (nnz = 12288) in one step.
    • Suggested fix: Replace CuSparseMatrixCSR(CuSparseMatrixCSC(float.(jac_sparsity))) with CuSparseMatrixCSR(float.(jac_sparsity)) and drop CuSparseMatrixCSC from the import on line 380.

What I ran

All checks were run on the build host (Julia 1.13.2, NVIDIA RTX PRO 6000 Blackwell Max-Q GPU, CUDA driver 595.99.02 / runtime 13.4.0) using isolated scratch copies/environments so the repository checkout remained untouched (git status --short --ignored empty):

  • Python locked-environment check: The repository is a pure Julia package with no pyproject.toml or uv.lock. Running uv run --locked python --version reported:
    warning: --locked has no effect when used outside of a project and Python 3.15.0.
  • Spell check & formatting:
    • typos (typos-cli 1.51.1) at repo root: exit 0, no issues.
    • julia --project=@runic -m Runic --check --diff .: exit 0.
    • julia --project=@runic -m Runic --check --diff --lines=334:442 --languages=julia,julia-repl,jldoctest,@example,@repl,@setup,@eval docs/src/tutorials/advanced_ode_example.md: exit 0.
  • Package test suite (test/runtests.jl):
    • julia --project=. -e 'using Pkg; Pkg.test()' in an isolated copy (DiffEqDocs v7.21.0, DifferentialEquations v8.1.1, ExplicitImports v1.15.0): ExplicitImports 2/2 passed, Documenter errors 3/3 passed.
  • Dependency license and merge-conflict inspection:
    • Verified merge commit 73b2ed6d0066fa29389503ea9c31e83ddf8f8df0 preserved all base-branch docs/Project.toml entries (CSV = "0.10, 1.0").
    • Verified licenses of all three added docs/Project.toml dependencies: CUDA.jl (v6.4.2, MIT wrapper over NVIDIA CUDA runtime artifacts), CUDSS.jl (v0.8.1, MIT wrapper over NVIDIA CUDSS_jll redistributable), and KrylovPreconditioners.jl (v0.3.8, MPL-2.0 file-level copyleft, matching Krylov.jl already in the LinearSolve dependency tree; scoped to docs/Project.toml only, with root Project.toml unchanged).
  • GPU execution, numerical convergence, and adversarial probes (CUDA v6.4.2, CUDSS v0.8.1, KrylovPreconditioners v0.3.8, LinearSolve v5.18.3, OrdinaryDiffEq v7.8.1):
    • Ran a minimal CUDA.jl functional check (CUDA.versioninfo(), device broadcast Array(CuArray([1.0, 2.0, 3.0]) .+ 1.0) == [2.0, 3.0, 4.0]).
    • Executed all @example stiff1 blocks and compared GPU vs CPU results:
      • gpu_rhs! vs brusselator_2d_loop max abs difference: 5.68e-14 at both t = 0.0 and t = 2.0 (Array(du_gpu) ≈ du_cpu is true).
      • Default tolerances: DE.solve(prob_gpu, TRBDF2(); save_everystep = false) returned ReturnCode.Success and matched CPU sparse TRBDF2() to 1.75e-11 max abs difference (55 Jacobians, 523 linear solves, 45 accepted steps). TRBDF2(; linsolve = KrylovJL_GMRES(precs = gpu_ilu0), concrete_jac = true) returned ReturnCode.Success and reduced RHS evaluations from 22387 (unpreconditioned GMRES) to 7126.
      • Tight-tolerance convergence (abstol = 1e-7, reltol = 1e-7, tstops = [1.1] against a CPU KenCarp47(linsolve = KLUFactorization()) reference at abstol = 1e-11, reltol = 1e-11, tstops = [1.1]): max abs error dropped to 1.36e-2 (GPU CUDSS LU) and 5.15e-3 (GPU KrylovJL_GMRES + kp_ilu0), with 8.42e-3 max difference between the two GPU solves.
    • Probed every failure mode claimed in the prose:
      • Host CartesianIndices((N, N)): threw ErrorException("Scalar indexing is disallowed...") with frames in bruss_point! and Base.Broadcast._broadcast_getindex (matches prose).
      • Host jac_prototype = float.(jac_sparsity): threw FirstAutodiffJacError wrapping Scalar indexing is disallowed with frames [1] jacobian! and [2] calc_J! (matches prose).
      • Omitting CUDSS: logged Falling back to Krylov warning and solved to ReturnCode.Success (refutes lines 437-441); explicit LUFactorization() without CUDSS threw MethodError on lu!(::Nothing, ::CuSparseMatrixCSR...).
      • Passing raw CUSPARSE.ilu02 in precs: threw ErrorException("A CuSparseMatrixCSR cannot be used as a preconditioner: ...") (matches lines 434-435, refutes "All three mistakes above report the same Scalar indexing is disallowed" at line 437).
  • Documenter single-page HTML build (tutorials/advanced_ode_example.md):
    • Ran Documenter.makedocs(...; pagesonly = true, pages = ["tutorials/advanced_ode_example.md"]) in a scratch copy executing all 5 new GPU @example stiff1 blocks verbatim under size_threshold = 500 * 2^10 (with @btime stripped to single solves and the unchanged slow symbolic MTK.modelingtoolkitize block fenced as static julia): succeeded cleanly, producing a 45023-byte rendered index.html.

What I did not verify

  • Full multi-package site build (docs/make.jl across all pages, linkcheck = true, and the unchanged MTK.modelingtoolkitize symbolic Jacobian compilation block at lines 479-487 of docs/src/tutorials/advanced_ode_example.md); CI is reported green on the current head, and all added GPU blocks were executed and rendered directly on GPU.
  • Compatibility under older major bounds listed in docs/Project.toml (CUDA v5, CUDSS v0.7, LinearSolve v2–v4), as resolution selected the latest compatible releases (CUDA v6.4.2, CUDSS v0.8.1, LinearSolve v5.18.3).

AUTHOR_GRADE: {"task": "docs", "score": 3, "difficulty": 2, "rounds": 9, "author_harness": "unknown", "author_model": "unknown", "note": "The added GPU sparse-Jacobian Brusselator @example blocks are formatted cleanly, execute on GPU, render cleanly through Documenter, and converge to the CPU reference under both CUDSS direct LU and KrylovPreconditioners ILU(0) GMRES, but the prose contains two concrete inaccuracies confirmed at runtime: lines 437-441 contradict lines 392-393 by claiming that omitting CUDSS raises Scalar indexing is disallowed in lu_instance (it actually warns and falls back to GMRES, solving to Success), and lines 413-415 claim precs receives a concrete CuSparseMatrixCSR rather than a WOperator."}

REVIEWER_GRADE: {"task": "docs", "score": 3, "rounds": 9, "reviewer_harness": "devin", "reviewer_model": "fusion-claude-opus-5-5-high-sidekick-swe-2-medium", "verdict": "missed", "note": "Useful source and RHS checks, but downgraded the CUDSS diagnostic contradiction to non-blocking and missed that precs receives a WOperator, not CuSparseMatrixCSR; both are runtime-confirmed P2 findings in the frozen report."}

Head link: 73b2ed6


🤖 Posted by an AI agent — harness: Antigravity CLI 1.5.10 · model: gemini-4-carbon-high
Conversation: local session 36ebace4-8db1-4d6a-a286-931f5d2944bc (no session URL)

@ChrisRackauckas

Copy link
Copy Markdown
Member

🤖 Automated comment from an AI agent running as @ChrisRackauckas — not written or reviewed by Chris.

PR: #908

Reviewed head: 5f433fb
Raw SHA-256: 375a76e18f3e2843e240fd31d2b8b3134181653d56a78e4f10b7770a95b09a3c
Source SHA-256: e656c7e30fb5af21ae3eb9aff115a5059e78c189baae1bcf3068e4b4e60dbc36
Source: standard-review-v1 (harness-log)
Reviewer session: 01a1edac-3afb-70e3-ba89-43dd49c41fd6
Slot: 1
Confidence: unknown
Own risk fixed before author rating/discussion: yes
Redaction: ran (substitutions=0)

Risk assessment

  • Risk: low (L1)
  • Verdict: MERGE
  • Reviewed head: 5f433fb

Review report

VERDICT: MERGE
Round: 10
Head: 5f433fb
Slot: 1
CI: green
Session: 01a1edac-3afb-70e3-ba89-43dd49c41fd6

Risk

low (L1: tutorial examples, prose, and documentation dependencies; no library API changes)

Blocking findings

  • Blocking priorities: none

Both prior blockers are resolved: the incorrect CUDSS scalar-indexing diagnosis is removed, and the callback description now correctly identifies the matrix obtained by conversion. The latter and both remaining scalar-indexing failure modes were confirmed by running.

Non-blocking findings

  • docs/src/tutorials/advanced_ode_example.md:402 and :406-428 — Existing advisory, from reading: the RHS comparison remains a bare boolean, and both solve results are discarded. Consider asserting the comparison and successful return codes so future numerical failures stop documentation generation. The changed comparison time now exercises nonzero forcing, confirmed by running.

What I ran

  • Reviewed the supplied delta, prior-head review, complete base-to-head diff, newest commit, test runner, and documentation workflow. No root AGENTS.md or CLAUDE.md exists. Newest commit has no attribution trailers, so author harness/model below are unknown.
  • uv run --locked python --version: Python 3.15.0, with warning that --locked has no effect outside a project. There is no Python project or lockfile. julia --version: 1.13.2.
  • Resolved a scratch copy of docs/Project.toml, preserving the inherited depot layers: CUDA 6.4.2, CUDSS 0.8.1, KrylovPreconditioners 0.3.8, LinearSolve 5.18.3.
  • julia --startup-file=no --project=../scratch/repo -e 'using Pkg; Pkg.test()': exit 0; ExplicitImports 2/2, Documenter errors 3/3.
  • typos docs/src/tutorials/advanced_ode_example.md docs/Project.toml and Runic's --check --diff --lines=334:437 --languages=julia,julia-repl,jldoctest,@example,@repl,@setup,@eval check of the tutorial: exit 0 each.
  • CUDA_VISIBLE_DEVICES=1 julia --startup-file=no --project=../scratch/docs-env ../scratch/probe.jl normal: exit 0. CUDA functional check passed on GPU 1. Direct CSR construction matched the previous conversion exactly (12,288 entries). RHS maximum difference at t=2 was 5.68e-14; forcing contribution was 5.0. Default and preconditioned solves returned Success; default GPU/CPU final-state maximum difference was 8.05e-12. Seven inspected callbacks converted WOperator to CuSparseMatrixCSR. Host indices and host Jacobian prototypes each raised scalar-indexing errors. An initial scratch-harness world-age error was corrected before this successful rerun.
  • git status --short: empty. No checkout edits or GitHub writes.

What I did not verify

  • Documenter rendering/full-site build, older supported dependency versions, or a fresh process omitting CUDSS. Further Julia checks were not started after available memory fell below the build host's required headroom. CI status is supplied by the orchestrator.
  • Requested Devin provenance is unavailable: devin list returned No session selected. This run exposes the actual Codex session ID recorded above; no Devin session name was invented.

AUTHOR_GRADE: {"task":"docs","score":4,"difficulty":2,"rounds":10,"author_harness":"unknown","author_model":"unknown","note":"The delta resolves both prior prose blockers. Current-environment GPU execution confirms the simplified CSR construction, default specialization, active-forcing RHS comparison, preconditioner conversion, and scalar-indexing diagnostics. Package tests pass; assertion coverage remains an advisory improvement."}

Head link: 5f433fb


🤖 Posted by an AI agent — harness: codex-cli 0.169.0 · model: gpt-6.1-sol
Conversation: local session 01a1edac-3afb-70e3-ba89-43dd49c41fd6 (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.

2 participants