message: Eliminated Bcast to rely on MPI Gatherv on zero sized arrays
diff: @@ -58,11 +58,6 @@ void GathervVectors(const std::vector<T> &in, std::vector<T> &out,
  {
  gatheredSize = std::accumulate(counts.begin(), counts.end(), 0);
  - MPI_Bcast(&gatheredSize, 1, ADIOS2_MPI_SIZE_T, rankDestination,
  - mpiComm);
  -
  - if (gatheredSize > 0)
  - {
  const size_t newSize = out.size() + gatheredSize;
  try
  {
  @@ -70,26 +65,17 @@ void GathervVectors(const std::vector<T> &in, std::vector<T> &out,
  }
  catch (...)
  {
  - std::throw_with_nested(std::runtime_error(
  - "ERROR: buffer overflow when resizing to " +
  + std::throw_with_nested(
  + std::runtime_error("ERROR: buffer overflow when resizing to " +
  std::to_string(newSize) +
  " bytes, in call to GathervVectors\n"));
  }
  }
  - }
  - else
  - {
  - MPI_Bcast(&gatheredSize, 1, ADIOS2_MPI_SIZE_T, rankDestination,
  - mpiComm);
  - }
  - if (gatheredSize > 0)
  - {
  GathervArrays(in.data(), in.size(), counts.data(), counts.size(),
  &out[position], mpiComm);
  position += gatheredSize;
  }
  -}
  } // end namespace adios2
  