From b3a20100d3d31e4937a5b23d012c8ae9b22e0cd3 Mon Sep 17 00:00:00 2001 From: Jeff Hammond Date: Tue, 11 Apr 2017 14:21:06 -0700 Subject: [PATCH] check for negative ranks in ompi_win_peer_invalid resolves #3326 (https://github.com/open-mpi/ompi/issues/3326) Signed-off-by: jeff.r.hammond@intel.com --- ompi/win/win.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ompi/win/win.h b/ompi/win/win.h index ab4af8fc43..bd49bb6927 100644 --- a/ompi/win/win.h +++ b/ompi/win/win.h @@ -162,7 +162,7 @@ static inline int ompi_win_invalid(ompi_win_t *win) { } static inline int ompi_win_peer_invalid(ompi_win_t *win, int peer) { - if (win->w_group->grp_proc_count <= peer) return true; + if (win->w_group->grp_proc_count <= peer || peer < 0) return true; return false; }