Skip to content

Commit 92b0ebd

Browse files
committed
For UCX it is legal to return UCS_INPROGRESS (1) code for non-blocking function
calls, which means that the operation was successfully started but not immediately completed. This is a "good" return code that should not be handled as an error. Signed-off-by: Pavel Shamis (Pasha) <[email protected]>
1 parent c54dc87 commit 92b0ebd

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

oshmem/mca/spml/ucx/spml_ucx.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
* All rights reserved.
44
* Copyright (c) 2014-2016 Research Organization for Information Science
55
* and Technology (RIST). All rights reserved.
6+
* Copyright (c) 2016 ARM, Inc. All rights reserved.
67
* $COPYRIGHT$
78
*
89
* Additional copyrights may follow
@@ -468,7 +469,7 @@ int mca_spml_ucx_get_nb(void *src_addr, size_t size, void *dst_addr, int src, vo
468469
status = ucp_get_nbi(mca_spml_ucx.ucp_peers[src].ucp_conn, dst_addr, size,
469470
(uint64_t)rva, ucx_mkey->rkey);
470471

471-
return ucx_status_to_oshmem(status);
472+
return ucx_status_to_oshmem_nb(status);
472473
}
473474

474475
int mca_spml_ucx_put(void* dst_addr, size_t size, void* src_addr, int dst)
@@ -494,7 +495,7 @@ int mca_spml_ucx_put_nb(void* dst_addr, size_t size, void* src_addr, int dst, vo
494495
status = ucp_put_nbi(mca_spml_ucx.ucp_peers[dst].ucp_conn, src_addr, size,
495496
(uint64_t)rva, ucx_mkey->rkey);
496497

497-
return ucx_status_to_oshmem(status);
498+
return ucx_status_to_oshmem_nb(status);
498499
}
499500

500501
int mca_spml_ucx_fence(void)

oshmem/mca/spml/ucx/spml_ucx.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
* All rights reserved.
44
* Copyright (c) 2016 Research Organization for Information Science
55
* and Technology (RIST). All rights reserved.
6+
* Copyright (c) 2016 ARM, Inc. All rights reserved.
67
* $COPYRIGHT$
78
*
89
* Additional copyrights may follow
@@ -133,6 +134,10 @@ static inline int ucx_status_to_oshmem(ucs_status_t status)
133134
return OPAL_LIKELY(UCS_OK == status) ? OSHMEM_SUCCESS : OSHMEM_ERROR;
134135
}
135136

137+
static inline int ucx_status_to_oshmem_nb(ucs_status_t status)
138+
{
139+
return OPAL_LIKELY(status >= 0) ? OSHMEM_SUCCESS : OSHMEM_ERROR;
140+
}
136141

137142
END_C_DECLS
138143

0 commit comments

Comments
 (0)