Repository navigation
Add LinearSolveDistributed: MPI strong-scaling benchmarks for the distributed PETSc path - #1636
Conversation
…findings Records the cloud phase: GAMG iteration counts flat across partitions and near-flat from N=40k to N=1M (10 -> 15 -> 17) with all correctness gates passing, and the 8-rank x 1M replicated configuration fitting in 64 GB — resolving the Finding 2 memory question for the planned cluster sizes. Finding 4: pool-allocated cloud hosts cannot produce defensible timings — 3.1x cross-run variance on an identical solve, and cache/working-set effects plus host drift produced 1635% parallel efficiency inside one sweep (caught by the suite's own >110% guard). Cloud tier is for correctness, memory, iteration behavior, toolchain; published curves need the dedicated runners. Finding 5: Julia precompile caches are CPU-target-keyed. Containers built and run on different microarchitectures silently invalidate bake-time caches; the recompile lands inside hydra's PMI handshake window and masquerades as an MPI bootstrap failure. Fixes: portable JULIA_CPU_TARGET before baking, singleton warmup before first mpiexec, and clearing stale .ji pidfiles after killing Julia mid-precompile (which otherwise forces fully interpreted execution).
…ges.jl The probe scripts were Phase 0 development scratch, referenced nowhere by the documents or FINDINGS. The pages.jl entry places the folder on the published site next to the other linear solver sections.
Drop FINDINGS.md: it was a development-phase working log (personal context, external file references, informal narrative). Its durable content already lives in the right places: the methodology guards are implemented and explained inside StrongScaling.jmd itself, and the bugs it recorded are filed as SciML/LinearSolve.jl#1142 and SciML/LinearSolve.jl#1166. Scrub development-context references from the documents and worker (project codenames, personal hardware narrative, external repo paths), and fix two stale statements in StrongScaling.jmd: the intro promised rank counts the sweep does not run, and the preconditioner paragraph still described the superseded unpreconditioned-CG design instead of the GAMG choice the document actually makes.
| # Runner configuration for the distributed (CPU / MPI) linear-solver benchmarks. | ||
| # | ||
| # CPU MPI scaling runs — stable multi-core self-hosted hardware (amdci1/amdci3). | ||
| # The GPU benchmark (B7) lives in the sibling folder LinearSolveDistributedGPU/ | ||
| # with its own ["self-hosted","gpu","exclusive"] runner, because runner selection | ||
| # is resolved per benchmark folder. | ||
| runner = ["self-hosted", "benchmark"] | ||
| timeout = 12000 |
There was a problem hiding this comment.
It duplicated the repository defaults so it selected nothing; copied from the GPU folders' pattern where a non-default runner genuinely needs choosing. Removed, along with two unused dependencies the same audit turned up.
The config file declared exactly the repository defaults (runner [self-hosted, benchmark], timeout 12000) so it selected nothing; it was copied from the GPU folders' pattern, where a non-default runner genuinely needs choosing. Removing it changes no behavior. Also drop PartitionedArrays and Random from the folder project (referenced nowhere in the documents or worker) and scrub one remaining internal codename from SmokeTest.jmd.
|
@ChrisRackauckas This one should be ready for another look whenever you get a chance: the config file from your review comment is removed (it duplicated the defaults), a couple of unused dependencies went with it, and all checks are green. The companion pages.jl edit for the output repo is SciML/SciMLBenchmarksOutput#24. |
|
I'm not sure this is going to work. If you mpiexec the weave locally did that work? |
|
Yes: the exact command the documents run (mpiexec with the MPICH_jll binary, 2 ranks, run_solve.jl) passes locally end to end, including on the final PR content: GAMG converges in 11 iterations with residual 5e-9 and a Success retcode, and the full weave was run during bring-up. I also validated the same harness in isolated cloud containers (Modal) before opening this: a clean Debian image with the same MPICH_jll pin that setup.sh applies ran the identical mpiexec path at N=250k on 1/2/4/8 ranks and at N=1M on 4/8 ranks, all with correct residuals and flat GAMG iteration counts (15 to 17), so the MPI plumbing is proven outside my machine as well. The one deliberate quirk is -launcher fork, which works around MPICH_jll hydra failing PMI bootstrap on single-node setups; it is harmless where hydra is healthy. The runner-side unknown is only setup.sh pinning MPI.jl to MPICH_jll on first run, which is why the committed sizes are small enough to fail fast if the environment disagrees. |
Summary
New folder
benchmarks/LinearSolveDistributedbenchmarking the distributed linear solver work in LinearSolve.jl (PETScAlgorithm with a communicator on replicated SparseMatrixCSC input):SmokeTest.jmd: minimal 2-rank correctness gate for the harness. Runs in minutes; a nonzero worker exit fails the document.
StrongScaling.jmd: fixed-size 2-D FD Laplacian solved with PETSc GAMG-CG across rank counts, reporting speedup, parallel efficiency, and iteration counts. The methodology guards are the point: iteration counts print on every run (a rank-dependent preconditioner silently corrupts strong scaling into an algorithm comparison), the serial baseline is pinned to one BLAS/OpenMP thread per rank, PETSc's stopping norm is aligned with LinearSolve's true-residual safety check, and the document warns on iteration spread above 25% or efficiency above 110% instead of silently plotting an impossible curve.
run_solve.jl / setup.sh: the MPI worker (correctness gate on every solve, CSV output) and the runner hook that pins MPI.jl to MPICH_jll so the whole stack shares PETSc_jll's MPI ABI.
Building this harness surfaced SciML/LinearSolve.jl#1166 (solve! discards iteration count on safety-check failure) and fed into SciML/LinearSolve.jl#1142; the methodology rationale (why block-Jacobi is excluded, why the stopping norm is aligned with the safety check, why iteration counts print on every run) is documented inside the documents themselves.
Sizes
The committed problem size and rank counts are deliberately modest so the first runner execution proves the pipeline inside a small CI budget (the full document is under an hour). A follow-up raises N toward 1e6 and extends the rank range once the harness is green on the runner; the document's closing section describes exactly that procedure.
pages.jl gets the section entry in this PR; the matching SciMLBenchmarksOutput edit is SciML/SciMLBenchmarksOutput#24.
AI Disclosure: Used Opus 5