Skip to content

Commit 8adf9f5

Browse files
committed
btl/uct: fix fetching atomics support for osc/rdma
The check that requires 32 and 64 bit atomic support is way outdated at this point. This commit takes the union of the two instead of the intersection because technically it is up to the btl user to determine which of each type are supported. This commit also ensures that MCA_BTL_ATOMIC_SUPPORTS_32BIT is set when 32-bit atomics are available and ensures that the required MCA_BTL_FLAGS_RDMA_REMOTE_COMPLETION flag is set on the btl. Signed-off-by: Nathan Hjelm <[email protected]>
1 parent 5f00259 commit 8adf9f5

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

opal/mca/btl/uct/btl_uct_module.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -337,7 +337,8 @@ mca_btl_uct_module_t mca_btl_uct_module_template = {
337337

338338
/* set the default flags for this btl. uct provides us with rdma and both
339339
* fetching and non-fetching atomics (though limited to add and cswap) */
340-
.btl_flags = MCA_BTL_FLAGS_RDMA | MCA_BTL_FLAGS_ATOMIC_FOPS | MCA_BTL_FLAGS_ATOMIC_OPS,
340+
.btl_flags = MCA_BTL_FLAGS_RDMA | MCA_BTL_FLAGS_ATOMIC_FOPS | MCA_BTL_FLAGS_ATOMIC_OPS
341+
| MCA_BTL_FLAGS_RDMA_REMOTE_COMPLETION,
341342
.btl_atomic_flags = MCA_BTL_ATOMIC_SUPPORTS_ADD | MCA_BTL_ATOMIC_SUPPORTS_CSWAP
342343
| MCA_BTL_ATOMIC_SUPPORTS_SWAP | MCA_BTL_ATOMIC_SUPPORTS_32BIT,
343344

opal/mca/btl/uct/btl_uct_tl.c

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -78,11 +78,10 @@ static void mca_btl_uct_module_set_atomic_flags(mca_btl_uct_module_t *module, mc
7878
uint64_t atomic_flags32 = MCA_BTL_UCT_TL_ATTR(tl, 0).cap.atomic32.fop_flags;
7979
uint64_t atomic_flags64 = MCA_BTL_UCT_TL_ATTR(tl, 0).cap.atomic64.fop_flags;
8080

81-
/* NTH: don't really have a way to separate 32-bit and 64-bit right now */
82-
uint64_t all_flags = atomic_flags32 & atomic_flags64;
83-
84-
module->super.btl_atomic_flags = 0;
81+
uint64_t all_flags = atomic_flags64 | atomic_flags32;
8582

83+
module->super.btl_atomic_flags = (0 != atomic_flags32) ? MCA_BTL_ATOMIC_SUPPORTS_32BIT : 0;
84+
8685
if (cap_flags & UCT_IFACE_FLAG_ATOMIC_CPU) {
8786
module->super.btl_atomic_flags |= MCA_BTL_ATOMIC_SUPPORTS_GLOB;
8887
}

0 commit comments

Comments
 (0)