Skip to content

Commit 31953c1

Browse files
authored
Merge pull request #10458 from gkatev/main
coll/HAN: Don't DQ HAN dynamic @ intra-node subcomm + typo fixes
2 parents a5cef90 + 705f8ec commit 31953c1

File tree

2 files changed

+13
-9
lines changed

2 files changed

+13
-9
lines changed

ompi/mca/coll/han/coll_han_allreduce.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ mca_coll_han_allreduce_intra(const void *sbuf,
110110
/* HAN cannot work with this communicator so fallback on all collectives */
111111
HAN_LOAD_FALLBACK_COLLECTIVES(han_module, comm);
112112
return comm->c_coll->coll_allreduce(sbuf, rbuf, count, dtype, op,
113-
comm, comm->c_coll->coll_reduce_module);
113+
comm, comm->c_coll->coll_allreduce_module);
114114
}
115115

116116
ptrdiff_t extent, lb;
@@ -444,7 +444,7 @@ mca_coll_han_allreduce_intra_simple(const void *sbuf,
444444
/* HAN cannot work with this communicator so fallback on all collectives */
445445
HAN_LOAD_FALLBACK_COLLECTIVES(han_module, comm);
446446
return comm->c_coll->coll_allreduce(sbuf, rbuf, count, dtype, op,
447-
comm, comm->c_coll->coll_reduce_module);
447+
comm, comm->c_coll->coll_allreduce_module);
448448
}
449449

450450
low_comm = han_module->sub_comm[INTRA_NODE];

ompi/mca/coll/han/coll_han_module.c

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -199,13 +199,6 @@ mca_coll_han_comm_query(struct ompi_communicator_t * comm, int *priority)
199199
ompi_comm_print_cid(comm), comm->c_name);
200200
return NULL;
201201
}
202-
if( !ompi_group_have_remote_peers(comm->c_local_group) ) {
203-
/* The group only contains local processes. Disable HAN for now */
204-
opal_output_verbose(10, ompi_coll_base_framework.framework_output,
205-
"coll:han:comm_query (%s/%s): comm has only local processes; disqualifying myself",
206-
ompi_comm_print_cid(comm), comm->c_name);
207-
return NULL;
208-
}
209202
/* Get the priority level attached to this module. If priority is less
210203
* than or equal to 0, then the module is unavailable. */
211204
*priority = mca_coll_han_component.han_priority;
@@ -240,6 +233,17 @@ mca_coll_han_comm_query(struct ompi_communicator_t * comm, int *priority)
240233
}
241234
}
242235

236+
if( !ompi_group_have_remote_peers(comm->c_local_group)
237+
&& INTRA_NODE != han_module->topologic_level ) {
238+
/* The group only contains local processes, and this is not a
239+
* intra-node subcomm we created. Disable HAN for now */
240+
opal_output_verbose(10, ompi_coll_base_framework.framework_output,
241+
"coll:han:comm_query (%s/%s): comm has only local processes; disqualifying myself",
242+
ompi_comm_print_cid(comm), comm->c_name);
243+
OBJ_RELEASE(han_module);
244+
return NULL;
245+
}
246+
243247
han_module->super.coll_module_enable = han_module_enable;
244248
han_module->super.coll_alltoall = NULL;
245249
han_module->super.coll_alltoallv = NULL;

0 commit comments

Comments
 (0)