- Eliminate some unused base globals
- Move one base global to the basic component and make it an MCA parameter - Convert the basic component to use the new MCA param API This commit was SVN r7598.
Этот коммит содержится в:
родитель
57fb96b018
Коммит
2cedfeec53
@ -213,27 +213,6 @@ OMPI_DECLSPEC extern int mca_coll_base_param;
|
||||
*/
|
||||
OMPI_DECLSPEC extern int mca_coll_base_output;
|
||||
|
||||
/**
|
||||
* JMS should this move to the basic component?
|
||||
*/
|
||||
OMPI_DECLSPEC extern int mca_coll_base_crossover;
|
||||
/**
|
||||
* JMS should this move to the basic component?
|
||||
*/
|
||||
OMPI_DECLSPEC extern int mca_coll_base_associative;
|
||||
/**
|
||||
* JMS should this move to the basic component?
|
||||
*/
|
||||
OMPI_DECLSPEC extern int mca_coll_base_reduce_crossover;
|
||||
/**
|
||||
* JMS should this move to the basic component?
|
||||
*/
|
||||
OMPI_DECLSPEC extern int mca_coll_base_bcast_collmaxlin;
|
||||
/**
|
||||
* JMS should this move to the basic component?
|
||||
*/
|
||||
OMPI_DECLSPEC extern int mca_coll_base_bcast_collmaxdim;
|
||||
|
||||
/**
|
||||
* Indicator as to whether the list of opened coll components is valid or
|
||||
* not.
|
||||
|
@ -45,9 +45,6 @@ int mca_coll_base_output = -1;
|
||||
|
||||
int mca_coll_base_crossover = 4;
|
||||
int mca_coll_base_associative = 1;
|
||||
int mca_coll_base_reduce_crossover = 4;
|
||||
int mca_coll_base_bcast_collmaxlin = 4;
|
||||
int mca_coll_base_bcast_collmaxdim = 64;
|
||||
|
||||
bool mca_coll_base_components_opened_valid = false;
|
||||
opal_list_t mca_coll_base_components_opened;
|
||||
|
@ -31,19 +31,12 @@ extern "C"
|
||||
{
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Globally exported variable
|
||||
*/
|
||||
/* Globally exported variables */
|
||||
|
||||
OMPI_COMP_EXPORT extern const mca_coll_base_component_1_0_0_t
|
||||
mca_coll_basic_component;
|
||||
OMPI_COMP_EXPORT extern int mca_coll_basic_priority_param;
|
||||
|
||||
|
||||
/*
|
||||
* coll API functions
|
||||
*/
|
||||
|
||||
OMPI_COMP_EXPORT extern int mca_coll_basic_priority;
|
||||
OMPI_COMP_EXPORT extern int mca_coll_basic_crossover;
|
||||
|
||||
/* API functions */
|
||||
|
||||
|
@ -34,9 +34,10 @@ const char *mca_coll_basic_component_version_string =
|
||||
"Open MPI basic collective MCA component version " OMPI_VERSION;
|
||||
|
||||
/*
|
||||
* Global variable
|
||||
* Global variables
|
||||
*/
|
||||
int mca_coll_basic_priority_param = -1;
|
||||
int mca_coll_basic_priority = 10;
|
||||
int mca_coll_basic_crossover = 4;
|
||||
|
||||
/*
|
||||
* Local function
|
||||
@ -69,14 +70,16 @@ const mca_coll_base_component_1_0_0_t mca_coll_basic_component = {
|
||||
/* Component open and close functions */
|
||||
|
||||
basic_open,
|
||||
NULL},
|
||||
NULL
|
||||
},
|
||||
|
||||
/* Next the MCA v1.0.0 component meta data */
|
||||
|
||||
{
|
||||
/* Whether the component is checkpointable or not */
|
||||
|
||||
true},
|
||||
true
|
||||
},
|
||||
|
||||
/* Initialization / querying functions */
|
||||
|
||||
@ -91,8 +94,16 @@ basic_open(void)
|
||||
{
|
||||
/* Use a low priority, but allow other components to be lower */
|
||||
|
||||
mca_coll_basic_priority_param =
|
||||
mca_base_param_register_int("coll", "basic", "priority", NULL, 10);
|
||||
mca_base_param_reg_int(&mca_coll_basic_component.collm_version,
|
||||
"priority",
|
||||
"Priority of the basic coll component",
|
||||
false, false, mca_coll_basic_priority,
|
||||
&mca_coll_basic_priority);
|
||||
mca_base_param_reg_int(&mca_coll_basic_component.collm_version,
|
||||
"crossover",
|
||||
"Minimum number of processes in a communicator before using the logarithmic algorithms",
|
||||
false, false, mca_coll_basic_crossover,
|
||||
&mca_coll_basic_crossover);
|
||||
|
||||
return OMPI_SUCCESS;
|
||||
}
|
||||
|
@ -145,11 +145,7 @@ const mca_coll_base_module_1_0_0_t *
|
||||
mca_coll_basic_comm_query(struct ompi_communicator_t *comm, int *priority,
|
||||
struct mca_coll_base_comm_t **data)
|
||||
{
|
||||
if (OMPI_SUCCESS !=
|
||||
mca_base_param_lookup_int(mca_coll_basic_priority_param,
|
||||
priority)) {
|
||||
return NULL;
|
||||
}
|
||||
*priority = mca_coll_basic_priority;
|
||||
|
||||
/* Choose whether to use [intra|inter], and [linear|log]-based
|
||||
* algorithms. */
|
||||
@ -157,7 +153,7 @@ mca_coll_basic_comm_query(struct ompi_communicator_t *comm, int *priority,
|
||||
if (OMPI_COMM_IS_INTER(comm)) {
|
||||
return &inter_linear;
|
||||
} else {
|
||||
if (ompi_comm_size(comm) <= mca_coll_base_crossover) {
|
||||
if (ompi_comm_size(comm) <= mca_coll_basic_crossover) {
|
||||
return &intra_linear;
|
||||
} else {
|
||||
return &intra_log;
|
||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user