Alaukik Aggarwal wrote:
>Thanks for your reply. I used this to solve the problem.
>But I think there should be an in-built construct for this.
What would such a construct look like? If you need information from the
remote processes, they need to send messages (in the two-sided model).
If you want to time out after a while, you can have MPI_Iprobe() checks
for in-coming messages and then give up after some period of time. I
just don't know what you'd be looking for.
If you have concrete ideas you would really want, you should address
them to the MPI Forum, which is in charge of defining MPI calls.
>On Sat, Dec 11, 2010 at 10:28 AM, Eugene Loh <eugene.loh_at_[hidden]> wrote:
>>Alaukik Aggarwal wrote:
>>>I am using Open MPI 1.4.3.
>>>I have to perform a receive operation from processes that are sending
>>>data. It might happen that some of the processes don't send data
>>>(might have completed in-fact).
>>>So, how do I perform check on which processes to receive data from and
>>>which processes to skip?
>>>if(id != master)
>>> MPI::COMM_WORLD.Send(&dist, NUM_VERTEX, MPI_LONG, master, 1234);
>>>if(id == master)
>>> for(int eachId = 1; eachId<procs ; eachId++)
>>> MPI::COMM_WORLD.Recv(&dist1, NUM_VERTEX, MPI_LONG, eachId, 1234);