Skip to content

Commit

Permalink
mpi_aggregator: use MPI_STATUS_IGNORE
Browse files Browse the repository at this point in the history
where we're ignoring the status anyway (which is everywhere).
  • Loading branch information
germasch committed Apr 1, 2019
1 parent ffcda0c commit f55eaf0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 9 deletions.
5 changes: 2 additions & 3 deletions source/adios2/toolkit/aggregator/mpi/MPIAggregator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -80,21 +80,20 @@ void MPIAggregator::WaitAbsolutePosition(const int step)
return;
}

MPI_Status status;
const int destination = (step != m_Size - 1) ? step + 1 : 0;

if (m_Rank == destination)
{
helper::CheckMPIReturn(
MPI_Wait(&m_AbsolutePositionRequests[1], &status),
MPI_Wait(&m_AbsolutePositionRequests[1], MPI_STATUS_IGNORE),
", aggregation Irecv Wait absolute position at iteration " +
std::to_string(step) + "\n");
}

if (m_Rank == step)
{
helper::CheckMPIReturn(
MPI_Wait(&m_AbsolutePositionRequests[0], &status),
MPI_Wait(&m_AbsolutePositionRequests[0], MPI_STATUS_IGNORE),
", aggregation Isend Wait absolute position at iteration " +
std::to_string(step) + "\n");
}
Expand Down
10 changes: 4 additions & 6 deletions source/adios2/toolkit/aggregator/mpi/MPIChain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -96,24 +96,23 @@ void MPIChain::Wait(const int step)
const bool sender = (m_Rank >= 1 && m_Rank <= endRank) ? true : false;
const bool receiver = (m_Rank < endRank) ? true : false;

MPI_Status status;
if (receiver)
{
helper::CheckMPIReturn(
MPI_Wait(&m_DataRequests[2], &status),
MPI_Wait(&m_DataRequests[2], MPI_STATUS_IGNORE),
", aggregation waiting for receiver data at iteration " +
std::to_string(step) + "\n");
}

if (sender)
{
helper::CheckMPIReturn(
MPI_Wait(&m_DataRequests[0], &status),
MPI_Wait(&m_DataRequests[0], MPI_STATUS_IGNORE),
", aggregation waiting for sender size at iteration " +
std::to_string(step) + "\n");

helper::CheckMPIReturn(
MPI_Wait(&m_DataRequests[1], &status),
MPI_Wait(&m_DataRequests[1], MPI_STATUS_IGNORE),
", aggregation waiting for sender data at iteration " +
std::to_string(step) + "\n");
}
Expand Down Expand Up @@ -154,9 +153,8 @@ void MPIChain::HandshakeLinks()

if (m_Rank > 0)
{
MPI_Status sendStatus;
helper::CheckMPIReturn(
MPI_Wait(&sendRequest, &sendStatus),
MPI_Wait(&sendRequest, MPI_STATUS_IGNORE),
"Isend wait handshake with neighbor, MPIChain aggregator, at Open");
}
}
Expand Down

0 comments on commit f55eaf0

Please sign in to comment.