I have a MPI_Isend and MPI_Recv program. Assume that i have 2 processors and both of them are like this.
- MPI_Isend
 - MPI_Recv
 - MPI_Wait
 
What i expect from this is sending the data on both processors without blocking. Then wait for the data to come. Then resume, like this.
- 0 sends to 1
 - 1 sends to 0
 - 0 receives from 1
 - 1 receives from 0
 
But what i get is this.
- 0 sends to 1
 - 0 receives from 1 (although 1 didn't send!)
 - 1 sends to 0 (now it sends)
 - 1 receives from 0
 
I thought that MPI_Recv should wait until the data comes. What may be causing this?