From 3586592c9ea0c8b4e934a29126c75de611bbc61c Mon Sep 17 00:00:00 2001 From: Ehsan Azimi Date: Fri, 27 Nov 2020 13:23:01 +0100 Subject: [PATCH] mc_api::check_send_request_detached() defined and used in comm_deter checker --- src/mc/checker/CommunicationDeterminismChecker.cpp | 3 ++- src/mc/mc_api.cpp | 8 ++++++++ src/mc/mc_api.hpp | 1 + 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/src/mc/checker/CommunicationDeterminismChecker.cpp b/src/mc/checker/CommunicationDeterminismChecker.cpp index 685f699400..d7eb49366c 100644 --- a/src/mc/checker/CommunicationDeterminismChecker.cpp +++ b/src/mc/checker/CommunicationDeterminismChecker.cpp @@ -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); diff --git a/src/mc/mc_api.cpp b/src/mc/mc_api.cpp index cbb995dc54..bf62e03b11 100644 --- a/src/mc/mc_api.cpp +++ b/src/mc/mc_api.cpp @@ -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(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(); diff --git a/src/mc/mc_api.hpp b/src/mc/mc_api.hpp index 78644a7f73..b551b33c87 100644 --- a/src/mc/mc_api.hpp +++ b/src/mc/mc_api.hpp @@ -52,6 +52,7 @@ public: unsigned long get_pattern_comm_dst_proc(void* addr) const; std::vector 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; -- 2.20.1