Boost logo

Boost Users :

Subject: Re: [Boost-users] boostMPI asychronous communication
From: Jack Bryan (dtustudy68_at_[hidden])
Date: 2010-06-28 13:46:29


Thanks,
This is the main part of me code, which may have deadlock.

Master:
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);
++taskCounterT2;}

// taskTotalNum = availableRank * TaskNumPerRank // right now, availableRank =1, TaskNumPerRank =2
mpi::wait_all(recvReqs, recvReqs+(taskTotalNum));
-----------------------------------------------worker:
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.
Jack

> Date: Mon, 28 Jun 2010 17:29:19 +0200
> From: riccardo.murri_at_[hidden]
> To: boost-users_at_[hidden]
> Subject: Re: [Boost-users] boostMPI asychronous communication
>
> Hi Jack,
>
> On Mon, Jun 28, 2010 at 5:18 PM, Jack Bryan <dtustudy68_at_[hidden]> wrote:
> > I just posted irecv before isend.
> > master node:
> > request=irecv();
> > do its local work;
> > isend(message to worker nodes);l
> > wait(request).
> > worker node:
> > while(stil have new task ){
> > recv(message);
> > do its local work;
> > isend(result message to master)
> > }
> > if there is only one task to worker, it works.
> > But, if there are 2 tasks to workers, master cannot get the result from
> > worker.
>
> Smells of deadlock. Maybe the master is waiting for a message coming
> from the wrong worker?
>
> We might need to delve into details; can you please post a minimal
> Boost.MPI program exhibiting this "blocking" behavior?
>
> Best regards,
> Riccardo
> _______________________________________________
> Boost-users mailing list
> Boost-users_at_[hidden]
> http://lists.boost.org/mailman/listinfo.cgi/boost-users
                                               
_________________________________________________________________
Hotmail has tools for the New Busy. Search, chat and e-mail from your inbox.
http://www.windowslive.com/campaign/thenewbusy?ocid=PID28326::T:WLMTAGL:ON:WL:en-US:WM_HMP:042010_1



Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net