[mpich-discuss] MPI_Iprobe bug in MPICH for BGQ?
Isaila, Florin D.
fisaila at mcs.anl.gov
Thu Nov 20 16:20:18 CST 2014
Hi,
when I run the program from below on 1 node on BGQ (Vesta), the message is not received (flag is 0). However on a Ubuntu, the message is received (flag is non-zero).
If I add another Iprobe (uncomment the Iprobe in the code below) the message is received on both BGQ and Ubuntu. Note that the program sleeps for 1 second after the Isend. Is it a bug?
This happens for both MPICH-3.1.3 and MPICH-3.1.
#include "mpi.h"
#include <stdio.h>
#include <unistd.h>
int main(int argc, char **argv)
{
int send_int, recv_int, tag, flag;
MPI_Status status;
MPI_Request req;
MPI_Init(&argc, &argv);
tag = 0;
send_int = 100;
MPI_Isend(&send_int, 1, MPI_INT, 0, tag, MPI_COMM_WORLD, &req );
sleep(1);
MPI_Iprobe(MPI_ANY_SOURCE , MPI_ANY_TAG, MPI_COMM_WORLD, &flag, &status );
//MPI_Iprobe(MPI_ANY_SOURCE , tag, MPI_COMM_WORLD, &flag, &status );
if (flag) {
MPI_Recv( &recv_int, 1, MPI_INT, MPI_ANY_SOURCE, tag, MPI_COMM_WORLD, &status);
printf("Received = %d\n", recv_int);
}
else
printf("Message not received yet");
MPI_Waitall(1, &req, MPI_STATUSES_IGNORE);
MPI_Finalize();
return 0;
}
Thanks
Florin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mpich.org/pipermail/discuss/attachments/20141120/52687215/attachment.html>
More information about the discuss
mailing list