From: mlaurent Date: Tue, 6 Jun 2023 15:11:35 +0000 (+0200) Subject: Merge branch 'master' of https://framagit.org/simgrid/simgrid X-Git-Tag: v3.34~41^2~6 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/122a5a2813fd6d64d4db8ee7f1fdb5a62b7e0d6a?hp=-c Merge branch 'master' of https://framagit.org/simgrid/simgrid --- 122a5a2813fd6d64d4db8ee7f1fdb5a62b7e0d6a diff --combined MANIFEST.in index 2aa9af7287,5fac1c74f3..0caa0f9991 --- a/MANIFEST.in +++ b/MANIFEST.in @@@ -350,14 -350,6 +350,6 @@@ include examples/cpp/network-ns3/s4u-ne include examples/cpp/network-ns3/s4u-network-ns3.cpp include examples/cpp/network-wifi/s4u-network-wifi.cpp include examples/cpp/network-wifi/s4u-network-wifi.tesh - include examples/cpp/task-io/s4u-task-io.cpp - include examples/cpp/task-io/s4u-task-io.tesh - include examples/cpp/task-simple/s4u-task-simple.cpp - include examples/cpp/task-simple/s4u-task-simple.tesh - include examples/cpp/task-switch-host/s4u-task-switch-host.cpp - include examples/cpp/task-switch-host/s4u-task-switch-host.tesh - include examples/cpp/task-variable-load/s4u-task-variable-load.cpp - include examples/cpp/task-variable-load/s4u-task-variable-load.tesh include examples/cpp/photovoltaic-simple/s4u-photovoltaic-simple.cpp include examples/cpp/photovoltaic-simple/s4u-photovoltaic-simple.tesh include examples/cpp/platform-comm-serialize/s4u-platform-comm-serialize.cpp @@@ -402,6 -394,14 +394,14 @@@ include examples/cpp/synchro-mutex/s4u- include examples/cpp/synchro-semaphore/s4u-mc-synchro-semaphore.tesh include examples/cpp/synchro-semaphore/s4u-synchro-semaphore.cpp include examples/cpp/synchro-semaphore/s4u-synchro-semaphore.tesh + include examples/cpp/task-io/s4u-task-io.cpp + include examples/cpp/task-io/s4u-task-io.tesh + include examples/cpp/task-simple/s4u-task-simple.cpp + include examples/cpp/task-simple/s4u-task-simple.tesh + include examples/cpp/task-switch-host/s4u-task-switch-host.cpp + include examples/cpp/task-switch-host/s4u-task-switch-host.tesh + include examples/cpp/task-variable-load/s4u-task-variable-load.cpp + include examples/cpp/task-variable-load/s4u-task-variable-load.tesh include examples/cpp/trace-categories/s4u-trace-categories.cpp include examples/cpp/trace-categories/s4u-trace-categories.tesh include examples/cpp/trace-host-user-variables/s4u-trace-host-user-variables.cpp @@@ -476,14 -476,6 +476,6 @@@ include examples/python/io-degradation/ include examples/python/io-degradation/io-degradation.tesh include examples/python/network-nonlinear/network-nonlinear.py include examples/python/network-nonlinear/network-nonlinear.tesh - include examples/python/task-io/task-io.py - include examples/python/task-io/task-io.tesh - include examples/python/task-simple/task-simple.py - include examples/python/task-simple/task-simple.tesh - include examples/python/task-switch-host/task-switch-host.py - include examples/python/task-switch-host/task-switch-host.tesh - include examples/python/task-variable-load/task-variable-load.py - include examples/python/task-variable-load/task-variable-load.tesh include examples/python/platform-comm-serialize/platform-comm-serialize.py include examples/python/platform-comm-serialize/platform-comm-serialize.tesh include examples/python/platform-failures/platform-failures.py @@@ -496,6 -488,14 +488,14 @@@ include examples/python/synchro-mutex/s include examples/python/synchro-mutex/synchro-mutex.tesh include examples/python/synchro-semaphore/synchro-semaphore.py include examples/python/synchro-semaphore/synchro-semaphore.tesh + include examples/python/task-io/task-io.py + include examples/python/task-io/task-io.tesh + include examples/python/task-simple/task-simple.py + include examples/python/task-simple/task-simple.tesh + include examples/python/task-switch-host/task-switch-host.py + include examples/python/task-switch-host/task-switch-host.tesh + include examples/python/task-variable-load/task-variable-load.py + include examples/python/task-variable-load/task-variable-load.tesh include examples/smpi/NAS/DGraph.c include examples/smpi/NAS/DGraph.h include examples/smpi/NAS/README.install @@@ -1944,8 -1944,8 +1944,8 @@@ include include/simgrid/plugins/file_sy include include/simgrid/plugins/live_migration.h include include/simgrid/plugins/load.h include include/simgrid/plugins/ns3.hpp - include include/simgrid/plugins/task.hpp include include/simgrid/plugins/photovoltaic.hpp + include include/simgrid/plugins/task.hpp include include/simgrid/s4u.hpp include include/simgrid/s4u/Activity.hpp include include/simgrid/s4u/Actor.hpp @@@ -2192,10 -2192,8 +2192,10 @@@ include src/mc/api/RemoteApp.hp include src/mc/api/State.cpp include src/mc/api/State.hpp include src/mc/api/strategy/BasicStrategy.hpp +include src/mc/api/strategy/MaxMatchComm.hpp +include src/mc/api/strategy/MinMatchComm.hpp include src/mc/api/strategy/Strategy.hpp -include src/mc/api/strategy/WaitStrategy.hpp +include src/mc/api/strategy/UniformStrategy.hpp include src/mc/compare.cpp include src/mc/datatypes.h include src/mc/explo/CommunicationDeterminismChecker.cpp @@@ -2320,8 -2318,8 +2320,8 @@@ include src/plugins/host_load.cp include src/plugins/link_energy.cpp include src/plugins/link_energy_wifi.cpp include src/plugins/link_load.cpp - include src/plugins/task.cpp include src/plugins/photovoltaic.cpp + include src/plugins/task.cpp include src/plugins/vm/VmLiveMigration.cpp include src/plugins/vm/VmLiveMigration.hpp include src/plugins/vm/dirty_page_tracking.cpp diff --combined src/mc/api/State.cpp index 007b1799a9,877835fb5c..cc85d8c5fb --- a/src/mc/api/State.cpp +++ b/src/mc/api/State.cpp @@@ -5,9 -5,7 +5,9 @@@ #include "src/mc/api/State.hpp" #include "src/mc/api/strategy/BasicStrategy.hpp" -#include "src/mc/api/strategy/WaitStrategy.hpp" +#include "src/mc/api/strategy/MaxMatchComm.hpp" +#include "src/mc/api/strategy/MinMatchComm.hpp" +#include "src/mc/api/strategy/UniformStrategy.hpp" #include "src/mc/explo/Exploration.hpp" #include "src/mc/mc_config.hpp" @@@ -23,17 -21,10 +23,17 @@@ long State::expended_states_ = 0 State::State(RemoteApp& remote_app) : num_(++expended_states_) { XBT_VERB("Creating a guide for the state"); + + srand(_sg_mc_random_seed); + if (_sg_mc_strategy == "none") strategy_ = std::make_shared(); - else if (_sg_mc_strategy == "nb_wait") - strategy_ = std::make_shared(); + else if (_sg_mc_strategy == "max_match_comm") + strategy_ = std::make_shared(); + else if (_sg_mc_strategy == "min_match_comm") + strategy_ = std::make_shared(); + else if (_sg_mc_strategy == "uniform") + strategy_ = std::make_shared(); else THROW_IMPOSSIBLE; @@@ -50,18 -41,13 +50,18 @@@ State::State(RemoteApp& remote_app, std::shared_ptr parent_state) : incoming_transition_(parent_state->get_transition_out()), num_(++expended_states_), parent_state_(parent_state) { - if (_sg_mc_strategy == "none") + + if (_sg_mc_strategy == "none") strategy_ = std::make_shared(); - else if (_sg_mc_strategy == "nb_wait") - strategy_ = std::make_shared(); + else if (_sg_mc_strategy == "max_match_comm") + strategy_ = std::make_shared(); + else if (_sg_mc_strategy == "min_match_comm") + strategy_ = std::make_shared(); + else if (_sg_mc_strategy == "uniform") + strategy_ = std::make_shared(); else THROW_IMPOSSIBLE; - *strategy_ = *(parent_state->strategy_); + strategy_->copy_from(parent_state_->strategy_.get()); remote_app.get_actors_status(strategy_->actors_to_run_); @@@ -76,7 -62,7 +76,7 @@@ /* For each actor in the previous sleep set, keep it if it is not dependent with current transition. * And if we kept it and the actor is enabled in this state, mark the actor as already done, so that * it is not explored*/ - for (auto& [aid, transition] : parent_state_->get_sleep_set()) { + for (const auto& [aid, transition] : parent_state_->get_sleep_set()) { if (not incoming_transition_->depends(transition.get())) { sleep_set_.try_emplace(aid, transition); if (strategy_->actors_to_run_.count(aid) != 0) { diff --combined src/mc/explo/DFSExplorer.cpp index fef9cc777d,a5f06d5557..aa7fbb023c --- a/src/mc/explo/DFSExplorer.cpp +++ b/src/mc/explo/DFSExplorer.cpp @@@ -112,8 -112,8 +112,8 @@@ void DFSExplorer::log_state() // overri on_log_state_signal(get_remote_app()); XBT_INFO("DFS exploration ended. %ld unique states visited; %lu backtracks (%lu transition replays, %lu states " "visited overall)", - State::get_expanded_states(), backtrack_count_, visited_states_count_, - Transition::get_replayed_transitions()); + State::get_expanded_states(), backtrack_count_, Transition::get_replayed_transitions(), + visited_states_count_); Exploration::log_state(); } @@@ -200,7 -200,7 +200,7 @@@ void DFSExplorer::run( if (_sg_mc_sleep_set && XBT_LOG_ISENABLED(mc_dfs, xbt_log_priority_verbose)) { XBT_VERB("Sleep set actually containing:"); - for (auto& [aid, transition] : state->get_sleep_set()) + for (const auto& [aid, transition] : state->get_sleep_set()) XBT_VERB(" <%ld,%s>", aid, transition->to_string().c_str()); } @@@ -372,7 -372,7 +372,7 @@@ std::shared_ptr DFSExplorer::bes continue; if (valid != current) *valid = std::move(*current); - if (best == end(opened_states_) || prio > best_prio) { + if (best == end(opened_states_) || prio < best_prio) { best_prio = prio; best = valid; } @@@ -399,7 -399,7 +399,7 @@@ std::shared_ptr DFSExplorer::nex const auto& state = *iter; state->do_odpor_unwind(); XBT_DEBUG("\tPerformed ODPOR 'clean-up'. Sleep set has:"); - for (auto& [aid, transition] : state->get_sleep_set()) + for (const auto& [aid, transition] : state->get_sleep_set()) XBT_DEBUG("\t <%ld,%s>", aid, transition->to_string().c_str()); if (!state->has_empty_tree()) { return state; @@@ -455,7 -455,7 +455,7 @@@ void DFSExplorer::backtrack( } else { XBT_DEBUG("ODPOR: Ignoring race: `sleep(E')` intersects `WI_[E'](v := notdep(%u, E))`", e); XBT_DEBUG("Sleep set contains:"); - for (auto& [aid, transition] : prev_state.get_sleep_set()) + for (const auto& [aid, transition] : prev_state.get_sleep_set()) XBT_DEBUG(" <%ld,%s>", aid, transition->to_string().c_str()); } }