X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/94e61a6926e7eb193363e147ff22206f77425abe..954676b700e711f38ec4d286d33d5427d3f4ca46:/src/smpi/colls/smpi_openmpi_selector.c diff --git a/src/smpi/colls/smpi_openmpi_selector.c b/src/smpi/colls/smpi_openmpi_selector.c index b24a7f4059..c344fa9da0 100644 --- a/src/smpi/colls/smpi_openmpi_selector.c +++ b/src/smpi/colls/smpi_openmpi_selector.c @@ -1,6 +1,6 @@ /* selector for collective algorithms based on openmpi's default coll_tuned_decision_fixed selector */ -/* Copyright (c) 2009, 2010. The SimGrid Team. +/* Copyright (c) 2009-2010, 2013-2014. The SimGrid Team. * All rights reserved. */ /* This program is free software; you can redistribute it and/or modify it @@ -601,9 +601,13 @@ int smpi_coll_tuned_scatter_ompi(void *sbuf, int scount, scount=rcount; sdtype=rdtype; } - return smpi_coll_tuned_scatter_ompi_binomial (sbuf, scount, sdtype, - rbuf, rcount, rdtype, - root, comm); + int ret=smpi_coll_tuned_scatter_ompi_binomial (sbuf, scount, sdtype, + rbuf, rcount, rdtype, + root, comm); + if(rank!=root){ + xbt_free(sbuf); + } + return ret; } return smpi_coll_tuned_scatter_ompi_basic_linear (sbuf, scount, sdtype, rbuf, rcount, rdtype,