From b35b0f7897628dd7aac9b8f29f0ecbc512ca3790 Mon Sep 17 00:00:00 2001 From: Ralph Castain Date: Sun, 23 Feb 2020 13:51:22 -0800 Subject: [PATCH] Fix comm_spawn Use the correct data type in the CID exchange Signed-off-by: Ralph Castain --- ompi/communicator/comm_cid.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/ompi/communicator/comm_cid.c b/ompi/communicator/comm_cid.c index 9b71f7d629..bd3ce84b7b 100644 --- a/ompi/communicator/comm_cid.c +++ b/ompi/communicator/comm_cid.c @@ -909,9 +909,8 @@ static int ompi_comm_allreduce_pmix_reduce_complete (ompi_comm_request_t *reques } PMIX_PDATA_CONSTRUCT(&pdat); - - info.value.type = OPAL_BYTE_OBJECT; - pdat.value.type = OPAL_BYTE_OBJECT; + PMIX_INFO_CONSTRUCT(&info); + info.value.type = PMIX_BYTE_OBJECT; opal_dss.unload(&sbuf, (void**)&info.value.data.bo.bytes, &rc); info.value.data.bo.size = rc; @@ -959,6 +958,10 @@ static int ompi_comm_allreduce_pmix_reduce_complete (ompi_comm_request_t *reques OBJ_DESTRUCT(&pdat); return rc; } + if (PMIX_BYTE_OBJECT != pdat.value.type) { + OBJ_DESTRUCT(&pdat); + return OPAL_ERR_TYPE_MISMATCH; + } OBJ_CONSTRUCT(&sbuf, opal_buffer_t); opal_dss.load(&sbuf, pdat.value.data.bo.bytes, pdat.value.data.bo.size);