From 141b20d991f2d3023cfb264cd94dc1b6bd3fde79 Mon Sep 17 00:00:00 2001 From: Todd Kordenbrock Date: Thu, 8 Oct 2015 12:17:19 -0500 Subject: [PATCH] osc-portals4: Initialize datatype in MPI_Get_accumulate and MPI_Rget_accumulate Fix code paths that didn't convert the MPI datatype to the corresponding Portals4 datatype. Thanks to Nicolas Chevalier (@shawone) for finding this bug and submitting a patch. --- ompi/mca/osc/portals4/osc_portals4_comm.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/ompi/mca/osc/portals4/osc_portals4_comm.c b/ompi/mca/osc/portals4/osc_portals4_comm.c index 4978435c2b..5e2d677db4 100644 --- a/ompi/mca/osc/portals4/osc_portals4_comm.c +++ b/ompi/mca/osc/portals4/osc_portals4_comm.c @@ -473,6 +473,11 @@ ompi_osc_portals4_rget_accumulate(const void *origin_addr, OMPI_OSC_PORTALS4_REQUEST_RETURN(request); return ret; } + ret = ompi_osc_portals4_get_dt(origin_dt, &ptl_dt); + if (OMPI_SUCCESS != ret) { + OMPI_OSC_PORTALS4_REQUEST_RETURN(request); + return ret; + } length *= origin_count; result_md_offset = (ptl_size_t) result_addr; @@ -835,6 +840,10 @@ ompi_osc_portals4_get_accumulate(const void *origin_addr, if (OMPI_SUCCESS != ret) { return ret; } + ret = ompi_osc_portals4_get_dt(origin_dt, &ptl_dt); + if (OMPI_SUCCESS != ret) { + return ret; + } length *= origin_count; result_md_offset = (ptl_size_t) result_addr;