Fix various issues with MPI and partitioning
These are two bugs and one feature in the current handling of repartitioning and MPI tasks.
Extracted from current developments so they do not get lost.
These are two bugs and one feature in the current handling of repartitioning and MPI tasks.
Extracted from current developments so they do not get lost.