Skip to content

Commit 375ca1b

Browse files
committed
mpi/c: MPI_PROC_NULL is not a valid rank in MPI_Win_{lock,unlock}
Signed-off-by: Gilles Gouaillardet <[email protected]> (back-ported from commit ebe6125)
1 parent 4b4ecde commit 375ca1b

File tree

2 files changed

+2
-8
lines changed

2 files changed

+2
-8
lines changed

ompi/mpi/c/win_lock.c

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
* All rights reserved.
1313
* Copyright (c) 2014 Los Alamos National Security, LLC. All rights
1414
* reserved.
15-
* Copyright (c) 2015 Research Organization for Information Science
15+
* Copyright (c) 2015-2017 Research Organization for Information Science
1616
* and Technology (RIST). All rights reserved.
1717
* $COPYRIGHT$
1818
*
@@ -61,9 +61,6 @@ int MPI_Win_lock(int lock_type, int rank, int assert, MPI_Win win)
6161
}
6262
}
6363

64-
/* NTH: do not bother keeping track of locking MPI_PROC_NULL. */
65-
if (MPI_PROC_NULL == rank) return MPI_SUCCESS;
66-
6764
rc = win->w_osc_module->osc_lock(lock_type, rank, assert, win);
6865
OMPI_ERRHANDLER_RETURN(rc, win, rc, FUNC_NAME);
6966
}

ompi/mpi/c/win_unlock.c

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
* All rights reserved.
1313
* Copyright (c) 2014 Los Alamos National Security, LLC. All rights
1414
* reserved.
15-
* Copyright (c) 2015 Research Organization for Information Science
15+
* Copyright (c) 2015-2017 Research Organization for Information Science
1616
* and Technology (RIST). All rights reserved.
1717
* $COPYRIGHT$
1818
*
@@ -54,9 +54,6 @@ int MPI_Win_unlock(int rank, MPI_Win win)
5454
}
5555
}
5656

57-
/* NTH: do not bother keeping track of unlocking MPI_PROC_NULL. */
58-
if (MPI_PROC_NULL == rank) return MPI_SUCCESS;
59-
6057
rc = win->w_osc_module->osc_unlock(rank, win);
6158
OMPI_ERRHANDLER_RETURN(rc, win, rc, FUNC_NAME);
6259
}

0 commit comments

Comments
 (0)