This also occurs if CTRL-C is pressed by the user while the program is running. As an illustration of this, I included some files in this mail. But if you press CTRL-C, the system initiates dozens of processes with copies of the initial program on all nodes. I think this is a serious security problem. Additional copyrights may follow.
Error check the number of processes.
Determine my rank in the world group. The sender will be rank 0 and the receiver, rank 1. As rank 0, send a message to rank 1. As rank 1, receive a message from rank 0.