Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Sometimes (most notably in StarPU-MPI case) the issuer of the comm is neither its...
authorLuka Stanisic <luka.stanisic@inria.fr>
Wed, 8 Feb 2017 17:24:33 +0000 (18:24 +0100)
committerMartin Quinson <martin.quinson@loria.fr>
Thu, 16 Feb 2017 09:59:59 +0000 (10:59 +0100)
This commit is indispensable for the correct termination of StarPU-MPI+SimGrid execution.

src/simix/smx_network.cpp

index 63171c5..c17b27b 100644 (file)
@@ -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++;
   }