Skip to content

Commit

Permalink
Merge pull request #3207 from pnorbert/fix-bpls-singlevalue
Browse files Browse the repository at this point in the history
bpls -l for a single scalar (not over time) for a BP5 file showed 0. …
  • Loading branch information
pnorbert authored May 9, 2022
2 parents 9b13a08 + 868e589 commit d881d36
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
7 changes: 6 additions & 1 deletion source/adios2/toolkit/format/bp5/BP5Deserializer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1812,7 +1812,10 @@ bool BP5Deserializer::VariableMinMax(const VariableBase &Var, const size_t Step,
writer_meta_base =
GetMetadataBase(VarRec, RelStep, WriterRank++);
}
ApplyElementMinMax(MinMax, VarRec->Type, writer_meta_base);
if (writer_meta_base)
{
ApplyElementMinMax(MinMax, VarRec->Type, writer_meta_base);
}
}
else if (VarRec->OrigShapeID == ShapeID::LocalValue)
{
Expand All @@ -1822,7 +1825,9 @@ bool BP5Deserializer::VariableMinMax(const VariableBase &Var, const size_t Step,
void *writer_meta_base =
GetMetadataBase(VarRec, RelStep, WriterRank);
if (writer_meta_base)
{
ApplyElementMinMax(MinMax, VarRec->Type, writer_meta_base);
}
}
}
}
Expand Down
3 changes: 2 additions & 1 deletion source/utils/bpls/bpls.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1232,7 +1232,8 @@ int printVariableInfo(core::Engine *fp, core::IO *io,
if (longopt && !timestep)
{
fprintf(outf, " = ");
print_data(&variable->m_Value, 0, adiosvartype, false);
auto mm = variable->MinMax();
print_data(&mm.second, 0, adiosvartype, false);
}
fprintf(outf, "\n");

Expand Down

0 comments on commit d881d36

Please sign in to comment.