@@ -945,14 +945,14 @@ int ompi_osc_ucx_dynamic_lock(ompi_osc_ucx_module_t *module, int target) {
945
945
uint64_t remote_addr = (module -> state_addrs )[target ] + OSC_UCX_STATE_DYNAMIC_LOCK_OFFSET ;
946
946
ucp_ep_h * ep ;
947
947
OSC_UCX_GET_DEFAULT_EP (ep , module , target );
948
- int ret = OMPI_SUCCESS ;
948
+ int ret ;
949
949
950
950
for (;;) {
951
951
ret = opal_common_ucx_wpmem_cmpswp (module -> state_mem ,
952
952
TARGET_LOCK_UNLOCKED , TARGET_LOCK_EXCLUSIVE ,
953
953
target , & result_value , sizeof (result_value ),
954
954
remote_addr , ep );
955
- if (ret != OMPI_SUCCESS ) {
955
+ if (OPAL_SUCCESS != ret ) {
956
956
OSC_UCX_VERBOSE (1 , "opal_common_ucx_mem_cmpswp failed: %d" , ret );
957
957
return OMPI_ERROR ;
958
958
}
@@ -963,18 +963,18 @@ int ompi_osc_ucx_dynamic_lock(ompi_osc_ucx_module_t *module, int target) {
963
963
opal_common_ucx_wpool_progress (mca_osc_ucx_component .wpool );
964
964
}
965
965
966
- return ret ;
966
+ return OMPI_SUCCESS ;
967
967
}
968
968
969
969
int ompi_osc_ucx_dynamic_unlock (ompi_osc_ucx_module_t * module , int target ) {
970
970
uint64_t result_value = -1 ;
971
971
uint64_t remote_addr = (module -> state_addrs )[target ] + OSC_UCX_STATE_DYNAMIC_LOCK_OFFSET ;
972
972
ucp_ep_h * ep ;
973
973
OSC_UCX_GET_DEFAULT_EP (ep , module , target );
974
- int ret = OMPI_SUCCESS ;
974
+ int ret ;
975
975
976
976
ret = opal_common_ucx_wpmem_fence (module -> mem );
977
- if (ret != OMPI_SUCCESS ) {
977
+ if (OPAL_SUCCESS != ret ) {
978
978
OSC_UCX_VERBOSE (1 , "opal_common_ucx_mem_fence failed: %d" , ret );
979
979
return OMPI_ERROR ;
980
980
}
@@ -983,8 +983,12 @@ int ompi_osc_ucx_dynamic_unlock(ompi_osc_ucx_module_t *module, int target) {
983
983
UCP_ATOMIC_FETCH_OP_SWAP , TARGET_LOCK_UNLOCKED ,
984
984
target , & result_value , sizeof (result_value ),
985
985
remote_addr , ep );
986
+ if (OPAL_SUCCESS != ret ) {
987
+ return OMPI_ERROR ;
988
+ }
989
+
986
990
assert (result_value == TARGET_LOCK_EXCLUSIVE );
987
- return ret ;
991
+ return OMPI_SUCCESS ;
988
992
}
989
993
990
994
int ompi_osc_ucx_win_attach (struct ompi_win_t * win , void * base , size_t len ) {
0 commit comments