message: fix bpls: if minblockinfo is available, don't just still use allstepsblockinfo. Fixes listing e3sm bp5 file content.
diff: @@ -3058,10 +3058,12 @@ Dims get_global_array_signature(core::Engine *fp, core::IO *io,
  if (minBlocks)
  {
  - delete minBlocks;
  for (size_t step = 0; step < nsteps; step++)
  + {
  + if (step > 0)
  {
  minBlocks = fp->MinBlocksInfo(*variable, step);
  + }
  if (minBlocks->Shape)
  {
  for (size_t k = 0; k < ndim; k++)
  @@ -3083,8 +3085,9 @@ Dims get_global_array_signature(core::Engine *fp, core::IO *io,
  }
  delete minBlocks;
  }
  - return dims;
  }
  + else
  + {
  const std::map<size_t, std::vector<size_t>> &indices =
  variable->m_AvailableStepBlockIndexOffsets;
  auto itStep = indices.begin();
  @@ -3113,6 +3116,7 @@ Dims get_global_array_signature(core::Engine *fp, core::IO *io,
  ++itStep;
  }
  }
  + }
  return dims;
  }
  @@ -3149,6 +3153,8 @@ std::pair<size_t, Dims> get_local_array_signature(core::Engine *fp,
  firstBlock = false;
  }
  }
  + else
  + {
  std::vector<typename core::Variable<T>::BPInfo> blocks =
  fp->BlocksInfo(*variable, fp->CurrentStep());
  if (!blocks.empty())
  @@ -3172,6 +3178,7 @@ std::pair<size_t, Dims> get_local_array_signature(core::Engine *fp,
  }
  }
  }
  + }
  else
  {
  bool firstStep = true;
  @@ -3184,14 +3191,16 @@ std::pair<size_t, Dims> get_local_array_signature(core::Engine *fp,
  if (minBlocksInfo)
  {
  dims.resize(minBlocksInfo->Dims);
  - delete minBlocksInfo;
  size_t RelStep = 0;
  for (RelStep = 0; RelStep < variable->m_AvailableStepsCount;
  RelStep++)
  + {
  + if (RelStep > 0)
  {
  minBlocksInfo = fp->MinBlocksInfo(*variable, RelStep);
  + }
  - auto coreBlocksInfo = minBlocksInfo->BlocksInfo;
  + auto &coreBlocksInfo = minBlocksInfo->BlocksInfo;
  if (firstStep)
  {
  nblocks = coreBlocksInfo.size();
  @@ -3224,14 +3233,15 @@ std::pair<size_t, Dims> get_local_array_signature(core::Engine *fp,
  firstStep = false;
  }
  }
  -
  + else
  + {
  std::map<size_t, std::vector<typename core::Variable<T>::BPInfo>>
  allblocks = fp->AllStepsBlocksInfo(*variable);
  for (auto &blockpair : allblocks)
  {
  - std::vector<typename adios2::core::Variable<T>::BPInfo> &blocks =
  - blockpair.second;
  + std::vector<typename adios2::core::Variable<T>::BPInfo>
  + &blocks = blockpair.second;
  const size_t blocksSize = blocks.size();
  if (firstStep)
  {
  @@ -3260,6 +3270,7 @@ std::pair<size_t, Dims> get_local_array_signature(core::Engine *fp,
  firstStep = false;
  }
  }
  + }
  return std::make_pair(nblocks, dims);
  }
  