Can MPI_Get_count() return a negative value for the count? My message sizes never exceed 1138 integers. So it should not be a problem with the message length.
if(MPI_Probe(MPI_ANY_SOURCE,0,MPI_COMM_WORLD,&status) == MPI_SUCCESS)
{
printf("probe flag true\n");
MPI_Get_count(&status,MPI_DOUBLE,&recv_size);
}
The value of recv_size I get is negative.
MPI_UNDEFINEDis-32766in both Open MPI and Intel MPI.