From: Stephen Siegel Date: June 9, 2006 8:05:00 PM GMT+02:00 To: William Gropp Cc: Rajeev Thakur ,"'Rusty Lusk'" ,"'Rob Ross'" Subject: RE: Euro PVMMPI Since you liked that one, here is the other error I found with MPI-SPIN. It's Example 2.19 ("Multiple-producer, single-consumer code, modified to use test calls") of the same book ("MPI: The Complete Reference, Vol. 1"). This concerns the code for (flag=0; !flag; i=(i+1)%(size-1)) { MPI_Test(&(buffer[i].req), &flag, &status); } ... MPI_Irecv(buffer[i]...); The code following the for loop depends upon the fact that, upon exiting the loop, i will have the value that caused the MPI_Test statement to set flag to true. However, i is incremented once more before the test (!flag) is evaluated, so it is actually one more than the correct value (modulo size-1). I think the correct code should look something like: flag=0; while (1) { MPI_Test(&(buffer[i].req), &flag, &status); if (flag) break; i=(i+1)%(size=1); } MPI_Irecv(buffer[i]...); i=(i+1)%(size=1); -Steve P.S. See http://www.beethovenfest.de/