Skip to content

Commit

Permalink
Only set shape if it was changed
Browse files Browse the repository at this point in the history
  • Loading branch information
franzpoeschel committed Feb 21, 2025
1 parent 3a10fcd commit 6400651
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion src/IO/ADIOS/ADIOS2IOHandler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2497,7 +2497,23 @@ ERROR: Variable ')"[1] + varName +
}
else
{
var.SetShape(shape);
auto const &old_shape = var.Shape();
bool shape_changed = old_shape.size() != shape.size();
if (!shape_changed)
{
for (size_t i = 0; i < old_shape.size(); ++i)
{
if (old_shape[i] != shape[i])
{
shape_changed = true;
break;
}
}
}
if (shape_changed)
{
var.SetShape(shape);
}
if (count.size() > 0)
{
var.SetSelection({start, count});
Expand Down

0 comments on commit 6400651

Please sign in to comment.