From 77eaa5c8b8b1035969affd3c499db2b333dfcff0 Mon Sep 17 00:00:00 2001 From: George Bosilca Date: Tue, 15 Sep 2020 16:05:23 -0400 Subject: [PATCH] Keep the non-blocking collective tags globally in sync. Signed-off-by: George Bosilca --- ompi/mca/coll/libnbc/nbc_ialltoallv.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/ompi/mca/coll/libnbc/nbc_ialltoallv.c b/ompi/mca/coll/libnbc/nbc_ialltoallv.c index 5d13d524ea4..40f04068216 100644 --- a/ompi/mca/coll/libnbc/nbc_ialltoallv.c +++ b/ompi/mca/coll/libnbc/nbc_ialltoallv.c @@ -74,13 +74,20 @@ static int nbc_alltoallv_init(const void* sendbuf, const int *sendcounts, const } } span = opal_datatype_span(&recvtype->super, count, &gap); + /** + * If this process has no data to send or receive it can bail out early, + * but it needs to increase the nonblocking tag to stay in sycn with the + * rest of the processses. + */ if (OPAL_UNLIKELY(0 == span)) { + ompi_coll_base_nbc_reserve_tags(comm, 1); return nbc_get_noop_request(persistent, request); } tmpbuf = malloc(span); if (OPAL_UNLIKELY(NULL == tmpbuf)) { return OMPI_ERR_OUT_OF_RESOURCE; } + sendcounts = recvcounts; sdispls = rdispls; } else {