Fixed the case where a device does not support inline data. Redefined the interpretation of max_inline_data MCA parameter.
* If max_inline_data == -1 perform runtime detection * If max_inline_data >=0 use the value provided * If the user does not explicitly set this via command line, use the value from INI file This commit fixes trac:1662 This commit was SVN r19995. The following Trac tickets were found above: Ticket 1662 --> https://svn.open-mpi.org/trac/ompi/ticket/1662
Этот коммит содержится в:
родитель
875741a5e3
Коммит
e4bdaac6d8
@ -1542,15 +1542,36 @@ static int init_one_device(opal_list_t *btl_list, struct ibv_device* ib_dev)
|
||||
/* Figure out what the max_inline_data value should be for all
|
||||
ports and QPs on this device */
|
||||
need_search = false;
|
||||
if (0 == mca_btl_openib_component.ib_max_inline_data) {
|
||||
need_search = true;
|
||||
} else if (mca_btl_openib_component.ib_max_inline_data > 0) {
|
||||
device->max_inline_data = mca_btl_openib_component.ib_max_inline_data;
|
||||
} else if (values.max_inline_data_set) {
|
||||
if (0 == values.max_inline_data) {
|
||||
if(-2 != mca_btl_openib_component.ib_max_inline_data) {
|
||||
/* User has explicitly set btl_openib_max_inline_data MCA parameter
|
||||
Per setup in _mca.c, we know that the MCA param value is guaranteed
|
||||
to be >= -1 */
|
||||
if (-1 == mca_btl_openib_component.ib_max_inline_data) {
|
||||
need_search = true;
|
||||
} else if (values.max_inline_data > 0) {
|
||||
device->max_inline_data = values.max_inline_data;
|
||||
} else {
|
||||
device->max_inline_data = (uint32_t)
|
||||
mca_btl_openib_component.ib_max_inline_data;
|
||||
}
|
||||
} else if (values.max_inline_data_set) {
|
||||
if (-1 == values.max_inline_data) {
|
||||
need_search = true;
|
||||
} else if (values.max_inline_data >= 0) {
|
||||
device->max_inline_data = (uint32_t) values.max_inline_data;
|
||||
} else {
|
||||
if(default_values.max_inline_data_set &&
|
||||
default_values.max_inline_data >= -1) {
|
||||
BTL_ERROR(("Invalid max_inline_data value specified "
|
||||
"in INI file (%d); using default value (%d)",
|
||||
values.max_inline_data,
|
||||
default_values.max_inline_data));
|
||||
device->max_inline_data = (uint32_t)
|
||||
default_values.max_inline_data;
|
||||
} else {
|
||||
BTL_ERROR(("Invalid max_inline_data value specified "
|
||||
"in INI file (%d)", values.max_inline_data));
|
||||
ret = OMPI_ERR_BAD_PARAM;
|
||||
goto error;
|
||||
}
|
||||
}
|
||||
}
|
||||
/* Horrible. :-( Per the thread starting here:
|
||||
@ -2098,6 +2119,19 @@ btl_openib_component_init(int *num_btl_modules,
|
||||
ompi_mpi_leave_pinned_pipeline = 0;
|
||||
}
|
||||
}
|
||||
index = mca_base_param_find("btl", "openib", "max_inline_data");
|
||||
if (index >= 0) {
|
||||
if (OPAL_SUCCESS == mca_base_param_lookup_source(index, &source,
|
||||
NULL)) {
|
||||
if (-1 == mca_btl_openib_component.ib_max_inline_data &&
|
||||
MCA_BASE_PARAM_SOURCE_DEFAULT == source) {
|
||||
/* If the user has not explicitly set this MCA parameter
|
||||
use max_inline_data value specified in the
|
||||
device-specific parameters INI file */
|
||||
mca_btl_openib_component.ib_max_inline_data = -2;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
OBJ_CONSTRUCT(&mca_btl_openib_component.send_free_coalesced, ompi_free_list_t);
|
||||
OBJ_CONSTRUCT(&mca_btl_openib_component.send_user_free, ompi_free_list_t);
|
||||
|
@ -397,7 +397,7 @@ static int parse_line(parsed_section_values_t *sv)
|
||||
|
||||
else if (0 == strcasecmp(key_buffer, "max_inline_data")) {
|
||||
/* Single value */
|
||||
sv->values.max_inline_data = (uint32_t) ompi_btl_openib_ini_intify(value);
|
||||
sv->values.max_inline_data = (int32_t) ompi_btl_openib_ini_intify(value);
|
||||
sv->values.max_inline_data_set = true;
|
||||
}
|
||||
|
||||
|
@ -29,7 +29,7 @@ typedef struct ompi_btl_openib_ini_values_t {
|
||||
|
||||
char *receive_queues;
|
||||
|
||||
uint32_t max_inline_data;
|
||||
int32_t max_inline_data;
|
||||
bool max_inline_data_set;
|
||||
} ompi_btl_openib_ini_values_t;
|
||||
|
||||
|
@ -270,9 +270,10 @@ int btl_openib_register_mca_params(void)
|
||||
|
||||
CHECK(reg_int("max_inline_data", "ib_max_inline_data",
|
||||
"Maximum size of inline data segment "
|
||||
"(-1 = use device default, "
|
||||
"0 = run-time probe to discover max value, "
|
||||
"otherwise must be >= 1)",
|
||||
"(-1 = run-time probe to discover max value, "
|
||||
"otherwise must be >= 0). "
|
||||
"If not explicitly set, use max_inline_data from "
|
||||
"the INI file containing device-specific parameters",
|
||||
-1, &ival, REGINT_NEG_ONE_OK | REGINT_GE_ZERO));
|
||||
mca_btl_openib_component.ib_max_inline_data = (int32_t) ival;
|
||||
|
||||
|
@ -87,7 +87,7 @@
|
||||
# receive_queues = P,128,256,192,128:S,65536,256,192,128
|
||||
|
||||
# max_inline_data: an integer specifying the maximum inline data (in
|
||||
# bytes) supported by the device. 0 means to use a run-time probe to
|
||||
# bytes) supported by the device. -1 means to use a run-time probe to
|
||||
# figure out the maximum value supported by the device.
|
||||
|
||||
# max_inline_data = 1024
|
||||
@ -151,6 +151,7 @@ vendor_part_id = 0
|
||||
use_eager_rdma = 1
|
||||
mtu = 2048
|
||||
receive_queues = P,128,256,192,128:P,65536,256,192,128
|
||||
max_inline_data = 0
|
||||
|
||||
############################################################################
|
||||
|
||||
|
Загрузка…
Ссылка в новой задаче
Block a user