MPI will run M processes on N nodes where M may be less than, equal to, or greater than N.
This site describes the setup.
I can't find a direct answer to your question, but there are a number of sites on the internet discussing process migration
and checkpointing
. But the general theme of these sites seems to be that this is still very much a work in progress. As such, I wouldn't expect that this would be happening automagically in your MPI implementation.
This site discusses the MPI_GET_PROCESSOR_NAME
command, which can be used in process migration, but states that "nothing in MPI requires or defines process migration; this definition of MPI_GET_PROCESSOR_NAME simply allows such an implementation". With this command, you can at least check if your code is being actively migrated.