Skip to content

Commit 81adcc0

Browse files
[OSC/UBCL] Fix returned error codes with overlapping exposure epochs
Signed-off-by: Brelle Emmanuel <[email protected]>
1 parent e773f54 commit 81adcc0

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

ompi/mca/osc/ubcl/osc_ubcl_sync.c

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ int ompi_osc_ubcl_lock(int lock_type, int target, int assert, struct ompi_win_t
192192
/* check synchronization type */
193193
if (UBCL_WIN_SYNC_NONE != module->sync_type && UBCL_WIN_SYNC_LOCK != module->sync_type
194194
&& UBCL_WIN_SYNC_FENCE != module->sync_type) {
195-
ret = OMPI_ERR_RMA_CONFLICT;
195+
ret = OMPI_ERR_RMA_SYNC;
196196
mca_osc_ubcl_warn(ret, "Failed to lock window %s already in sync type %s",
197197
win->w_name, osc_ubcl_sync_name(module->sync_type));
198198
goto return_locked;
@@ -219,7 +219,7 @@ int ompi_osc_ubcl_lock(int lock_type, int target, int assert, struct ompi_win_t
219219

220220
/* check access epoch */
221221
if (UBCL_WIN_SYNC_NONE != module->procs_sync_type[target]) {
222-
ret = OMPI_ERR_RMA_CONFLICT;
222+
ret = OMPI_ERR_RMA_SYNC;
223223
mca_osc_ubcl_warn(ret, "Target %d is already locked on window %s",
224224
target, win->w_name);
225225
goto return_locked;
@@ -271,7 +271,7 @@ int ompi_osc_ubcl_unlock(int target, struct ompi_win_t *win)
271271
if (UBCL_WIN_SYNC_LOCK != module->sync_type
272272
|| (UBCL_WIN_SYNC_LOCK != module->procs_sync_type[target]
273273
&& UBCL_WIN_SYNC_LOCK_NO_CHECK != module->procs_sync_type[target])) {
274-
ret = OMPI_ERR_RMA_CONFLICT;
274+
ret = OMPI_ERR_RMA_SYNC;
275275
mca_osc_ubcl_warn(ret, "Target %d is not locked so it cannot be unlocked "
276276
"window %s (sync type %s)",
277277
target, win->w_name, osc_ubcl_sync_name(module->sync_type));
@@ -344,7 +344,7 @@ static int get_all_ubcl_ranks(struct ompi_win_t *win, ubcl_rank_t *all_ranks)
344344

345345
/* lock_all doesn't need to check the exposure epoch because if there was another
346346
* one started (individual lock or lock_all) then module->sync_type would be
347-
* different from UBCL_WIN_SYNC_NONE therefore returning OMPI_ERR_RMA_CONFLICT.
347+
* different from UBCL_WIN_SYNC_NONE therefore returning OMPI_ERR_RMA_SYNC.
348348
* Stemming from this, unlock_all doesn't need to check the epoch either
349349
*/
350350
int ompi_osc_ubcl_lock_all(int assert, struct ompi_win_t *win)
@@ -359,7 +359,7 @@ int ompi_osc_ubcl_lock_all(int assert, struct ompi_win_t *win)
359359

360360
/* check access epoch */
361361
if (UBCL_WIN_SYNC_NONE != module->sync_type && UBCL_WIN_SYNC_FENCE != module->sync_type) {
362-
ret = OMPI_ERR_RMA_CONFLICT;
362+
ret = OMPI_ERR_RMA_SYNC;
363363
mca_osc_ubcl_warn(ret, "Failed to lock_all window %s already in sync type %s",
364364
win->w_name, osc_ubcl_sync_name(module->sync_type));
365365
return ret;
@@ -413,7 +413,7 @@ int ompi_osc_ubcl_unlock_all(struct ompi_win_t *win)
413413

414414
/* check access epoch */
415415
if (UBCL_WIN_SYNC_LOCK_ALL != module->sync_type) {
416-
return OMPI_ERR_RMA_CONFLICT;
416+
return OMPI_ERR_RMA_SYNC;
417417
}
418418

419419
group_size = ompi_group_size(win->w_group);
@@ -513,7 +513,7 @@ int ompi_osc_ubcl_complete(struct ompi_win_t *win)
513513
OPAL_THREAD_LOCK(&module->sync_lock);
514514

515515
if (UBCL_WIN_SYNC_PSCW != module->sync_type) {
516-
ret = OMPI_ERR_RMA_CONFLICT;
516+
ret = OMPI_ERR_RMA_SYNC;
517517
mca_osc_ubcl_warn(ret, "Failed to complete window %s in sync type %s",
518518
win->w_name, osc_ubcl_sync_name(module->sync_type));
519519
goto return_locked;
@@ -596,7 +596,7 @@ int ompi_osc_ubcl_post(struct ompi_group_t *group, int assert, struct ompi_win_t
596596
|| ( UBCL_WIN_SYNC_NONE != module->sync_type
597597
&& UBCL_WIN_SYNC_FENCE != module->sync_type
598598
&& UBCL_WIN_SYNC_PSCW != module->sync_type )) {
599-
ret = OMPI_ERR_RMA_CONFLICT;
599+
ret = OMPI_ERR_RMA_SYNC;
600600
mca_osc_ubcl_warn(ret, "Failed to post window %s already in sync type %s",
601601
win->w_name, osc_ubcl_sync_name(module->sync_type));
602602
goto return_locked;
@@ -662,7 +662,7 @@ int ompi_osc_ubcl_test(struct ompi_win_t *win, int *flag)
662662
}
663663

664664
if (UBCL_WIN_SYNC_PSCW != module->sync_type) {
665-
ret = OMPI_ERR_RMA_CONFLICT;
665+
ret = OMPI_ERR_RMA_SYNC;
666666
mca_osc_ubcl_warn(ret, "Failed to test window %s in sync type %s",
667667
win->w_name, osc_ubcl_sync_name(module->sync_type));
668668
goto return_locked;
@@ -742,7 +742,7 @@ int ompi_osc_ubcl_fence(int assert, struct ompi_win_t *win)
742742
if (UBCL_WIN_SYNC_FENCE != module->sync_type
743743
&& UBCL_WIN_SYNC_FENCE_EPOCH != module->sync_type
744744
&& UBCL_WIN_SYNC_NONE != module->sync_type) {
745-
ret = OMPI_ERR_RMA_CONFLICT;
745+
ret = OMPI_ERR_RMA_SYNC;
746746
mca_osc_ubcl_warn(ret, "Failed to fence window %s in sync type %s",
747747
win->w_name, osc_ubcl_sync_name(module->sync_type));
748748
return ret;

0 commit comments

Comments
 (0)