Merge pull request #5624 from ggouaillardet/topic/misc_finalize_leaks
Plug misc finalize leaks on finalize
Этот коммит содержится в:
Коммит
2707ef5909
@ -14,7 +14,7 @@
|
||||
* Copyright (c) 2009 Sun Microsystems, Inc. All rights reserved.
|
||||
* Copyright (c) 2012-2015 Los Alamos National Security, LLC. All rights
|
||||
* reserved.
|
||||
* Copyright (c) 2015 Research Organization for Information Science
|
||||
* Copyright (c) 2015-2018 Research Organization for Information Science
|
||||
* and Technology (RIST). All rights reserved.
|
||||
* Copyright (c) 2016-2017 IBM Corporation. All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
@ -259,6 +259,9 @@ int ompi_mpiinfo_finalize(void)
|
||||
opal_info_entry_t *entry;
|
||||
bool found = false;
|
||||
|
||||
OBJ_DESTRUCT(&ompi_mpi_info_null);
|
||||
OBJ_DESTRUCT(&ompi_mpi_info_env);
|
||||
|
||||
/* Go through the f2c table and see if anything is left. Free them
|
||||
all. */
|
||||
|
||||
|
@ -1,5 +1,7 @@
|
||||
/*
|
||||
* Copyright (c) 2017 IBM Corporation. All rights reserved.
|
||||
* Copyright (c) 2018 Research Organization for Information Science
|
||||
* and Technology (RIST). All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
@ -119,6 +121,7 @@ static int ompi_hook_base_close( void )
|
||||
if( OMPI_SUCCESS != ret ) {
|
||||
return ret;
|
||||
}
|
||||
OBJ_RELEASE(additional_callback_components);
|
||||
ompi_hook_is_framework_open = false;
|
||||
|
||||
return OMPI_SUCCESS;
|
||||
|
@ -14,7 +14,7 @@
|
||||
* Copyright (c) 2012-2017 Los Alamos National Security, LLC. All rights
|
||||
* reserved.
|
||||
* Copyright (c) 2013-2017 Intel, Inc. All rights reserved
|
||||
* Copyright (c) 2017 Research Organization for Information Science
|
||||
* Copyright (c) 2018 Research Organization for Information Science
|
||||
* and Technology (RIST). All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
@ -277,7 +277,7 @@ ompi_mtl_psm2_component_open(void)
|
||||
|
||||
/* Component available only if Omni-Path hardware is present */
|
||||
res = glob("/dev/hfi1_[0-9]", GLOB_DOOFFS, NULL, &globbuf);
|
||||
if (globbuf.gl_pathc > 0) {
|
||||
if (globbuf.gl_pathc > 0 || GLOB_NOMATCH==res) {
|
||||
globfree(&globbuf);
|
||||
}
|
||||
if (0 != res) {
|
||||
|
@ -16,6 +16,8 @@
|
||||
* reserved.
|
||||
* Copyright (c) 2018 Sandia National Laboratories
|
||||
* All rights reserved.
|
||||
* Copyright (c) 2018 Research Organization for Information Science
|
||||
* and Technology (RIST). All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
@ -321,8 +323,14 @@ int mca_pml_ob1_component_fini(void)
|
||||
if(OMPI_SUCCESS != (rc = mca_bml.bml_finalize()))
|
||||
return rc;
|
||||
|
||||
if(!mca_pml_ob1.enabled)
|
||||
if(!mca_pml_ob1.enabled) {
|
||||
if( NULL != mca_pml_ob1.allocator ) {
|
||||
(void)mca_pml_ob1.allocator->alc_finalize(mca_pml_ob1.allocator);
|
||||
mca_pml_ob1.allocator = NULL;
|
||||
}
|
||||
|
||||
return OMPI_SUCCESS; /* never selected.. return success.. */
|
||||
}
|
||||
mca_pml_ob1.enabled = false; /* not anymore */
|
||||
|
||||
/* return the static receive/send requests to the respective free list and
|
||||
|
@ -15,7 +15,7 @@
|
||||
* Copyright (c) 2010-2018 Los Alamos National Security, LLC. All rights
|
||||
* reserved.
|
||||
* Copyright (c) 2014 NVIDIA Corporation. All rights reserved.
|
||||
* Copyright (c) 2017 Research Organization for Information Science
|
||||
* Copyright (c) 2017-2018 Research Organization for Information Science
|
||||
* and Technology (RIST). All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
@ -237,7 +237,7 @@ static int mca_mpool_memkind_close(void)
|
||||
opal_output_close (mca_mpool_memkind_component.output);
|
||||
mca_mpool_memkind_component.output = -1;
|
||||
|
||||
OBJ_DESTRUCT(&mca_mpool_memkind_component.module_list);
|
||||
OPAL_LIST_DESTRUCT(&mca_mpool_memkind_component.module_list);
|
||||
|
||||
if (mca_mpool_memkind_policy_enum) {
|
||||
OBJ_RELEASE(mca_mpool_memkind_policy_enum);
|
||||
|
@ -4,6 +4,8 @@
|
||||
* Copyright (c) 2015 Los Alamos National Security, LLC. All rights
|
||||
* reserved.
|
||||
* Copyright (c) 2016-2018 Cisco Systems, Inc. All rights reserved
|
||||
* Copyright (c) 2018 Research Organization for Information Science
|
||||
* and Technology (RIST). All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
@ -19,6 +21,7 @@
|
||||
#include "opal/mca/base/base.h"
|
||||
#include "opal/mca/pmix/pmix.h"
|
||||
#include "opal/mca/pmix/base/base.h"
|
||||
#include "opal/util/opal_environ.h"
|
||||
|
||||
/*
|
||||
* Globals
|
||||
@ -33,11 +36,8 @@ int opal_pmix_base_select(void)
|
||||
// value of OPAL's mca_base_component_show_load_errors (i.e., the
|
||||
// bool variable behind Open MPI's mca_component_show_load_errors
|
||||
// MCA param).
|
||||
char *pmix_show_load_errors_env = NULL;
|
||||
asprintf(&pmix_show_load_errors_env,
|
||||
"PMIX_MCA_mca_base_component_show_load_errors=%d",
|
||||
mca_base_component_show_load_errors ? 1 : 0);
|
||||
putenv(pmix_show_load_errors_env);
|
||||
char *pmix_show_load_errors_env = mca_base_component_show_load_errors ? "1" : "0";
|
||||
opal_setenv("PMIX_MCA_mca_base_component_show_load_errors", pmix_show_load_errors_env, true, &environ);
|
||||
|
||||
/*
|
||||
* Select the best component
|
||||
|
@ -1,6 +1,6 @@
|
||||
/*
|
||||
* Copyright (c) 2014-2018 Intel, Inc. All rights reserved.
|
||||
* Copyright (c) 2014-2015 Research Organization for Information Science
|
||||
* Copyright (c) 2014-2018 Research Organization for Information Science
|
||||
* and Technology (RIST). All rights reserved.
|
||||
* Copyright (c) 2016-2018 Cisco Systems, Inc. All rights reserved
|
||||
* $COPYRIGHT$
|
||||
@ -86,6 +86,7 @@ mca_pmix_pmix3x_component_t mca_pmix_pmix3x_component = {
|
||||
static int external_register(void)
|
||||
{
|
||||
mca_base_component_t *component = &mca_pmix_pmix3x_component.super.base_version;
|
||||
char *tmp = NULL;
|
||||
|
||||
mca_pmix_pmix3x_component.silence_warning = false;
|
||||
(void) mca_base_component_var_register (component, "silence_warning",
|
||||
@ -97,6 +98,7 @@ static int external_register(void)
|
||||
|
||||
asprintf(&pmix_library_version,
|
||||
"PMIx library version %s (embedded in Open MPI)", PMIx_Get_version());
|
||||
tmp = pmix_library_version;
|
||||
(void) mca_base_component_var_register(component, "library_version",
|
||||
"Version of the underlying PMIx library",
|
||||
MCA_BASE_VAR_TYPE_STRING,
|
||||
@ -104,6 +106,7 @@ static int external_register(void)
|
||||
OPAL_INFO_LVL_4,
|
||||
MCA_BASE_VAR_SCOPE_CONSTANT,
|
||||
&pmix_library_version);
|
||||
free(tmp);
|
||||
|
||||
return OPAL_SUCCESS;
|
||||
}
|
||||
@ -131,6 +134,7 @@ static int external_close(void)
|
||||
OPAL_LIST_DESTRUCT(&mca_pmix_pmix3x_component.jobids);
|
||||
OPAL_LIST_DESTRUCT(&mca_pmix_pmix3x_component.events);
|
||||
OPAL_LIST_DESTRUCT(&mca_pmix_pmix3x_component.dmdx);
|
||||
|
||||
return OPAL_SUCCESS;
|
||||
}
|
||||
|
||||
|
@ -14,7 +14,7 @@
|
||||
* Copyright (c) 2009 Sun Microsystems, Inc. All rights reserved.
|
||||
* Copyright (c) 2012-2017 Los Alamos National Security, LLC. All rights
|
||||
* reserved.
|
||||
* Copyright (c) 2015 Research Organization for Information Science
|
||||
* Copyright (c) 2015-2018 Research Organization for Information Science
|
||||
* and Technology (RIST). All rights reserved.
|
||||
* Copyright (c) 2016-2018 IBM Corporation. All rights reserved.
|
||||
* Copyright (c) 2017-2018 Intel, Inc. All rights reserved.
|
||||
@ -97,6 +97,10 @@ static void infosubscriber_destruct(opal_infosubscriber_t *obj) {
|
||||
}
|
||||
|
||||
OBJ_DESTRUCT(&obj->s_subscriber_table);
|
||||
|
||||
if (NULL != obj->s_info) {
|
||||
OBJ_RELEASE(obj->s_info);
|
||||
}
|
||||
}
|
||||
|
||||
static void opal_callback_list_item_destruct(opal_callback_list_item_t *obj) {
|
||||
|
@ -859,6 +859,52 @@ static int rte_finalize(void)
|
||||
if (orte_do_not_launch) {
|
||||
exit(0);
|
||||
}
|
||||
|
||||
{
|
||||
opal_pointer_array_t * array = orte_node_topologies;
|
||||
int i;
|
||||
if( array->number_free != array->size ) {
|
||||
OPAL_THREAD_LOCK(&array->lock);
|
||||
array->lowest_free = 0;
|
||||
array->number_free = array->size;
|
||||
for(i=0; i<array->size; i++) {
|
||||
if(NULL != array->addr[i]) {
|
||||
orte_topology_t * topo = (orte_topology_t *)array->addr[i];
|
||||
topo->topo = NULL;
|
||||
OBJ_RELEASE(topo);
|
||||
}
|
||||
array->addr[i] = NULL;
|
||||
}
|
||||
OPAL_THREAD_UNLOCK(&array->lock);
|
||||
}
|
||||
}
|
||||
OBJ_RELEASE(orte_node_topologies);
|
||||
|
||||
{
|
||||
opal_pointer_array_t * array = orte_node_pool;
|
||||
int i;
|
||||
orte_node_t* node = (orte_node_t *)opal_pointer_array_get_item(orte_node_pool, 0);
|
||||
assert(NULL != node);
|
||||
OBJ_RELEASE(node->daemon);
|
||||
node->daemon = NULL;
|
||||
if( array->number_free != array->size ) {
|
||||
OPAL_THREAD_LOCK(&array->lock);
|
||||
array->lowest_free = 0;
|
||||
array->number_free = array->size;
|
||||
for(i=0; i<array->size; i++) {
|
||||
if(NULL != array->addr[i]) {
|
||||
node= (orte_node_t*)array->addr[i];
|
||||
OBJ_RELEASE(node);
|
||||
}
|
||||
array->addr[i] = NULL;
|
||||
}
|
||||
OPAL_THREAD_UNLOCK(&array->lock);
|
||||
}
|
||||
}
|
||||
OBJ_RELEASE(orte_node_pool);
|
||||
|
||||
free(orte_topo_signature);
|
||||
|
||||
return ORTE_SUCCESS;
|
||||
}
|
||||
|
||||
|
Загрузка…
Ссылка в новой задаче
Block a user