From 9f12a0495cfbbf84c1f38bcae48740c60153a91e Mon Sep 17 00:00:00 2001 From: SUTER Frederic Date: Sun, 6 Feb 2022 12:56:37 +0100 Subject: [PATCH] enforce simcall order as before to check dependencies (Isend, Irecv, Wait) --- src/kernel/actor/SimcallObserver.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/kernel/actor/SimcallObserver.cpp b/src/kernel/actor/SimcallObserver.cpp index 0c55199d90..d6795b4db4 100644 --- a/src/kernel/actor/SimcallObserver.cpp +++ b/src/kernel/actor/SimcallObserver.cpp @@ -298,6 +298,12 @@ bool ActivityWaitSimcall::depends(SimcallObserver* other) if (get_issuer() == other->get_issuer()) return false; + if (auto* isend = dynamic_cast(other)) + return isend->depends(this); + + if (auto* irecv = dynamic_cast(other)) + return irecv->depends(this); + /* Timeouts in wait transitions are not considered by the independence theorem, thus assumed dependent */ if (auto* wait = dynamic_cast(other)) { if (timeout_ > 0 || wait->get_timeout() > 0) @@ -474,8 +480,8 @@ bool CommIrecvSimcall::depends(SimcallObserver* other) if (auto* other_irecv = dynamic_cast(other)) return mbox_ == other_irecv->get_mailbox(); - if (dynamic_cast(other) != nullptr) - return false; + if (auto* isend = dynamic_cast(other)) + return isend->depends(this); #if SIMGRID_HAVE_MC // FIXME needed to access mbox_cpy if (auto* wait = dynamic_cast(other)) { -- 2.20.1