diff --git a/libsrc/core/mpi_wrapper.hpp b/libsrc/core/mpi_wrapper.hpp index bf9540a5..8d9631f5 100644 --- a/libsrc/core/mpi_wrapper.hpp +++ b/libsrc/core/mpi_wrapper.hpp @@ -275,6 +275,18 @@ namespace ngcore &recv, 1, GetMPIType(), 0, comm); } + template + void AllGather (T val, FlatArray recv) const + { + if (size == 1) + { + recv[0] = val; + return; + } + MPI_Allgather (&val, 1, GetMPIType(), + recv.Data(), 1, GetMPIType(), + comm); + } NgMPI_Comm SubCommunicator (FlatArray procs) const