From: Christophe ThiƩry Date: Thu, 5 Jan 2012 18:03:18 +0000 (+0100) Subject: SMPI: don't finish immediately a dsend comm. X-Git-Tag: exp_20120216~195^2~1 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/78066359276779d87571226ba7a6c1ef69ea1a83 SMPI: don't finish immediately a dsend comm. Otherwise, the receiver would make invalid memory reads while matching the comm. I'm not sure when the request can be freed, so for now, dsends make a memory leaks. But smpi-reduce now works. --- diff --git a/src/smpi/smpi_base.c b/src/smpi/smpi_base.c index 076cd429da..b358b671f5 100644 --- a/src/smpi/smpi_base.c +++ b/src/smpi/smpi_base.c @@ -294,11 +294,11 @@ int smpi_mpi_testany(int count, MPI_Request requests[], int *index, void smpi_mpi_wait(MPI_Request * request, MPI_Status * status) { print_request("Waiting", *request); - if ((*request)->action != NULL) { - - SIMIX_req_comm_wait((*request)->action, -1.0); + if ((*request)->action != NULL) { // this is not a detached send + SIMIX_req_comm_wait((*request)->action, -1.0); + finish_wait(request, status); } - finish_wait(request, status); + // FIXME for a detached send, finish_wait is not called: } int smpi_mpi_waitany(int count, MPI_Request requests[],