Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Really detach detached sends.
authorArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Mon, 1 Apr 2019 13:06:36 +0000 (15:06 +0200)
committerArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Mon, 1 Apr 2019 14:09:15 +0000 (16:09 +0200)
The communication is not cancelled when the sender terminates, following the
ogic of commit 9acedb4ebce15cd3399fcad4effb3fb79a0ee5ef.

src/kernel/activity/CommImpl.cpp

index ef42412..a838619 100644 (file)
@@ -71,13 +71,13 @@ XBT_PRIVATE smx_activity_t simcall_HANDLER_comm_isend(
     other_comm->state_ = SIMIX_READY;
     other_comm->set_type(simgrid::kernel::activity::CommImpl::Type::READY);
   }
     other_comm->state_ = SIMIX_READY;
     other_comm->set_type(simgrid::kernel::activity::CommImpl::Type::READY);
   }
-  src_proc->comms.push_back(other_comm);
 
   if (detached) {
     other_comm->detached  = true;
     other_comm->clean_fun = clean_fun;
   } else {
     other_comm->clean_fun = nullptr;
 
   if (detached) {
     other_comm->detached  = true;
     other_comm->clean_fun = clean_fun;
   } else {
     other_comm->clean_fun = nullptr;
+    src_proc->comms.push_back(other_comm);
   }
 
   /* Setup the communication synchro */
   }
 
   /* Setup the communication synchro */
@@ -88,12 +88,10 @@ XBT_PRIVATE smx_activity_t simcall_HANDLER_comm_isend(
   other_comm->match_fun     = match_fun;
   other_comm->copy_data_fun = copy_data_fun;
 
   other_comm->match_fun     = match_fun;
   other_comm->copy_data_fun = copy_data_fun;
 
-  if (MC_is_active() || MC_record_replay_is_active()) {
+  if (MC_is_active() || MC_record_replay_is_active())
     other_comm->state_ = SIMIX_RUNNING;
     other_comm->state_ = SIMIX_RUNNING;
-    return (detached ? nullptr : other_comm);
-  }
-
-  other_comm->start();
+  else
+    other_comm->start();
 
   return (detached ? nullptr : other_comm);
 }
 
   return (detached ? nullptr : other_comm);
 }