Skip to content

Commit

Permalink
testing
Browse files Browse the repository at this point in the history
  • Loading branch information
eisenhauer committed Nov 3, 2024
1 parent a52f376 commit cbaf89f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
6 changes: 2 additions & 4 deletions source/adios2/toolkit/format/bp5/BP5Helper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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())
{
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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<size_t>(RecvBuffer, pos, false);
if (!MMBSet.count(thisMMB))
if (thisMMBSize && (!MMBSet.count(thisMMB)))
{
MMBSet.insert(thisMMB);
MMsNeeded += (((size_t)1) << block);
Expand Down
2 changes: 1 addition & 1 deletion source/adios2/toolkit/format/bp5/BP5Helper.h
Original file line number Diff line number Diff line change
Expand Up @@ -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];
Expand Down

0 comments on commit cbaf89f

Please sign in to comment.