Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions ompi/mca/osc/ucx/osc_ucx_active_target.c
Original file line number Diff line number Diff line change
Expand Up @@ -276,6 +276,7 @@ int ompi_osc_ucx_post(struct ompi_group_t *group, int assert, struct ompi_win_t
ompi_osc_ucx_handle_incoming_post(module, &(module->state.post_state[j]), NULL, 0);
}

ucp_worker_progress(mca_osc_ucx_component.ucp_worker);
usleep(100);
} while (1);
}
Expand Down
8 changes: 6 additions & 2 deletions ompi/mca/osc/ucx/osc_ucx_comm.c
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@ static inline int start_atomicity(ompi_osc_ucx_module_t *module, ucp_ep_h ep, in
uint64_t remote_addr = (module->state_info_array)[target].addr + OSC_UCX_STATE_ACC_LOCK_OFFSET;
ucs_status_t status;

while (result_value != TARGET_LOCK_UNLOCKED) {
for (;;) {
status = opal_common_ucx_atomic_cswap(ep, TARGET_LOCK_UNLOCKED, TARGET_LOCK_EXCLUSIVE,
&result_value, sizeof(result_value),
remote_addr, rkey,
Expand All @@ -290,9 +290,13 @@ static inline int start_atomicity(ompi_osc_ucx_module_t *module, ucp_ep_h ep, in
OSC_UCX_VERBOSE(1, "ucp_atomic_cswap64 failed: %d", status);
return OMPI_ERROR;
}
if (result_value == TARGET_LOCK_UNLOCKED) {
return OMPI_SUCCESS;
}

ucp_worker_progress(mca_osc_ucx_component.ucp_worker);
}

return OMPI_SUCCESS;
}

static inline int end_atomicity(ompi_osc_ucx_module_t *module, ucp_ep_h ep, int target) {
Expand Down
10 changes: 7 additions & 3 deletions ompi/mca/osc/ucx/osc_ucx_passive_target.c
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ static inline int start_shared(ompi_osc_ucx_module_t *module, int target) {
} else {
break;
}
ucp_worker_progress(mca_osc_ucx_component.ucp_worker);
}

return OMPI_SUCCESS;
Expand Down Expand Up @@ -72,17 +73,20 @@ static inline int start_exclusive(ompi_osc_ucx_module_t *module, int target) {
uint64_t remote_addr = (module->state_info_array)[target].addr + OSC_UCX_STATE_LOCK_OFFSET;
ucs_status_t status;

while (result_value != TARGET_LOCK_UNLOCKED) {
for (;;) {
status = opal_common_ucx_atomic_cswap(ep, TARGET_LOCK_UNLOCKED, TARGET_LOCK_EXCLUSIVE,
&result_value, sizeof(result_value),
remote_addr, rkey,
mca_osc_ucx_component.ucp_worker);
if (status != UCS_OK) {
return OMPI_ERROR;
}
}
if (result_value == TARGET_LOCK_UNLOCKED) {
return OMPI_SUCCESS;
}

return OMPI_SUCCESS;
ucp_worker_progress(mca_osc_ucx_component.ucp_worker);
}
}

static inline int end_exclusive(ompi_osc_ucx_module_t *module, int target) {
Expand Down