1
1
This commit fixes three leaks:

 - bml/r2: fix leak of del_procs in mca_bml_r2_del_procs

 - Release the modex data in btl/scif, btl/ugni, and btl/vader

 - ompi_mpi_finalize: close the allocator framework

cmr=v1.8.2:reviewer=jsquyres

This commit was SVN r31778.

The following SVN revision numbers were found above:
  r2 --> open-mpi/ompi@58fdc18855
Этот коммит содержится в:
Nathan Hjelm 2014-05-15 15:59:51 +00:00
родитель 1d1cef76df
Коммит e4db2c3ebb
5 изменённых файлов: 19 добавлений и 3 удалений

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

@ -1,4 +1,4 @@
/* -*- Mode: C; c-basic-offset:4 ; -*- */ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */
/* /*
* Copyright (c) 2004-2007 The Trustees of Indiana University and Indiana * Copyright (c) 2004-2007 The Trustees of Indiana University and Indiana
* University Research and Technology * University Research and Technology
@ -10,7 +10,7 @@
* University of Stuttgart. All rights reserved. * University of Stuttgart. All rights reserved.
* Copyright (c) 2004-2006 The Regents of the University of California. * Copyright (c) 2004-2006 The Regents of the University of California.
* All rights reserved. * All rights reserved.
* Copyright (c) 2007-2012 Los Alamos National Security, LLC. All rights * Copyright (c) 2007-2014 Los Alamos National Security, LLC. All rights
* reserved. * reserved.
* Copyright (c) 2008-2014 Cisco Systems, Inc. All rights reserved. * Copyright (c) 2008-2014 Cisco Systems, Inc. All rights reserved.
* Copyright (c) 2013 Intel, Inc. All rights reserved * Copyright (c) 2013 Intel, Inc. All rights reserved
@ -208,7 +208,7 @@ static int mca_bml_r2_add_procs( size_t nprocs,
/* for each proc that is reachable */ /* for each proc that is reachable */
for( p = 0; p < n_new_procs; p++ ) { for( p = 0; p < n_new_procs; p++ ) {
if(opal_bitmap_is_set_bit(reachable, p)) { if(opal_bitmap_is_set_bit(reachable, p)) {
ompi_proc_t *proc = new_procs[p]; ompi_proc_t *proc = new_procs[p];
mca_bml_base_endpoint_t * bml_endpoint = mca_bml_base_endpoint_t * bml_endpoint =
(mca_bml_base_endpoint_t*) proc->proc_endpoints[OMPI_PROC_ENDPOINT_TAG_BML]; (mca_bml_base_endpoint_t*) proc->proc_endpoints[OMPI_PROC_ENDPOINT_TAG_BML];
mca_bml_base_btl_t* bml_btl; mca_bml_base_btl_t* bml_btl;
@ -469,6 +469,7 @@ static int mca_bml_r2_del_procs(size_t nprocs,
rc = btl->btl_del_procs(btl,1,&proc,&bml_btl->btl_endpoint); rc = btl->btl_del_procs(btl,1,&proc,&bml_btl->btl_endpoint);
if(OMPI_SUCCESS != rc) { if(OMPI_SUCCESS != rc) {
free(del_procs);
return rc; return rc;
} }
@ -493,6 +494,7 @@ static int mca_bml_r2_del_procs(size_t nprocs,
if (btl != 0) { if (btl != 0) {
rc = btl->btl_del_procs(btl,1,&proc,&bml_btl->btl_endpoint); rc = btl->btl_del_procs(btl,1,&proc,&bml_btl->btl_endpoint);
if(OMPI_SUCCESS != rc) { if(OMPI_SUCCESS != rc) {
free(del_procs);
return rc; return rc;
} }
} }
@ -503,6 +505,8 @@ static int mca_bml_r2_del_procs(size_t nprocs,
OBJ_RELEASE(bml_endpoint); OBJ_RELEASE(bml_endpoint);
} }
free(del_procs);
return OMPI_SUCCESS; return OMPI_SUCCESS;
} }

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

@ -78,6 +78,9 @@ static inline int mca_btl_scif_ep_init (mca_btl_base_endpoint_t *endpoint,
rc = ompi_modex_recv (&mca_btl_scif_component.super.btl_version, peer_proc, rc = ompi_modex_recv (&mca_btl_scif_component.super.btl_version, peer_proc,
(void **) &modex, &msg_size); (void **) &modex, &msg_size);
if (OMPI_SUCCESS != rc) {
return rc;
}
assert (msg_size == sizeof (endpoint->port_id)); assert (msg_size == sizeof (endpoint->port_id));
endpoint->port_id = modex->port_id; endpoint->port_id = modex->port_id;
@ -89,6 +92,8 @@ static inline int mca_btl_scif_ep_init (mca_btl_base_endpoint_t *endpoint,
endpoint->seq_expected = 0x00001010; endpoint->seq_expected = 0x00001010;
#endif #endif
free (modex);
return OMPI_SUCCESS; return OMPI_SUCCESS;
} }

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

@ -192,6 +192,8 @@ static int init_vader_endpoint (struct mca_btl_base_endpoint_t *ep, struct ompi_
} }
#endif #endif
free (modex);
ep->next_fbox_out = 0; ep->next_fbox_out = 0;
ep->next_fbox_in = 0; ep->next_fbox_in = 0;
ep->next_sequence = 0; ep->next_sequence = 0;

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

@ -45,6 +45,8 @@ int ompi_common_ugni_endpoint_for_proc (ompi_common_ugni_device_t *dev, ompi_pro
*ep = endpoint; *ep = endpoint;
free (modex);
return OMPI_SUCCESS; return OMPI_SUCCESS;
} }

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

@ -411,6 +411,9 @@ int ompi_mpi_finalize(void)
if (OMPI_SUCCESS != (ret = mca_base_framework_close(&ompi_rcache_base_framework))) { if (OMPI_SUCCESS != (ret = mca_base_framework_close(&ompi_rcache_base_framework))) {
return ret; return ret;
} }
if (OMPI_SUCCESS != (ret = mca_base_framework_close(&ompi_allocator_base_framework))) {
return ret;
}
if (NULL != ompi_mpi_main_thread) { if (NULL != ompi_mpi_main_thread) {
OBJ_RELEASE(ompi_mpi_main_thread); OBJ_RELEASE(ompi_mpi_main_thread);