From 1aeceb4b77916b6f68cb0cc3215c4c878d13b3ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mos=C3=A8=20Giordano?= Date: Fri, 15 Nov 2024 13:00:43 +0000 Subject: [PATCH] Register custom MPI operator for aarch64 --- Project.toml | 4 ++-- src/statistics.jl | 5 +++++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/Project.toml b/Project.toml index 0ffc6e4..65cbf66 100644 --- a/Project.toml +++ b/Project.toml @@ -1,7 +1,7 @@ name = "ParticleDA" uuid = "61cd1fb4-f4c4-4bc8-80c6-ea5639a6ca2e" authors = ["Mosè Giordano and Tuomas Koskela and Dan Giles and Matt Graham"] -version = "1.1.0" +version = "1.2.0" [deps] ChunkSplitters = "ae650224-84b6-46f8-82ea-d812ca08434e" @@ -19,7 +19,7 @@ YAML = "ddb6d928-2868-570f-bddf-ab3f9cf99eb6" ChunkSplitters = "3.1" HDF5 = "0.14, 0.15, 0.16, 0.17" LinearAlgebra = "<0.0.1, 1" -MPI = "0.20.8" +MPI = "0.20.22" PDMats = "0.11.17" Random = "<0.0.1, 1" Statistics = "<0.0.1, 1" diff --git a/src/statistics.jl b/src/statistics.jl index a5fa481..0e4236e 100644 --- a/src/statistics.jl +++ b/src/statistics.jl @@ -170,6 +170,11 @@ function combine_statistics(s1::MeanAndVarSummaryStat, s2::MeanAndVarSummaryStat MeanAndVarSummaryStat(m, v, n) end +# Register the custom reduction operator. This is necessary only on platforms +# where Julia doesn't support closures as cfunctions (e.g. ARM), but can be used +# on all platforms for consistency. +MPI.@RegisterOp(combine_statistics, AbstractCustomReductionSummaryStat) + function init_statistics( S::Type{<:AbstractCustomReductionSummaryStat}, T::Type, dimension::Int )