Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
MC does not need a mc_value_ in the simcall anymore
authorMartin Quinson <martin.quinson@ens-rennes.fr>
Fri, 18 Feb 2022 23:52:50 +0000 (00:52 +0100)
committerMartin Quinson <martin.quinson@ens-rennes.fr>
Fri, 18 Feb 2022 23:52:50 +0000 (00:52 +0100)
doc/doxygen/uhood_switch.doc
src/kernel/activity/CommImpl.cpp
src/kernel/actor/SimcallObserver.hpp
src/simix/popping_generated.cpp
src/simix/popping_private.hpp

index 40c7b46..dc40367 100644 (file)
@@ -336,7 +336,6 @@ struct s_smx_simcall {
   union u_smx_scalar result;
   // Some additional stuff:
   smx_timer_t timer;
-  int mc_value;
 };
 @endcode
 
index 842d669..3759f4c 100644 (file)
@@ -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;
   }
index f489e0c..0bba980 100644 (file)
@@ -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
index 50b7d0e..637e267 100644 (file)
@@ -48,7 +48,6 @@ constexpr std::array<const char*, simgrid::simix::NUM_SIMCALLS> 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())
index b66593e..e335252 100644 (file)
@@ -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<u_smx_scalar, 11> args_      = {};
   u_smx_scalar result_                    = {};
 };