Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Fix the depends of iSend/iRecv vs. WaitComm to fix the bugged2 example
[simgrid.git] / src / mc / api / TransitionComm.cpp
index 1e38480abe7c801abbc2291fc3730b9d4c27a305..6fa67302179f1a288d4f9c5f3dce22b0eb4e44ba 100644 (file)
@@ -103,10 +103,7 @@ bool CommRecvTransition::depends(const Transition* other) const
     if (mbox_ != wait->mbox_)
       return false;
 
-    if ((aid_ != wait->sender_) && (aid_ != wait->receiver_))
-      return false;
-
-    if (wait->dst_buff_ != dst_buff_)
+    if ((aid_ != wait->sender_) && (aid_ != wait->receiver_) && (wait->dst_buff_ != dst_buff_))
       return false;
   }
 
@@ -146,7 +143,6 @@ bool CommSendTransition::depends(const Transition* other) const
   if (const auto* other_isend = dynamic_cast<const CommSendTransition*>(other))
     return mbox_ == other_isend->mbox_;
 
-  // FIXME: Not in the former dependency check because of the ordering but seems logical to add it
   if (dynamic_cast<const CommRecvTransition*>(other) != nullptr)
     return false;
 
@@ -157,10 +153,7 @@ bool CommSendTransition::depends(const Transition* other) const
     if (mbox_ != wait->mbox_)
       return false;
 
-    if ((aid_ != wait->sender_) && (aid_ != wait->receiver_))
-      return false;
-
-    if (wait->src_buff_ != src_buff_)
+    if ((aid_ != wait->sender_) && (aid_ != wait->receiver_) && (wait->src_buff_ != src_buff_))
       return false;
   }