From e9d155feb09074d266e4a6e82b130d4dac3c79f6 Mon Sep 17 00:00:00 2001 From: Arnaud Giersch Date: Mon, 20 Feb 2023 19:19:19 +0100 Subject: [PATCH] Determine n_transitions on receiving side (and remove it from the message). --- src/mc/api/RemoteApp.cpp | 9 ++------- src/mc/remote/AppSide.cpp | 1 - src/mc/remote/mc_protocol.h | 4 ---- 3 files changed, 2 insertions(+), 12 deletions(-) diff --git a/src/mc/api/RemoteApp.cpp b/src/mc/api/RemoteApp.cpp index aece6f867f..00c6522ed6 100644 --- a/src/mc/api/RemoteApp.cpp +++ b/src/mc/api/RemoteApp.cpp @@ -105,14 +105,9 @@ void RemoteApp::get_actors_status(std::map& whereto) const whereto.clear(); for (const auto& actor : status) { - xbt_assert(actor.n_transitions == 0 || actor.n_transitions == actor.max_considered, - "If any transitions are serialized for an actor, it must match the " - "total number of transitions that can be considered for the actor " - "(currently %d), but only %d transition(s) was/were said to be encoded", - actor.max_considered, actor.n_transitions); - std::vector> actor_transitions; - for (int times_considered = 0; times_considered < actor.n_transitions; times_considered++) { + int n_transitions = actor.enabled ? actor.max_considered : 0; + for (int times_considered = 0; times_considered < n_transitions; times_considered++) { s_mc_message_simcall_probe_one_t probe; ssize_t received = checker_side_->get_channel().receive(probe); xbt_assert(received >= 0, "Could not receive response to ACTORS_PROBE message (%s)", strerror(errno)); diff --git a/src/mc/remote/AppSide.cpp b/src/mc/remote/AppSide.cpp index 329918978d..96f3b3ee60 100644 --- a/src/mc/remote/AppSide.cpp +++ b/src/mc/remote/AppSide.cpp @@ -168,7 +168,6 @@ void AppSide::handle_actors_status() const status[i].aid = aid; status[i].enabled = mc::actor_is_enabled(actor); status[i].max_considered = actor->simcall_.observer_->get_max_consider(); - status[i].n_transitions = mc::actor_is_enabled(actor) ? status[i].max_considered : 0; i++; } diff --git a/src/mc/remote/mc_protocol.h b/src/mc/remote/mc_protocol.h index caa405b843..97b72eee4e 100644 --- a/src/mc/remote/mc_protocol.h +++ b/src/mc/remote/mc_protocol.h @@ -110,10 +110,6 @@ struct s_mc_message_actors_status_one_t { // an array of `s_mc_message_actors_st aid_t aid; bool enabled; int max_considered; - - // The total number of transitions that are serialized and associated with this actor. - // Enforced to be either `0` or the same as `max_considered` - int n_transitions; }; // Answer from an actor to the question "what are you about to run?" -- 2.20.1