Skip to content

Commit

Permalink
Fix C binding problem
Browse files Browse the repository at this point in the history
  • Loading branch information
eisenhauer committed Jun 28, 2022
1 parent 32cff28 commit 4bd2685
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
4 changes: 1 addition & 3 deletions bindings/C/adios2/c/adios2_c_engine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -708,9 +708,7 @@ adios2_varinfo *adios2_inquire_blockinfo(adios2_engine *engine,
b[i].BlockID = minBlocksInfo->BlocksInfo[i].BlockID;
if (minBlocksInfo->WasLocalVar)
{
b[i].Start = (size_t *)malloc(sizeof(size_t));
b[i].Start[0] =
(intptr_t)minBlocksInfo->BlocksInfo[i].Start;
b[i].Start = NULL;
b[i].Count = (size_t *)malloc(sizeof(size_t));
b[i].Count[0] =
(intptr_t)minBlocksInfo->BlocksInfo[i].Count;
Expand Down
3 changes: 2 additions & 1 deletion source/adios2/toolkit/format/bp5/BP5Deserializer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1503,7 +1503,8 @@ MinVarInfo *BP5Deserializer::MinBlocksInfo(const VariableBase &Var, size_t Step)
MV->IsReverseDims =
((MV->Dims > 1) && (m_WriterIsRowMajor != m_ReaderIsRowMajor));

MV->WasLocalVar = (VarRec->OrigShapeID == ShapeID::LocalValue);
MV->WasLocalVar = (VarRec->OrigShapeID == ShapeID::LocalValue) ||
(VarRec->OrigShapeID == ShapeID::LocalArray);
if ((VarRec->OrigShapeID == ShapeID::LocalValue) ||
(VarRec->OrigShapeID == ShapeID::GlobalValue))
{
Expand Down

0 comments on commit 4bd2685

Please sign in to comment.