From a19c265ab5afd5882344e4ecacf6122e602bd5e8 Mon Sep 17 00:00:00 2001 From: Nathan Hjelm Date: Tue, 26 Jan 2016 15:44:07 -0700 Subject: [PATCH] osc/rdma: fix typo in ompi_osc_rdma_complete_atomic The typo caused SEGVs on systems with only fetching atomic support. Fixes open-mpi/ompi#1329 Signed-off-by: Nathan Hjelm --- ompi/mca/osc/rdma/osc_rdma_active_target.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ompi/mca/osc/rdma/osc_rdma_active_target.c b/ompi/mca/osc/rdma/osc_rdma_active_target.c index bc0117dc1d..1400d396a7 100644 --- a/ompi/mca/osc/rdma/osc_rdma_active_target.c +++ b/ompi/mca/osc/rdma/osc_rdma_active_target.c @@ -456,7 +456,8 @@ int ompi_osc_rdma_complete_atomic (ompi_win_t *win) ompi_osc_rdma_sync_rdma_complete (sync); - if (MCA_BTL_FLAGS_ATOMIC_OPS & module->selected_btl->btl_flags) { + if (!(MCA_BTL_FLAGS_ATOMIC_OPS & module->selected_btl->btl_flags)) { + /* need a temporary buffer for performing fetching atomics */ ret = ompi_osc_rdma_frag_alloc (module, 8, &frag, (char **) &scratch_lock); if (OPAL_UNLIKELY(OPAL_SUCCESS != ret)) { return ret;