diff --git a/source/adios2/helper/adiosMpiHandshake.cpp b/source/adios2/helper/adiosMpiHandshake.cpp index 91662490d4..bd2a78e35a 100644 --- a/source/adios2/helper/adiosMpiHandshake.cpp +++ b/source/adios2/helper/adiosMpiHandshake.cpp @@ -38,26 +38,6 @@ std::map>> MpiHandshake::m_ReadersMap; std::map MpiHandshake::m_AppsSize; std::set MpiHandshake::m_RanksToReceive; -MpiHandshake::~MpiHandshake() -{ - // clean up MPI requests - - for (auto &rs : m_RecvRequests) - { - for (auto &r : rs) - { - MPI_Status status; - int success; - MPI_Test(&r, &success, &status); - if (!success) - { - MPI_Cancel(&r); - } - } - } - m_RecvRequests.clear(); -} - size_t MpiHandshake::PlaceInBuffer(size_t stream, int rank) { return rank * m_MaxStreamsPerApp * m_ItemSize + stream * m_ItemSize; @@ -270,7 +250,22 @@ void MpiHandshake::Handshake(const std::string &filename, const char mode, } } - std::cout << "Rank " << m_WorldRank << " completed ..." << std::endl; + // clean up MPI requests + + for (auto &rs : m_RecvRequests) + { + for (auto &r : rs) + { + MPI_Status status; + int success; + MPI_Test(&r, &success, &status); + if (!success) + { + MPI_Cancel(&r); + } + } + } + m_RecvRequests.clear(); ++m_StreamID; } diff --git a/source/adios2/helper/adiosMpiHandshake.h b/source/adios2/helper/adiosMpiHandshake.h index dccf460f65..e5e89aad45 100644 --- a/source/adios2/helper/adiosMpiHandshake.h +++ b/source/adios2/helper/adiosMpiHandshake.h @@ -30,8 +30,6 @@ namespace helper class MpiHandshake { public: - ~MpiHandshake(); - /** * Start the handshake operations and wait until the rendezvous conditions * are reached, or timeout.