]> AND Public Git Repository - simgrid.git/blobdiff - src/mc/checker/CommunicationDeterminismChecker.cpp
Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
MC dependency: do the easy test before the harder one
[simgrid.git] / src / mc / checker / CommunicationDeterminismChecker.cpp
index 5d79c4a2f536e84112db4cca9eefd33fc9514e4a..5192439f62918cf926934f52f08d45afde4c5b85 100644 (file)
@@ -9,11 +9,6 @@
 #include "src/mc/mc_exit.hpp"
 #include "src/mc/mc_private.hpp"
 #include "src/mc/mc_request.hpp"
-#include "src/mc/mc_smx.hpp"
-
-#if HAVE_SMPI
-#include "smpi_request.hpp"
-#endif
 
 #include <cstdint>
 
@@ -117,8 +112,8 @@ static void update_comm_pattern(simgrid::mc::PatternCommunication* comm_pattern,
   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);
+  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);
@@ -194,7 +189,7 @@ void CommunicationDeterminismChecker::get_comm_pattern(smx_simcall_t request, Ca
     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);
+    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);
@@ -224,7 +219,7 @@ void CommunicationDeterminismChecker::get_comm_pattern(smx_simcall_t request, Ca
 #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);
+    pattern->dst_host = &api::get().get_actor_host_name(issuer);
   } else
     xbt_die("Unexpected call_type %i", (int)call_type);
 
@@ -503,11 +498,7 @@ void CommunicationDeterminismChecker::real_run()
 
       visited_state = nullptr;
 
-      /* Check for deadlocks */
-      if (api::get().mc_check_deadlock()) {
-        api::get().mc_show_deadlock();
-        throw simgrid::mc::DeadlockError();
-      }
+      api::get().mc_check_deadlock();
 
       while (not stack_.empty()) {
         std::unique_ptr<State> state(std::move(stack_.back()));