@@ -184,15 +184,16 @@ int ompi_osc_ubcl_lock(int lock_type, int target, int assert, struct ompi_win_t
184184 mca_osc_ubcl_module_t * module = (mca_osc_ubcl_module_t * ) win -> w_osc_module ;
185185
186186 if (module -> no_locks ) {
187- mca_osc_ubcl_error (OMPI_ERR_RMA_SYNC , "MPI_Win_lock : window %d is no_locks=true" , module -> wid );
187+ mca_osc_ubcl_warn (OMPI_ERR_RMA_SYNC , "MPI_Win_lock : window %d is no_locks=true" , module -> wid );
188+ return OMPI_ERR_RMA_SYNC ;
188189 }
189190
190191 OPAL_THREAD_LOCK (& module -> sync_lock );
191192
192193 /* check synchronization type */
193194 if (UBCL_WIN_SYNC_NONE != module -> sync_type && UBCL_WIN_SYNC_LOCK != module -> sync_type
194195 && UBCL_WIN_SYNC_FENCE != module -> sync_type ) {
195- ret = OMPI_ERR_RMA_CONFLICT ;
196+ ret = OMPI_ERR_RMA_SYNC ;
196197 mca_osc_ubcl_warn (ret , "Failed to lock window %s already in sync type %s" ,
197198 win -> w_name , osc_ubcl_sync_name (module -> sync_type ));
198199 goto return_locked ;
@@ -219,7 +220,7 @@ int ompi_osc_ubcl_lock(int lock_type, int target, int assert, struct ompi_win_t
219220
220221 /* check access epoch */
221222 if (UBCL_WIN_SYNC_NONE != module -> procs_sync_type [target ]) {
222- ret = OMPI_ERR_RMA_CONFLICT ;
223+ ret = OMPI_ERR_RMA_SYNC ;
223224 mca_osc_ubcl_warn (ret , "Target %d is already locked on window %s" ,
224225 target , win -> w_name );
225226 goto return_locked ;
@@ -262,7 +263,8 @@ int ompi_osc_ubcl_unlock(int target, struct ompi_win_t *win)
262263 mca_osc_ubcl_module_t * module = (mca_osc_ubcl_module_t * ) win -> w_osc_module ;
263264
264265 if (module -> no_locks ) {
265- mca_osc_ubcl_error (OMPI_ERR_RMA_SYNC , "MPI_Win_unlock : window %d is no_locks=true" , module -> wid );
266+ mca_osc_ubcl_warn (OMPI_ERR_RMA_SYNC , "MPI_Win_unlock : window %d is no_locks=true" , module -> wid );
267+ return OMPI_ERR_RMA_SYNC ;
266268 }
267269
268270 OPAL_THREAD_LOCK (& module -> sync_lock );
@@ -271,7 +273,7 @@ int ompi_osc_ubcl_unlock(int target, struct ompi_win_t *win)
271273 if (UBCL_WIN_SYNC_LOCK != module -> sync_type
272274 || (UBCL_WIN_SYNC_LOCK != module -> procs_sync_type [target ]
273275 && UBCL_WIN_SYNC_LOCK_NO_CHECK != module -> procs_sync_type [target ])) {
274- ret = OMPI_ERR_RMA_CONFLICT ;
276+ ret = OMPI_ERR_RMA_SYNC ;
275277 mca_osc_ubcl_warn (ret , "Target %d is not locked so it cannot be unlocked "
276278 "window %s (sync type %s)" ,
277279 target , win -> w_name , osc_ubcl_sync_name (module -> sync_type ));
@@ -344,7 +346,7 @@ static int get_all_ubcl_ranks(struct ompi_win_t *win, ubcl_rank_t *all_ranks)
344346
345347/* lock_all doesn't need to check the exposure epoch because if there was another
346348 * 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 .
349+ * different from UBCL_WIN_SYNC_NONE therefore returning OMPI_ERR_RMA_SYNC .
348350 * Stemming from this, unlock_all doesn't need to check the epoch either
349351 */
350352int ompi_osc_ubcl_lock_all (int assert , struct ompi_win_t * win )
@@ -354,12 +356,13 @@ int ompi_osc_ubcl_lock_all(int assert, struct ompi_win_t *win)
354356 mca_osc_ubcl_module_t * module = (mca_osc_ubcl_module_t * ) win -> w_osc_module ;
355357
356358 if (module -> no_locks ) {
357- mca_osc_ubcl_error (OMPI_ERR_RMA_SYNC , "MPI_Win_lockall : window %d is no_locks=true" , module -> wid );
359+ mca_osc_ubcl_warn (OMPI_ERR_RMA_SYNC , "MPI_Win_lockall : window %d is no_locks=true" , module -> wid );
360+ return OMPI_ERR_RMA_SYNC ;
358361 }
359362
360363 /* check access epoch */
361364 if (UBCL_WIN_SYNC_NONE != module -> sync_type && UBCL_WIN_SYNC_FENCE != module -> sync_type ) {
362- ret = OMPI_ERR_RMA_CONFLICT ;
365+ ret = OMPI_ERR_RMA_SYNC ;
363366 mca_osc_ubcl_warn (ret , "Failed to lock_all window %s already in sync type %s" ,
364367 win -> w_name , osc_ubcl_sync_name (module -> sync_type ));
365368 return ret ;
@@ -401,7 +404,8 @@ int ompi_osc_ubcl_unlock_all(struct ompi_win_t *win)
401404 mca_osc_ubcl_module_t * module = (mca_osc_ubcl_module_t * ) win -> w_osc_module ;
402405
403406 if (module -> no_locks ) {
404- mca_osc_ubcl_error (OMPI_ERR_RMA_SYNC , "MPI_Win_unlockall : window %d is no_locks=true" , module -> wid );
407+ mca_osc_ubcl_warn (OMPI_ERR_RMA_SYNC , "MPI_Win_unlockall : window %d is no_locks=true" , module -> wid );
408+ return OMPI_ERR_RMA_SYNC ;
405409 }
406410
407411 if (UBCL_WIN_SYNC_LOCK_ALL_NO_CHECK == module -> sync_type ) {
@@ -413,7 +417,7 @@ int ompi_osc_ubcl_unlock_all(struct ompi_win_t *win)
413417
414418 /* check access epoch */
415419 if (UBCL_WIN_SYNC_LOCK_ALL != module -> sync_type ) {
416- return OMPI_ERR_RMA_CONFLICT ;
420+ return OMPI_ERR_RMA_SYNC ;
417421 }
418422
419423 group_size = ompi_group_size (win -> w_group );
@@ -513,7 +517,7 @@ int ompi_osc_ubcl_complete(struct ompi_win_t *win)
513517 OPAL_THREAD_LOCK (& module -> sync_lock );
514518
515519 if (UBCL_WIN_SYNC_PSCW != module -> sync_type ) {
516- ret = OMPI_ERR_RMA_CONFLICT ;
520+ ret = OMPI_ERR_RMA_SYNC ;
517521 mca_osc_ubcl_warn (ret , "Failed to complete window %s in sync type %s" ,
518522 win -> w_name , osc_ubcl_sync_name (module -> sync_type ));
519523 goto return_locked ;
@@ -596,7 +600,7 @@ int ompi_osc_ubcl_post(struct ompi_group_t *group, int assert, struct ompi_win_t
596600 || ( UBCL_WIN_SYNC_NONE != module -> sync_type
597601 && UBCL_WIN_SYNC_FENCE != module -> sync_type
598602 && UBCL_WIN_SYNC_PSCW != module -> sync_type )) {
599- ret = OMPI_ERR_RMA_CONFLICT ;
603+ ret = OMPI_ERR_RMA_SYNC ;
600604 mca_osc_ubcl_warn (ret , "Failed to post window %s already in sync type %s" ,
601605 win -> w_name , osc_ubcl_sync_name (module -> sync_type ));
602606 goto return_locked ;
@@ -662,7 +666,7 @@ int ompi_osc_ubcl_test(struct ompi_win_t *win, int *flag)
662666 }
663667
664668 if (UBCL_WIN_SYNC_PSCW != module -> sync_type ) {
665- ret = OMPI_ERR_RMA_CONFLICT ;
669+ ret = OMPI_ERR_RMA_SYNC ;
666670 mca_osc_ubcl_warn (ret , "Failed to test window %s in sync type %s" ,
667671 win -> w_name , osc_ubcl_sync_name (module -> sync_type ));
668672 goto return_locked ;
@@ -742,7 +746,7 @@ int ompi_osc_ubcl_fence(int assert, struct ompi_win_t *win)
742746 if (UBCL_WIN_SYNC_FENCE != module -> sync_type
743747 && UBCL_WIN_SYNC_FENCE_EPOCH != module -> sync_type
744748 && UBCL_WIN_SYNC_NONE != module -> sync_type ) {
745- ret = OMPI_ERR_RMA_CONFLICT ;
749+ ret = OMPI_ERR_RMA_SYNC ;
746750 mca_osc_ubcl_warn (ret , "Failed to fence window %s in sync type %s" ,
747751 win -> w_name , osc_ubcl_sync_name (module -> sync_type ));
748752 return ret ;
0 commit comments