Skip to content

Commit b82a082

Browse files
committed
btl/ugni: fix 32-bit compare-and-swap atomics
This commit fixes an error in the 32-bit compare-and-swap atomic support for Aries networks. The code was incorrectly using the non-fetching version of cswap which was causing the routing to return OPAL_ERR_BAD_ARG. Signed-off-by: Nathan Hjelm <[email protected]>
1 parent 4345308 commit b82a082

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

opal/mca/btl/ugni/btl_ugni_atomic.c

+4-1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22
/*
33
* Copyright (c) 2014-2018 Los Alamos National Security, LLC. All rights
44
* reserved.
5+
* Copyright (c) 2019 Triad National Security, LLC. All rights
6+
* reserved.
7+
* Copyright (c) 2019 Google, LLC. All rights reserved.
58
* $COPYRIGHT$
69
*
710
* Additional copyrights may follow
@@ -144,7 +147,7 @@ int mca_btl_ugni_acswap (struct mca_btl_base_module_t *btl, struct mca_btl_base_
144147
size_t size;
145148
int gni_op;
146149

147-
gni_op = (MCA_BTL_ATOMIC_FLAG_32BIT & flags) ? GNI_FMA_ATOMIC2_CSWAP_S : GNI_FMA_ATOMIC_CSWAP;
150+
gni_op = (MCA_BTL_ATOMIC_FLAG_32BIT & flags) ? GNI_FMA_ATOMIC2_FCSWAP_S : GNI_FMA_ATOMIC_CSWAP;
148151
size = (MCA_BTL_ATOMIC_FLAG_32BIT & flags) ? 4 : 8;
149152

150153
init_post_desc (&post_desc, endpoint, order, GNI_POST_AMO, (intptr_t) local_address,

0 commit comments

Comments
 (0)