Skip to content

Commit

Permalink
Add an EnsureComm call to make sure things are sane (elemental#182)
Browse files Browse the repository at this point in the history
  • Loading branch information
benson31 authored Jun 27, 2024
1 parent b63b170 commit e6aea8d
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions include/El/blas_like/level1/Copy/TranslateBetweenGrids.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -3891,6 +3891,7 @@ void TranslateBetweenGrids(
Int ALDim = A.LDim();

mpi::Comm const& viewingCommB = B.Grid().ViewingComm();

bool const inAGrid = A.Participating();
bool const inBGrid = B.Participating();

Expand Down Expand Up @@ -3951,6 +3952,10 @@ void TranslateBetweenGrids(
? *maybeMultiSync
: (inAGrid ? syncInfoA : syncInfoB));

// Collective!
mpi::EnsureComm<T, Collective::SEND>(viewingCommB, syncInfo);
mpi::EnsureComm<T, Collective::RECV>(viewingCommB, syncInfo);

// Translate the ranks from A's VC communicator to B's viewing so
// that we can match send/recv communicators. Since A's VC
// communicator is not necessarily defined on every process, we
Expand Down

0 comments on commit e6aea8d

Please sign in to comment.