From f15c0c3e7bff88a373e50a4a6c96bff7f02de54b Mon Sep 17 00:00:00 2001 From: Alberto Invernizzi Date: Thu, 21 Nov 2024 14:18:24 +0100 Subject: [PATCH 1/2] consume also communicator shared wrapper in transform_mpi --- include/dlaf/sender/transform_mpi.h | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/include/dlaf/sender/transform_mpi.h b/include/dlaf/sender/transform_mpi.h index 4a07488d25..1b62b7db51 100644 --- a/include/dlaf/sender/transform_mpi.h +++ b/include/dlaf/sender/transform_mpi.h @@ -24,24 +24,29 @@ namespace dlaf::comm::internal { -/// This helper "consumes" a CommunicatorPipelineExclusiveWrapper ensuring that after this call -/// the one passed as argument gets destroyed. All other types left as they are -/// by the second overload. +/// This helper "consumes" a CommunicatorPipeline{Exclusive/Shared}Wrapper ensuring that after this call +/// the one passed as argument gets destroyed. +/// All other types left as they are by the generic overload. inline void consumeCommunicatorWrapper(CommunicatorPipelineExclusiveWrapper& comm_wrapper) { [[maybe_unused]] auto comm_wrapper_local = std::move(comm_wrapper); } -/// \overload consumeCommunicatorWrapper (for non communicator types) +/// \overload consumeCommunicatorWrapper +inline void consumeCommunicatorWrapper(CommunicatorPipelineSharedWrapper& comm_wrapper) { + [[maybe_unused]] auto comm_wrapper_local = std::move(comm_wrapper); +} + +/// \overload consumeCommunicatorWrapper template void consumeCommunicatorWrapper(T&) {} /// Helper type for wrapping MPI calls. /// -/// The wrapper explicitly releases any dla communicator objects when the pika::transform_mpi -/// function returns (e.g. a message has been sent/posted) to prevent blocking access to many -/// queued mpi operations. -/// The mpi operations can complete asynchronously later, but the commmunicator is -/// released/made available once the mpi task has been safely initiated +/// The wrapper explicitly releases any CommunicatorPipeline{Exclusive/Shared}Wrapper objects when the +/// pika::transform_mpi function returns (e.g. a message has been sent/posted) to prevent blocking access +/// to many queued mpi operations. +/// The mpi operations can complete asynchronously later, but the CommunicatorPipeline{Exclusive/Shared}Wrapper +/// is released/made available once the mpi task has been safely initiated. /// /// This could in theory be a lambda inside transformMPI. However, clang at /// least until version 12 fails with an internal compiler error with a trailing From ac7c6b9e54d40403adfcb2d581096852fe04744c Mon Sep 17 00:00:00 2001 From: Alberto Invernizzi Date: Mon, 2 Dec 2024 10:24:20 +0100 Subject: [PATCH 2/2] apparently unused c++20 header (we are still supporting c++17) FYI @rmeli --- test/unit/eigensolver/test_gen_eigensolver.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/test/unit/eigensolver/test_gen_eigensolver.cpp b/test/unit/eigensolver/test_gen_eigensolver.cpp index e06f56762d..c939264c70 100644 --- a/test/unit/eigensolver/test_gen_eigensolver.cpp +++ b/test/unit/eigensolver/test_gen_eigensolver.cpp @@ -9,7 +9,6 @@ // #include -#include #include #include #include