From 0423820d722c2d36aa78b89cf99250ac081d938d Mon Sep 17 00:00:00 2001 From: nhz2 Date: Mon, 31 Aug 2026 13:58:34 -0400 Subject: [PATCH 1/3] Drop DoubleFloat test dep --- test/Project.toml | 2 -- test/runtests.jl | 2 -- test/test_reduce.jl | 11 ++++++++--- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/test/Project.toml b/test/Project.toml index 3b332eb80..b8fc09c79 100644 --- a/test/Project.toml +++ b/test/Project.toml @@ -1,5 +1,4 @@ [deps] -DoubleFloats = "497a8b3b-efae-58df-a0af-a86822472b78" MPI = "da04e1cc-30fd-572f-bb4f-1f8673147195" MPIPreferences = "3da0fdf6-3ccc-4f1b-acd9-58baa6c99267" Pkg = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f" @@ -18,7 +17,6 @@ MPIPreferences = {path = "../lib/MPIPreferences"} [compat] AMDGPU = "0.6, 0.7, 0.8, 0.9, 1, 2" CUDA = "3, 4, 5" -DoubleFloats = "1.4" MPIPreferences = "0.1" TOML = "< 0.0.1, 1.0" diff --git a/test/runtests.jl b/test/runtests.jl index d18476f7e..9265fb06f 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -25,8 +25,6 @@ end _, backend_name = parse_flags!(ARGS, "--backend"; default="CPU", typ=String) -# load test packages to trigger precompilation -using DoubleFloats @static if backend_name == "CUDA" Pkg.add("CUDA") ENV["JULIA_MPI_TEST_ARRAYTYPE"] = "CuArray" diff --git a/test/test_reduce.jl b/test/test_reduce.jl index 6ad5d24cf..618a5ee13 100644 --- a/test/test_reduce.jl +++ b/test/test_reduce.jl @@ -9,7 +9,12 @@ const can_do_closures = Sys.ARCH !== :aarch64 && !startswith(string(Sys.ARCH), "arm") -using DoubleFloats +# a non-builtin isbits type, to test automatic datatype/op creation +struct TestSum + hi::Float64 + lo::Float64 +end +Base.:+(a::TestSum, b::TestSum) = TestSum(a.hi + b.hi, a.lo + b.lo) MPI.Init() @@ -122,11 +127,11 @@ end MPI.Barrier( MPI.COMM_WORLD ) -send_arr = [Double64(i)/10 for i = 1:10] +send_arr = [TestSum(i, i/4) for i = 1:10] result = MPI.Reduce(send_arr, +, MPI.COMM_WORLD; root=root) if rank == root - @test result ≈ [Double64(sz*i)/10 for i = 1:10] rtol=sz*eps(Double64) + @test result == [TestSum(sz*i, sz*i/4) for i = 1:10] else @test result === nothing end From 47e513275bf483a28a2b94e9779a5f6d8db044e6 Mon Sep 17 00:00:00 2001 From: nhz2 Date: Mon, 31 Aug 2026 14:11:32 -0400 Subject: [PATCH 2/3] add back comment --- test/runtests.jl | 1 + 1 file changed, 1 insertion(+) diff --git a/test/runtests.jl b/test/runtests.jl index 9265fb06f..f795105de 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -25,6 +25,7 @@ end _, backend_name = parse_flags!(ARGS, "--backend"; default="CPU", typ=String) +# load test packages to trigger precompilation @static if backend_name == "CUDA" Pkg.add("CUDA") ENV["JULIA_MPI_TEST_ARRAYTYPE"] = "CuArray" From 8c74eaa93e6298bc1a1a19c2eb646659963bdf4e Mon Sep 17 00:00:00 2001 From: nhz2 Date: Mon, 31 Aug 2026 14:13:25 -0400 Subject: [PATCH 3/3] fix other comment --- test/test_reduce.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/test_reduce.jl b/test/test_reduce.jl index 618a5ee13..b99a7aa20 100644 --- a/test/test_reduce.jl +++ b/test/test_reduce.jl @@ -9,7 +9,7 @@ const can_do_closures = Sys.ARCH !== :aarch64 && !startswith(string(Sys.ARCH), "arm") -# a non-builtin isbits type, to test automatic datatype/op creation +# a non-builtin isbits type to test generic MPI.reduce struct TestSum hi::Float64 lo::Float64