Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
mc_api::check_send_request_detached() defined and used in comm_deter checker
authorEhsan Azimi <eazimi@ehsan.irisa.fr>
Fri, 27 Nov 2020 12:23:01 +0000 (13:23 +0100)
committerEhsan Azimi <eazimi@ehsan.irisa.fr>
Fri, 27 Nov 2020 12:23:01 +0000 (13:23 +0100)
src/mc/checker/CommunicationDeterminismChecker.cpp
src/mc/mc_api.cpp
src/mc/mc_api.hpp

index 685f699..d7eb493 100644 (file)
@@ -201,7 +201,8 @@ void CommunicationDeterminismChecker::get_comm_pattern(smx_simcall_t request, Ca
     }
 
 #if HAVE_SMPI
-    if (mpi_request.detached()) {
+    auto send_detached = mcapi::get().check_send_request_detached(request);
+    if (send_detached) {
       if (this->initial_communications_pattern_done) {
         /* Evaluate comm determinism */
         this->deterministic_comm_pattern(pattern->src_proc, pattern.get(), backtracking);
index cbb995d..bf62e03 100644 (file)
@@ -272,6 +272,14 @@ const char* mc_api::get_actor_host_name(smx_actor_t actor) const
   return host_name;
 }
 
+bool mc_api::check_send_request_detached(smx_simcall_t const& simcall) const
+{
+  simgrid::smpi::Request mpi_request;
+  mc_model_checker->get_remote_simulation().read(
+      &mpi_request, remote(static_cast<smpi::Request*>(simcall_comm_isend__get__data(simcall))));
+  return mpi_request.detached();
+}
+
 std::size_t mc_api::get_remote_heap_bytes() const
 {
   RemoteSimulation& process = mc_model_checker->get_remote_simulation();
index 78644a7..b551b33 100644 (file)
@@ -52,6 +52,7 @@ public:
   unsigned long get_pattern_comm_dst_proc(void* addr) const;
   std::vector<char> get_pattern_comm_data(void* addr) const;
   const char* get_actor_host_name(smx_actor_t actor) const;
+  bool check_send_request_detached(smx_simcall_t const& simcall) const;
 
   // REMOTE
   std::size_t get_remote_heap_bytes() const;