From: Martin Quinson Date: Fri, 18 Feb 2022 23:52:50 +0000 (+0100) Subject: MC does not need a mc_value_ in the simcall anymore X-Git-Tag: v3.31~370 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/0bbb6ee667c6f5b64cb0c9b7370d199bb571678a MC does not need a mc_value_ in the simcall anymore --- diff --git a/doc/doxygen/uhood_switch.doc b/doc/doxygen/uhood_switch.doc index 40c7b46f43..dc4036766b 100644 --- a/doc/doxygen/uhood_switch.doc +++ b/doc/doxygen/uhood_switch.doc @@ -336,7 +336,6 @@ struct s_smx_simcall { union u_smx_scalar result; // Some additional stuff: smx_timer_t timer; - int mc_value; }; @endcode diff --git a/src/kernel/activity/CommImpl.cpp b/src/kernel/activity/CommImpl.cpp index 842d669957..3759f4c14e 100644 --- a/src/kernel/activity/CommImpl.cpp +++ b/src/kernel/activity/CommImpl.cpp @@ -28,7 +28,6 @@ XBT_PRIVATE void simcall_HANDLER_comm_send(smx_simcall_t simcall, smx_actor_t sr simgrid::kernel::actor::CommIsendSimcall observer(src, mbox, task_size, rate, src_buff, src_buff_size, match_fun, nullptr, copy_data_fun, data, false); simgrid::kernel::activity::ActivityImplPtr comm = simgrid::kernel::activity::CommImpl::isend(&observer); - simcall->mc_value_ = 0; comm->wait_for(simcall->issuer_, timeout); } @@ -54,7 +53,6 @@ XBT_PRIVATE void simcall_HANDLER_comm_recv(smx_simcall_t simcall, smx_actor_t re simgrid::kernel::actor::CommIrecvSimcall observer(receiver, mbox, dst_buff, dst_buff_size, match_fun, copy_data_fun, data, rate); simgrid::kernel::activity::ActivityImplPtr comm = simgrid::kernel::activity::CommImpl::irecv(&observer); - simcall->mc_value_ = 0; comm->wait_for(simcall->issuer_, timeout); } @@ -413,16 +411,8 @@ void CommImpl::wait_for(actor::ActorImpl* issuer, double timeout) /* Associate this simcall to the wait synchro */ register_simcall(&issuer->simcall_); if (MC_is_active() || MC_record_replay_is_active()) { - int idx = issuer->simcall_.mc_value_; - if (idx == 0) { - set_state(State::DONE); - } else { - /* If we reached this point, the wait simcall must have a timeout */ - /* Otherwise it shouldn't be enabled and executed by the MC */ - xbt_assert(timeout >= 0.0, - "The checker asked me to raise a timeout on a communication that is not expecting any timeout"); - set_state(issuer == src_actor_ ? State::SRC_TIMEOUT : State::DST_TIMEOUT); - } + // FIXME: what about timeouts? + set_state(State::DONE); finish(); return; } diff --git a/src/kernel/actor/SimcallObserver.hpp b/src/kernel/actor/SimcallObserver.hpp index f489e0c4c6..0bba980271 100644 --- a/src/kernel/actor/SimcallObserver.hpp +++ b/src/kernel/actor/SimcallObserver.hpp @@ -31,6 +31,7 @@ public: /** Returns the amount of time that this transition can be used. * + * If it's 0, the transition is not enabled. * If it's 1 (as with send/wait), there is no need to fork the state space exploration on this point. * If it's more than one (as with mc_random or waitany), we need to consider this transition several times to start * differing branches diff --git a/src/simix/popping_generated.cpp b/src/simix/popping_generated.cpp index 50b7d0e88a..637e267fa6 100644 --- a/src/simix/popping_generated.cpp +++ b/src/simix/popping_generated.cpp @@ -48,7 +48,6 @@ constexpr std::array simcall_names{{ void simgrid::kernel::actor::ActorImpl::simcall_handle(int times_considered) { XBT_DEBUG("Handling simcall %p: %s", &simcall_, SIMIX_simcall_name(simcall_)); - simcall_.mc_value_ = times_considered; if (simcall_.observer_ != nullptr) simcall_.observer_->prepare(times_considered); if (context_->wannadie()) diff --git a/src/simix/popping_private.hpp b/src/simix/popping_private.hpp index b66593e229..e335252eff 100644 --- a/src/simix/popping_private.hpp +++ b/src/simix/popping_private.hpp @@ -50,7 +50,6 @@ struct s_smx_simcall { simgrid::kernel::actor::SimcallObserver* observer_ = nullptr; // makes that simcall observable by the MC unsigned int mc_max_consider_ = 0; // How many times this simcall should be used. If >1, this will be a fork in the state space. - int mc_value_ = 0; std::array args_ = {}; u_smx_scalar result_ = {}; };