From cbaf89f6830f22512e3a7d62c255a78d5c4d988f Mon Sep 17 00:00:00 2001 From: Greg Eisenhauer Date: Sun, 3 Nov 2024 16:34:25 -0500 Subject: [PATCH] testing --- source/adios2/toolkit/format/bp5/BP5Helper.cpp | 6 ++---- source/adios2/toolkit/format/bp5/BP5Helper.h | 2 +- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/source/adios2/toolkit/format/bp5/BP5Helper.cpp b/source/adios2/toolkit/format/bp5/BP5Helper.cpp index a4b3c86c94..4f1ee3fd1a 100644 --- a/source/adios2/toolkit/format/bp5/BP5Helper.cpp +++ b/source/adios2/toolkit/format/bp5/BP5Helper.cpp @@ -64,7 +64,6 @@ BP5Helper::BuildNodeContrib(const digest attrHash, const size_t attrSize, for (auto &MM : MMBlocks) { digest D; - std::memset(&D.x[0], 0, sizeof(digest)); std::memcpy(&D.x[0], MM.MetaMetaID, MM.MetaMetaIDLen); helper::CopyToBuffer(ret, position, &D.x[0], sizeof(digest)); size_t AlignedSize = ((MM.MetaMetaInfoLen + 7) & ~0x7); @@ -90,7 +89,6 @@ BP5Helper::BuildFixedNodeContrib(const digest attrHash, const size_t attrSize, NC->MMBCount = MMBlocks.size(); for (size_t i = 0; i < FIXED_MMB_SLOT_COUNT; i++) { - std::memset(&NC->MMBArray[i].x[0], 0, sizeof(digest)); auto MM = &MMBlocks[i]; if (i < MMBlocks.size()) { @@ -152,7 +150,7 @@ void BP5Helper::BreakdownFixedIncomingMInfo( { digest thisMMB = NC->MMBArray[block]; size_t thisMMBSize = NC->MMBSizeArray[block]; - if (!MMBSet.count(thisMMB)) + if (thisMMBSize && (!MMBSet.count(thisMMB))) { MMBSet.insert(thisMMB); MMsNeeded += (((size_t)1) << block); @@ -209,7 +207,7 @@ void BP5Helper::BreakdownIncomingMInfo( digest thisMMB; helper::ReadArray(RecvBuffer, pos, &thisMMB.x[0], sizeof(thisMMB.x), false); size_t thisMMBSize = helper::ReadValue(RecvBuffer, pos, false); - if (!MMBSet.count(thisMMB)) + if (thisMMBSize && (!MMBSet.count(thisMMB))) { MMBSet.insert(thisMMB); MMsNeeded += (((size_t)1) << block); diff --git a/source/adios2/toolkit/format/bp5/BP5Helper.h b/source/adios2/toolkit/format/bp5/BP5Helper.h index 6c1887e43e..565a3831d1 100644 --- a/source/adios2/toolkit/format/bp5/BP5Helper.h +++ b/source/adios2/toolkit/format/bp5/BP5Helper.h @@ -50,7 +50,7 @@ class BP5Helper : virtual public BP5Base return (x[1] < dg.x[1]); }; - // bool is_zero() { return ((x[0] == 0) && (x[1] == 0)); }; + bool IsZero() { return ((x[0] == 0) && (x[1] == 0)); }; friend std::ostream &operator<<(std::ostream &os, const digest &d) { std::cout << "0x" << std::setw(8) << std::setfill('0') << std::hex << d.x[0] << d.x[1];