Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
RemotePtr in get_pattern_comm_dst_proc()
authoreazimi <azimi.ehsan@outlook.com>
Wed, 27 Jan 2021 13:50:22 +0000 (14:50 +0100)
committereazimi <azimi.ehsan@outlook.com>
Wed, 27 Jan 2021 13:50:22 +0000 (14:50 +0100)
src/mc/api.cpp
src/mc/api.hpp
src/mc/checker/CommunicationDeterminismChecker.cpp

index 960ade7..e2a50db 100644 (file)
@@ -368,10 +368,10 @@ unsigned long Api::get_pattern_comm_src_proc(RemotePtr<kernel::activity::CommImp
   return src_proc;
 }
 
-unsigned long Api::get_pattern_comm_dst_proc(void* addr) const
+unsigned long Api::get_pattern_comm_dst_proc(RemotePtr<kernel::activity::CommImpl> const& addr) const
 {
   Remote<kernel::activity::CommImpl> temp_synchro;
-  mc_model_checker->get_remote_simulation().read(temp_synchro, remote((simgrid::kernel::activity::CommImpl*)addr));
+  mc_model_checker->get_remote_simulation().read(temp_synchro, remote(addr.local()));
   const kernel::activity::CommImpl* synchro = temp_synchro.get_buffer();
   auto src_proc =
       mc_model_checker->get_remote_simulation().resolve_actor(mc::remote(synchro->dst_actor_.get()))->get_pid();
index d986868..e6c38a0 100644 (file)
@@ -61,7 +61,7 @@ public:
   kernel::activity::CommImpl* get_comm_waitany_raw_addr(smx_simcall_t request, int value) const;
   std::string get_pattern_comm_rdv(RemotePtr<kernel::activity::CommImpl> const& addr) const;
   unsigned long get_pattern_comm_src_proc(RemotePtr<kernel::activity::CommImpl> const& addr) const;
-  unsigned long get_pattern_comm_dst_proc(void* addr) const;
+  unsigned long get_pattern_comm_dst_proc(RemotePtr<kernel::activity::CommImpl> const& addr) const;
   std::vector<char> get_pattern_comm_data(RemotePtr<kernel::activity::CommImpl> const& addr) const;
   const char* get_actor_host_name(smx_actor_t actor) const;
 #if HAVE_SMPI
index 308bb54..73df3d8 100644 (file)
@@ -224,7 +224,7 @@ void CommunicationDeterminismChecker::get_comm_pattern(smx_simcall_t request, Ca
 #endif
     auto comm_addr = pattern->comm_addr;
     pattern->rdv = api::get().get_pattern_comm_rdv(remote(comm_addr));
-    pattern->dst_proc = api::get().get_pattern_comm_dst_proc(comm_addr);
+    pattern->dst_proc = api::get().get_pattern_comm_dst_proc(remote(comm_addr));
     pattern->dst_host = api::get().get_actor_host_name(issuer);
   } else
     xbt_die("Unexpected call_type %i", (int)call_type);