auto dst_proc = api::get().get_dst_actor(comm_addr);
comm_pattern->src_proc = src_proc->get_pid();
comm_pattern->dst_proc = dst_proc->get_pid();
- comm_pattern->src_host = &api::get().get_actor_host_name(src_proc);
- comm_pattern->dst_host = &api::get().get_actor_host_name(dst_proc);
if (comm_pattern->data.empty()) {
comm_pattern->data = api::get().get_pattern_comm_data(comm_addr);
pattern->comm_addr = api::get().get_comm_isend_raw_addr(request);
pattern->rdv = api::get().get_pattern_comm_rdv(pattern->comm_addr);
pattern->src_proc = api::get().get_pattern_comm_src_proc(pattern->comm_addr);
- pattern->src_host = &api::get().get_actor_host_name(issuer);
#if HAVE_SMPI
pattern->tag = api::get().get_smpi_request_tag(request, simgrid::simix::Simcall::COMM_ISEND);
#endif
pattern->rdv = api::get().get_pattern_comm_rdv(pattern->comm_addr);
pattern->dst_proc = api::get().get_pattern_comm_dst_proc(pattern->comm_addr);
- pattern->dst_host = &api::get().get_actor_host_name(issuer);
} else
xbt_die("Unexpected call_type %i", (int)call_type);
{
RecordTrace res;
for (auto const& state : stack_)
- res.push_back(*state->get_transition());
+ res.push_back(state->get_transition());
return res;
}
XBT_INFO("%s", this->send_diff);
}
}
- XBT_INFO("Expanded states = %lu", expanded_states_count_);
+ XBT_INFO("Expanded states = %ld", State::get_expanded_states());
XBT_INFO("Visited states = %lu", api::get().mc_get_visited_states());
XBT_INFO("Executed transitions = %lu", Transition::get_executed_transitions());
XBT_INFO("Send-deterministic : %s", this->send_deterministic ? "Yes" : "No");
initial_communications_pattern.resize(maxpid);
incomplete_communications_pattern.resize(maxpid);
- ++expanded_states_count_;
- auto initial_state = std::make_unique<State>(expanded_states_count_);
+ auto initial_state = std::make_unique<State>();
XBT_DEBUG("********* Start communication determinism verification *********");
State* cur_state = stack_.back().get();
XBT_DEBUG("**************************************************");
- XBT_DEBUG("Exploration depth = %zu (state = %d, interleaved processes = %zu)", stack_.size(), cur_state->num_,
+ XBT_DEBUG("Exploration depth = %zu (state = %ld, interleaved processes = %zu)", stack_.size(), cur_state->num_,
cur_state->count_todo());
/* Update statistics */
next_transition = cur_state->next_transition();
if (next_transition >= 0 && visited_state == nullptr) {
- cur_state->get_transition()->execute(cur_state, next_transition);
+ cur_state->execute_next(next_transition);
aid_t aid = cur_state->get_transition()->aid_;
int req_num = cur_state->get_transition()->times_considered_;
smx_simcall_t req = &cur_state->executed_req_;
- XBT_DEBUG("Execute: %s", cur_state->get_transition()->to_string().c_str());
+ XBT_DEBUG("Execute: %s", cur_state->get_transition()->to_cstring());
std::string req_str;
if (dot_output != nullptr)
handle_comm_pattern(call, req, req_num, 0);
/* Create the new expanded state */
- ++expanded_states_count_;
- auto next_state = std::make_unique<State>(expanded_states_count_);
+ auto next_state = std::make_unique<State>();
/* If comm determinism verification, we cannot stop the exploration if some communications are not finished (at
* least, data are transferred). These communications are incomplete and they cannot be analyzed and compared
bool compare_snapshots = this->initial_communications_pattern_done && all_communications_are_finished();
if (_sg_mc_max_visited_states != 0)
- visited_state = visited_states_.addVisitedState(expanded_states_count_, next_state.get(), compare_snapshots);
+ visited_state = visited_states_.addVisitedState(next_state->num_, next_state.get(), compare_snapshots);
else
visited_state = nullptr;
}
if (dot_output != nullptr)
- fprintf(dot_output, "\"%d\" -> \"%d\" [%s];\n", cur_state->num_, next_state->num_, req_str.c_str());
+ fprintf(dot_output, "\"%ld\" -> \"%ld\" [%s];\n", cur_state->num_, next_state->num_, req_str.c_str());
} else if (dot_output != nullptr)
- fprintf(dot_output, "\"%d\" -> \"%d\" [%s];\n", cur_state->num_,
+ fprintf(dot_output, "\"%ld\" -> \"%ld\" [%s];\n", cur_state->num_,
visited_state->original_num == -1 ? visited_state->num : visited_state->original_num, req_str.c_str());
stack_.push_back(std::move(next_state));
if (stack_.size() > (std::size_t)_sg_mc_max_depth)
XBT_WARN("/!\\ Max depth reached! /!\\ ");
else if (visited_state != nullptr)
- XBT_DEBUG("State already visited (equal to state %d), exploration stopped on this path.",
+ XBT_DEBUG("State already visited (equal to state %ld), exploration stopped on this path.",
visited_state->original_num == -1 ? visited_state->num : visited_state->original_num);
else
XBT_DEBUG("There are no more processes to interleave. (depth %zu)", stack_.size());
this->initial_communications_pattern_done = true;
/* Trash the current state, no longer needed */
- XBT_DEBUG("Delete state %d at depth %zu", cur_state->num_, stack_.size());
+ XBT_DEBUG("Delete state %ld at depth %zu", cur_state->num_, stack_.size());
stack_.pop_back();
visited_state = nullptr;
stack_.pop_back();
if (state->count_todo() && stack_.size() < (std::size_t)_sg_mc_max_depth) {
/* We found a back-tracking point, let's loop */
- XBT_DEBUG("Back-tracking to state %d at depth %zu", state->num_, stack_.size() + 1);
+ XBT_DEBUG("Back-tracking to state %ld at depth %zu", state->num_, stack_.size() + 1);
stack_.push_back(std::move(state));
this->restoreState();
- XBT_DEBUG("Back-tracking to state %d at depth %zu done", stack_.back()->num_, stack_.size());
+ XBT_DEBUG("Back-tracking to state %ld at depth %zu done", stack_.back()->num_, stack_.size());
break;
} else {
- XBT_DEBUG("Delete state %d at depth %zu", state->num_, stack_.size() + 1);
+ XBT_DEBUG("Delete state %ld at depth %zu", state->num_, stack_.size() + 1);
}
}
}