Open MPI logo

Open MPI User's Mailing List Archives

  |   Home   |   Support   |   FAQ   |   all Open MPI User's mailing list

Subject: Re: [OMPI users] Urgent Question regarding, MPI_ANY_SOURCE.
From: Eugene Loh (eugene.loh_at_[hidden])
Date: 2011-07-15 13:13:15

I'm going to echo what you've already heard here: it is impossible for
a process to receive a message that was sent to a different process. A
sender must specify a unique destination. No process other than the
destination process will see that message.

In what you write below, why do you think you are receiving a message
that was intended for a different destination? Maybe you can put
together a short program that illustrates your question.

On 7/15/2011 9:49 AM, Mudassar Majeed wrote:
> Yes, processes receive messages that were not sent to them. I am
> receiving the message with the following call
> MPI_Recv(&recv_packet, 1, loadDatatype, MPI_ANY_SOURCE, MPI_TAG_LOAD,
> comm, &status);
> and that was sent using the following call,
> MPI_Ssend(&load_packet, 1, loadDatatype, rec_rank, MPI_TAG_LOAD, comm);
> What problem it can have ?. All the parameters are correct, I have
> seen them by printf. What I am thinking is that, the receive is done
> with MPI_ANY_SOURCE, so the process is getting any message (from any
> source). What should be done so that only that message is captured
> that had the destination as this process.