1
1

Change the default value of mpi_leave_pinned to -1, meaning that we'll

figure it out at runtime (really meaning: we'll still default to "0"
unless something explicitly overrides to 1, such as the openib BTL).
This way, ompi_info doesn't confusingly report mpi_leave_pinned==0 for
mpi_leave_pinned, but we end up running with mpi_leave_pinned==1.

Fixes trac:1502.

This commit was SVN r19571.

The following Trac tickets were found above:
  Ticket 1502 --> https://svn.open-mpi.org/trac/ompi/ticket/1502
Этот коммит содержится в:
Jeff Squyres 2008-09-16 22:06:14 +00:00
родитель 351c3a3a86
Коммит d2d06008a0
6 изменённых файлов: 15 добавлений и 17 удалений

Просмотреть файл

@ -854,7 +854,7 @@ static void device_destruct(mca_btl_openib_device_t *device)
OBJ_DESTRUCT(&device->device_lock);
if (ibv_close_device(device->ib_dev_context)) {
if (ompi_mpi_leave_pinned || ompi_mpi_leave_pinned_pipeline) {
if (1 == ompi_mpi_leave_pinned || ompi_mpi_leave_pinned_pipeline) {
BTL_VERBOSE(("Warning! Failed to close device"));
goto device_error;
} else {
@ -1988,8 +1988,8 @@ btl_openib_component_init(int *num_btl_modules,
goto no_btls;
}
/* If we have a memory manager available, unless the user
explicitly set mpi_leave_pinned==0 or
/* If we have a memory manager available, and
mpi_leave_pinned==-1, then unless the user explicitly set
mpi_leave_pinned_pipeline==0, then set mpi_leave_pinned to 1.
We have a memory manager if:
@ -2004,11 +2004,8 @@ btl_openib_component_init(int *num_btl_modules,
index = mca_base_param_find("mpi", NULL, "leave_pinned");
if (index >= 0) {
if (OPAL_SUCCESS == mca_base_param_lookup_int(index, &value) &&
OPAL_SUCCESS == mca_base_param_lookup_source(index, &source,
NULL)) {
if (0 == value && MCA_BASE_PARAM_SOURCE_DEFAULT == source) {
++ret;
}
-1 == value) {
++ret;
}
}
index = mca_base_param_find("mpi", NULL, "leave_pinned_pipeline");

Просмотреть файл

@ -116,7 +116,7 @@ mca_mpool_base_module_t* mca_mpool_base_module_create(
enabled (note that either of these leave_pinned variables
may have been set by a user MCA param or elsewhere in the
code base) */
if (ompi_mpi_leave_pinned || ompi_mpi_leave_pinned_pipeline) {
if (1 == ompi_mpi_leave_pinned || ompi_mpi_leave_pinned_pipeline) {
use_mem_hooks = 1;
}

Просмотреть файл

@ -73,7 +73,7 @@ void mca_mpool_rdma_module_init(mca_mpool_rdma_module_t* mpool)
ompi_mpi_leave_pinned* may have been set after MCA params were
read (e.g., by the openib btl) */
mca_mpool_rdma_component.leave_pinned = (int)
(ompi_mpi_leave_pinned || ompi_mpi_leave_pinned_pipeline);
(1 == ompi_mpi_leave_pinned || ompi_mpi_leave_pinned_pipeline);
}
static inline int dereg_mem(mca_mpool_base_module_t *mpool,

Просмотреть файл

@ -173,7 +173,7 @@ mca_pml_ob1_component_init( int* priority,
/* Set this here (vs in component_open()) because
ompi_mpi_leave_pinned* may have been set after MCA params were
read (e.g., by the openib btl) */
mca_pml_ob1.leave_pinned = ompi_mpi_leave_pinned;
mca_pml_ob1.leave_pinned = (1 == ompi_mpi_leave_pinned);
mca_pml_ob1.leave_pinned_pipeline = (int) ompi_mpi_leave_pinned_pipeline;
return &mca_pml_ob1.super;

Просмотреть файл

@ -53,7 +53,7 @@ bool ompi_mpi_abort_print_stack = false;
int ompi_mpi_abort_delay = 0;
bool ompi_mpi_keep_peer_hostnames = true;
bool ompi_mpi_keep_fqdn_hostnames = false;
bool ompi_mpi_leave_pinned = false;
int ompi_mpi_leave_pinned = -1;
bool ompi_mpi_leave_pinned_pipeline = false;
bool ompi_have_sparse_group_storage = OPAL_INT_TO_BOOL(OMPI_GROUP_SPARSE);
bool ompi_use_sparse_group_storage = OPAL_INT_TO_BOOL(OMPI_GROUP_SPARSE);
@ -251,10 +251,10 @@ int ompi_mpi_register_params(void)
/* Leave pinned parameter */
mca_base_param_reg_int_name("mpi", "leave_pinned",
"Whether to use the \"leave pinned\" protocol or not. Enabling this setting can help bandwidth performance when repeatedly sending and receiving large messages with the same buffers over RDMA-based networks.",
"Whether to use the \"leave pinned\" protocol or not. Enabling this setting can help bandwidth performance when repeatedly sending and receiving large messages with the same buffers over RDMA-based networks (0 = do not use \"leave pinned\" protocol, 1 = use \"leave pinned\" protocol, -1 = allow network to choose at runtime).",
false, false,
(int) ompi_mpi_leave_pinned, &value);
ompi_mpi_leave_pinned = OPAL_INT_TO_BOOL(value);
ompi_mpi_leave_pinned, &value);
ompi_mpi_leave_pinned = value;
mca_base_param_reg_int_name("mpi", "leave_pinned_pipeline",
"Whether to use the \"leave pinned pipeline\" protocol or not.",

Просмотреть файл

@ -125,9 +125,10 @@ OMPI_DECLSPEC extern bool ompi_mpi_abort_print_stack;
OMPI_DECLSPEC extern int ompi_mpi_abort_delay;
/**
* Whether to use the "leave pinned" protocol or not.
* Whether to use the "leave pinned" protocol or not (0 = no, 1 = yes,
* -1 = determine at runtime).
*/
OMPI_DECLSPEC extern bool ompi_mpi_leave_pinned;
OMPI_DECLSPEC extern int ompi_mpi_leave_pinned;
/**
* Whether to use the "leave pinned pipeline" protocol or not.