From: Luka Stanisic Date: Wed, 8 Feb 2017 17:24:33 +0000 (+0100) Subject: Sometimes (most notably in StarPU-MPI case) the issuer of the comm is neither its... X-Git-Tag: v3_15~347^2 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/0927ed1a29e896c342ba0110b7032e65d3625ed7 Sometimes (most notably in StarPU-MPI case) the issuer of the comm is neither its src nor dst. I dont see how this can jeopardies the correct execution of SimGrid in other use cases, but I may be missing something. This commit is indispensable for the correct termination of StarPU-MPI+SimGrid execution. --- diff --git a/src/simix/smx_network.cpp b/src/simix/smx_network.cpp index 63171c5247..c17b27bb90 100644 --- a/src/simix/smx_network.cpp +++ b/src/simix/smx_network.cpp @@ -639,13 +639,18 @@ void SIMIX_comm_finish(smx_activity_t synchro) if(comm->dst_proc) xbt_fifo_remove(comm->dst_proc->comms, synchro); } - if(simcall->issuer == comm->dst_proc){ + else if(simcall->issuer == comm->dst_proc){ if(comm->src_proc) xbt_fifo_remove(comm->src_proc->comms, synchro); //in case of a detached comm we have an extra ref to remove, as the sender won't do it destroy_count++; } + else{ + xbt_fifo_remove(comm->dst_proc->comms, synchro); + xbt_fifo_remove(comm->src_proc->comms, synchro); + } } + SIMIX_simcall_answer(simcall); destroy_count++; }