X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/d0ffc37686edcc803601f76ab51fdfed5fc2f241..5880a1bbbf150def1664cfefd6ec7f36f56edfaa:/src/smpi/colls/scatter-ompi.c diff --git a/src/smpi/colls/scatter-ompi.c b/src/smpi/colls/scatter-ompi.c index c65b6f9511..130ec40932 100644 --- a/src/smpi/colls/scatter-ompi.c +++ b/src/smpi/colls/scatter-ompi.c @@ -1,3 +1,9 @@ +/* Copyright (c) 2013-2014. The SimGrid Team. + * All rights reserved. */ + +/* This program is free software; you can redistribute it and/or modify it + * under the terms of the license (GNU LGPL) which comes with this package. */ + /* * Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana * University Research and Technology @@ -9,11 +15,8 @@ * University of Stuttgart. All rights reserved. * Copyright (c) 2004-2005 The Regents of the University of California. * All rights reserved. - * $COPYRIGHT$ * * Additional copyrights may follow - * - * $HEADER$ */ @@ -145,13 +148,15 @@ smpi_coll_tuned_scatter_ompi_binomial(void *sbuf, int scount, total_send += mycount; } - if (NULL != tempbuf) - free(tempbuf); + } else { /* recv from parent on leaf nodes */ smpi_mpi_recv(ptmp, rcount, rdtype, bmtree->tree_prev, COLL_TAG_SCATTER, comm, &status); } + + if (NULL != tempbuf) + free(tempbuf); //!FIXME : store the tree, as done in ompi, instead of calculating it each time ? xbt_free(bmtree);