For some MPI implementations IPM determines the number of transferred bytes in MPI_Wait and variant calls by accessing the count member of the MPI_Status struct. This seems to break (at least) on MPICH-shmem (1.2.7p1)
The test program outputs
0/2 (send): MPI_Status.count=-1075006546
1/2 (recv): MPI_Status.count=8
I.e, garbled data for the send operation, correct data for the recv operation.
The MPI standard says:
"The fields in a status object returned by a call to MPI WAIT, MPI TEST, or any of the other derived functions (MPI {TEST,WAIT}{ALL,SOME,ANY}), where the request corresponds to a send call, are undefined, with two exceptions: The error status field will contain valid information if the wait or test call returned with MPI ERR IN STATUS; and the returned status can be queried by the call MPI TEST CANCELLED."