include examples/cpp/mc-centralized-mutex/s4u-mc-centralized-mutex.tesh
include examples/cpp/mc-electric-fence/s4u-mc-electric-fence.cpp
include examples/cpp/mc-electric-fence/s4u-mc-electric-fence.tesh
+include examples/cpp/mc-failing-assert/s4u-mc-failing-assert-nodpor.tesh
+include examples/cpp/mc-failing-assert/s4u-mc-failing-assert-statequality.tesh
include examples/cpp/mc-failing-assert/s4u-mc-failing-assert.cpp
include examples/cpp/mc-failing-assert/s4u-mc-failing-assert.tesh
include examples/cpp/network-factors/s4u-network-factors.cpp
include examples/python/exec-cpu-nonlinear/exec-cpu-nonlinear.tesh
include examples/python/exec-dvfs/exec-dvfs.py
include examples/python/exec-dvfs/exec-dvfs.tesh
+include examples/python/exec-ptask/exec-ptask.py
+include examples/python/exec-ptask/exec-ptask.tesh
include examples/python/exec-remote/exec-remote.py
include examples/python/exec-remote/exec-remote.tesh
include examples/python/io-degradation/io-degradation.py
include examples/smpi/trace_call_location/trace_call_location.tesh
include examples/smpi/trace_simple/trace_simple.c
include examples/smpi/trace_simple/trace_simple.tesh
+include examples/sthread/pthread-mutex-simple.c
+include examples/sthread/pthread-mutex-simple.tesh
+include examples/sthread/sthread-mutex-simple.c
include src/include/catch_simgrid.hpp
include teshsuite/java/semaphoregc/SemaphoreGC.java
include teshsuite/java/semaphoregc/semaphoregc.tesh
include teshsuite/smpi/coll-alltoall/clusters.tesh
include teshsuite/smpi/coll-alltoall/coll-alltoall.c
include teshsuite/smpi/coll-alltoall/coll-alltoall.tesh
-include teshsuite/smpi/coll-alltoall/griffon.tesh
include teshsuite/smpi/coll-alltoallv/coll-alltoallv.c
include teshsuite/smpi/coll-alltoallv/coll-alltoallv.tesh
include teshsuite/smpi/coll-barrier/coll-barrier.c
include examples/platforms/vivaldi.xml
include examples/platforms/wifi.xml
include examples/platforms/wifi_energy.xml
+ include examples/platforms/wifi_large_cell.xml
include examples/platforms/wifi_ns3.xml
include examples/python/CMakeLists.txt
include examples/python/actor-create/actor-create_d.xml
include examples/smpi/replay_multiple/CMakeLists.txt
include examples/smpi/replay_multiple_manual_deploy/CMakeLists.txt
include examples/smpi/smpi_s4u_masterworker/CMakeLists.txt
+include examples/sthread/CMakeLists.txt
include include/simgrid/Exception.hpp
include include/simgrid/actor.h
include include/simgrid/barrier.h
include include/xbt/Extendable.hpp
include include/xbt/PropertyHolder.hpp
include include/xbt/asserts.h
+include include/xbt/asserts.hpp
include include/xbt/automaton.h
include include/xbt/automaton.hpp
include include/xbt/backtrace.hpp
include src/mc/AddressSpace.hpp
include src/mc/ModelChecker.cpp
include src/mc/ModelChecker.hpp
-include src/mc/Session.cpp
-include src/mc/Session.hpp
include src/mc/VisitedState.cpp
include src/mc/VisitedState.hpp
-include src/mc/api.cpp
-include src/mc/api.hpp
+include src/mc/api/ActorState.hpp
+include src/mc/api/RemoteApp.cpp
+include src/mc/api/RemoteApp.hpp
include src/mc/api/State.cpp
include src/mc/api/State.hpp
include src/mc/compare.cpp
include src/mc/explo/CommunicationDeterminismChecker.cpp
include src/mc/explo/DFSExplorer.cpp
include src/mc/explo/DFSExplorer.hpp
+include src/mc/explo/Exploration.cpp
include src/mc/explo/Exploration.hpp
include src/mc/explo/LivenessChecker.cpp
include src/mc/explo/LivenessChecker.hpp
include src/mc/mc_exit.hpp
include src/mc/mc_forward.hpp
include src/mc/mc_global.cpp
-include src/mc/mc_hash.cpp
-include src/mc/mc_hash.hpp
-include src/mc/mc_ignore.hpp
include src/mc/mc_mmu.hpp
-include src/mc/mc_pattern.hpp
include src/mc/mc_private.hpp
include src/mc/mc_record.cpp
include src/mc/mc_record.hpp
include src/mc/mc_replay.hpp
-include src/mc/mc_safety.hpp
-include src/mc/mc_smx.cpp
include src/mc/remote/AppSide.cpp
include src/mc/remote/AppSide.hpp
include src/mc/remote/Channel.cpp
include src/simgrid/sg_version.cpp
include src/simgrid/util.hpp
include src/simix/libsmx.cpp
-include src/simix/smx_context.cpp
include src/smpi/bindings/smpi_f77.cpp
include src/smpi/bindings/smpi_f77_coll.cpp
include src/smpi/bindings/smpi_f77_comm.cpp
include src/smpi/smpiff.in
include src/smpi/smpirun.in
include src/smpi/smpitools.sh
+include src/sthread/sthread.c
+include src/sthread/sthread.h
+include src/sthread/sthread_impl.cpp
include src/surf/HostImpl.cpp
include src/surf/HostImpl.hpp
include src/surf/cpu_cas01.cpp
include src/xbt/memory_map.hpp
include src/xbt/mmalloc/mfree.c
include src/xbt/mmalloc/mm.c
+include src/xbt/mmalloc/mm_interface.c
include src/xbt/mmalloc/mm_legacy.c
include src/xbt/mmalloc/mm_module.c
include src/xbt/mmalloc/mmalloc.c
int Element::get_concurrency() const
{
+ // just to try having the computation of the concurrency
+ if (constraint->get_sharing_policy() == Constraint::SharingPolicy::WIFI) {
+ return 1;
+ }
+
// Ignore element with weight less than one (e.g. cross-traffic)
return (consumption_weight >= 1) ? 1 : 0;
// There are other alternatives, but they will change the behavior of the model..
"Concurrency limit overflow!");
}
-System* System::build(const std::string& solver_name, bool selective_update)
+System* System::build(std::string_view solver_name, bool selective_update)
{
System* system = nullptr;
if (solver_name == "bmf") {
return elem;
}
-void System::expand(Constraint* cnst, Variable* var, double consumption_weight)
+void System::expand(Constraint* cnst, Variable* var, double consumption_weight, bool force_creation)
{
modified_ = true;
auto elem_it =
std::find_if(begin(var->cnsts_), end(var->cnsts_), [&cnst](Element const& x) { return x.constraint == cnst; });
- if (elem_it != end(var->cnsts_) && var->sharing_penalty_ != 0.0) {
+
+ bool reuse_elem = elem_it != end(var->cnsts_) && not force_creation;
+ if (reuse_elem && var->sharing_penalty_ != 0.0) {
/* before changing it, decreases concurrency on constraint, it'll be added back later */
elem_it->decrease_concurrency();
}
- Element& elem = elem_it != end(var->cnsts_) ? expand_add_to_elem(*elem_it, cnst, consumption_weight)
- : expand_create_elem(cnst, var, consumption_weight);
+ Element& elem = reuse_elem ? expand_add_to_elem(*elem_it, cnst, consumption_weight)
+ : expand_create_elem(cnst, var, consumption_weight);
// Check if we need to disable the variable
if (var->sharing_penalty_ != 0) {
void Constraint::set_sharing_policy(SharingPolicy policy, const s4u::NonLinearResourceCb& cb)
{
- xbt_assert(policy == SharingPolicy::NONLINEAR || not cb,
+ xbt_assert(policy == SharingPolicy::NONLINEAR || policy == SharingPolicy::WIFI || not cb,
"Invalid sharing policy for constraint. Callback should be used with NONLINEAR sharing policy");
sharing_policy_ = policy;
dyn_constraint_cb_ = cb;
#include <cmath>
#include <limits>
#include <memory>
+#include <string_view>
#include <vector>
namespace simgrid::kernel::lmm {
*/
class XBT_PUBLIC Constraint {
public:
- enum class SharingPolicy { NONLINEAR = 2, SHARED = 1, FATPIPE = 0 };
+ enum class SharingPolicy { WIFI = 3, NONLINEAR = 2, SHARED = 1, FATPIPE = 0 };
Constraint(resource::Resource* id_value, double bound_value);
* @param selective_update Enables lazy updates
* @return pointer to System instance
*/
- static System* build(const std::string& solver_name, bool selective_update);
+ static System* build(std::string_view solver_name, bool selective_update);
/** @brief Validates solver configuration */
static void validate_solver(const std::string& solver_name);
* @param cnst A constraint
* @param var A variable
* @param value The coefficient associated to the variable in the constraint
+ * @param force_creation Force the creation of new element linking the variable to the constraint. Should be used only
+ * by the model ptask_L07 to cope with ptasks composed of flows running on the same resource (see
+ * https://framagit.org/simgrid/simgrid/-/issues/111)
*/
- void expand(Constraint * cnst, Variable * var, double value);
+ void expand(Constraint* cnst, Variable* var, double value, bool force_creation = false);
/** @brief Update the bound of a variable */
void update_variable_bound(Variable * var, double bound);
select = true;
}
- set_maxmin_system(lmm::System::build(cfg_network_solver, select));
+ set_maxmin_system(lmm::System::build(cfg_network_solver.get(), select));
loopback_.reset(create_link("__loopback__", {config::get_value<double>("network/loopback-bw")}));
loopback_->set_sharing_policy(s4u::Link::SharingPolicy::FATPIPE, {});
/* WI-FI links needs special treatment, do it here */
if (src_wifi_link != nullptr) {
- /* In case of 0Mbps data rate, don't consider it in the LMM */
if (src_wifi_link->get_host_rate(src) > 0)
get_maxmin_system()->expand(src_wifi_link->get_constraint(), action->get_variable(),
1.0 / src_wifi_link->get_host_rate(src));
- else
+ else {
get_maxmin_system()->update_variable_penalty(action->get_variable(), 0);
+ }
}
+
if (dst_wifi_link != nullptr) {
if (dst_wifi_link->get_host_rate(dst) > 0)
get_maxmin_system()->expand(dst_wifi_link->get_constraint(), action->get_variable(),
1.0 / dst_wifi_link->get_host_rate(dst));
- else
+ else {
get_maxmin_system()->update_variable_penalty(action->get_variable(), 0);
+ }
+
}
for (auto const* link : route) {
src/surf/network_ib.cpp
src/surf/network_smpi.cpp
)
+set(STHREAD_SRC
+ src/sthread/sthread_impl.cpp
+ src/sthread/sthread.c
+ src/sthread/sthread.h
+)
set(XBT_SRC
src/xbt/OsSemaphore.hpp
)
if(HAVE_MMALLOC)
- set(XBT_SRC ${XBT_SRC} src/xbt/mmalloc/mm.c )
+ set(SGMALLOC_SRC src/xbt/mmalloc/mm.c)
+ set(XBT_SRC ${XBT_SRC} src/xbt/mmalloc/mm.c)
else()
set(EXTRA_DIST ${EXTRA_DIST} src/xbt/mmalloc/mm.c)
endif()
src/kernel/context/ContextThread.cpp
src/kernel/context/ContextThread.hpp
src/simix/libsmx.cpp
- src/simix/smx_context.cpp
)
# Boost context may not be available
src/mc/explo/CommunicationDeterminismChecker.cpp
src/mc/explo/DFSExplorer.cpp
src/mc/explo/DFSExplorer.hpp
+ src/mc/explo/Exploration.cpp
src/mc/explo/Exploration.hpp
src/mc/explo/LivenessChecker.cpp
src/mc/explo/LivenessChecker.hpp
src/mc/AddressSpace.hpp
src/mc/ModelChecker.cpp
src/mc/ModelChecker.hpp
- src/mc/Session.cpp
- src/mc/Session.hpp
src/mc/VisitedState.cpp
src/mc/VisitedState.hpp
- src/mc/api.cpp
- src/mc/api.hpp
+ src/mc/api/ActorState.hpp
src/mc/api/State.cpp
src/mc/api/State.hpp
+ src/mc/api/RemoteApp.cpp
+ src/mc/api/RemoteApp.hpp
src/mc/compare.cpp
src/mc/mc_client_api.cpp
src/mc/mc_exit.hpp
src/mc/mc_forward.hpp
- src/mc/mc_hash.cpp
- src/mc/mc_hash.hpp
- src/mc/mc_ignore.hpp
- src/mc/mc_pattern.hpp
src/mc/mc_private.hpp
src/mc/mc_record.cpp
- src/mc/mc_safety.hpp
- src/mc/mc_smx.cpp
src/mc/udpor_global.cpp
src/mc/udpor_global.hpp
+
+ src/xbt/mmalloc/mm_interface.c
)
set(MC_SIMGRID_MC_SRC src/mc/explo/simgrid_mc.cpp)
include/smpi/forward.hpp
include/xbt.h
include/xbt/asserts.h
+ include/xbt/asserts.hpp
include/xbt/automaton.h
include/xbt/automaton.hpp
include/xbt/backtrace.hpp
examples/smpi/replay_multiple/CMakeLists.txt
examples/smpi/replay_multiple_manual_deploy/CMakeLists.txt
examples/smpi/smpi_s4u_masterworker/CMakeLists.txt
+ examples/sthread/CMakeLists.txt
teshsuite/java/CMakeLists.txt
teshsuite/kernel/CMakeLists.txt
examples/platforms/vivaldi.xml
examples/platforms/wifi.xml
examples/platforms/wifi_energy.xml
+ examples/platforms/wifi_large_cell.xml
examples/platforms/wifi_ns3.xml
)