Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

avoid using MPI_Rget to make SSC work on Summit #2360

Merged
merged 2 commits into from
Jul 6, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions source/adios2/engine/ssc/SscReader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,6 @@ StepStatus SscReader::BeginStep(const StepMode stepMode,
m_InitialStep = false;
SyncWritePattern();
MPI_Win_create(NULL, 0, 1, MPI_INFO_NULL, m_StreamComm, &m_MpiWin);
MPI_Win_start(m_MpiAllWritersGroup, 0, m_MpiWin);
}
else
{
Expand Down Expand Up @@ -210,7 +209,6 @@ void SscReader::EndStep()
TAU_SCOPED_TIMER_FUNC();
if (m_CurrentStep == 0)
{
MPI_Win_complete(m_MpiWin);
MPI_Win_free(&m_MpiWin);
SyncReadPattern();
MPI_Win_create(m_Buffer.data(), m_Buffer.size(), 1, MPI_INFO_NULL,
Expand Down
22 changes: 8 additions & 14 deletions source/adios2/engine/ssc/SscReader.tcc
Original file line number Diff line number Diff line change
Expand Up @@ -60,16 +60,13 @@ void SscReader::GetDeferredCommon(Variable<std::string> &variable,
totalDataSize += i.second.second;
}
m_Buffer.resize(totalDataSize);
std::vector<MPI_Request> requests;
for (const auto &i : m_AllReceivingWriterRanks)
{
requests.emplace_back();
MPI_Rget(m_Buffer.data() + i.second.first, i.second.second,
MPI_CHAR, i.first, 0, i.second.second, MPI_CHAR, m_MpiWin,
&requests.back());
MPI_Win_lock(MPI_LOCK_SHARED, i.first, 0, m_MpiWin);
MPI_Get(m_Buffer.data() + i.second.first, i.second.second, MPI_CHAR,
i.first, 0, i.second.second, MPI_CHAR, m_MpiWin);
MPI_Win_unlock(i.first, m_MpiWin);
}
MPI_Status statuses[requests.size()];
MPI_Waitall(requests.size(), requests.data(), statuses);
}

for (const auto &i : m_AllReceivingWriterRanks)
Expand Down Expand Up @@ -146,16 +143,13 @@ void SscReader::GetDeferredCommon(Variable<T> &variable, T *data)
totalDataSize += i.second.second;
}
m_Buffer.resize(totalDataSize);
std::vector<MPI_Request> requests;
for (const auto &i : m_AllReceivingWriterRanks)
{
requests.emplace_back();
MPI_Rget(m_Buffer.data() + i.second.first, i.second.second,
MPI_CHAR, i.first, 0, i.second.second, MPI_CHAR, m_MpiWin,
&requests.back());
MPI_Win_lock(MPI_LOCK_SHARED, i.first, 0, m_MpiWin);
MPI_Get(m_Buffer.data() + i.second.first, i.second.second, MPI_CHAR,
i.first, 0, i.second.second, MPI_CHAR, m_MpiWin);
MPI_Win_unlock(i.first, m_MpiWin);
}
MPI_Status statuses[requests.size()];
MPI_Waitall(requests.size(), requests.data(), statuses);
}

for (const auto &i : m_AllReceivingWriterRanks)
Expand Down
9 changes: 0 additions & 9 deletions source/adios2/engine/ssc/SscWriter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -58,13 +58,6 @@ StepStatus SscWriter::BeginStep(StepMode mode, const float timeoutSeconds)
++m_CurrentStep;
}

if (m_Verbosity >= 5)
{
std::cout << "SscWriter::BeginStep, World Rank " << m_StreamRank
<< ", Writer Rank " << m_WriterRank << ", Step "
<< m_CurrentStep << std::endl;
}

return StepStatus::OK;
}

Expand Down Expand Up @@ -141,8 +134,6 @@ void SscWriter::EndStep()
SyncWritePattern();
MPI_Win_create(m_Buffer.data(), m_Buffer.size(), 1, MPI_INFO_NULL,
m_StreamComm, &m_MpiWin);
MPI_Win_post(m_MpiAllReadersGroup, 0, m_MpiWin);
MPI_Win_wait(m_MpiWin);
MPI_Win_free(&m_MpiWin);
SyncReadPattern();
MPI_Win_create(m_Buffer.data(), m_Buffer.size(), 1, MPI_INFO_NULL,
Expand Down