34 unsigned int const n_files)
39 MPI_Comm_size(mpi_comm, &mpi_size);
40 MPI_Comm_rank(mpi_comm, &mpi_rank);
42 std::vector<std::size_t> partition_sizes;
43 partition_sizes.resize(mpi_size);
48 partition_sizes.data(),
56 std::vector<std::size_t> partition_offsets(1, 0);
57 std::partial_sum(partition_sizes.begin(),
58 partition_sizes.end(),
59 back_inserter(partition_offsets));
62 std::size_t longest_partition =
63 *max_element(partition_sizes.begin(), partition_sizes.end());
66 return {partition_offsets[mpi_rank], size, longest_partition,
67 partition_offsets.back()};