Skip to content

Commit 4345308

Browse files
committed
osc/rdma: fix CAS 32-bit network atomic compatibility check
When checking for btl compatibility with 32-bit CAS osc/rdma was checking the incorrect flag field. Signed-off-by: Nathan Hjelm <hjelmn@cs.unm.edu>
1 parent dabad08 commit 4345308

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

ompi/mca/osc/rdma/osc_rdma_accumulate.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@
55
* Copyright (c) 2016-2017 Research Organization for Information Science
66
* and Technology (RIST). All rights reserved.
77
* Copyright (c) 2016-2018 Intel, Inc. All rights reserved.
8+
* Copyright (c) 2019 Triad National Security, LLC. All rights
9+
* reserved.
10+
* Copyright (c) 2019 Google, LLC. All rights reserved.
811
* $COPYRIGHT$
912
*
1013
* Additional copyrights may follow
@@ -476,11 +479,12 @@ static inline int ompi_osc_rdma_cas_atomic (ompi_osc_rdma_sync_t *sync, const vo
476479
bool lock_acquired)
477480
{
478481
ompi_osc_rdma_module_t *module = sync->module;
482+
int32_t atomic_flags = module->selected_btl->btl_atomic_flags;
479483
const size_t size = datatype->super.size;
480484
int64_t compare, source;
481485
int ret, flags;
482486

483-
if (8 != size && !(4 == size && (MCA_BTL_ATOMIC_SUPPORTS_32BIT & module->selected_btl->btl_flags))) {
487+
if (8 != size && !(4 == size && (MCA_BTL_ATOMIC_SUPPORTS_32BIT & atomic_flags))) {
484488
return OMPI_ERR_NOT_SUPPORTED;
485489
}
486490

0 commit comments

Comments
 (0)