#4348 closed Bugs (invalid)
[Boost.MPI] wait_any and wait_some don't wait at all
Reported by: | Owned by: | anonymous | |
---|---|---|---|
Milestone: | Boost 1.43.0 | Component: | mpi |
Version: | Boost 1.43.0 | Severity: | Problem |
Keywords: | Cc: |
Description
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
Change History (3)
comment:1 by , 12 years ago
Owner: | changed from | to
---|---|
Status: | new → assigned |
follow-up: 3 comment:2 by , 12 years ago
Resolution: | → invalid |
---|---|
Status: | assigned → closed |
Replying to 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