Skip to content

Commit

Permalink
source/adios2/engine/bp5/BP5Reader.cpp
Browse files Browse the repository at this point in the history
  • Loading branch information
guj committed Jun 5, 2024
1 parent c52d755 commit 4adeb05
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions source/adios2/toolkit/profiling/iochrono/IOChrono.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -122,8 +122,13 @@ std::string JSONProfiler::GetRankProfilingJSON(
rankLog += ", \"transport_" + std::to_string(t) + "\":{";
rankLog += "\"type\":\"" + transportsTypes[t] + "\"";

size_t wBytes = transportsProfilers[t]->m_Bytes.at("write");
rankLog += ", \"wbytes\":" + std::to_string(wBytes);
if (transportsProfilers[t]->m_Bytes.find("write") != transportsProfilers[t]->m_Bytes.end()) {
size_t wBytes = transportsProfilers[t]->m_Bytes.at("write");
rankLog += ", \"wbytes\":" + std::to_string(wBytes);
} else if (transportsProfilers[t]->m_Bytes.find("read") != transportsProfilers[t]->m_Bytes.end()) {
size_t rBytes = transportsProfilers[t]->m_Bytes.at("read");
rankLog += ", \"rbytes\":" + std::to_string(rBytes);
}

for (const auto &transportTimerPair : transportsProfilers[t]->m_Timers)
{
Expand Down

0 comments on commit 4adeb05

Please sign in to comment.