Skip to content

Fix MPI remainder copies on Julia 1.14 and test explicit Julia versions - #797

Merged
jpsamaroo merged 2 commits into
masterfrom
jps/mpi-julia-114-fence
Nov 26, 2026
Merged

jpsamaroo merged 2 commits into
masterfrom
jps/mpi-julia-114-fence

Conversation

@jpsamaroo

@jpsamaroo jpsamaroo commented Nov 26, 2026 •

Copy link
Copy Markdown
Member

Changes

  • Use Base.Threads.atomic_fence() after an MPI remainder copy scatters received bytes. Julia 1.14 requires a synchronization scope on the private intrinsic, which makes the existing one-argument call fail in cross-rank Datadeps tests. The public API matches the Distributed remainder-copy path.
  • Replace the MPI CPU matrix's rolling pre lane with explicit Julia 1.13 and 1.14 lanes. Both run at two and four ranks. The 1.14 lane can use prereleases within its minor series so it works before 1.14 is stable.

The fence failure is present on the shared base of #790 and #791. The failing MPI CPU job on master

Validation

Nightly QR follow-up

Both Julia 1.15 nightly jobs failed in NextLA's QR reflector kernel, where the bundled LinearAlgebra rejects an aliased workspace in mul!. The NextLA change uses rmul! for the in-place update. All 184 Dagger QR assertions passed locally with the change on the same nightly build, Julia 1.15.0-DEV.1036. NextLA fix

Julia also has a pending stdlib bump that includes restored support for this triangular mul! case. Julia stdlib bump

Julia 1.14 added a sync-scope argument to the private atomic_fence intrinsic. Use the public sequentially consistent fence to preserve publication of the received data across supported Julia versions.
Keep coverage of each minor series at both rank counts as the rolling prerelease channel advances. Allow prereleases within the 1.14 lane so it runs before 1.14 is stable.
@github-actions

Copy link
Copy Markdown
Contributor

Dagger benchmarks: dirty vs master

Counts are benchmark metrics (time, allocations, bytes). Timing changes require non-overlapping median ± IQR bands; both revisions need at least five timed samples, and timing regressions need an independent confirmation run.

Backend Regressions Improvements Within noise Inconclusive time Suites
Threads 0 1 14 1 4/4
Distributed 3 2 0 0 4/4
Distributed+Threads 1 0 1 0 4/4
MPI 0 0 1 1 4/4
MPI+Threads 1 1 21 4 4/4
Total 5 4 37 6 20/20

Regressions across all backends

Backend Benchmark Metric Change
MPI+Threads linalg/dagger/N=1024 (block 512)/solve (A\b via lu) time +92.9%
Distributed+Threads stencil/dagger/N=1024 (block 512)/neighbors (Pad) time +71.6%
Distributed stencil/dagger/N=256 (block 128)/alloc (neighbors Wrap) time +42.4%
Distributed sparse/dagger/N=256 (block 16)/spgemm (S*S) memory +28.5%
Distributed sparse/dagger/N=256 (block 16)/spgemm (S*S) allocs +27.1%

Improvements across all backends

Backend Benchmark Metric Change
MPI+Threads linalg/dagger/N=256 (block 256)/matvec (A*x) time -48.2%
Threads stencil/dagger/N=256 (block 128)/update (+) time -42.7%
Distributed sparse/dagger/N=256 (block 16)/cg solve (laplacian) memory -37.2%
Distributed sparse/dagger/N=256 (block 16)/cg solve (laplacian) allocs -32.0%
Threads (1 process × 4 threads) — 0 regressions, 1 improvements
Suite Regressions Improvements Within noise Inconclusive time
array 0 0 8 1
linalg 0 0 3 0
sparse 0 0 0 0
stencil 0 1 3 0

Improvements

Benchmark Metric Change
stencil/dagger/N=256 (block 128)/update (+) time -42.7%

Within noise

Benchmark Metric Change
linalg/dagger/N=256 (block 128)/qr time +69.3%
array/dagger/N=1024 (block 512)/transpose (permutedims) time +26.1%
stencil/dagger/N=1024 (block 512)/neighbors (Pad) time -25.5%
array/dagger/N=1024 (block 128)/map (sin.(X)) time -25.7%
array/dagger/N=256 (block 128)/reduce (sum) time -31.0%
linalg/dagger/N=256 (block 256)/matvec (A*x) time -31.2%
array/dagger/N=256 (block 256)/broadcast (X .+ 1) time -35.9%
array/dagger/N=1024 (block 512)/alloc (rand) time -37.3%
array/dagger/N=1024 (block 512)/add (X + X) time -38.0%
stencil/dagger/N=256 (block 128)/alloc (neighbors Wrap) time -42.7%
array/dagger/N=256 (block 128)/add (X + X) time -43.0%
stencil/dagger/N=1024 (block 128)/neighbors (Reflect) time -46.4%
linalg/dagger/N=256 (block 128)/solve (A\b via lu) time -47.5%
array/dagger/N=256 (block 128)/broadcast (X .+ 1) time -78.5%

