From 415bcef093fcaa88f34a8ccd48248815a5a8757f Mon Sep 17 00:00:00 2001 From: Marion Guthmuller Date: Fri, 14 Dec 2012 15:57:57 +0100 Subject: [PATCH 1/1] 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. --- src/simix/smx_network.c | 10 ++++++++++ 1 file changed, 10 insertions(+) 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++; } -- 2.20.1