- The component will remove itself from the list of potential collective
modules, if its priority is zero (the default value). Reason for that is + if there is no other module with a priority > 0, the hierarchical collective module has a problem anyway, since it has to rely on the coll modules of the subcommunicators. On the other hand, if its priority is zero, it won't be chosen anyway, and we can simply save the allreduce/allgather and comm_split operations which might occur during hierarchy detection. + to improve the startup times until we have the modex thing which we discussed with Jeff and Tim in Knoxville in place - adding an mca parameter indicating a symmetric configuration. This can speed up startup times, since each process can conclude from its data onto the data of the other processes -> no need for the allreduce operations. Per default this parameter is set to "no". This commit was SVN r7932.
Этот коммит содержится в:
родитель
acc54c6381
Коммит
2ec5fa5d24
@ -138,19 +138,33 @@ mca_coll_hierarch_comm_query(struct ompi_communicator_t *comm, int *priority,
|
||||
int level;
|
||||
int ret=OMPI_SUCCESS;
|
||||
int ignore_sm=0;
|
||||
|
||||
/* Get the priority level attached to this module */
|
||||
*priority = mca_coll_hierarch_priority_param;
|
||||
int symmetric=0;
|
||||
|
||||
/* This module only works for intra-communicators at the moment */
|
||||
if ( OMPI_COMM_IS_INTER(comm) ) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
/* Get the priority level attached to this module. If priority = 0,
|
||||
we assume that we won't be chosen anyway, so we quit and improve
|
||||
therefore the startup time. */
|
||||
*priority = mca_coll_hierarch_priority_param;
|
||||
if ( 0 >= mca_coll_hierarch_priority_param ) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/* Check whether we should ignore sm. This might be necessary to take advantage
|
||||
of the some ib or gm collectives. */
|
||||
ignore_sm = mca_coll_hierarch_ignore_sm_param;
|
||||
|
||||
|
||||
/* Check whether we can assume a symmetric configuration. This can save commmunication
|
||||
and improve the startup time, since we can conclude from our configuration onto
|
||||
the configuration of every other process.
|
||||
*/
|
||||
symmetric = mca_coll_hierarch_symmetric_param;
|
||||
|
||||
size = ompi_comm_size(comm);
|
||||
|
||||
if ( size < 3 ) {
|
||||
@ -193,11 +207,16 @@ mca_coll_hierarch_comm_query(struct ompi_communicator_t *comm, int *priority,
|
||||
that this might be the best solution. These functions emulate an
|
||||
allreduce and an allgather.
|
||||
*/
|
||||
ret = mca_coll_hierarch_allreduce_tmp (&ncount, &maxncount, 1, MPI_INT,
|
||||
MPI_MAX, comm );
|
||||
if ( OMPI_SUCCESS != ret ) {
|
||||
return NULL;
|
||||
}
|
||||
if ( symmetric ) {
|
||||
maxncount = ncount;
|
||||
}
|
||||
else {
|
||||
ret = mca_coll_hierarch_allreduce_tmp (&ncount, &maxncount, 1, MPI_INT,
|
||||
MPI_MAX, comm );
|
||||
if ( OMPI_SUCCESS != ret ) {
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
|
||||
if ( 0 == maxncount ) {
|
||||
if ( mca_coll_hierarch_verbose_param ) {
|
||||
|
@ -37,6 +37,7 @@ extern int mca_coll_hierarch_priority_param;
|
||||
extern int mca_coll_hierarch_verbose_param;
|
||||
extern int mca_coll_hierarch_use_rdma_param;
|
||||
extern int mca_coll_hierarch_ignore_sm_param;
|
||||
extern int mca_coll_hierarch_symmetric_param;
|
||||
|
||||
|
||||
#define HIER_DEFAULT_NUM_LLEAD 5
|
||||
|
@ -39,6 +39,7 @@ int mca_coll_hierarch_priority_param = 0;
|
||||
int mca_coll_hierarch_verbose_param = 0;
|
||||
int mca_coll_hierarch_use_rdma_param=0;
|
||||
int mca_coll_hierarch_ignore_sm_param=0;
|
||||
int mca_coll_hierarch_symmetric_param=0;
|
||||
|
||||
|
||||
/*
|
||||
@ -122,6 +123,11 @@ static int hierarch_open(void)
|
||||
false, false, mca_coll_hierarch_ignore_sm_param,
|
||||
&mca_coll_hierarch_ignore_sm_param);
|
||||
|
||||
mca_base_param_reg_int(&mca_coll_hierarch_component.collm_version,
|
||||
"symmetric",
|
||||
"Assume symmetric configuration",
|
||||
false, false, mca_coll_hierarch_symmetric_param,
|
||||
&mca_coll_hierarch_symmetric_param);
|
||||
|
||||
return OMPI_SUCCESS;
|
||||
}
|
||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user