diff --git a/ompi/mca/coll/base/coll_base_alltoallv.c b/ompi/mca/coll/base/coll_base_alltoallv.c index c3c22cb564d..62289036be6 100644 --- a/ompi/mca/coll/base/coll_base_alltoallv.c +++ b/ompi/mca/coll/base/coll_base_alltoallv.c @@ -55,7 +55,7 @@ mca_coll_base_alltoallv_intra_basic_inplace(const void *rbuf, const int *rcounts { int i, size, rank, left, right, err = MPI_SUCCESS, line; ptrdiff_t extent; - ompi_request_t *req; + ompi_request_t *req = MPI_REQUEST_NULL; char *tmp_buffer; size_t packed_size = 0, max_size; opal_convertor_t convertor; @@ -140,10 +140,10 @@ mca_coll_base_alltoallv_intra_basic_inplace(const void *rbuf, const int *rcounts right, MCA_COLL_BASE_TAG_ALLTOALLV, MCA_PML_BASE_SEND_STANDARD, comm)); if (MPI_SUCCESS != err) { goto error_hndl; } - - err = ompi_request_wait (&req, MPI_STATUSES_IGNORE); - if (MPI_SUCCESS != err) { goto error_hndl; } } + + err = ompi_request_wait (&req, MPI_STATUSES_IGNORE); + if (MPI_SUCCESS != err) { goto error_hndl; } } error_hndl: diff --git a/ompi/mca/coll/basic/coll_basic_alltoallw.c b/ompi/mca/coll/basic/coll_basic_alltoallw.c index 50ec9c9774b..0f8a2dae144 100644 --- a/ompi/mca/coll/basic/coll_basic_alltoallw.c +++ b/ompi/mca/coll/basic/coll_basic_alltoallw.c @@ -139,10 +139,10 @@ mca_coll_basic_alltoallw_intra_inplace(const void *rbuf, const int *rcounts, con right, MCA_COLL_BASE_TAG_ALLTOALLW, MCA_PML_BASE_SEND_STANDARD, comm)); if (MPI_SUCCESS != err) { goto error_hndl; } - - err = ompi_request_wait (&req, MPI_STATUSES_IGNORE); - if (MPI_SUCCESS != err) { goto error_hndl; } } + + err = ompi_request_wait (&req, MPI_STATUSES_IGNORE); + if (MPI_SUCCESS != err) { goto error_hndl; } } error_hndl: