$include_dir="/home/hyper-archives/boost-commit/include"; include("$include_dir/msg-header.inc") ?>
Subject: [Boost-commit] svn:boost r86712 - trunk/boost/mpi
From: troyer_at_[hidden]
Date: 2013-11-15 14:22:18
Author: troyer
Date: 2013-11-15 14:22:18 EST (Fri, 15 Nov 2013)
New Revision: 86712
URL: http://svn.boost.org/trac/boost/changeset/86712
Log:
Fixed #9356
Text files modified: 
   trunk/boost/mpi/nonblocking.hpp |     4 +++-                                    
   1 files changed, 3 insertions(+), 1 deletions(-)
Modified: trunk/boost/mpi/nonblocking.hpp
==============================================================================
--- trunk/boost/mpi/nonblocking.hpp	Fri Nov 15 13:24:31 2013	(r86711)
+++ trunk/boost/mpi/nonblocking.hpp	2013-11-15 14:22:18 EST (Fri, 15 Nov 2013)	(r86712)
@@ -59,7 +59,9 @@
   ForwardIterator current = first;
   while (true) {
     // Check if we have found a completed request. If so, return it.
-    if (optional<status> result = current->test())
+    if (current->m_requests[0] != MPI_REQUEST_NULL &&
+        current->m_requests[1] != MPI_REQUEST_NULL &&
+        optional<status> result = current->test())
       return std::make_pair(*result, current);
 
     // Check if this request (and all others before it) are "trivial"