Skip to content

Commit

Permalink
Merge pull request #899 from DARMA-tasking/886-gosslb-iprobe
Browse files Browse the repository at this point in the history
886 - Add missing MPI-allowed guard in recvDataMsgBuffer
  • Loading branch information
lifflander authored Jul 1, 2020
2 parents 2a5c57c + 7012c6c commit 8549446
Showing 1 changed file with 14 additions and 7 deletions.
21 changes: 14 additions & 7 deletions src/vt/messaging/active.cc
Original file line number Diff line number Diff line change
Expand Up @@ -447,11 +447,14 @@ bool ActiveMessenger::recvDataMsgBuffer(
MPI_Status stat;
int flag;

const int probe_ret = MPI_Iprobe(
node == uninitialized_destination ? MPI_ANY_SOURCE : node,
tag, theContext()->getComm(), &flag, &stat
);
vtAssertMPISuccess(probe_ret, "MPI_Iprobe");
{
VT_ALLOW_MPI_CALLS;
const int probe_ret = MPI_Iprobe(
node == uninitialized_destination ? MPI_ANY_SOURCE : node,
tag, theContext()->getComm(), &flag, &stat
);
vtAssertMPISuccess(probe_ret, "MPI_Iprobe");
}

if (flag == 1) {
MPI_Get_count(&stat, MPI_BYTE, &num_probe_bytes);
Expand Down Expand Up @@ -505,8 +508,12 @@ bool ActiveMessenger::recvDataMsgBuffer(
};

int recv_flag = 0;
MPI_Status recv_stat;
MPI_Test(&recv_holder.req, &recv_flag, &recv_stat);
{
VT_ALLOW_MPI_CALLS;
MPI_Status recv_stat;
MPI_Test(&recv_holder.req, &recv_flag, &recv_stat);
}

if (recv_flag == 1) {
finishPendingDataMsgAsyncRecv(&recv_holder);
} else {
Expand Down

0 comments on commit 8549446

Please sign in to comment.