Inconclusive timing changes

Benchmark Metric Change
array/dagger/N=1024 (block 128)/reduce (sum) time +30.7%
Distributed (4 processes × 1 thread) — 3 regressions, 2 improvements
Suite Regressions Improvements Within noise Inconclusive time
array 0 0 0 0
linalg 0 0 0 0
sparse 2 2 0 0
stencil 1 0 0 0

Regressions

Benchmark Metric Change
stencil/dagger/N=256 (block 128)/alloc (neighbors Wrap) time +42.4%
sparse/dagger/N=256 (block 16)/spgemm (S*S) memory +28.5%
sparse/dagger/N=256 (block 16)/spgemm (S*S) allocs +27.1%

Improvements

Benchmark Metric Change
sparse/dagger/N=256 (block 16)/cg solve (laplacian) memory -37.2%
sparse/dagger/N=256 (block 16)/cg solve (laplacian) allocs -32.0%
Distributed+Threads (2 processes × 2 threads) — 1 regressions, 0 improvements
Suite Regressions Improvements Within noise Inconclusive time
array 0 0 0 0
linalg 0 0 0 0
sparse 0 0 0 0
stencil 1 0 1 0

Regressions

Benchmark Metric Change
stencil/dagger/N=1024 (block 512)/neighbors (Pad) time +71.6%

Within noise

Benchmark Metric Change
stencil/dagger/N=1024 (block 512)/neighbors (Wrap) time +58.1%
MPI (4 ranks × 1 thread) — 0 regressions, 0 improvements
Suite Regressions Improvements Within noise Inconclusive time
array 0 0 1 0
linalg 0 0 0 1
sparse 0 0 0 0
stencil 0 0 0 0

Within noise

Benchmark Metric Change
array/dagger/N=1024 (block 128)/norm time -40.5%

Inconclusive timing changes

Benchmark Metric Change
linalg/dagger/N=1024 (block 128)/matvec (A*x) time +117.3%
MPI+Threads (2 ranks × 2 threads) — 1 regressions, 1 improvements
Suite Regressions Improvements Within noise Inconclusive time
array 0 0 13 0
linalg 1 1 4 1
sparse 0 0 0 0
stencil 0 0 4 3

Regressions

Benchmark Metric Change
linalg/dagger/N=1024 (block 512)/solve (A\b via lu) time +92.9%

Improvements

Benchmark Metric Change
linalg/dagger/N=256 (block 256)/matvec (A*x) time -48.2%

Within noise

Benchmark Metric Change
linalg/dagger/N=1024 (block 512)/matvec (A*x) time +384.0%
array/dagger/N=256 (block 128)/map (sin.(X)) time +364.7%
array/dagger/N=256 (block 256)/broadcast (X .+ 1) time +203.7%
array/dagger/N=256 (block 128)/norm time +131.6%
linalg/dagger/N=1024 (block 512)/cholesky time +123.9%
stencil/dagger/N=256 (block 128)/update (+) time +102.1%
array/dagger/N=256 (block 128)/alloc (rand) time +72.3%
array/dagger/N=1024 (block 512)/transpose (permutedims) time +72.1%
array/dagger/N=256 (block 128)/add (X + X) time +67.7%
array/dagger/N=1024 (block 128)/alloc (rand) time +67.1%
array/dagger/N=256 (block 256)/alloc (rand) time +59.7%
linalg/dagger/N=1024 (block 512)/syrk (A'*A) time +57.1%
array/dagger/N=256 (block 256)/reduce (sum) time +52.5%
array/dagger/N=1024 (block 128)/transpose (permutedims) time +36.0%
linalg/dagger/N=256 (block 256)/lu time -35.5%
array/dagger/N=256 (block 128)/reduce (sum) time -40.2%
stencil/dagger/N=256 (block 256)/alloc (neighbors Wrap) time -43.6%
array/dagger/N=1024 (block 512)/broadcast (X .+ 1) time -44.4%
stencil/dagger/N=256 (block 128)/neighbors (Pad) time -45.1%
array/dagger/N=256 (block 128)/transpose (permutedims) time -49.9%
stencil/dagger/N=1024 (block 512)/update (+) time -53.7%

Inconclusive timing changes

Benchmark Metric Change
stencil/dagger/N=256 (block 128)/assign (const) time +329.6%
stencil/dagger/N=1024 (block 512)/assign (const) time +141.5%
stencil/dagger/N=1024 (block 128)/update (+) time +56.1%
linalg/dagger/N=1024 (block 512)/qr time +35.8%

Full results and plots (download the benchmark-results-* artifacts).

@jpsamaroo
jpsamaroo merged commit bd7c8f4 into master Nov 26, 2026
47 of 59 checks passed
@jpsamaroo
jpsamaroo deleted the jps/mpi-julia-114-fence branch November 26, 2026 20:08
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