Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Apply the default settings of 'smpi/buffering' too
[simgrid.git] / src / mc / mc_state.cpp
index acb6bc2..0106b84 100644 (file)
@@ -21,8 +21,8 @@ namespace mc {
 State::State(unsigned long state_number) : num_(state_number)
 {
   this->internal_comm.clear();
-  std::memset(&this->internal_req, 0, sizeof(this->internal_req));
-  std::memset(&this->executed_req_, 0, sizeof(this->executed_req_));
+  this->internal_req  = s_smx_simcall();
+  this->executed_req_ = s_smx_simcall();
 
   actor_states_.resize(MC_smx_get_maxpid());
   /* Stateful model checking */
@@ -118,12 +118,12 @@ static inline smx_simcall_t MC_state_get_request_for_process(simgrid::mc::State*
       mc_model_checker->process().read(temp_act, remote_act);
       simgrid::kernel::activity::CommImpl* act = temp_act.get_buffer();
       if (act->src_actor_.get() && act->dst_actor_.get())
-        state->transition_.argument_ = 0;
+        state->transition_.argument_ = 0; // OK
       else if (act->src_actor_.get() == nullptr && act->type_ == simgrid::kernel::activity::CommImpl::Type::READY &&
                act->detached())
-        state->transition_.argument_ = 0;
+        state->transition_.argument_ = 0; // OK
       else
-        state->transition_.argument_ = -1;
+        state->transition_.argument_ = -1; // timeout
       procstate->set_done();
       req = &actor->simcall;
       break;