if mpi_leave_pinned is enabled - force malloc hooks
This commit was SVN r7491.
Этот коммит содержится в:
родитель
5eec949138
Коммит
848f12e7fd
@ -52,22 +52,25 @@ opal_list_t mca_mpool_base_modules;
|
||||
*/
|
||||
int mca_mpool_base_open(void)
|
||||
{
|
||||
/* Open up all available components - and populate the
|
||||
mca_mpool_base_components list */
|
||||
/* Open up all available components - and populate the
|
||||
mca_mpool_base_components list */
|
||||
|
||||
if (OMPI_SUCCESS !=
|
||||
mca_base_components_open("mpool", 0, mca_mpool_base_static_components,
|
||||
if (OMPI_SUCCESS !=
|
||||
mca_base_components_open("mpool", 0, mca_mpool_base_static_components,
|
||||
&mca_mpool_base_components, true)) {
|
||||
return OMPI_ERROR;
|
||||
}
|
||||
return OMPI_ERROR;
|
||||
}
|
||||
|
||||
/* Initialize the list so that in mca_mpool_base_close(), we can
|
||||
iterate over it (even if it's empty, as in the case of
|
||||
ompi_info) */
|
||||
/* Initialize the list so that in mca_mpool_base_close(), we can
|
||||
iterate over it (even if it's empty, as in the case of ompi_info) */
|
||||
|
||||
OBJ_CONSTRUCT(&mca_mpool_base_modules, opal_list_t);
|
||||
OBJ_CONSTRUCT(&mca_mpool_base_modules, opal_list_t);
|
||||
|
||||
mca_base_param_reg_int_name("mpool_base",
|
||||
/*
|
||||
* check for use_mem_hooks (for diagnostics/testing)
|
||||
* however if leave_pinned is set we force this to be enabled
|
||||
*/
|
||||
mca_base_param_reg_int_name("mpool_base",
|
||||
"use_mem_hooks",
|
||||
"use memory hooks for deregistering freed memory",
|
||||
false,
|
||||
@ -75,8 +78,12 @@ int mca_mpool_base_open(void)
|
||||
0,
|
||||
&mca_mpool_base_use_mem_hooks);
|
||||
|
||||
/* All done */
|
||||
|
||||
return OMPI_SUCCESS;
|
||||
if(0 == mca_mpool_base_use_mem_hooks) {
|
||||
int param;
|
||||
mca_base_param_register_int("mpi", NULL, "leave_pinned", "leave_pinned", 0);
|
||||
param = mca_base_param_find("mpi", NULL, "leave_pinned");
|
||||
mca_base_param_lookup_int(param, &mca_mpool_base_use_mem_hooks);
|
||||
}
|
||||
return OMPI_SUCCESS;
|
||||
}
|
||||
|
||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user