From e690521cdd4660a0ec3c5e1e5b72df11b44fbe0a Mon Sep 17 00:00:00 2001 From: Igor Ivanov Date: Fri, 18 Mar 2016 19:00:43 +0200 Subject: [PATCH] oshmem/scoll: Fix bug in basic/barrier algorithm --- oshmem/mca/scoll/basic/scoll_basic_barrier.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/oshmem/mca/scoll/basic/scoll_basic_barrier.c b/oshmem/mca/scoll/basic/scoll_basic_barrier.c index 3ce89def81..bf51dc82aa 100644 --- a/oshmem/mca/scoll/basic/scoll_basic_barrier.c +++ b/oshmem/mca/scoll/basic/scoll_basic_barrier.c @@ -559,9 +559,10 @@ static int _algorithm_adaptive(struct oshmem_group_t *group, long *pSync) /* check if we have only local peers */ { int i = 0; + int my_id = oshmem_proc_group_find_id(group, group->my_pe); for (i = 0; i < group->proc_count; i++) { - if (i == group->id) + if (i == my_id) continue; if (!OPAL_PROC_ON_LOCAL_NODE(group->proc_array[i]->super.proc_flags)) {