@@ -55,13 +55,15 @@ int mca_atomic_ucx_op(shmem_ctx_t ctx,
55
55
ucp_atomic_post_op_t op )
56
56
#endif
57
57
{
58
- ucs_status_t status ;
59
58
spml_ucx_mkey_t * ucx_mkey ;
60
59
uint64_t rva ;
61
60
mca_spml_ucx_ctx_t * ucx_ctx = (mca_spml_ucx_ctx_t * )ctx ;
62
61
#if HAVE_DECL_UCP_ATOMIC_OP_NBX
63
62
ucs_status_ptr_t status_ptr ;
63
+ #else
64
+ ucs_status_t status ;
64
65
#endif
66
+ int res ;
65
67
66
68
assert ((8 == size ) || (4 == size ));
67
69
@@ -71,20 +73,20 @@ int mca_atomic_ucx_op(shmem_ctx_t ctx,
71
73
status_ptr = ucp_atomic_op_nbx (ucx_ctx -> ucp_peers [pe ].ucp_conn ,
72
74
op , & value , 1 , rva , ucx_mkey -> rkey ,
73
75
& mca_spml_ucp_request_params [size >> 3 ]);
74
- if (OPAL_LIKELY (!UCS_PTR_IS_ERR (status_ptr ))) {
75
- mca_spml_ucx_remote_op_posted (ucx_ctx , pe );
76
- }
77
- status = UCS_PTR_STATUS (status_ptr );
76
+ res = opal_common_ucx_wait_request (status_ptr , ucx_ctx -> ucp_worker [0 ],
77
+ "ucp_atomic_op_nbx post" );
78
78
#else
79
79
status = ucp_atomic_post (ucx_ctx -> ucp_peers [pe ].ucp_conn ,
80
80
op , value , size , rva ,
81
81
ucx_mkey -> rkey );
82
+ res = ucx_status_to_oshmem (status );
82
83
#endif
83
- if (OPAL_LIKELY (UCS_OK == status )) {
84
+
85
+ if (OPAL_LIKELY (OSHMEM_SUCCESS == res )) {
84
86
mca_spml_ucx_remote_op_posted (ucx_ctx , pe );
85
87
}
86
88
87
- return ucx_status_to_oshmem ( status ) ;
89
+ return res ;
88
90
}
89
91
90
92
static inline
0 commit comments