From 611f3ba408fd7b61b79a910e7e989679b1a0e366 Mon Sep 17 00:00:00 2001 From: Rainer Keller Date: Fri, 15 Sep 2006 12:37:29 +0000 Subject: [PATCH] - Fix buglet found by Feng Sheng's IO tests; Correctly initialize the status for non-blocking io. This commit was SVN r11672. --- ompi/mca/io/base/io_base_request.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/ompi/mca/io/base/io_base_request.c b/ompi/mca/io/base/io_base_request.c index eecc76b6a8..2398004871 100644 --- a/ompi/mca/io/base/io_base_request.c +++ b/ompi/mca/io/base/io_base_request.c @@ -196,6 +196,17 @@ int mca_io_base_request_alloc(ompi_file_t *file, OMPI_REQUEST_INIT(&((*req)->super), false); + /* + * Copied from ompi/mca/pml/base/pml_base_recvreq.h: + * always set the req_status.MPI_TAG to ANY_TAG before starting the + * request. This field is used if cancelled to find out if the request + * has been matched or not. + */ + (*req)->super.req_status.MPI_TAG = MPI_ANY_TAG; + (*req)->super.req_status.MPI_ERROR = OMPI_SUCCESS; + (*req)->super.req_status._count = 0; + (*req)->super.req_status._cancelled = 0; + /* All done */ return OMPI_SUCCESS;