From 705f8ec105c944f6ef6f6ca42dee668aa2295ff8 Mon Sep 17 00:00:00 2001 From: gkatev Date: Wed, 8 Jun 2022 17:06:21 +0300 Subject: [PATCH] coll/HAN: Don't DQ HAN dynamic @ intra-node subcomm + typo fixes Signed-off-by: George Katevenis --- ompi/mca/coll/han/coll_han_allreduce.c | 4 ++-- ompi/mca/coll/han/coll_han_module.c | 18 +++++++++++------- 2 files changed, 13 insertions(+), 9 deletions(-) diff --git a/ompi/mca/coll/han/coll_han_allreduce.c b/ompi/mca/coll/han/coll_han_allreduce.c index 4d5c887bc1b..951575ffe1b 100644 --- a/ompi/mca/coll/han/coll_han_allreduce.c +++ b/ompi/mca/coll/han/coll_han_allreduce.c @@ -110,7 +110,7 @@ mca_coll_han_allreduce_intra(const void *sbuf, /* HAN cannot work with this communicator so fallback on all collectives */ HAN_LOAD_FALLBACK_COLLECTIVES(han_module, comm); return comm->c_coll->coll_allreduce(sbuf, rbuf, count, dtype, op, - comm, comm->c_coll->coll_reduce_module); + comm, comm->c_coll->coll_allreduce_module); } ptrdiff_t extent, lb; @@ -444,7 +444,7 @@ mca_coll_han_allreduce_intra_simple(const void *sbuf, /* HAN cannot work with this communicator so fallback on all collectives */ HAN_LOAD_FALLBACK_COLLECTIVES(han_module, comm); return comm->c_coll->coll_allreduce(sbuf, rbuf, count, dtype, op, - comm, comm->c_coll->coll_reduce_module); + comm, comm->c_coll->coll_allreduce_module); } low_comm = han_module->sub_comm[INTRA_NODE]; diff --git a/ompi/mca/coll/han/coll_han_module.c b/ompi/mca/coll/han/coll_han_module.c index 11e5ced5529..f8116c1d27c 100644 --- a/ompi/mca/coll/han/coll_han_module.c +++ b/ompi/mca/coll/han/coll_han_module.c @@ -199,13 +199,6 @@ mca_coll_han_comm_query(struct ompi_communicator_t * comm, int *priority) ompi_comm_print_cid(comm), comm->c_name); return NULL; } - if( !ompi_group_have_remote_peers(comm->c_local_group) ) { - /* The group only contains local processes. Disable HAN for now */ - opal_output_verbose(10, ompi_coll_base_framework.framework_output, - "coll:han:comm_query (%s/%s): comm has only local processes; disqualifying myself", - ompi_comm_print_cid(comm), comm->c_name); - return NULL; - } /* Get the priority level attached to this module. If priority is less * than or equal to 0, then the module is unavailable. */ *priority = mca_coll_han_component.han_priority; @@ -240,6 +233,17 @@ mca_coll_han_comm_query(struct ompi_communicator_t * comm, int *priority) } } + if( !ompi_group_have_remote_peers(comm->c_local_group) + && INTRA_NODE != han_module->topologic_level ) { + /* The group only contains local processes, and this is not a + * intra-node subcomm we created. Disable HAN for now */ + opal_output_verbose(10, ompi_coll_base_framework.framework_output, + "coll:han:comm_query (%s/%s): comm has only local processes; disqualifying myself", + ompi_comm_print_cid(comm), comm->c_name); + OBJ_RELEASE(han_module); + return NULL; + } + han_module->super.coll_module_enable = han_module_enable; han_module->super.coll_alltoall = NULL; han_module->super.coll_alltoallv = NULL;