diff --git a/src/mpi/coll/src/csel.c b/src/mpi/coll/src/csel.c index 4422c78dea0..016c8e18a35 100644 --- a/src/mpi/coll/src/csel.c +++ b/src/mpi/coll/src/csel.c @@ -643,14 +643,14 @@ static csel_node_s *prune_tree(csel_node_s * root, MPIR_Comm * comm_ptr) else node = node->success; break; - +/* case CSEL_NODE_TYPE__OPERATOR__COMM_HIERARCHY: if (comm_ptr->hierarchy_kind == node->u.comm_hierarchy.val) node = node->success; else node = node->failure; break; - +*/ case CSEL_NODE_TYPE__OPERATOR__IS_NODE_CONSECUTIVE: if (MPII_Comm_is_node_consecutive(comm_ptr) == node->u.is_node_consecutive.val) node = node->success; @@ -1188,6 +1188,7 @@ void *MPIR_Csel_search(void *csel_, MPIR_Csel_coll_sig_s coll_info) csel_s *csel = (csel_s *) csel_; csel_node_s *node = NULL; MPIR_Comm *comm_ptr = coll_info.comm_ptr; + int coll_group = coll_info.coll_group; MPIR_Assert(csel_); @@ -1349,7 +1350,8 @@ void *MPIR_Csel_search(void *csel_, MPIR_Csel_coll_sig_s coll_info) break; case CSEL_NODE_TYPE__OPERATOR__COMM_HIERARCHY: - if (coll_info.comm_ptr->hierarchy_kind == node->u.comm_hierarchy.val) + if (node->u.comm_hierarchy.val == MPIR_COMM_HIERARCHY_KIND__PARENT && + MPIR_Comm_is_parent_comm(comm_ptr, coll_group)) node = node->success; else node = node->failure;