Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
mem leaks
authorAugustin Degomme <degomme@idpann.imag.fr>
Tue, 25 Jun 2013 09:34:29 +0000 (11:34 +0200)
committerAugustin Degomme <degomme@idpann.imag.fr>
Tue, 25 Jun 2013 14:29:22 +0000 (16:29 +0200)
src/smpi/colls/coll_tuned_topo.c
src/smpi/colls/scatter-ompi.c

index ce7cec7..2fc8df4 100644 (file)
@@ -421,7 +421,7 @@ ompi_coll_tuned_topo_build_in_order_bmtree( MPI_Comm comm,
 
     vrank = (rank - root + size) % size;
 
-    bmtree = (ompi_coll_tree_t*)malloc(sizeof(ompi_coll_tree_t));
+    bmtree = (ompi_coll_tree_t*)xbt_malloc(sizeof(ompi_coll_tree_t));
     if (!bmtree) {
         XBT_DEBUG("coll:tuned:topo:build_bmtree PANIC out of memory");
         return NULL;
index 205d602..dbc223f 100644 (file)
@@ -153,6 +153,8 @@ smpi_coll_tuned_scatter_ompi_binomial(void *sbuf, int scount,
        smpi_mpi_recv(ptmp, rcount, rdtype, bmtree->tree_prev,
                                MCA_COLL_BASE_TAG_SCATTER, comm, &status);
     }
+    //!FIXME : store the tree, as done in ompi, instead of calculating it each time ?
+    xbt_free(bmtree);
 
     return MPI_SUCCESS;