<html dir="ltr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style id="owaParaStyle" type="text/css">P {margin-top:0;margin-bottom:0;}</style>
</head>
<body ocsi="0" fpstyle="1">
<div style="direction: ltr;font-family: Tahoma;color: #000000;font-size: 10pt;">Hi,
<br>
<br>
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).
<br>
<br>
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?
<br>
<br>
This happens for both MPICH-3.1.3 and MPICH-3.1.<br>
<br>
<br>
#include "mpi.h"<br>
#include <stdio.h><br>
#include <unistd.h><br>
<br>
int main(int argc, char **argv)<br>
{<br>
int send_int, recv_int, tag, flag;<br>
MPI_Status status;<br>
MPI_Request req;<br>
<br>
MPI_Init(&argc, &argv);<br>
<br>
tag = 0;<br>
send_int = 100;<br>
MPI_Isend(&send_int, 1, MPI_INT, 0, tag, MPI_COMM_WORLD, &req );<br>
sleep(1);<br>
<br>
MPI_Iprobe(MPI_ANY_SOURCE , MPI_ANY_TAG, MPI_COMM_WORLD, &flag, &status );<br>
//MPI_Iprobe(MPI_ANY_SOURCE , tag, MPI_COMM_WORLD, &flag, &status );<br>
if (flag) {<br>
MPI_Recv( &recv_int, 1, MPI_INT, MPI_ANY_SOURCE, tag, MPI_COMM_WORLD, &status);<br>
printf("Received = %d\n", recv_int);<br>
}<br>
else<br>
printf("Message not received yet");<br>
<br>
MPI_Waitall(1, &req, MPI_STATUSES_IGNORE);<br>
<br>
MPI_Finalize();<br>
return 0;<br>
}<br>
<br>
Thanks<br>
Florin<br>
</div>
</body>
</html>