Use the number of MPI ranks, not some guess when checking if the regridding is complete. Closes #707 See merge request !1169