Skip to content

Run SDC sweeps in parallel across the collocation nodes - #4348

Merged
ChrisRackauckas merged 1 commit into
SciML:masterfrom
singhharsh1708:sdc-parallel
Sep 19, 2026
Merged

ChrisRackauckas merged 1 commit into
SciML:masterfrom
singhharsh1708:sdc-parallel

Conversation

@singhharsh1708

@singhharsh1708 singhharsh1708 commented Aug 23, 2026 •

Copy link
Copy Markdown
Member

With a diagonal QΔ the M node solves in an SDC sweep are independent, so threading = true runs them concurrently on the in-place path; BaseThreads() and PolyesterThreads() from Core work too, and threading with a non-diagonal sweeper is rejected at construction because it would silently drop the coupling. This is parallel across the method in Speck's sense.

Stiff 1-D reaction-diffusion with M = 4 nodes on 4 threads: 64 unknowns 0.0093 s to 0.0072 s (1.3x), 256 unknowns 0.0905 s to 0.0460 s (2.0x), 1024 unknowns 2.42 s to 1.42 s (1.7x). Results match the serial sweep; the full suite passes on one, two and four threads.

The threading tests run as their own Threaded group at two threads, because the default sublibrary matrix runs Core at one thread and the comparison against the serial sweep proves nothing there.

Threaded runs undercount sol.stats: nlsolve! and calc_W! add to integrator.stats with a plain += from whichever thread runs the node, so the threading test compares solutions and not statistics. Counting exactly needs nlsolve! to take its own counters.

AI Disclosure: Claude assisted with this change.

@singhharsh1708

singhharsh1708 commented Sep 1, 2026 •

Copy link
Copy Markdown
Member Author

@ChrisRackauckas ready for review, stacked on #4347.

@singhharsh1708

Copy link
Copy Markdown
Member Author

@ChrisRackauckas restacked on #4347 after the rebase, ready for review once that one is in.

@ChrisRackauckas
ChrisRackauckas merged commit 61f52b3 into SciML:master Sep 19, 2026
130 of 134 checks passed
@singhharsh1708
singhharsh1708 deleted the sdc-parallel branch September 20, 2026 12:57
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