Skip to content

Commit 778bb6e

Browse files
jeffhammondggouaillardet
authored andcommitted
check for negative ranks in ompi_win_peer_invalid
resolves #3326 (#3326) Signed-off-by: [email protected] (cherry picked from commit b3a2010)
1 parent de57552 commit 778bb6e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ompi/win/win.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ static inline int ompi_win_invalid(ompi_win_t *win) {
162162
}
163163

164164
static inline int ompi_win_peer_invalid(ompi_win_t *win, int peer) {
165-
if (win->w_group->grp_proc_count <= peer) return true;
165+
if (win->w_group->grp_proc_count <= peer || peer < 0) return true;
166166
return false;
167167
}
168168

0 commit comments

Comments
 (0)