Re: [Boost-bugs] [Boost C++ Libraries] #4348: [Boost.MPI] wait_any and wait_some don't wait at all

Subject: Re: [Boost-bugs] [Boost C++ Libraries] #4348: [Boost.MPI] wait_any and wait_some don't wait at all
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2013-10-23 15:03:38


#4348: [Boost.MPI] wait_any and wait_some don't wait at all
------------------------------------------+-----------------------
  Reporter: Didier Devaurs <ddevaurs@…> | Owner: anonymous
      Type: Bugs | Status: closed
 Milestone: Boost 1.43.0 | Component: mpi
   Version: Boost 1.43.0 | Severity: Problem
Resolution: invalid | Keywords:
------------------------------------------+-----------------------

Comment (by christopher.bignamini@…):

 Replying to [comment:2 Didier Devaurs <ddevaurs@…>]:


 Hello,
 I am observing in the current boost release (1.54) in Boost MPI the same
 problem you described in the ticket (I have tried to your example). A
 similar problem is also observable by running the code below (sorry for
 bad indent), I guess due to the same bug(?) in the wait_any function (I
 hope that the rest of my code is bug free..). It is not clear to me if the
 ticket you have opened has been solved, did the developers fix the bug?

 Christopher Bignamini


 {{{

 mpi::communicator mpiCommunicator;

 const int taskId(mpiCommunicator.rank());
 const int numberOfTasks(mpiCommunicator.size());

 if(taskId==0){

  double* slaveData = new double[numberOfTasks-1];
  mpi::request* receiveRequest = new mpi::request[numberOfTasks-1];

  for(int taskId=1;taskId<numberOfTasks;++taskId) {

   receiveRequest[taskId-1] = mpiCommunicator.irecv(taskId,
                                                   taskId,
                                                   &slaveData[taskId-1],
                                                   1);
  }

  unsigned int numberOfReceivedContributions(0);

  do {

   const mpi::status& communicationStatus(mpi::wait_any(receiveRequest,
                                                        receiveRequest +
 numberOfTasks - 1).first);

   if(communicationStatus.error()==0) {

       const int subDomainIndex(communicationStatus.source());
       ++numberOfReceivedContributions;

       ...DO..SOMETHING WITH AVAILABLE DATA...

     }

  }while(numberOfReceivedContributions<numberOfTasks-1);

  delete [] slaveData;
  delete [] receiveRequest;

 }
 else{

  double dataTmp(...);
  mpiCommunicator.send(0,mpiCommunicator.rank(),dataTmp);

 }

 }}}

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/4348#comment:3>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:14 UTC