Skip to content

MPI IO missing particle with more than 1 MPI rank

In MPIFileutils.hpp, the code has a wrong assumption on the number of particles per node.

const size_t split = d.n / d.nrank;
const size_t remaining = d.n - d.nrank * split;

const MPI_Offset col = d.n * sizeof(double);
MPI_Offset offset = d.rank * split * sizeof(double);
if (d.rank == 0) offset += remaining * sizeof(double);