Subject: [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: 2010-06-16 07:50:34
#4348: [Boost.MPI] wait_any and wait_some don't wait at all
------------------------------------------------------+---------------------
Reporter: Didier Devaurs <ddevaurs@â¦> | Owner: dgregor
Type: Bugs | Status: new
Milestone: Boost 1.43.0 | Component: mpi
Version: Boost 1.43.0 | Severity: Problem
Keywords: |
------------------------------------------------------+---------------------
Hello,
The functions wait_any and wait_some don't work properly. If they were
really waiting for a request to be completed (like wait_all is doing) the
program below would hang indefinitely.
Currently, the function wait_any tests the requests, and since none is
completed, returns -1. So it simply implements a test_all function.
int main()
{
boost::mpi::environment environment;
boost::mpi::communicator world;
int processNumber = world.size();
if (world.rank() == 0) {
boost::mpi::request requests[processNumber];
for (int source = 1; source < processNumber; ++source)
requests[source] = world.irecv(source, 0);
std::cout << boost::mpi::wait_any(requests, requests +
processNumber).first.source();
}
return 0;
}
Didier Devaurs
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/4348> 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:03 UTC