X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/872d65264714799b25eb231609c3f05bae3d03dc..0eead244337fde8f0508629f8f8473f946c19f88:/src/mc/CommunicationDeterminismChecker.cpp?ds=sidebyside diff --git a/src/mc/CommunicationDeterminismChecker.cpp b/src/mc/CommunicationDeterminismChecker.cpp index dc3ac5f7ad..9f03fe9028 100644 --- a/src/mc/CommunicationDeterminismChecker.cpp +++ b/src/mc/CommunicationDeterminismChecker.cpp @@ -95,17 +95,17 @@ static char* print_determinism_result(e_mc_comm_pattern_difference_t diff, int p static void update_comm_pattern( simgrid::mc::PatternCommunication* comm_pattern, - simgrid::mc::RemotePtr comm_addr) + simgrid::mc::RemotePtr comm_addr) { // HACK, type punning - simgrid::mc::Remote temp_comm; + simgrid::mc::Remote temp_comm; mc_model_checker->process().read(temp_comm, comm_addr); - simgrid::simix::Comm* comm = - static_cast(temp_comm.data()); + simgrid::kernel::activity::Comm* comm = + static_cast(temp_comm.getBuffer()); - smx_process_t src_proc = mc_model_checker->process().resolveProcess( + smx_actor_t src_proc = mc_model_checker->process().resolveProcess( simgrid::mc::remote(comm->src_proc)); - smx_process_t dst_proc = mc_model_checker->process().resolveProcess( + smx_actor_t dst_proc = mc_model_checker->process().resolveProcess( simgrid::mc::remote(comm->dst_proc)); comm_pattern->src_proc = src_proc->pid; comm_pattern->dst_proc = dst_proc->pid; @@ -178,7 +178,7 @@ void CommunicationDeterminismChecker::deterministic_comm_pattern( void CommunicationDeterminismChecker::get_comm_pattern(xbt_dynar_t list, smx_simcall_t request, e_mc_call_type_t call_type, int backtracking) { - const smx_process_t issuer = MC_smx_simcall_get_issuer(request); + const smx_actor_t issuer = MC_smx_simcall_get_issuer(request); simgrid::mc::PatternCommunicationList* initial_pattern = xbt_dynar_get_as( initial_communications_pattern, issuer->pid, simgrid::mc::PatternCommunicationList*); xbt_dynar_t incomplete_pattern = xbt_dynar_get_as( @@ -195,11 +195,11 @@ void CommunicationDeterminismChecker::get_comm_pattern(xbt_dynar_t list, smx_sim pattern->type = simgrid::mc::PatternCommunicationType::send; pattern->comm_addr = simcall_comm_isend__get__result(request); - simgrid::mc::Remote temp_synchro; + simgrid::mc::Remote temp_synchro; mc_model_checker->process().read(temp_synchro, remote( - static_cast(pattern->comm_addr))); - simgrid::simix::Comm* synchro = - static_cast(temp_synchro.data()); + static_cast(pattern->comm_addr))); + simgrid::kernel::activity::Comm* synchro = + static_cast(temp_synchro.getBuffer()); char* remote_name = mc_model_checker->process().read( (std::uint64_t)(synchro->mbox ? &synchro->mbox->name : &synchro->mbox_cpy->name)); @@ -244,11 +244,10 @@ void CommunicationDeterminismChecker::get_comm_pattern(xbt_dynar_t list, smx_sim &mpi_request, remote((struct s_smpi_mpi_request*)simcall_comm_irecv__get__data(request))); pattern->tag = mpi_request.tag; - simgrid::mc::Remote temp_comm; + simgrid::mc::Remote temp_comm; mc_model_checker->process().read(temp_comm, remote( - static_cast(pattern->comm_addr))); - simgrid::simix::Comm* comm = - static_cast(temp_comm.data()); + static_cast(pattern->comm_addr))); + simgrid::kernel::activity::Comm* comm = temp_comm.getBuffer(); char* remote_name; mc_model_checker->process().read(&remote_name, @@ -270,7 +269,7 @@ void CommunicationDeterminismChecker::get_comm_pattern(xbt_dynar_t list, smx_sim void CommunicationDeterminismChecker::complete_comm_pattern( - xbt_dynar_t list, simgrid::mc::RemotePtr comm_addr, + xbt_dynar_t list, simgrid::mc::RemotePtr comm_addr, unsigned int issuer, int backtracking) { simgrid::mc::PatternCommunication* current_comm_pattern; @@ -393,8 +392,8 @@ void CommunicationDeterminismChecker::prepare() /* Get an enabled process and insert it in the interleave set of the initial state */ for (auto& p : mc_model_checker->process().simix_processes()) - if (simgrid::mc::process_is_enabled(&p.copy)) - initial_state->interleave(&p.copy); + if (simgrid::mc::process_is_enabled(p.copy.getBuffer())) + initial_state->interleave(p.copy.getBuffer()); stack_.push_back(std::move(initial_state)); } @@ -449,7 +448,7 @@ void CommunicationDeterminismChecker::restoreState() /* because we got a copy of the executed request, we have to fetch the real one, pointed by the request field of the issuer process */ - const smx_process_t issuer = MC_smx_simcall_get_issuer(saved_req); + const smx_actor_t issuer = MC_smx_simcall_get_issuer(saved_req); smx_simcall_t req = &issuer->simcall; /* TODO : handle test and testany simcalls */ @@ -520,7 +519,7 @@ int CommunicationDeterminismChecker::main(void) std::unique_ptr(MC_state_new(++expandedStatesCount_)); /* If comm determinism verification, we cannot stop the exploration if - some communications are not finished (at least, data are transfered). + some communications are not finished (at least, data are transferred). These communications are incomplete and they cannot be analyzed and compared with the initial pattern. */ bool compare_snapshots = all_communications_are_finished() @@ -532,8 +531,8 @@ int CommunicationDeterminismChecker::main(void) /* Get enabled processes and insert them in the interleave set of the next state */ for (auto& p : mc_model_checker->process().simix_processes()) - if (simgrid::mc::process_is_enabled(&p.copy)) - next_state->interleave(&p.copy); + if (simgrid::mc::process_is_enabled(p.copy.getBuffer())) + next_state->interleave(p.copy.getBuffer()); if (dot_output != nullptr) fprintf(dot_output, "\"%d\" -> \"%d\" [%s];\n",