Skip to content

Commit 0497ec0

Browse files
committed
osc/rdma: fix typo in check for MPI_MODE_NOCHECK
This commit fixes two typos in the lock_all path that inverted the MPI_MODE_NOCHECK flag. Signed-off-by: Nathan Hjelm <[email protected]>
1 parent 269e5e3 commit 0497ec0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

ompi/mca/osc/rdma/osc_rdma_passive_target.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -313,7 +313,7 @@ int ompi_osc_rdma_lock_all_atomic (int assert, struct ompi_win_t *win)
313313
* at the expense of memory usage. Ex. if a window has 1M peers then 8MB per process would
314314
* be needed for this array. */
315315

316-
if (0 != (assert & MPI_MODE_NOCHECK)) {
316+
if (0 == (assert & MPI_MODE_NOCHECK)) {
317317
/* increment the global shared lock */
318318
ret = ompi_osc_rdma_lock_acquire_shared (module, module->leader, 0x0000000100000000UL,
319319
offsetof(ompi_osc_rdma_state_t, global_lock),
@@ -356,7 +356,7 @@ int ompi_osc_rdma_unlock_all_atomic (struct ompi_win_t *win)
356356
/* finish all outstanding fragments */
357357
ompi_osc_rdma_sync_rdma_complete (lock);
358358

359-
if (0 != (lock->sync.lock.assert & MPI_MODE_NOCHECK)) {
359+
if (0 == (lock->sync.lock.assert & MPI_MODE_NOCHECK)) {
360360
/* decrement the master lock shared count */
361361
(void) ompi_osc_rdma_lock_release_shared (module, module->leader, -0x0000000100000000UL, offsetof (ompi_osc_rdma_state_t, global_lock));
362362
}

0 commit comments

Comments
 (0)