From 2b9077b75bdbe45bd82779ebda0661570d9cce1e Mon Sep 17 00:00:00 2001 From: Julian P Samaroo Date: Thu, 26 Nov 2026 11:19:30 -0700 Subject: [PATCH 1/2] Use Julia's public fence API for MPI remainder copies 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. --- AGENTS.md | 9 +++++++++ ext/MPIExt.jl | 4 ++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/AGENTS.md b/AGENTS.md index a2d5a639a..61b1c43b8 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -1014,3 +1014,12 @@ lesson. the domain's indices there. Test both direct sparse-domain slicing and the existing allocation/distribute suite on the current nightly; an older nightly without the fallback does not exercise the conflict. + +98. **Use the public fence API in both remainder-copy transports.** + Julia 1.14 added a sync-scope argument to the `atomic_fence` intrinsic. + A direct one-argument call can survive precompilation and then fail when + MPI first compiles a cross-rank remainder copy. Use + `Base.Threads.atomic_fence()` after scattering in both the Distributed + and MPI paths. When diagnosing MPI uniformity errors, check for an earlier + task failure that left ranks on different operations. Compare the actual + Julia versions behind rolling CI labels such as `pre`. diff --git a/ext/MPIExt.jl b/ext/MPIExt.jl index 39d4a3186..502c52448 100644 --- a/ext/MPIExt.jl +++ b/ext/MPIExt.jl @@ -1832,8 +1832,8 @@ function move!(dep_mod::Dagger.RemainderAliasing{<:MPIMemorySpace}, to_space::MP mpi_device_sync(to_space.innerSpace) stage_release!(kind, stage_buf) - # Ensure that the data is visible - Core.Intrinsics.atomic_fence(:release) + # Publish the scattered data with a fence across supported Julia versions. + Base.Threads.atomic_fence() end end From d626eceb8e110b74761dc3eba336b0a67cc3a654 Mon Sep 17 00:00:00 2001 From: Julian P Samaroo Date: Thu, 26 Nov 2026 11:19:30 -0700 Subject: [PATCH 2/2] Test Julia 1.13 and 1.14 explicitly in MPI CPU CI 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/workflows/CI.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 664024534..97ada53b5 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -448,8 +448,9 @@ jobs: version: - '1.10' # LTS - '1.11' + - '1.13' + - '1.14' - '1' # latest stable - - 'pre' # latest prerelease ranks: - 2 - 4 @@ -458,6 +459,7 @@ jobs: - uses: julia-actions/setup-julia@v3 with: version: ${{ matrix.version }} + include-all-prereleases: ${{ matrix.version == '1.14' }} arch: x64 - uses: julia-actions/cache@v3 # test/mpi/env pulls MPI (MPICH_jll by default) plus the checked-out Dagger;