for reply. One more thing I would like to know is that since the
message has already left the sender, how to make sure that the receiver
side receives this message? From the output of my program, it seems
that the receiver side is waiting for the message(MPI_Recv).
You mean how the sender can be sure to push the message all the way
over to the receiver? In practical terms, if the sender completes its
send, the receiver should be able to poll and (in short order) see the
message. Sounds like you have a bug.