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

More BlocksInfo support for BP5 #3027

Merged
merged 9 commits into from
Jan 31, 2022
Merged
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Fix std::string in min blocks info
eisenhauer committed Jan 31, 2022
commit 07ca7d2e8823eeb6d0ba8167530b30f6689ad09c
10 changes: 9 additions & 1 deletion bindings/CXX11/adios2/cxx11/Variable.tcc
Original file line number Diff line number Diff line change
@@ -196,7 +196,15 @@ Variable<T>::ToBlocksInfoMin(const MinVarInfo *coreVarInfo) const
blockInfo.IsReverseDims = coreVarInfo->IsReverseDims;
if (blockInfo.IsValue)
{
blockInfo.Value = *((T *)coreBlockInfo.BufferP);
if (std::is_same<T, std::string>::value)
{
std::string *Tmp = (std::string *)&blockInfo.Value;
Tmp->assign(*(const char **)coreBlockInfo.BufferP);
}
else
{
blockInfo.Value = *((T *)coreBlockInfo.BufferP);
}
}
else
{
3 changes: 1 addition & 2 deletions testing/adios2/engine/bp/TestBPWriteReadMultiblock.cpp
Original file line number Diff line number Diff line change
@@ -410,8 +410,7 @@ TEST_F(BPWriteReadMultiblockTest, ADIOS2BPWriteReadMultiblock1D8)
for (size_t i = 0; i < static_cast<size_t>(mpiSize); ++i)
{
EXPECT_TRUE(iStringInfo[i].IsValue);
// EXPECT_EQ(iStringInfo[i].Value, "Testing
// ADIOS2 String type");
EXPECT_EQ(iStringInfo[i].Value, "Testing ADIOS2 String type");
}

for (size_t i = 0; i < 2 * static_cast<size_t>(mpiSize); ++i)