From 33c6dae93a9d0f000636b4a238d73e08099c5dc3 Mon Sep 17 00:00:00 2001 From: Rainer Keller Date: Tue, 2 Sep 2008 15:36:10 +0000 Subject: [PATCH] - As shown in ticket #1349, the status is not copied correctly in case of MPI_PROC_NULL with persistent requests. As of r12339, the req_status of the request is initialized correclty and being used in {{{ompi_request_test}}} and {{{ompi_request_wait}}}. So, just set the status, getting rid of the if-statement. Checked by Jeff using mtt. This commit was SVN r19485. The following SVN revision numbers were found above: r12339 --> open-mpi/ompi@020efdf1f9e7a50cbcbed6188c37ec30884d2371 --- ompi/request/req_test.c | 10 ++++++++-- ompi/request/req_wait.c | 10 ++++------ 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/ompi/request/req_test.c b/ompi/request/req_test.c index 29ed0e19f6..4d9f4f0f9a 100644 --- a/ompi/request/req_test.c +++ b/ompi/request/req_test.c @@ -5,7 +5,7 @@ * Copyright (c) 2004-2005 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, + * Copyright (c) 2004-2008 High Performance Computing Center Stuttgart, * University of Stuttgart. All rights reserved. * Copyright (c) 2004-2005 The Regents of the University of California. * All rights reserved. @@ -210,8 +210,14 @@ int ompi_request_default_test_all( /* fill out completion status and free request if required */ for( i = 0; i < count; i++, rptr++ ) { request = *rptr; + /* + * If the request is OMPI_REQUEST_INACTIVE set the status + * (either in the case of standard and persistent requests), + * to the already initialized req_status. + * Works also in the case of persistent request w/ MPI_PROC_NULL. + */ if( request->req_state == OMPI_REQUEST_INACTIVE ) { - statuses[i] = ompi_status_empty; + statuses[i] = request->req_status; continue; } if (OMPI_REQUEST_GEN == request->req_type) { diff --git a/ompi/request/req_wait.c b/ompi/request/req_wait.c index cbe8af182a..9883db26fb 100644 --- a/ompi/request/req_wait.c +++ b/ompi/request/req_wait.c @@ -5,7 +5,7 @@ * Copyright (c) 2004-2006 The University of Tennessee and The University * of Tennessee Research Foundation. All rights * reserved. - * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, + * Copyright (c) 2004-2008 High Performance Computing Center Stuttgart, * University of Stuttgart. All rights reserved. * Copyright (c) 2004-2005 The Regents of the University of California. * All rights reserved. @@ -297,11 +297,9 @@ int ompi_request_default_wait_all( size_t count, if (OMPI_REQUEST_GEN == request->req_type) { ompi_grequest_invoke_query(request, &request->req_status); } - if( request->req_state == OMPI_REQUEST_INACTIVE ) { - statuses[i] = ompi_status_empty; - } else { - statuses[i] = request->req_status; - } + + statuses[i] = request->req_status; + if( request->req_persistent ) { request->req_state = OMPI_REQUEST_INACTIVE; } else {