Skip to content

Commit 5e8d2ed

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 dcd7cf8 commit 5e8d2ed

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
@@ -141,7 +141,7 @@ static inline int ompi_win_invalid(ompi_win_t *win) {
141141
}
142142

143143
static inline int ompi_win_peer_invalid(ompi_win_t *win, int peer) {
144-
if (win->w_group->grp_proc_count <= peer) return true;
144+
if (win->w_group->grp_proc_count <= peer || peer < 0) return true;
145145
return false;
146146
}
147147

0 commit comments

Comments
 (0)