From: Marion Guthmuller Date: Fri, 14 Dec 2012 14:57:57 +0000 (+0100) Subject: Remove comm from src_proc->comms and dst_proc->comms when finish it, X-Git-Tag: v3_9_rc1~86^2~110^2~5 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/415bcef093fcaa88f34a8ccd48248815a5a8757f Remove comm from src_proc->comms and dst_proc->comms when finish it, if is detached (dsend) Currently, with dsend action, the wait of src_proc is not necessary to finish the communication. In this case, only dst_proc removes this communication from its list and destroys it, if src_proc is always running. When src_proc makes a process_cleanup after that, it retrieves this communication in its list while it doesn't exist anymore and thinks that this communication isn't for it. This led to a simulation error. --- diff --git a/src/simix/smx_network.c b/src/simix/smx_network.c index 11eb250003..23600af323 100644 --- a/src/simix/smx_network.c +++ b/src/simix/smx_network.c @@ -877,6 +877,16 @@ void SIMIX_comm_finish(smx_action_t action) simcall->issuer->waiting_action = NULL; xbt_fifo_remove(simcall->issuer->comms, action); + if(action->comm.detached){ + if(simcall->issuer == action->comm.src_proc){ + if(action->comm.dst_proc) + xbt_fifo_remove(action->comm.dst_proc->comms, action); + } + if(simcall->issuer == action->comm.dst_proc){ + if(action->comm.src_proc) + xbt_fifo_remove(action->comm.src_proc->comms, action); + } + } SIMIX_simcall_answer(simcall); destroy_count++; }