[Mpi-forum] MPI problem of asynchronous communication

Jack Bryan dtustudy68 at hotmail.com
Mon Jun 28 13:12:22 CDT 2010

Dear All:
How to do asynchronous communication among nodes by MPI in cluster ?
I need to set up a kind of asychronous communication protocol such that message senders and receivers can communicate asynchronously without losing anymessages between them. 
I do not want to use blocking MPI routines because the processors can do otheroperations when they wait for new messages coming.
This is the main part of my code, which have a  deadlock. 
The worker can receives message from master but master cannot get message from workers.It is blocked by the mpi::wait_all().
for (iRank = 0; iRank < availableRank ; iRank++){
destRank = iRank+1;
for (taski = 1; taski <=  TaskNumPerRank ; taski++){resultSourceRank = destRank;
recvReqs[taskCounterT2] = world.irecv(resultSourceRank, upStreamTaskTag, resultTaskPackageT2[iRank][taskCounterT3]);
reqs = world.isend(destRank, taskTag, myTaskPackage);

// taskTotalNum = availableRank * TaskNumPerRank // right now, availableRank =1, TaskNumPerRank =2
mpi::wait_all(recvReqs, recvReqs+(taskTotalNum));
while (1){world.recv(managerRank, downStreamTaskTag, resultTaskPackageW);
do its local work on received task;
destRank = masterRank;
reqs = world.isend(destRank, taskTag, myTaskPackage);if (recv end signal) 	break;}
Any help is appreciated. 
June 27  2010 		 	   		  
The New Busy think 9 to 5 is a cute idea. Combine multiple calendars with Hotmail. 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mpi-forum.org/pipermail/mpi-forum/attachments/20100628/e8df23a0/attachment.html>

More information about the mpi-forum mailing list