Skip to content

Give each threaded complex stage its own JVP operator - #4430

Merged
ChrisRackauckas merged 1 commit into
SciML:masterfrom
singhharsh1708:fix-firk-threaded-jvp
Aug 30, 2026
Merged

ChrisRackauckas merged 1 commit into
SciML:masterfrom
singhharsh1708:fix-firk-threaded-jvp

Conversation

@singhharsh1708

Copy link
Copy Markdown
Member

AdaptiveRadau(threading = true) with a matrix-free Jacobian is nondeterministic once the method has two complex stage pairs: ten solves of a 200-point heat equation at min_order = max_order = 9 with KrylovJL_GMRES() gave ten different answers, spread 1.4e-3 apart at tolerance 1e-7, with one Julia thread they agree exactly.
Every ComplexWOperator is built from the same W1.jacvec, so the stage solves that @threaded runs in parallel all push through one JVPCache and race on its pushforward buffers and its product tally; the threaded nf came out 566 where the serial solve counts 163.
When threading is on and the Jacobian is a JVPCache, build_complex_W now gives each complex stage its own operator, firk_new_J! moves those operators with the real one, and the existing per-stage drain picks up their tallies, so ten threaded solves now agree to the bit and report the serial nf.
The new test checks the operators are distinct, that repeated threaded solves agree, and that the threaded and serial nf match; the FIRK Krylov file passes on four threads.
AI Disclosure: Claude assisted with this change.

@singhharsh1708
singhharsh1708 marked this pull request as ready for review August 29, 2026 20:47
@ChrisRackauckas

Copy link
Copy Markdown
Member

needs a rebase

@singhharsh1708

Copy link
Copy Markdown
Member Author

done

@ChrisRackauckas
ChrisRackauckas merged commit 3fd2db9 into SciML:master Aug 30, 2026
130 of 131 checks passed
ChrisRackauckas referenced this pull request Aug 31, 2026
Apply Runic v1.10 formatting to the tests added by #4445.



Agent-Harness: Codex (version unknown)
Agent-Model: GPT-5
Agent-Session: unknown

Co-authored-by: ChrisRackauckas-Claude <[email protected]>
Co-authored-by: OpenAI Codex <[email protected]>
ChrisRackauckas added a commit that referenced this pull request Sep 7, 2026
- Add serial SDC solver family (OrdinaryDiffEqSDC) (#4208)
- Give each threaded complex stage its own JVP operator (#4430)
- Fix the adaptive error estimates of MRIGARKERK22a and MIS (#4232)
- Skip sparsity prep for matrix-free jac_prototype operators (#4445)
- Format differentiation tests (#4446)
- Fix SciMLBase reexport QA on Julia LTS (#4450)



Agent-Harness: Claude Code
Agent-Model: claude-opus-5[1m]
Claude-Session: https://claude.ai/code/session_014FEzNTLFutCmTEAZ3zBg5R

Co-authored-by: Claude Opus 5 (1M context) <[email protected]>
ChrisRackauckas added a commit that referenced this pull request Sep 7, 2026
- Add serial SDC solver family (OrdinaryDiffEqSDC) (#4208)
- Give each threaded complex stage its own JVP operator (#4430)
- Fix the adaptive error estimates of MRIGARKERK22a and MIS (#4232)
- Skip sparsity prep for matrix-free jac_prototype operators (#4445)
- Format differentiation tests (#4446)
- Fix SciMLBase reexport QA on Julia LTS (#4450)



Agent-Harness: Claude Code
Agent-Model: claude-opus-5[1m]
Claude-Session: https://claude.ai/code/session_014FEzNTLFutCmTEAZ3zBg5R

Co-authored-by: Claude Opus 5 (1M context) <[email protected]>
ChrisRackauckas added a commit that referenced this pull request Sep 11, 2026
- Add serial SDC solver family (OrdinaryDiffEqSDC) (#4208)
- Give each threaded complex stage its own JVP operator (#4430)
- Fix the adaptive error estimates of MRIGARKERK22a and MIS (#4232)
- Skip sparsity prep for matrix-free jac_prototype operators (#4445)
- Format differentiation tests (#4446)
- Fix SciMLBase reexport QA on Julia LTS (#4450)
- Preserve conditioning in OOP no-init solves (#4438)
- Read the test group from GROUP like the CI passes it (#4447)
- Raise root GPU test timeout (#4449)
- Fix default SDE dt vector lengths (#4454)



Agent-Harness: Claude Code
Agent-Model: claude-opus-5[1m]
Claude-Session: https://claude.ai/code/session_014FEzNTLFutCmTEAZ3zBg5R

Co-authored-by: Claude Opus 5 (1M context) <[email protected]>
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