Fixing the OpenIB receive queue selection logic. Refs trac:4816
This commit was SVN r32350. The following Trac tickets were found above: Ticket 4816 --> https://svn.open-mpi.org/trac/ompi/ticket/4816
Этот коммит содержится в:
родитель
10a58992af
Коммит
da286d9a84
@ -512,8 +512,9 @@ static int mca_btl_openib_tune_endpoint(mca_btl_openib_module_t* openib_btl,
|
||||
if a user distributes different INI files or parameters for different node/procs,
|
||||
it is on his own responsibility */
|
||||
switch(mca_btl_openib_component.receive_queues_source) {
|
||||
case BTL_OPENIB_RQ_SOURCE_MCA:
|
||||
case BTL_OPENIB_RQ_SOURCE_MAX:
|
||||
case MCA_BASE_VAR_SOURCE_COMMAND_LINE:
|
||||
case MCA_BASE_VAR_SOURCE_ENV:
|
||||
case MCA_BASE_VAR_SOURCE_MAX:
|
||||
break;
|
||||
|
||||
/* If the queues configuration was set from command line
|
||||
@ -523,7 +524,9 @@ static int mca_btl_openib_tune_endpoint(mca_btl_openib_module_t* openib_btl,
|
||||
not possible that remote side got its queues configuration from command line =>
|
||||
(by prio) the configuration was set from INI file or (if not configure)
|
||||
by default queues configuration */
|
||||
case BTL_OPENIB_RQ_SOURCE_DEVICE_INI:
|
||||
case MCA_BASE_VAR_SOURCE_FILE:
|
||||
case MCA_BASE_VAR_SOURCE_SET:
|
||||
case MCA_BASE_VAR_SOURCE_OVERRIDE:
|
||||
if(NULL != values.receive_queues) {
|
||||
recv_qps = values.receive_queues;
|
||||
} else {
|
||||
@ -551,7 +554,7 @@ static int mca_btl_openib_tune_endpoint(mca_btl_openib_module_t* openib_btl,
|
||||
|
||||
/* If the local queues configuration was set
|
||||
by default queues => check all possible cases for remote side and compare */
|
||||
case BTL_OPENIB_RQ_SOURCE_DEFAULT:
|
||||
case MCA_BASE_VAR_SOURCE_DEFAULT:
|
||||
if(NULL != values.receive_queues) {
|
||||
if(0 != strcmp(mca_btl_openib_component.receive_queues,
|
||||
values.receive_queues)) {
|
||||
|
@ -253,7 +253,7 @@ struct mca_btl_openib_component_t {
|
||||
/* MCA param btl_openib_receive_queues */
|
||||
char *receive_queues;
|
||||
/* Whether we got a non-default value of btl_openib_receive_queues */
|
||||
btl_openib_receive_queues_source_t receive_queues_source;
|
||||
mca_base_var_source_t receive_queues_source;
|
||||
|
||||
/** Colon-delimited list of filenames for device parameters */
|
||||
char *device_params_file_names;
|
||||
|
@ -1936,7 +1936,8 @@ static int init_one_device(opal_list_t *btl_list, struct ibv_device* ib_dev)
|
||||
*/
|
||||
|
||||
/* If the MCA param was specified, skip all the checks */
|
||||
if (BTL_OPENIB_RQ_SOURCE_MCA ==
|
||||
if ( MCA_BASE_VAR_SOURCE_COMMAND_LINE ||
|
||||
MCA_BASE_VAR_SOURCE_ENV ==
|
||||
mca_btl_openib_component.receive_queues_source) {
|
||||
goto good;
|
||||
}
|
||||
@ -1955,7 +1956,7 @@ static int init_one_device(opal_list_t *btl_list, struct ibv_device* ib_dev)
|
||||
mca_btl_openib_component.receive_queues =
|
||||
strdup(values.receive_queues);
|
||||
mca_btl_openib_component.receive_queues_source =
|
||||
BTL_OPENIB_RQ_SOURCE_DEVICE_INI;
|
||||
MCA_BASE_VAR_SOURCE_FILE;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -222,7 +222,8 @@ int btl_openib_register_mca_params(void)
|
||||
char default_qps[100];
|
||||
uint32_t mid_qp_size;
|
||||
char *msg, *str;
|
||||
int ret, tmp;
|
||||
int ret, tmp, index;
|
||||
mca_base_var_source_t source;
|
||||
|
||||
ret = OPAL_SUCCESS;
|
||||
#define CHECK(expr) do {\
|
||||
@ -662,11 +663,18 @@ int btl_openib_register_mca_params(void)
|
||||
CHECK(reg_string("receive_queues", NULL,
|
||||
"Colon-delimited, comma-delimited list of receive queues: P,4096,8,6,4:P,32768,8,6,4",
|
||||
default_qps, &mca_btl_openib_component.receive_queues,
|
||||
0));
|
||||
mca_btl_openib_component.receive_queues_source =
|
||||
(0 == strcmp(default_qps,
|
||||
mca_btl_openib_component.receive_queues)) ?
|
||||
BTL_OPENIB_RQ_SOURCE_DEFAULT : BTL_OPENIB_RQ_SOURCE_MCA;
|
||||
0
|
||||
));
|
||||
index = mca_base_var_find("opal","btl","openib","receive_queues");
|
||||
if (index >= 0) {
|
||||
if (OPAL_SUCCESS != (ret = mca_base_var_get_value(index, NULL, &source, NULL))) {
|
||||
BTL_ERROR(("mca_base_var_get_value failed to get value for receive_queues: %s:%d",
|
||||
__FILE__, __LINE__));
|
||||
return ret;
|
||||
} else {
|
||||
mca_btl_openib_component.receive_queues_source = source;
|
||||
}
|
||||
}
|
||||
|
||||
CHECK(reg_string("if_include", NULL,
|
||||
"Comma-delimited list of devices/ports to be used (e.g. \"mthca0,mthca1:2\"; empty value means to use all ports found). Mutually exclusive with btl_openib_if_exclude.",
|
||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user