Skip to content

Commit

Permalink
Wait for all communicators in miniapp_triangular_multiplication
Browse files Browse the repository at this point in the history
  • Loading branch information
msimberg committed May 28, 2024
1 parent f5c6fcb commit a354d3b
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions miniapp/miniapp_triangular_multiplication.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ using dlaf::TileElementSize;
using dlaf::comm::Communicator;
using dlaf::comm::CommunicatorGrid;
using dlaf::common::Ordering;
using pika::this_thread::experimental::sync_wait;

struct Options
: dlaf::miniapp::MiniappOptions<dlaf::miniapp::SupportReal::Yes, dlaf::miniapp::SupportComplex::No> {
Expand Down Expand Up @@ -111,6 +112,11 @@ struct triangularMultiplicationMiniapp {
auto sync_barrier = [&]() {
a.get().waitLocalTiles();
b.get().waitLocalTiles();
for (std::size_t i = 0; i < comm_grid.num_pipelines(); ++i) {
sync_wait(comm_grid.full_communicator_pipeline().exclusive());
sync_wait(comm_grid.row_communicator_pipeline().exclusive());
sync_wait(comm_grid.col_communicator_pipeline().exclusive());
}
DLAF_MPI_CHECK_ERROR(MPI_Barrier(world));
};

Expand Down

0 comments on commit a354d3b

Please sign in to comment.