Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

#9356 closed Bugs (fixed)

Unexpected wait_any function behavor (with irecv)

Reported by: christopher.bignamini@… Owned by: Matthias Troyer
Milestone: To Be Determined Component: mpi
Version: Boost 1.54.0 Severity: Problem
Keywords: wait_any, mpi, non blocking Cc:

Description

The boost wait_any function does not behave as the corresponding MPI function, in correspondence to irecv function calls, when more than 1 data transmission request is present. In particular it is possible that after a first successfully completed communication all the others are not checked at all, with the function always returning as in case of a new completed communication. This unexpected behavior is probably due to the following code lines (in file nonblocking.hpp, from line 61):

// Check if we have found a completed request. If so, return it.
if (optional<status> result = current->test())
      return std::make_pair(*result, current);

If a previously completed request is tested the corresponding optional result is returned and, with the above conditional statement, this condition leads to a subsequent return to the external calling code. The performed request status check should therefore probably also include the required information to exclude previously completed communications. By commenting the above lines and using the wait_any function with standard MPI data types the unexpected behavior disappears since in this case the boost function is allowed to make use of the corresponding MPI function.

Change History (3)

comment:1 by Matthias Troyer, 9 years ago

Status: newassigned

If I see things correctly then to recover the same functionality as MPI_Waitany we need to clear any request that was already returned. However, this means that the iterator always points to an invalid (finished) request.

comment:2 by Matthias Troyer, 9 years ago

Resolution: fixed
Status: assignedclosed

(In [86712]) Fixed #9356

comment:3 by Matthias Troyer, 9 years ago

(In [86713]) Fixed #9356

Note: See TracTickets for help on using tickets.