Skip to content

Commit 6886c12

Browse files
Merge pull request #3327 from jeffhammond/fix-issue-3326
check for negative ranks in ompi_win_peer_invalid
2 parents f1403ac + b3a2010 commit 6886c12

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)