Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Merge branch 'master' of https://framagit.org/simgrid/simgrid
authormlaurent <mathieu.laurent@ens-rennes.fr>
Tue, 27 Jun 2023 09:20:07 +0000 (11:20 +0200)
committermlaurent <mathieu.laurent@ens-rennes.fr>
Tue, 27 Jun 2023 09:20:07 +0000 (11:20 +0200)
90 files changed:
CMakeLists.txt
ChangeLog
MANIFEST.in
NEWS
docs/source/Configuring_SimGrid.rst
docs/source/Doxyfile
docs/source/Plugins.rst
docs/source/Release_Notes.rst
docs/source/app_s4u.rst
docs/source/app_smpi.rst
docs/source/conf.py
examples/README.rst
examples/cpp/CMakeLists.txt
examples/cpp/io-file-system/s4u-io-file-system.cpp
examples/cpp/mc-bugged1-liveness/s4u-mc-bugged1-liveness-visited.tesh
examples/cpp/mc-bugged1-liveness/s4u-mc-bugged1-liveness.tesh
examples/cpp/mc-bugged1/s4u-mc-bugged1.tesh
examples/cpp/mc-bugged2/s4u-mc-bugged2.tesh
examples/cpp/mc-electric-fence/s4u-mc-electric-fence.tesh
examples/cpp/mc-failing-assert/s4u-mc-failing-assert-nodpor.tesh
examples/cpp/mc-failing-assert/s4u-mc-failing-assert.tesh
examples/cpp/synchro-barrier/s4u-mc-synchro-barrier.tesh
examples/cpp/synchro-barrier/s4u-synchro-barrier.cpp
examples/cpp/synchro-mutex/s4u-mc-synchro-mutex-stateful.tesh
examples/cpp/synchro-mutex/s4u-mc-synchro-mutex.tesh
examples/cpp/synchro-semaphore/s4u-mc-synchro-semaphore.tesh
examples/cpp/task-io/s4u-task-io.cpp
examples/cpp/task-simple/s4u-task-simple.cpp
examples/cpp/task-storm/s4u-task-storm.cpp [new file with mode: 0644]
examples/cpp/task-storm/s4u-task-storm.tesh [new file with mode: 0644]
examples/cpp/task-switch-host/s4u-task-switch-host.cpp
examples/cpp/task-variable-load/s4u-task-variable-load.cpp
examples/python/task-io/task-io.py
examples/python/task-simple/task-simple.py
examples/python/task-switch-host/task-switch-host.py
examples/python/task-variable-load/task-variable-load.py
examples/smpi/mc/only_send_deterministic.tesh
examples/smpi/mc/sendsend.tesh
examples/sthread/pthread-mc-mutex-simple.tesh
examples/sthread/pthread-mc-mutex-simpledeadlock.tesh
examples/sthread/pthread-mc-producer-consumer.tesh
examples/sthread/stdobject/stdobject.tesh
include/simgrid/Exception.hpp
include/simgrid/forward.h
include/simgrid/host.h
include/simgrid/instr.h
include/simgrid/kernel/resource/Action.hpp
include/simgrid/plugins/battery.hpp
include/simgrid/plugins/photovoltaic.hpp
include/simgrid/s4u.hpp
include/simgrid/s4u/Activity.hpp
include/simgrid/s4u/Comm.hpp
include/simgrid/s4u/Disk.hpp
include/simgrid/s4u/Engine.hpp
include/simgrid/s4u/Exec.hpp
include/simgrid/s4u/Host.hpp
include/simgrid/s4u/Link.hpp
include/simgrid/s4u/Task.hpp [moved from include/simgrid/plugins/task.hpp with 53% similarity]
include/simgrid/simix.h [deleted file]
include/xbt/Extendable.hpp
include/xbt/base.h
include/xbt/module.h
include/xbt/virtu.h
setup.py
sonar-project.properties
src/bindings/python/simgrid_python.cpp
src/deprecated.cpp [deleted file]
src/instr/instr_interface.cpp
src/mc/api/State.cpp
src/mc/api/strategy/BasicStrategy.hpp
src/mc/api/strategy/MaxMatchComm.hpp
src/mc/api/strategy/MinMatchComm.hpp
src/mc/api/strategy/UniformStrategy.hpp
src/mc/explo/DFSExplorer.cpp
src/mc/explo/odpor/WakeupTreeIterator.cpp
src/mc/explo/odpor/WakeupTreeIterator.hpp
src/mc/explo/udpor/ExtensionSetCalculator.cpp
src/mc/mc_config.cpp
src/mc/mc_config.hpp
src/plugins/battery.cpp
src/plugins/photovoltaic.cpp
src/s4u/s4u_Comm.cpp
src/s4u/s4u_Engine.cpp
src/s4u/s4u_Host.cpp
src/s4u/s4u_Task.cpp [moved from src/plugins/task.cpp with 57% similarity]
src/simgrid/Exception.cpp
teshsuite/s4u/storage_client_server/storage_client_server.cpp
teshsuite/smpi/coll-allreduce-with-leaks/mc-coll-allreduce-with-leaks.tesh
teshsuite/xbt/cmdline/cmdline.c
tools/cmake/DefinePackages.cmake

index 4a34d20..545604e 100644 (file)
@@ -1,7 +1,7 @@
 # Build the version number
 
 set(SIMGRID_VERSION_MAJOR "3")
-set(SIMGRID_VERSION_MINOR "32")
+set(SIMGRID_VERSION_MINOR "34")
 set(SIMGRID_VERSION_PATCH "1") # odd => git branch; even => stable release or released snapshot
 
 if(${SIMGRID_VERSION_PATCH} EQUAL "0")
index 78392f1..5157b9d 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,4 +1,10 @@
-SimGrid (3.32.1) not released yet (target december 22)
+SimGrid (3.34.1) not released (Target: fall 2023)
+
+----------------------------------------------------------------------------
+
+SimGrid (3.34) June 26. 2023
+
+  Save the planet, skip a release: 3.33 was due 6 months ago, so skip directly to 3.34.
 
 General:
  - SimGrid now requires a compiler with C++17 support for public headers too.
@@ -17,13 +23,15 @@ S4U:
    Comm::set_payload_size() to change the size of the simulated data.
  - New function: Engine::flatify_platform(), to get a fully detailed vision of the
    configured platform.
+ - New Task abstraction: They are designed to represent dataflows, i.e, graphs of repeatable Activities.
+   See the examples under examples/cpp/task-* and the associated documentation.
  - Full simDAG integration: Activity::start() actually starts only when all dependencies
-   are fullfiled. If it cannot be started right away, it will start as soon as it becomes
+   are fulfilled. If it cannot be started right away, it will start as soon as it becomes
    possible.
  - Allow to set a concurrency limit on disks and hosts, as it was already the case for links.
  - Rename Link::get_usage() to Link::get_load() for consistency with Host::
  - Every signal now come with a static version that is invoked for every object of that class,
-   and an instance version that is invoked for this specific object only. For example, 
+   and an instance version that is invoked for this specific object only. For example,
    s4u::Actor::on_suspend_cb() adds a callback that is invoked for the suspend of any actor while
    s4u::Actor::on_this_suspend_cb() adds a callback for this specific actor only.
  - Activity::on_suspended_cb() is renamed to Activity::on_suspend_cb(), and fired right before the suspend.
@@ -34,15 +42,13 @@ S4U:
    That is, callbacks registered in Exec::on_suspend_cb will not be fired for Comms nor Ios.
 
 New S4U plugins:
- - Task: They are designed to represent dataflows, i.e, graphs of repeatable Activities.
-   See the examples under examples/cpp/task-* and the documentation in the Plugins page.
  - Battery: Enable the management of batteries on hosts.
    See the examples under examples/cpp/battery-* and the documentation in the Plugins page.
  - Photovoltaic: Enable the management of photovoltaic panels on hosts.
    See the examples under examples/cpp/photovoltaic-* and the documentation in the Plugins page.
 
 Kernel:
- - optimize an internal datastructure (use a set instead of a list for ongoing activities),
+ - optimize an internal data structure (use a set instead of a list for ongoing activities),
    leading to a potentially big performance gain, in particular with many detached comms.
 
 MPI:
@@ -52,7 +58,7 @@ MPI:
 
 Models:
  - Write the section of the manual about models, at least.
- - WiFi: the total capacity of a link depends on the amout of flows on that link.
+ - WiFi: the total capacity of a link depends on the amount of flows on that link.
    - Use the nonlinear callback feature of LMM to reflect this.
    - Calibration values can be changed to match different MCS configurations
    - See the example teshsuite/models/wifi_usage_decay/wifi_usage_decay.cpp
@@ -75,19 +81,22 @@ sthread:
    It requires code annotation, as shown in examples/sthread/stdobject/stdobject.cpp
 
 Model checking:
+ - Stateless model-checking is now usable on any system, including Mac OSX and ARM processors.
+ - The stateless aspects of the MC are now enabled by default in all SimGrid builds.
+   Liveness and stateful aspects are still controlled by the enabling_model-checking
+   configuration option.
+ - Introducing ODPOR and SDPOR reduction strategies
+ - Introducing guiding heuristics, trying to find bugs faster than DFS in reduced state space.
  - Synchronize the MBI tests with upstream.
- - Show the full actor bactraces when replaying a MC trace (with model-check/replay)
+ - Show the full actor backtraces when replaying a MC trace (with model-check/replay)
    and the status of all actors on deadlocks in MC mode.
- - The safety/stateless aspects of the MC are now enabled by default in all SimGrid builds.
-   Liveness and stateful aspects are still controled by the enabling_model-checking
-   configuration option.
- - Stateless model-checking is now usable on any system, including Mac OSX and ARM processors.
 
 XBT:
  - simgrid::xbt::cmdline and simgrid::xbt::binary_name are gone.
    Please use simgrid::s4u::Engine::get_cmdline() instead.
 
 Documentation:
+ - New tutorial on simulating DAGs.
  - New section in the user guide on the provided performance models.
  - New section presenting some technical good practices for (potential) contributors.
  - Add a section on errors and exceptions to the API documentation.
index 296c687..069d589 100644 (file)
@@ -398,6 +398,8 @@ 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-storm/s4u-task-storm.cpp
+include examples/cpp/task-storm/s4u-task-storm.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
@@ -1945,7 +1947,6 @@ include include/simgrid/plugins/live_migration.h
 include include/simgrid/plugins/load.h
 include include/simgrid/plugins/ns3.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
@@ -1962,9 +1963,9 @@ include include/simgrid/s4u/Mailbox.hpp
 include include/simgrid/s4u/Mutex.hpp
 include include/simgrid/s4u/NetZone.hpp
 include include/simgrid/s4u/Semaphore.hpp
+include include/simgrid/s4u/Task.hpp
 include include/simgrid/s4u/VirtualMachine.hpp
 include include/simgrid/semaphore.h
-include include/simgrid/simix.h
 include include/simgrid/simix.hpp
 include include/simgrid/version.h.in
 include include/simgrid/vm.h
@@ -2023,7 +2024,6 @@ include src/dag/dax.dtd
 include src/dag/dax_dtd.c
 include src/dag/dax_dtd.h
 include src/dag/loaders.cpp
-include src/deprecated.cpp
 include src/instr/instr_config.cpp
 include src/instr/instr_interface.cpp
 include src/instr/instr_paje_containers.cpp
@@ -2228,9 +2228,9 @@ include src/mc/explo/udpor/Configuration_test.cpp
 include src/mc/explo/udpor/EventSet.cpp
 include src/mc/explo/udpor/EventSet.hpp
 include src/mc/explo/udpor/EventSet_test.cpp
-include src/mc/explo/udpor/ExtensionSet_test.cpp
 include src/mc/explo/udpor/ExtensionSetCalculator.cpp
 include src/mc/explo/udpor/ExtensionSetCalculator.hpp
+include src/mc/explo/udpor/ExtensionSet_test.cpp
 include src/mc/explo/udpor/History.cpp
 include src/mc/explo/udpor/History.hpp
 include src/mc/explo/udpor/History_test.cpp
@@ -2322,7 +2322,6 @@ include src/plugins/link_energy.cpp
 include src/plugins/link_energy_wifi.cpp
 include src/plugins/link_load.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
@@ -2341,6 +2340,7 @@ include src/s4u/s4u_Mailbox.cpp
 include src/s4u/s4u_Mutex.cpp
 include src/s4u/s4u_Netzone.cpp
 include src/s4u/s4u_Semaphore.cpp
+include src/s4u/s4u_Task.cpp
 include src/s4u/s4u_VirtualMachine.cpp
 include src/simgrid/Exception.cpp
 include src/simgrid/math_utils.h
diff --git a/NEWS b/NEWS
index fe01ae8..7265100 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -1,14 +1,32 @@
-                    _               _____  __________
-__   _____ _ __ ___(_) ___  _ __   |___ / |___ /___ /
-\ \ / / _ \ '__/ __| |/ _ \| '_ \    |_ \   |_ \ |_ \
+                    _               _____  _________
+__   _____ _ __ ___(_) ___  _ __   |___ / |___ / ___|
+\ \ / / _ \ '__/ __| |/ _ \| '_ \    |_ \   |_ \___ \
  \ V /  __/ |  \__ \ | (_) | | | |  ___) | ___) |__) |
   \_/ \___|_|  |___/_|\___/|_| |_| |____(_)____/____/
                (not released yet)
 
-  * MSG and Java are gone (EOL was scheduled for 2020)
-  * Introduce a fluid I/O model, mixing I/O and network, to represent streaming from disk
-  * Fix the DPOR reduction, toward sound verifications.
-  * (+ MANY internal refactoring, bug fixes and MANY documentation improvement)
+                    _               _____  _____ _  _
+__   _____ _ __ ___(_) ___  _ __   |___ / |___ /| || |
+\ \ / / _ \ '__/ __| |/ _ \| '_ \    |_ \   |_ \| || |_
+ \ V /  __/ |  \__ \ | (_) | | | |  ___) | ___) |__   _|
+  \_/ \___|_|  |___/_|\___/|_| |_| |____(_)____/   |_|
+               June 26. 2023
+
+Save the planet, skip a release: 3.33 was due 6 months ago, so skip directly to 3.34.
+
+ * Maint: MSG and Java are gone (EOL was scheduled for 2020), move to C++17,
+          and drop 32bits support.
+ * Model: Introduce a fluid I/O model, mixing I/O and network, to represent
+          streaming from disk
+ * API: DAG/workflow loader; Introducing Tasks which are activities that can
+        be fired several times.
+ * Doc: Several new documentation sections, and a new tutorial on DAGs.
+ * MC: Safety properties now portable to every OS, activated by default
+       in all builds.
+ * MC: Introduction ODPOR/SDPOR reductions and guiding strategies (better
+       state space traversal).
+ * (+ internal refactoring, bug fixes and documentation improvement)
+
                     _               _____  _________
 __   _____ _ __ ___(_) ___  _ __   |___ / |___ /___ \
 \ \ / / _ \ '__/ __| |/ _ \| '_ \    |_ \   |_ \ __) |
index d344ae1..72d4c51 100644 (file)
@@ -684,16 +684,20 @@ setting for your specific system.
 Specifying the kind of reduction
 ................................
 
+**Option** model-check/reduction **Default:** "dpor"
+
 The main issue when using the model-checking is the state space
 explosion. You can activate some reduction technique with
 ``--cfg=model-check/reduction:<technique>``. For now, this
 configuration variable can take 2 values:
 
- - **none:** Do not apply any kind of reduction (mandatory for
-   liveness properties, as our current DPOR algorithm breaks cycles)
- - **dpor:** Apply Dynamic Partial Ordering Reduction. Only valid if
-   you verify local safety properties (default value for safety
-   checks).
+ - **none:** Do not apply any kind of reduction (mandatory for liveness properties, as our current DPOR algorithm breaks cycles)
+ - **dpor:** Apply Dynamic Partial Ordering Reduction. Only valid if you verify local safety properties (default value for
+   safety checks).
+ - **sdpor:** Source-set DPOR, as described in "Source Sets: A Foundation for Optimal Dynamic Partial Order Reduction"
+    by Abdulla et al.
+ - **odpor:** Optimal DPOR, as described in "Source Sets: A Foundation for Optimal Dynamic Partial Order Reduction"
+    by Abdulla et al.
 
 Another way to mitigate the state space explosion is to search for
 cycles in the exploration with the :ref:`cfg=model-check/visited`
@@ -705,6 +709,27 @@ currently improving its efficiency (both in term of reduction ability
 and computational speed), and future work could make it compatible
 with liveness properties.
 
+.. _cfg=model-check/strategy:
+
+Guiding strategy
+................
+
+**Option** model-check/strategy **Default:** "none"
+
+Even after the DPOR's reduction, the state space that we have to explore remains huge. SimGrid provides several guiding
+strategies aiming at converging faster toward bugs. By default, none of these strategy is enabled, and SimGrid does a regular
+DFS exploration.
+
+ - **max_match_comm**: Try to minimize the number of in-fly communication by appairing matching send and receive. This tend to
+   produce nicer backtraces, in particular when a user-level ``send`` is broken down internally into a ``send_async`` + ``wait``.
+   This strategy will ensure that the ``wait`` occures as soon as possible, easing the understanding of the user who do not
+   expect her ``send`` to be split.
+ - **min_match_comm**: Try to maximize the number of in-fly communication by not appairing matching send and receive. This is
+   the exact opposite strategy, but it is still useful as it tend to explore first the branches where the risk of deadlock is
+   higher.
+ - **uniform**: this is a boring random strategy where choices are based on a uniform sampling of possible choices.
+   Surprisingly, it gives really really good results.
+
 .. _cfg=model-check/visited:
 
 Size of Cycle Detection Set (state equality reduction)
index 1595fcb..4f74552 100644 (file)
@@ -19,6 +19,7 @@ INPUT                 += ../../include/simgrid/mutex.h
 INPUT                 += ../../include/simgrid/semaphore.h
 INPUT                 += ../../include/simgrid/vm.h
 INPUT                 += ../../include/simgrid/zone.h
+INPUT                 += ../../include/smpi/smpi.h
 INPUT                 += ../../include/xbt/dynar.h
 INPUT                 += ../../src/xbt/dynar.cpp
 INPUT                 += ../../include/xbt/signal.hpp
@@ -65,7 +66,6 @@ PREDEFINED             += \
     XBT_ATTRIB_NORETURN= \
     XBT_ATTRIB_UNUSED= \
     XBT_LOG_NEW_DEFAULT_SUBCATEGORY(cname,parent,desc)= \
-    XBT_ATTRIB_DEPRECATED_v334(mesg)= \
-    XBT_ATTRIB_DEPRECATED_v335(mesg)= \
     XBT_ATTRIB_DEPRECATED_v336(mesg)= \
-    XBT_ATTRIB_DEPRECATED_v337(mesg)=
+    XBT_ATTRIB_DEPRECATED_v338(mesg)= \
+    XBT_ATTRIB_DEPRECATED_v339(mesg)=
index aeac133..46b6c01 100644 (file)
@@ -23,6 +23,8 @@ documents some of the plugins distributed with SimGrid:
   - :ref:`Host Energy <plugin_host_energy>`: models the energy dissipation of the compute units.
   - :ref:`Link Energy <plugin_link_energy>`: models the energy dissipation of the network.
   - :ref:`WiFi Energy <plugin_link_energy_wifi>`: models the energy dissipation of wifi links.
+  - :ref:`Battery <plugin_battery>`: models batteries that get discharged by the energy consumption of a given host.
+  - :ref:`Photovoltaic <plugin_photovoltaic>`: models photovoltaic panels which energy production depends on the solar irradiance.
 
 You can activate these plugins with the :ref:`--cfg=plugin <cfg=plugin>` command
 line option, for example with ``--cfg=plugin:host_energy``. You can get the full
@@ -67,7 +69,10 @@ kind of objects, please let us now.
 
   Fire that signal, invoking all callbacks.
 
-Partial list of existing signals in s4u:
+.. _s4u_API_signals:
+
+Existing signals
+================
 
 - In actors:
   :cpp:func:`Actor::on_creation <simgrid::s4u::Actor::on_creation_cb>`
@@ -219,13 +224,6 @@ Battery
 
 .. doxygengroup:: plugin_battery
 
-.. _plugin_task:
-
-Task
-===========
-
-.. doxygengroup:: plugin_task
-
 .. _plugin_photovoltaic:
 
 Photovoltaic
index 495ad65..80cad37 100644 (file)
@@ -568,15 +568,20 @@ Hopefully in the next release.
 Finally, this release mostly entails maintenance work **on the model front**: a bug was fixed when using ptasks on multicore hosts, and the legacy
 stochastic generator of external load has been reintroduced.
 
-Version 3.33 (not released yet)
--------------------------------
+Version 3.33 (never released)
+-----------------------------
+
+This version was overdue for more than 6 months, so it was skipped to not hinder our process of deprecating old code.
+
+Version 3.34 (June 26. 2023)
+----------------------------
 
-**On the maintainance front,** we removed the ancient MSG interface which end-of-life was scheduled for 2020, the Java bindings
+**On the maintenance front,** we removed the ancient MSG interface which end-of-life was scheduled for 2020, the Java bindings
 that was MSG-only, support for native builds on Windows (WSL is now required) and support for 32 bits platforms. Keeping SimGrid
 alive while adding new features require to remove old, unused stuff. The very rare users impacted by these removals are urged to
 move to the new API and systems.
 
-We also conducted many internal refactorings to remove any occurence of "surf" and "simix". SimGrid v3.12 used a layered design
+We also conducted many internal refactorings to remove any occurrence of "surf" and "simix". SimGrid v3.12 used a layered design
 where simix was providing synchronizations to actors, on top of surf which was computing the models. These features are now
 provided in modules, not layers. Surf became the kernel::{lmm, resource, routing, timer, xml} modules while simix became
 the kernel::{activity, actor, context} modules.
@@ -589,13 +594,16 @@ the other models do. The *fair bottleneck* solver is convenient, but with less s
 development of its replacement (the *bmf solver*) is still ongoing. However, this combination of I/Os and
 communications seemed easier as these activities share the same unit (bytes).
 
-After a few tentatives, we opted for a simple, slightly unperfect, yet convenient way to implement such I/O streams
-at the kernel level. It doesn't require a new model, just that the default HostModels implements a new function which
-creates a classical NetworkAction, but add some I/O-related constraints to it. A couple little hacks here and there,
-and done! A single activity mixing I/Os and communications can be created whose progress is limited by the resource
-(Disk or Link) of least bandwidth value.
+After a few tentatives, we opted for a simple, slightly imperfect, yet convenient way to implement such I/O streams at the
+kernel level. It doesn't require a new model, just that the default HostModels implements a new function which creates a
+classical NetworkAction, but add some I/O-related constraints to it. A couple little hacks here and there, and done! A single
+activity mixing I/Os and communications can be created whose progress is limited by the resource (Disk or Link) of least
+bandwidth value. As a result, a new :cpp:func:`Io::streamto()` function has been added to send data between arbitrary disks or
+hosts. The user can specify a ``src_disk`` on a ``src_host`` and a ``dst_disk`` on a ``dst_host`` to stream data of a
+given ``size``. Note that disks are optional, allowing users to simulate some kind of "disk-to-memory" or "memory-to-disk" I/O
+streams. It's highly inspired by the existing :cpp:func:`Comm::sendto` that can be used to send data between arbitrary hosts.
 
-We also modified the Wi-Fi model so that the total capacity of a link depends on the amout of flows on that link, accordingly to
+We also modified the Wi-Fi model so that the total capacity of a link depends on the amount of flows on that link, accordingly to
 the result of some ns-3 experiments. This model can be more accurate for congestioned Wi-Fi links, but its calibration is more
 demanding, as shown in the `example
 <https://framagit.org/simgrid/simgrid/tree/master/teshsuite/models/wifi_usage_decay/wifi_usage_decay.cpp>`_ and in the `research
@@ -603,29 +611,63 @@ paper <https://hal.archives-ouvertes.fr/hal-03777726>`_.
 
 We also worked on the usability of our models, by actually writing the long overdue documentation of our TCP models and by renaming
 some options for clarity (old names are still accepted as aliases). A new function ``s4u::Engine::flatify_platform()`` dumps an
-XML representation that is inefficient (all zones are flatified) but easier to read (routes are explicitely defined). You should
+XML representation that is inefficient (all zones are flatified) but easier to read (routes are explicitly defined). You should
 not use the output as a regular input file, but it will prove useful to double-check the your platform.
 
-**On the interface front**, the new ``Io::streamto()`` function has been inspired by the existing ``Comm::sendto()``
-function (which also derives from the ptask model). The user can specify a ``src_disk`` on a ``src_host`` and a
-``dst_disk`` on a ``dst_host`` to stream data of a given ``size``. Note that disks are optional, allowing users to
-simulate some kind of "disk-to-memory" or "memory-to-disk" I/O streams.
-
-As usual on that front, some functions were deprecated and will be removed in 4 versions, while some old deprecated functions
-were removed in this version.
-
-**On the model checking front**, we are almost done with the ongoing refactoring to ensure that the model-checker don't read
-directly the memory of the application beside checkpoint/restore and state equality. Instead, the network protocol is used to
-retrieve the information, which makes the code much easier to read and understand. We fixed a bug in the DPOR reduction which
-resulted in some failures to be missed by the exploration, but our quick fix hindered the reduction quality. As a result, some
-scenarios which could be explored completely earlier (with bugs) are now too large for our (correct) exploration algorithm. We
-should improve DPOR in the next release, possibly implementing the ODPOR variant (Optimal DPOR). Also, we started implementing
-the UDPOR (Unfoldings DPOR) reduction algorithm, also for the next release.
+**On the interface front**, some functions were deprecated and will be removed in 4 versions, while some old deprecated functions
+were removed in this version, as usual.
+
+Expressing your application as a DAG or a workflow is even more integrated than before. We added a new tutorial on simulating
+DAGs and a DAG loader for workflows using the `wfcommons formalism <https://wfcommons.org/>`_. Starting an activity is now
+properly delayed until after all its dependencies are fulfilled. We also added a notion of :ref:`Task <API_s4u_Tasks>`, a sort
+of activity that can be fired several time. It's very useful to represent complex workflows. We added a ``on_this`` variant of
+:ref:`every signal <s4u_API_signals>`, to react to the signals emitted by one object instance only. This is sometimes easier than
+reacting to every signals of a class, and then filtering on the object you want. Activity signals (veto, suspend, resume,
+completion) are now specialized by activity class. That is, callbacks registered in Exec::on_suspend_cb will not be fired for
+Comms nor Ios
+
+Two new useful plugins were added: The :ref:`battery plugin<plugin_battery>` can be used to create batteries that get discharged
+by the energy consumption of a given host, while the :ref:`photovoltaic plugin <plugin_photovoltaic>` can be used to create
+photovoltaic panels which energy production depends on the solar irradiance. These plugins could probably be better integrated
+in the framework, but our goal is to include in SimGrid the building blocks upon which everybody would agree, while the model
+elements that are more arguable are provided as plugins, in the hope that the users will carefully assess the plugins and adapt
+them to their specific needs before usage. Here for example, there is several models of batteries (the one provided does not
+take the aging into account), and would not be adapted to every studies.
+
+It is now easy to mix S4U actors and SMPI applications, or even to start more than one MPI application in a given simulation
+with the :ref:`SMPI_app_instance_start() <SMPI_mix_s4u>` function.
+
+**On the model checking front**, this release brings a huge load of good improvements. First, we finished the long refactoring
+so that the model-checker only reads the memory of the application for state equality (used for liveness checking) and for
+:ref:`stateful checking <cfg=model-check/checkpoint>`. Instead, the network protocol is used to retrieve the information and the
+application is simply forked to explore new execution branches. The code is now easier to read and to understand. Even better,
+the verification of safety properties is now enabled by default on every platforms since it does not depend on advanced OS
+mechanisms anymore. You can even run the verified application in valgrind in that case. On the other hand, liveness checking
+still needs to be enabled at compile time if you need it. Tbh, this part of the framework is not very well maintained nowadays.
+We should introduce more testing of the liveness verification at some point to fix this situation.
+
+Back on to safety verification, we fixed a bug in the DPOR reduction which resulted in some failures to be missed by the
+exploration, but this somewhat hinders the reduction quality (as we don't miss branches anymore). Some scenarios which could be
+exhaustively explored earlier (with our buggy algorithm) are now too large for our (correct) exploration algorithm. But that's
+not a problem because we implemented several mechanism to improve the performance of the verification. First, we implemented
+source sets in DPOR, to blacklist transitions that are redundant with previously explored ones. Then, we implemented several new
+DPOR variants. SDPOR and ODPOR are very efficient algorithms described in the paper "Source Sets: A Foundation for Optimal
+Dynamic Partial Order Reduction" by Abdulla et al in 2017. We also have an experimental implementation of UPDOR, described in
+the paper "Unfolding-based Partial Order Reduction" by Rodriguez et al in 2015, but it's not completely functional yet. We hope
+to finish it for the next release. And finally, we implemented a guiding mechanism trying to converge faster toward the bugs in
+the reduced state space. We have some naive heuristics, and we hope to provide better ones in the next release.
 
 We also extended the sthread module, which allows to intercept simple code that use pthread mutex and semaphores to simulate and
 verify it. You do not even need to recompile your code, as it uses LD_PRELOAD to intercept on the target functions. This module
-is still rather young, but it could already reveal useful to verify the code written by students in a class on UNIX IPC and
-synchronization. Check `the examples <https://framagit.org/simgrid/simgrid/tree/master/examples/sthread>`_.
+is still rather young, but it could probably be useful already, e.g. to verify the code written by students in a class on UNIX
+IPC and synchronization. Check `the examples <https://framagit.org/simgrid/simgrid/tree/master/examples/sthread>`_. In addition,
+sthread can now also check concurrent accesses to a given collection, loosely inspired from `this paper
+<https://www.microsoft.com/en-us/research/publication/efficient-and-scalable-thread-safety-violation-detection-finding-thousands-of-concurrency-bugs-during-testing>`_.
+This feature is not very usable yet, as you have to manually annotate your code, but we hope to improve it in the near future.
+
+Version 3.35 (TBD)
+------------------
+
 
 .. |br| raw:: html
 
index e5148af..4a0f3fe 100644 (file)
@@ -96,6 +96,9 @@ provides many helper functions to simplify the code of actors.
 .. |API_s4u_Activities| replace:: **Activities**
 .. _API_s4u_Activities: #api-s4u-activity
 
+.. |API_s4u_Tasks| replace:: **Tasks**
+.. _API_s4u_Tasks: #api-s4u-task
+
 .. |API_s4u_Hosts| replace:: **Hosts**
 .. _API_s4u_Hosts: #api-s4u-host
 
@@ -187,13 +190,39 @@ with :cpp:func:`s4u::Comm::wait_all() <simgrid::s4u::Comm::wait_all>`.
    :dedent: 2
 
 =====================
-Activities Life cycle
+Activities Life Cycle
 =====================
 
 Sometimes, you want to change the setting of an activity before it even starts.
 
 .. todo:: write this section
 
+=====================
+Repeatable Activities
+=====================
+
+In order to simulate the execution of Dataflow applications, we introduced the
+concept of |API_s4u_Tasks|, that can be seen as repeatable activities. A Dataflow
+is defined as a graph of |API_s4u_Tasks| through which circulate Tokens. Tokens
+can carry any user-defined data, using the same internal mechanisms as for the
+other simulated objects. Each Task has to receive a token from each of its
+predecessor to fire a new instance of a |API_s4u_Comm|, |API_s4u_Exec|, or
+|API_s4u_Io| activity. On completion of this activity, the Task propagates tokens
+to its successors, and waits for the next set of tokens to arrive.
+
+To initiate the execution of a Dataflow, it is possible to some make
+|API_s4u_Tasks| fire one or more activities without waiting for any token with the
+:cpp:func:`s4u::Task::enqueue_firings() <simgrid::s4u::Task::enqueue_firings>`
+function.
+
+The parameters and successors of a Task can be redefined at runtime by attaching
+callbacks to the
+:cpp:func:`s4u::Task::on_this_start <simgrid::s4u::Task::on_this_start>`
+and
+:cpp:func:`s4u::Task::on_this_completion <simgrid::s4u::Task::on_this_completion>`
+signals.
+
+
 .. _s4u_mailbox:
 
 Mailboxes
@@ -2116,8 +2145,8 @@ Querying info
 
    .. group-tab:: C++
 
-      .. doxygenfunction:: simgrid::s4u::Activity::get_cname
-      .. doxygenfunction:: simgrid::s4u::Activity::get_name
+      .. doxygenfunction:: simgrid::s4u::Activity::get_cname() const
+      .. doxygenfunction:: simgrid::s4u::Activity::get_name() const
       .. doxygenfunction:: simgrid::s4u::Activity::get_remaining() const
       .. doxygenfunction:: simgrid::s4u::Activity::get_state() const
       .. doxygenfunction:: simgrid::s4u::Activity::set_remaining(double remains)
@@ -2310,11 +2339,11 @@ Signals
    .. group-tab:: C++
 
       .. doxygenfunction:: simgrid::s4u::Comm::on_start_cb
+      .. doxygenfunction:: simgrid::s4u::Comm::on_this_start_cb
       .. doxygenfunction:: simgrid::s4u::Comm::on_completion_cb
+      .. doxygenfunction:: simgrid::s4u::Comm::on_this_completion_cb
       .. doxygenfunction:: simgrid::s4u::Comm::on_recv_cb
       .. doxygenfunction:: simgrid::s4u::Comm::on_send_cb
-
-      .. doxygenfunction:: simgrid::s4u::Comm::on_completion_cb
       .. doxygenfunction:: simgrid::s4u::Comm::on_suspended_cb
       .. doxygenfunction:: simgrid::s4u::Comm::on_resumed_cb
       .. doxygenfunction:: simgrid::s4u::Comm::on_veto_cb
@@ -2453,9 +2482,10 @@ Signals
    .. group-tab:: C++
 
       .. doxygenfunction:: simgrid::s4u::Exec::on_start_cb
+      .. doxygenfunction:: simgrid::s4u::Exec::on_this_start_cb
       .. doxygenfunction:: simgrid::s4u::Exec::on_completion_cb
+      .. doxygenfunction:: simgrid::s4u::Exec::on_this_completion_cb
 
-      .. doxygenfunction:: simgrid::s4u::Exec::on_completion_cb
       .. doxygenfunction:: simgrid::s4u::Exec::on_suspended_cb
       .. doxygenfunction:: simgrid::s4u::Exec::on_resumed_cb
       .. doxygenfunction:: simgrid::s4u::Exec::on_veto_cb
@@ -2529,13 +2559,211 @@ Signals
    .. group-tab:: C++
 
       .. doxygenfunction:: simgrid::s4u::Io::on_start_cb
+      .. doxygenfunction:: simgrid::s4u::Io::on_this_start_cb
       .. doxygenfunction:: simgrid::s4u::Io::on_completion_cb
+      .. doxygenfunction:: simgrid::s4u::Io::on_this_completion_cb
 
-      .. doxygenfunction:: simgrid::s4u::Io::on_completion_cb
       .. doxygenfunction:: simgrid::s4u::Io::on_suspended_cb
       .. doxygenfunction:: simgrid::s4u::Io::on_resumed_cb
       .. doxygenfunction:: simgrid::s4u::Io::on_veto_cb
 
+
+.. _API_s4u_Tasks:
+
+==========
+Tasks
+==========
+
+==============
+class Task
+==============
+
+.. doxygenclass:: simgrid::s4u::Task
+
+**Known subclasses:**
+:ref:`Communication Tasks <API_s4u_CommTask>`,
+:ref:`Executions Tasks <API_s4u_ExecTask>`,
+:ref:`I/O Tasks <API_s4u_Task>`.
+See also the :ref:`section on activities <s4u_Tasks>` above.
+
+Basic management
+----------------
+
+.. tabs::
+
+   .. group-tab:: C++
+
+      .. code-block:: C++
+
+         #include <simgrid/s4u/Task.hpp>
+
+      .. doxygentypedef:: TaskPtr
+
+Querying info
+-------------
+
+.. tabs::
+
+   .. group-tab:: C++
+
+      .. doxygenfunction:: simgrid::s4u::Task::get_cname() const
+      .. doxygenfunction:: simgrid::s4u::Task::get_name() const
+      .. doxygenfunction:: simgrid::s4u::Task::get_count() const
+      .. doxygenfunction:: simgrid::s4u::Task::get_amount() const
+      .. doxygenfunction:: simgrid::s4u::Task::set_amount(double amount)
+
+Life cycle
+----------
+
+.. tabs::
+
+   .. group-tab:: C++
+      .. doxygenfunction:: simgrid::s4u::Task::enqueue_firings(int n)
+
+Managing Dependencies
+---------------------
+.. tabs::
+
+   .. group-tab:: C++
+      .. doxygenfunction:: simgrid::s4u::Task::add_successor(TaskPtr t)
+      .. doxygenfunction:: simgrid::s4u::Task::remove_successor(TaskPtr t)
+      .. doxygenfunction:: simgrid::s4u::Task::remove_all_successors()
+      .. doxygenfunction:: simgrid::s4u::Task::get_successors() const
+
+Managing Tokens
+---------------
+.. doxygenclass:: simgrid::s4u::Token
+
+.. tabs::
+
+   .. group-tab:: C++
+      .. doxygenfunction:: simgrid::s4u::Task::set_token(std::shared_ptr<Token> token)
+      .. doxygenfunction:: simgrid::s4u::Task::get_next_token_from(TaskPtr t)
+
+Signals
+-------
+
+.. tabs::
+
+   .. group-tab:: C++
+      .. doxygenfunction:: simgrid::s4u::Task::on_start_cb
+      .. doxygenfunction:: simgrid::s4u::Task::on_this_start_cb
+      .. doxygenfunction:: simgrid::s4u::Task::on_completion_cb
+      .. doxygenfunction:: simgrid::s4u::Task::on_this_completion_cb
+
+.. _API_s4u_CommTask:
+
+================
+⁣  class CommTask
+================
+.. tabs::
+
+   .. group-tab:: C++
+
+      .. doxygenclass:: simgrid::s4u::CommTask
+
+Basic management
+----------------
+
+.. tabs::
+
+   .. group-tab:: C++
+
+      .. code-block:: C++
+
+         #include <simgrid/s4u/Task.hpp>
+
+      .. doxygentypedef:: CommTaskPtr
+
+Querying info
+-------------
+
+.. tabs::
+
+   .. group-tab:: C++
+
+      .. doxygenfunction:: simgrid::s4u::Task::get_source() const
+      .. doxygenfunction:: simgrid::s4u::Task::get_destination() const
+      .. doxygenfunction:: simgrid::s4u::Task::get_bytes() const
+      .. doxygenfunction:: simgrid::s4u::Task::set_source(simgrid::s4u::Host* source);
+      .. doxygenfunction:: simgrid::s4u::Task::set_destination(simgrid::s4u::Host* destination);
+      .. doxygenfunction:: simgrid::s4u::Task::set_bytes(double bytes)
+
+
+.. _API_s4u_ExecTask:
+
+================
+⁣  class ExecTask
+================
+.. tabs::
+
+   .. group-tab:: C++
+
+      .. doxygenclass:: simgrid::s4u::ExecTask
+
+Basic management
+----------------
+
+.. tabs::
+
+   .. group-tab:: C++
+
+      .. code-block:: C++
+
+         #include <simgrid/s4u/Task.hpp>
+
+      .. doxygentypedef:: ExecTaskPtr
+
+Querying info
+-------------
+
+.. tabs::
+
+   .. group-tab:: C++
+
+      .. doxygenfunction:: simgrid::s4u::Task::get_host() const
+      .. doxygenfunction:: simgrid::s4u::Task::get_flops() const
+      .. doxygenfunction:: simgrid::s4u::Task::set_host(simgrid::s4u::Host* host);
+      .. doxygenfunction:: simgrid::s4u::Task::set_flops(double flops);
+
+.. _API_s4u_IoTask:
+
+================
+⁣  class IoTask
+================
+.. tabs::
+
+   .. group-tab:: C++
+
+      .. doxygenclass:: simgrid::s4u::IoTask
+
+Basic management
+----------------
+
+.. tabs::
+
+   .. group-tab:: C++
+
+      .. code-block:: C++
+
+         #include <simgrid/s4u/Task.hpp>
+
+      .. doxygentypedef:: IoTaskPtr
+
+Querying info
+-------------
+
+.. tabs::
+
+   .. group-tab:: C++
+
+     .. doxygenfunction:: simgrid::s4u::Task::get_disk() const
+     .. doxygenfunction:: simgrid::s4u::Task::get_bytes() const
+     .. doxygenfunction:: simgrid::s4u::Task::get_op_type() const
+     .. doxygenfunction:: simgrid::s4u::Task::set_disk(simgrid::s4u::Disk* disk);
+     .. doxygenfunction:: simgrid::s4u::Task::set_bytes(simgrid::double bytes);
+     .. doxygenfunction:: simgrid::s4u::Task::set_op_type(simgrid::s4u::Io::OpType type);
+
 .. _API_s4u_Synchronizations:
 
 =======================
index c5040da..a168562 100644 (file)
@@ -42,11 +42,121 @@ For **further scalability**, you may modify your code to speed up your
 studies or save memory space.  Maximal **simulation accuracy**
 requires some specific care from you.
 
+-------------------------
+What can run within SMPI?
+-------------------------
+
+You can run unmodified MPI applications (both C/C++ and Fortran) within
+SMPI, provided that you only use MPI calls that we implemented. Global
+variables should be handled correctly on Linux systems.
+
+....................
+MPI coverage of SMPI
+....................
+
+SMPI support a large faction of the MPI interface: we pass many of the MPICH coverage tests, and many of the existing
+:ref:`proxy apps <SMPI_proxy_apps>` run almost unmodified on top of SMPI. But our support is still incomplete, with I/O
+primitives the being one of the major missing feature.
+
+The full list of functions that remain to be implemented is documented in the file `include/smpi/smpi.h
+<https://framagit.org/simgrid/simgrid/tree/master/include/smpi/smpi.h>`_ in your version of SimGrid, between two lines
+containing the ``FIXME`` marker. If you miss a feature, please get in touch with us: we can guide you through the SimGrid
+code to help you implementing it, and we'd be glad to integrate your contribution to the main project.
+
+.. _SMPI_what_globals:
+
+.................................
+Privatization of global variables
+.................................
+
+Concerning the globals, the problem comes from the fact that usually,
+MPI processes run as real UNIX processes while they are all folded
+into threads of a unique system process in SMPI. Global variables are
+usually private to each MPI process while they become shared between
+the processes in SMPI.  The problem and some potential solutions are
+discussed in this article: `Automatic Handling of Global Variables for
+Multi-threaded MPI Programs
+<http://charm.cs.illinois.edu/newPapers/11-23/paper.pdf>` (note that
+this article does not deal with SMPI but with a competing solution
+called AMPI that suffers of the same issue).  This point used to be
+problematic in SimGrid, but the problem should now be handled
+automatically on Linux.
+
+Older versions of SimGrid came with a script that automatically
+privatized the globals through static analysis of the source code. But
+our implementation was not robust enough to be used in production, so
+it was removed at some point. Currently, SMPI comes with two
+privatization mechanisms that you can :ref:`select at runtime
+<cfg=smpi/privatization>`.  The dlopen approach is used by
+default as it is much faster and still very robust.  The mmap approach
+is an older approach that proves to be slower.
+
+With the **mmap approach**, SMPI duplicates and dynamically switch the
+``.data`` and ``.bss`` segments of the ELF process when switching the
+MPI ranks. This allows each ranks to have its own copy of the global
+variables.  No copy actually occurs as this mechanism uses ``mmap()``
+for efficiency. This mechanism is considered to be very robust on all
+systems supporting ``mmap()`` (Linux and most BSDs). Its performance
+is questionable since each context switch between MPI ranks induces
+several syscalls to change the ``mmap`` that redirects the ``.data``
+and ``.bss`` segments to the copies of the new rank. The code will
+also be copied several times in memory, inducing a slight increase of
+memory occupation.
+
+Another limitation is that SMPI only accounts for global variables
+defined in the executable. If the processes use external global
+variables from dynamic libraries, they won't be switched
+correctly. The easiest way to solve this is to statically link against
+the library with these globals. This way, each MPI rank will get its
+own copy of these libraries. Of course you should never statically
+link against the SimGrid library itself.
+
+With the **dlopen approach**, SMPI loads several copies of the same
+executable in memory as if it were a library, so that the global
+variables get naturally duplicated. It first requires the executable
+to be compiled as a relocatable binary, which is less common for
+programs than for libraries. But most distributions are now compiled
+this way for security reason as it allows one to randomize the address
+space layout. It should thus be safe to compile most (any?) program
+this way.  The second trick is that the dynamic linker refuses to link
+the exact same file several times, be it a library or a relocatable
+executable. It makes perfectly sense in the general case, but we need
+to circumvent this rule of thumb in our case. To that extend, the
+binary is copied in a temporary file before being re-linked against.
+``dlmopen()`` cannot be used as it only allows 256 contexts, and as it
+would also duplicate SimGrid itself.
+
+This approach greatly speeds up the context switching, down to about
+40 CPU cycles with our raw contexts, instead of requesting several
+syscalls with the ``mmap()`` approach. Another advantage is that it
+permits one to run the SMPI contexts in parallel, which is obviously not
+possible with the ``mmap()`` approach. It was tricky to implement, but
+we are not aware of any flaws, so smpirun activates it by default.
+
+In the future, it may be possible to further reduce the memory and
+disk consumption. It seems that we could `punch holes
+<https://lwn.net/Articles/415889/>`_ in the files before dl-loading
+them to remove the code and constants, and mmap these area onto a
+unique copy. If done correctly, this would reduce the disk- and
+memory- usage to the bare minimum, and would also reduce the pressure
+on the CPU instruction cache. See the `relevant bug
+<https://github.com/simgrid/simgrid/issues/137>`_ on github for
+implementation leads.\n
+
+Also, currently, only the binary is copied and dlopen-ed for each MPI
+rank. We could probably extend this to external dependencies, but for
+now, any external dependencies must be statically linked into your
+application. As usual, SimGrid itself shall never be statically linked
+in your app. You don't want to give a copy of SimGrid to each MPI rank:
+that's ways too much for them to deal with.
+
+.. todo: speak of smpi/privatize-libs here
+
 .. _SMPI_online:
 
------------------
-Using SMPI online
------------------
+---------------------------
+Online SMPI: live execution
+---------------------------
 
 In this mode, your application is actually executed. Every computation
 occurs for real while every communication is simulated. In addition,
@@ -500,119 +610,36 @@ Alltoall on 16 Nodes with the Ring Algorithm.
 
 Alltoall on 16 Nodes with the Pairwise Algorithm.
 
--------------------------
-What can run within SMPI?
--------------------------
-
-You can run unmodified MPI applications (both C/C++ and Fortran) within
-SMPI, provided that you only use MPI calls that we implemented. Global
-variables should be handled correctly on Linux systems.
-
-....................
-MPI coverage of SMPI
-....................
+.. _SMPI_mix_s4u:
 
-SMPI support a large faction of the MPI interface: we pass many of the MPICH coverage tests, and many of the existing
-:ref:`proxy apps <SMPI_proxy_apps>` run almost unmodified on top of SMPI. But our support is still incomplete, with I/O
-primitives the being one of the major missing feature.
-
-The full list of functions that remain to be implemented is documented in the file `include/smpi/smpi.h
-<https://framagit.org/simgrid/simgrid/tree/master/include/smpi/smpi.h>`_ in your version of SimGrid, between two lines
-containing the ``FIXME`` marker. If you miss a feature, please get in touch with us: we can guide you through the SimGrid
-code to help you implementing it, and we'd be glad to integrate your contribution to the main project.
-
-.. _SMPI_what_globals:
-
-.................................
-Privatization of global variables
-.................................
-
-Concerning the globals, the problem comes from the fact that usually,
-MPI processes run as real UNIX processes while they are all folded
-into threads of a unique system process in SMPI. Global variables are
-usually private to each MPI process while they become shared between
-the processes in SMPI.  The problem and some potential solutions are
-discussed in this article: `Automatic Handling of Global Variables for
-Multi-threaded MPI Programs
-<http://charm.cs.illinois.edu/newPapers/11-23/paper.pdf>` (note that
-this article does not deal with SMPI but with a competing solution
-called AMPI that suffers of the same issue).  This point used to be
-problematic in SimGrid, but the problem should now be handled
-automatically on Linux.
+.............................
+Mixing S4U and MPI simulation
+.............................
 
-Older versions of SimGrid came with a script that automatically
-privatized the globals through static analysis of the source code. But
-our implementation was not robust enough to be used in production, so
-it was removed at some point. Currently, SMPI comes with two
-privatization mechanisms that you can :ref:`select at runtime
-<cfg=smpi/privatization>`.  The dlopen approach is used by
-default as it is much faster and still very robust.  The mmap approach
-is an older approach that proves to be slower.
+Mixing both interfaces is very easy. This can be useful to easily implement a service in S4U that is provided by your
+infrastructure in some way, and test how your MPI application interacts with this service. Or you can use it to start more than
+one MPI application in your simulation, and study their interactions.
 
-With the **mmap approach**, SMPI duplicates and dynamically switch the
-``.data`` and ``.bss`` segments of the ELF process when switching the
-MPI ranks. This allows each ranks to have its own copy of the global
-variables.  No copy actually occurs as this mechanism uses ``mmap()``
-for efficiency. This mechanism is considered to be very robust on all
-systems supporting ``mmap()`` (Linux and most BSDs). Its performance
-is questionable since each context switch between MPI ranks induces
-several syscalls to change the ``mmap`` that redirects the ``.data``
-and ``.bss`` segments to the copies of the new rank. The code will
-also be copied several times in memory, inducing a slight increase of
-memory occupation.
+.. doxygenfunction:: SMPI_app_instance_start
 
-Another limitation is that SMPI only accounts for global variables
-defined in the executable. If the processes use external global
-variables from dynamic libraries, they won't be switched
-correctly. The easiest way to solve this is to statically link against
-the library with these globals. This way, each MPI rank will get its
-own copy of these libraries. Of course you should never statically
-link against the SimGrid library itself.
+.. tabs::
 
-With the **dlopen approach**, SMPI loads several copies of the same
-executable in memory as if it were a library, so that the global
-variables get naturally duplicated. It first requires the executable
-to be compiled as a relocatable binary, which is less common for
-programs than for libraries. But most distributions are now compiled
-this way for security reason as it allows one to randomize the address
-space layout. It should thus be safe to compile most (any?) program
-this way.  The second trick is that the dynamic linker refuses to link
-the exact same file several times, be it a library or a relocatable
-executable. It makes perfectly sense in the general case, but we need
-to circumvent this rule of thumb in our case. To that extend, the
-binary is copied in a temporary file before being re-linked against.
-``dlmopen()`` cannot be used as it only allows 256 contexts, and as it
-would also duplicate SimGrid itself.
+   .. group-tab:: Example
 
-This approach greatly speeds up the context switching, down to about
-40 CPU cycles with our raw contexts, instead of requesting several
-syscalls with the ``mmap()`` approach. Another advantage is that it
-permits one to run the SMPI contexts in parallel, which is obviously not
-possible with the ``mmap()`` approach. It was tricky to implement, but
-we are not aware of any flaws, so smpirun activates it by default.
+      Here is a simple example of use, which starts the function ``alltoall_mpi`` as a MPI instance on 4 hosts, along several
+      S4U actors doing a master/workers.
 
-In the future, it may be possible to further reduce the memory and
-disk consumption. It seems that we could `punch holes
-<https://lwn.net/Articles/415889/>`_ in the files before dl-loading
-them to remove the code and constants, and mmap these area onto a
-unique copy. If done correctly, this would reduce the disk- and
-memory- usage to the bare minimum, and would also reduce the pressure
-on the CPU instruction cache. See the `relevant bug
-<https://github.com/simgrid/simgrid/issues/137>`_ on github for
-implementation leads.\n
+      .. showfile:: examples/smpi/smpi_s4u_masterworker/masterworker_mailbox_smpi.cpp
+         :language: cpp
 
-Also, currently, only the binary is copied and dlopen-ed for each MPI
-rank. We could probably extend this to external dependencies, but for
-now, any external dependencies must be statically linked into your
-application. As usual, SimGrid itself shall never be statically linked
-in your app. You don't want to give a copy of SimGrid to each MPI rank:
-that's ways too much for them to deal with.
+   .. group-tab:: Deployment file
 
-.. todo: speak of smpi/privatize-libs here
+      .. showfile:: examples/smpi/smpi_s4u_masterworker/deployment_masterworker_mailbox_smpi.xml
+         :language: xml
 
-----------------------------------------------
+..............................................
 Adapting your MPI code for further scalability
-----------------------------------------------
+..............................................
 
 As detailed in the `reference article
 <http://hal.inria.fr/hal-01415484>`_, you may want to adapt your code
@@ -621,9 +648,8 @@ hinder the result quality (or even prevent the app to run) if used
 wrongly. We assume that if you want to simulate an HPC application,
 you know what you are doing. Don't prove us wrong!
 
-..............................
 Reducing your memory footprint
-..............................
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 If you get short on memory (the whole app is executed on a single node when
 simulated), you should have a look at the SMPI_SHARED_MALLOC and
@@ -651,9 +677,8 @@ This feature is demoed by the example file
 
 .. _SMPI_use_faster:
 
-.........................
 Toward Faster Simulations
-.........................
+^^^^^^^^^^^^^^^^^^^^^^^^^
 
 If your application is too slow, try using SMPI_SAMPLE_LOCAL,
 SMPI_SAMPLE_GLOBAL and friends to indicate which computation loops can
@@ -673,9 +698,8 @@ what is necessary to group calls of a given size together.
 This feature is demoed by the example file
 `examples/smpi/NAS/ep.c <https://framagit.org/simgrid/simgrid/tree/master/examples/smpi/NAS/ep.c>`_
 
-.............................
 Ensuring Accurate Simulations
-.............................
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 Out of the box, SimGrid may give you fairly accurate results, but
 there is a plenty of factors that could go wrong and make your results
@@ -717,9 +741,9 @@ modeling distributed systems.
 
 .. _SMPI_proxy_apps:
 
-----------------------
+......................
 Examples of SMPI Usage
-----------------------
+......................
 
 A small amount of examples can be found directly in the SimGrid
 archive, under `examples/smpi <https://framagit.org/simgrid/simgrid/-/tree/master/examples/smpi>`_.
@@ -747,6 +771,50 @@ next generation of runtimes and hardware. `This project
 from different sources, along with the patches needed (if any) to run
 them on top of SMPI.
 
+.. _SMPI_offline:
+
+--------------------------
+Offline SMPI: Trace Replay
+--------------------------
+
+Although SMPI is often used for :ref:`online simulation
+<SMPI_online>`, where the application is executed for real, you can
+also go for offline simulation through trace replay.
+
+SimGrid uses time-independent traces, in which each actor is given a
+script of the actions to do sequentially. These trace files can
+actually be captured with the online version of SMPI, as follows:
+
+.. code-block:: console
+
+   $ smpirun -trace-ti --cfg=tracing/filename:LU.A.32 -np 32 -platform ../cluster_backbone.xml bin/lu.A.32
+
+The produced trace is composed of a file ``LU.A.32`` and a folder
+``LU.A.32_files``. The file names don't match with the MPI ranks, but
+that's expected.
+
+To replay this with SMPI, you need to first compile the provided
+``smpi_replay.cpp`` file, that comes from
+`simgrid/examples/smpi/replay
+<https://framagit.org/simgrid/simgrid/tree/master/examples/smpi/replay>`_.
+
+.. code-block:: console
+
+   $ smpicxx ../replay.cpp -O3 -o ../smpi_replay
+
+Afterward, you can replay your trace in SMPI as follows:
+
+.. code-block:: console
+
+   $ smpirun -np 32 -platform ../cluster_torus.xml -ext smpi_replay ../smpi_replay LU.A.32
+
+All the outputs are gone, as the application is not really simulated
+here. Its trace is simply replayed. But if you visualize the live
+simulation and the replay, you will see that the behavior is
+unchanged. The simulation does not run much faster on this very
+example, but this becomes very interesting when your application
+is computationally hungry.
+
 -------------------------
 Troubleshooting with SMPI
 -------------------------
@@ -808,52 +876,6 @@ only if you declare ``_GNU_SOURCE`` before including
 SMPI, then you need to ensure that you pass the right configuration
 defines as advised above.
 
-
-
-.. _SMPI_offline:
-
------------------------------
-Trace Replay and Offline SMPI
------------------------------
-
-Although SMPI is often used for :ref:`online simulation
-<SMPI_online>`, where the application is executed for real, you can
-also go for offline simulation through trace replay.
-
-SimGrid uses time-independent traces, in which each actor is given a
-script of the actions to do sequentially. These trace files can
-actually be captured with the online version of SMPI, as follows:
-
-.. code-block:: console
-
-   $ smpirun -trace-ti --cfg=tracing/filename:LU.A.32 -np 32 -platform ../cluster_backbone.xml bin/lu.A.32
-
-The produced trace is composed of a file ``LU.A.32`` and a folder
-``LU.A.32_files``. The file names don't match with the MPI ranks, but
-that's expected.
-
-To replay this with SMPI, you need to first compile the provided
-``smpi_replay.cpp`` file, that comes from
-`simgrid/examples/smpi/replay
-<https://framagit.org/simgrid/simgrid/tree/master/examples/smpi/replay>`_.
-
-.. code-block:: console
-
-   $ smpicxx ../replay.cpp -O3 -o ../smpi_replay
-
-Afterward, you can replay your trace in SMPI as follows:
-
-.. code-block:: console
-
-   $ smpirun -np 32 -platform ../cluster_torus.xml -ext smpi_replay ../smpi_replay LU.A.32
-
-All the outputs are gone, as the application is not really simulated
-here. Its trace is simply replayed. But if you visualize the live
-simulation and the replay, you will see that the behavior is
-unchanged. The simulation does not run much faster on this very
-example, but this becomes very interesting when your application
-is computationally hungry.
-
 .. |br| raw:: html
 
    <br />
index 1c8d99c..7c553de 100644 (file)
@@ -34,7 +34,7 @@ copyright = u'2002-2023, The SimGrid Team'
 author = u'The SimGrid Team'
 
 # The short X.Y version
-version = u'3.32.1'
+version = u'3.34.1'
 
 # -- General configuration ---------------------------------------------------
 
index 5e0220f..1370212 100644 (file)
@@ -366,7 +366,7 @@ Checking for incoming communications
 ------------------------------------
 
 This example uses ``Mailbox.ready()`` to check for completed communications. When this function returns true, then at least a message
-is arrived, so you know that ``Mailbox.get()`` will complete imediately. This is thus another way toward asynchronous communications.
+is arrived, so you know that ``Mailbox.get()`` will complete immediately. This is thus another way toward asynchronous communications.
 
 .. tabs::
 
@@ -620,7 +620,7 @@ on which they run is turned off: they are just terminated in this case, and thei
 failing hosts however, any blocking operation such as ``exec`` or ``wait`` will raise an exception that you can catch and react to. See also
 :ref:`howto_churn`,
 :ref:`this example <s4u_ex_platform_state_profile>` on how to attach a state profile to hosts, and
-:ref:`that example <s4u_ex_comm_failure>` on how to react to networ failures.
+:ref:`that example <s4u_ex_comm_failure>` on how to react to network failures.
 
 .. tabs::
 
@@ -727,7 +727,7 @@ schedules activities itself.
 Simple dependencies
 -------------------
 
-When you declare dependencies between two activities, the depedent will not actually start until all its dependencies complete,
+When you declare dependencies between two activities, the dependent will not actually start until all its dependencies complete,
 as shown in the following examples. The first one declare dependencies between executions while the second one declare
 dependencies between communications. You could declare such dependencies between arbitrary activities.
 
@@ -754,7 +754,7 @@ Simple DAG of activities
 ------------------------
 
 This example shows how to create activities from the maestro directly without relying on an actor, organize the dependencies of
-activities as a DAG (direct acyclic graph), and start them. Each activity will start as soon as its dependencies are fullfiled.
+activities as a DAG (direct acyclic graph), and start them. Each activity will start as soon as its dependencies are fulfilled.
 
 .. tabs::
 
@@ -791,7 +791,7 @@ to determine which host is the better fit for a given activity, and this example
 Loading DAGs from file
 ----------------------
 
-There is currently two file formats that you can load directly in SimGrid, but writting another loader for your beloved format should not be difficult.
+There is currently two file formats that you can load directly in SimGrid, but writing another loader for your beloved format should not be difficult.
 
 .. tabs::
 
index dc66fc9..66187a8 100644 (file)
@@ -171,7 +171,7 @@ foreach (example activity-testany activity-waitany
                  mc-bugged1 mc-bugged1-liveness mc-bugged2 mc-bugged2-liveness mc-centralized-mutex mc-electric-fence mc-failing-assert
                  network-ns3 network-ns3-wifi network-wifi
                  io-async io-priority io-degradation io-file-system io-file-remote io-disk-raw io-dependent
-                 task-io task-simple task-variable-load task-switch-host
+                 task-io task-simple task-variable-load task-storm task-switch-host
                  photovoltaic-simple
                  platform-comm-serialize platform-failures platform-profile platform-properties
                  plugin-host-load plugin-link-load plugin-prodcons
index ef57282..40e0048 100644 (file)
@@ -58,9 +58,8 @@ public:
 
     // Test attaching some user data to the file
     file->set_data(new std::string("777"));
-    const auto* file_data = file->get_data<std::string>();
+    auto file_data = file->get_unique_data<std::string>();
     XBT_INFO("User data attached to the file: %s", file_data->c_str());
-    delete file_data;
 
     // Close the file
     file->close();
index 8f2d6cf..e956f9c 100644 (file)
@@ -3,7 +3,7 @@
 ! expect return 2
 ! timeout 30
 ! output display
-$ $VALGRIND_NO_TRACE_CHILDREN ${bindir:=.}/../../../bin/simgrid-mc --cfg=model-check/sleep-set:true ${bindir:=.}/s4u-mc-bugged1-liveness ${platfdir:=.}/small_platform.xml 1 --log=xbt_cfg.thresh:warning "--log=root.fmt:[%10.6r]%e(%i:%a@%h)%e%m%n" --cfg=contexts/factory:ucontext --cfg=model-check/visited:100 --cfg=contexts/stack-size:256  --cfg=model-check/property:promela_bugged1_liveness
+$ $VALGRIND_NO_TRACE_CHILDREN ${bindir:=.}/../../../bin/simgrid-mc ${bindir:=.}/s4u-mc-bugged1-liveness ${platfdir:=.}/small_platform.xml 1 --log=xbt_cfg.thresh:warning "--log=root.fmt:[%10.6r]%e(%i:%a@%h)%e%m%n" --cfg=contexts/factory:ucontext --cfg=model-check/visited:100 --cfg=contexts/stack-size:256  --cfg=model-check/property:promela_bugged1_liveness
 > [  0.000000] (0:maestro@) Check the liveness property promela_bugged1_liveness
 > [  0.000000] (2:client@Boivin) Ask the request
 > [  0.000000] (3:client@Fafard) Ask the request
index 58d6358..5f0999c 100644 (file)
@@ -3,7 +3,7 @@
 ! expect return 2
 ! timeout 20
 ! output display
-$ $VALGRIND_NO_TRACE_CHILDREN ${bindir:=.}/../../../bin/simgrid-mc --cfg=model-check/sleep-set:true ${bindir:=.}/s4u-mc-bugged1-liveness ${platfdir:=.}/small_platform.xml 0 --log=xbt_cfg.thresh:warning "--log=root.fmt:[%10.6r]%e(%i:%a@%h)%e%m%n" --cfg=contexts/factory:ucontext --cfg=contexts/stack-size:256 --cfg=model-check/property:promela_bugged1_liveness
+$ $VALGRIND_NO_TRACE_CHILDREN ${bindir:=.}/../../../bin/simgrid-mc ${bindir:=.}/s4u-mc-bugged1-liveness ${platfdir:=.}/small_platform.xml 0 --log=xbt_cfg.thresh:warning "--log=root.fmt:[%10.6r]%e(%i:%a@%h)%e%m%n" --cfg=contexts/factory:ucontext --cfg=contexts/stack-size:256 --cfg=model-check/property:promela_bugged1_liveness
 > [  0.000000] (0:maestro@) Check the liveness property promela_bugged1_liveness
 > [  0.000000] (2:client@Boivin) Ask the request
 > [  0.000000] (3:client@Fafard) Ask the request
index a6593db..424e312 100644 (file)
@@ -9,13 +9,7 @@ $ $VALGRIND_NO_TRACE_CHILDREN ${bindir:=.}/../../../bin/simgrid-mc ${bindir:=.}/
 > [  0.000000] (1:server@HostA) OK
 > [  0.000000] (4:client@HostD) Sent!
 > [  0.000000] (2:client@HostB) Sent!
-> [  0.000000] (1:server@HostA) OK
-> [  0.000000] (3:client@HostC) Sent!
-> [  0.000000] (4:client@HostD) Sent!
-> [  0.000000] (2:client@HostB) Sent!
 > [  0.000000] (3:client@HostC) Sent!
-> [  0.000000] (1:server@HostA) OK
-> [  0.000000] (4:client@HostD) Sent!
 > [  0.000000] (2:client@HostB) Sent!
 > [  0.000000] (0:maestro@) **************************
 > [  0.000000] (0:maestro@) *** PROPERTY NOT VALID ***
@@ -32,4 +26,4 @@ $ $VALGRIND_NO_TRACE_CHILDREN ${bindir:=.}/../../../bin/simgrid-mc ${bindir:=.}/
 > [  0.000000] (0:maestro@)   3: iSend(mbox=0)
 > [  0.000000] (0:maestro@)   1: WaitComm(from 3 to 1, mbox=0, no timeout)
 > [  0.000000] (0:maestro@) You can debug the problem (and see the whole details) by rerunning out of simgrid-mc with --cfg=model-check/replay:'1;2;1;1;2;4;1;1;3;1'
-> [  0.000000] (0:maestro@) DFS exploration ended. 26 unique states visited; 3 backtracks (20 transition replays, 49 states visited overall)
+> [  0.000000] (0:maestro@) DFS exploration ended. 19 unique states visited; 2 backtracks (12 transition replays, 33 states visited overall)
index e1087e9..10cc2f3 100644 (file)
@@ -2,7 +2,7 @@
 
 ! expect return 1
 ! timeout 20
-$ $VALGRIND_NO_TRACE_CHILDREN ${bindir:=.}/../../../bin/simgrid-mc --cfg=model-check/sleep-set:true ${bindir:=.}/s4u-mc-bugged2 ${platfdir:=.}/model_checker_platform.xml  --log=root.thresh:critical --log=mc.thresh:info
+$ $VALGRIND_NO_TRACE_CHILDREN ${bindir:=.}/../../../bin/simgrid-mc ${bindir:=.}/s4u-mc-bugged2 ${platfdir:=.}/model_checker_platform.xml  --log=root.thresh:critical --log=mc.thresh:info
 > [0.000000] [mc_dfs/INFO] Start a DFS exploration. Reduction is: dpor.
 > [0.000000] [mc_explo/INFO] **************************
 > [0.000000] [mc_explo/INFO] *** PROPERTY NOT VALID ***
@@ -20,7 +20,7 @@ $ $VALGRIND_NO_TRACE_CHILDREN ${bindir:=.}/../../../bin/simgrid-mc --cfg=model-c
 
 ! expect return 1
 ! timeout 20
-$ $VALGRIND_NO_TRACE_CHILDREN ${bindir:=.}/../../../bin/simgrid-mc --cfg=model-check/sleep-set:true --cfg=model-check/strategy:min_match_comm ${bindir:=.}/s4u-mc-bugged2 ${platfdir:=.}/model_checker_platform.xml  --log=root.thresh:critical --log=mc.thresh:info
+$ $VALGRIND_NO_TRACE_CHILDREN ${bindir:=.}/../../../bin/simgrid-mc --cfg=model-check/strategy:min_match_comm ${bindir:=.}/s4u-mc-bugged2 ${platfdir:=.}/model_checker_platform.xml  --log=root.thresh:critical --log=mc.thresh:info
 > [0.000000] [mc_dfs/INFO] Start a DFS exploration. Reduction is: dpor.
 > [0.000000] [mc_explo/INFO] **************************
 > [0.000000] [mc_explo/INFO] *** PROPERTY NOT VALID ***
@@ -39,7 +39,7 @@ $ $VALGRIND_NO_TRACE_CHILDREN ${bindir:=.}/../../../bin/simgrid-mc --cfg=model-c
 
 ! expect return 1
 ! timeout 20
-$ $VALGRIND_NO_TRACE_CHILDREN ${bindir:=.}/../../../bin/simgrid-mc --cfg=model-check/sleep-set:true --cfg=model-check/strategy:max_match_comm ${bindir:=.}/s4u-mc-bugged2 ${platfdir:=.}/model_checker_platform.xml  --log=root.thresh:critical --log=mc.thresh:info
+$ $VALGRIND_NO_TRACE_CHILDREN ${bindir:=.}/../../../bin/simgrid-mc --cfg=model-check/strategy:max_match_comm ${bindir:=.}/s4u-mc-bugged2 ${platfdir:=.}/model_checker_platform.xml  --log=root.thresh:critical --log=mc.thresh:info
 > [0.000000] [mc_dfs/INFO] Start a DFS exploration. Reduction is: dpor.
 > [0.000000] [mc_explo/INFO] **************************
 > [0.000000] [mc_explo/INFO] *** PROPERTY NOT VALID ***
index bb5e3e1..8516a98 100644 (file)
@@ -9,60 +9,6 @@ $ $VALGRIND_NO_TRACE_CHILDREN ${bindir:=.}/../../../bin/simgrid-mc ${bindir:=.}/
 > [HostB:client:(2) 0.000000] [electric_fence/INFO] Sent!
 > [HostC:client:(3) 0.000000] [electric_fence/INFO] Sent!
 > [HostC:client:(3) 0.000000] [electric_fence/INFO] Sent!
-> [HostA:server:(1) 0.000000] [electric_fence/INFO] OK
-> [HostB:client:(2) 0.000000] [electric_fence/INFO] Sent!
-> [HostB:client:(2) 0.000000] [electric_fence/INFO] Sent!
-> [HostA:server:(1) 0.000000] [electric_fence/INFO] OK
-> [HostC:client:(3) 0.000000] [electric_fence/INFO] Sent!
-> [HostA:server:(1) 0.000000] [electric_fence/INFO] OK
-> [HostB:client:(2) 0.000000] [electric_fence/INFO] Sent!
-> [HostC:client:(3) 0.000000] [electric_fence/INFO] Sent!
-> [HostB:client:(2) 0.000000] [electric_fence/INFO] Sent!
-> [HostA:server:(1) 0.000000] [electric_fence/INFO] OK
-> [HostC:client:(3) 0.000000] [electric_fence/INFO] Sent!
-> [HostA:server:(1) 0.000000] [electric_fence/INFO] OK
-> [HostB:client:(2) 0.000000] [electric_fence/INFO] Sent!
-> [HostC:client:(3) 0.000000] [electric_fence/INFO] Sent!
-> [HostC:client:(3) 0.000000] [electric_fence/INFO] Sent!
-> [HostA:server:(1) 0.000000] [electric_fence/INFO] OK
-> [HostB:client:(2) 0.000000] [electric_fence/INFO] Sent!
-> [HostA:server:(1) 0.000000] [electric_fence/INFO] OK
-> [HostB:client:(2) 0.000000] [electric_fence/INFO] Sent!
-> [HostC:client:(3) 0.000000] [electric_fence/INFO] Sent!
-> [HostC:client:(3) 0.000000] [electric_fence/INFO] Sent!
-> [HostA:server:(1) 0.000000] [electric_fence/INFO] OK
-> [HostB:client:(2) 0.000000] [electric_fence/INFO] Sent!
-> [HostB:client:(2) 0.000000] [electric_fence/INFO] Sent!
-> [HostA:server:(1) 0.000000] [electric_fence/INFO] OK
-> [HostC:client:(3) 0.000000] [electric_fence/INFO] Sent!
-> [HostA:server:(1) 0.000000] [electric_fence/INFO] OK
 > [HostB:client:(2) 0.000000] [electric_fence/INFO] Sent!
 > [HostC:client:(3) 0.000000] [electric_fence/INFO] Sent!
-> [HostB:client:(2) 0.000000] [electric_fence/INFO] Sent!
-> [HostA:server:(1) 0.000000] [electric_fence/INFO] OK
-> [HostC:client:(3) 0.000000] [electric_fence/INFO] Sent!
-> [HostA:server:(1) 0.000000] [electric_fence/INFO] OK
-> [HostB:client:(2) 0.000000] [electric_fence/INFO] Sent!
-> [HostC:client:(3) 0.000000] [electric_fence/INFO] Sent!
-> [HostB:client:(2) 0.000000] [electric_fence/INFO] Sent!
-> [HostA:server:(1) 0.000000] [electric_fence/INFO] OK
-> [HostC:client:(3) 0.000000] [electric_fence/INFO] Sent!
-> [HostA:server:(1) 0.000000] [electric_fence/INFO] OK
-> [HostB:client:(2) 0.000000] [electric_fence/INFO] Sent!
-> [HostC:client:(3) 0.000000] [electric_fence/INFO] Sent!
-> [HostC:client:(3) 0.000000] [electric_fence/INFO] Sent!
-> [HostA:server:(1) 0.000000] [electric_fence/INFO] OK
-> [HostB:client:(2) 0.000000] [electric_fence/INFO] Sent!
-> [HostA:server:(1) 0.000000] [electric_fence/INFO] OK
-> [HostB:client:(2) 0.000000] [electric_fence/INFO] Sent!
-> [HostC:client:(3) 0.000000] [electric_fence/INFO] Sent!
-> [HostC:client:(3) 0.000000] [electric_fence/INFO] Sent!
-> [HostA:server:(1) 0.000000] [electric_fence/INFO] OK
-> [HostB:client:(2) 0.000000] [electric_fence/INFO] Sent!
-> [HostA:server:(1) 0.000000] [electric_fence/INFO] OK
-> [HostB:client:(2) 0.000000] [electric_fence/INFO] Sent!
-> [HostC:client:(3) 0.000000] [electric_fence/INFO] Sent!
-> [HostC:client:(3) 0.000000] [electric_fence/INFO] Sent!
-> [HostA:server:(1) 0.000000] [electric_fence/INFO] OK
-> [HostB:client:(2) 0.000000] [electric_fence/INFO] Sent!
-> [0.000000] [mc_dfs/INFO] DFS exploration ended. 125 unique states visited; 20 backtracks (44 transition replays, 189 states visited overall)
+> [0.000000] [mc_dfs/INFO] DFS exploration ended. 26 unique states visited; 6 backtracks (8 transition replays, 40 states visited overall)
index 7c418cf..3b77074 100644 (file)
@@ -16,7 +16,7 @@ $ $VALGRIND_NO_TRACE_CHILDREN ${bindir:=.}/../../../bin/simgrid-mc --cfg=model-c
 > [0.000000] [mc_explo/INFO]   2: iSend(mbox=0)
 > [0.000000] [mc_explo/INFO]   1: WaitComm(from 2 to 1, mbox=0, no timeout)
 > [0.000000] [mc_explo/INFO] You can debug the problem (and see the whole details) by rerunning out of simgrid-mc with --cfg=model-check/replay:'1;3;1;1;2;1'
-> [0.000000] [mc_dfs/INFO] DFS exploration ended. 119 unique states visited; 36 backtracks (175 transition replays, 330 states visited overall)
+> [0.000000] [mc_dfs/INFO] DFS exploration ended. 24 unique states visited; 8 backtracks (26 transition replays, 58 states visited overall)
 
 ! expect return 1
 ! timeout 300
@@ -49,12 +49,12 @@ $ $VALGRIND_NO_TRACE_CHILDREN ${bindir:=.}/../../../bin/simgrid-mc --cfg=model-c
 > [0.000000] [mc_explo/INFO] *** PROPERTY NOT VALID ***
 > [0.000000] [mc_explo/INFO] **************************
 > [0.000000] [mc_explo/INFO] Counter-example execution trace:
+> [0.000000] [mc_explo/INFO]   1: iRecv(mbox=0)
 > [0.000000] [mc_explo/INFO]   3: iSend(mbox=0)
 > [0.000000] [mc_explo/INFO]   2: iSend(mbox=0)
-> [0.000000] [mc_explo/INFO]   1: iRecv(mbox=0)
 > [0.000000] [mc_explo/INFO]   1: WaitComm(from 3 to 1, mbox=0, no timeout)
 > [0.000000] [mc_explo/INFO]   3: WaitComm(from 3 to 1, mbox=0, no timeout)
 > [0.000000] [mc_explo/INFO]   1: iRecv(mbox=0)
 > [0.000000] [mc_explo/INFO]   1: WaitComm(from 2 to 1, mbox=0, no timeout)
-> [0.000000] [mc_explo/INFO] You can debug the problem (and see the whole details) by rerunning out of simgrid-mc with --cfg=model-check/replay:'3;2;1;1;3;1;1'
-> [0.000000] [mc_dfs/INFO] DFS exploration ended. 23 unique states visited; 2 backtracks (0 transition replays, 25 states visited overall)
\ No newline at end of file
+> [0.000000] [mc_explo/INFO] You can debug the problem (and see the whole details) by rerunning out of simgrid-mc with --cfg=model-check/replay:'1;3;2;1;3;1;1'
+> [0.000000] [mc_dfs/INFO] DFS exploration ended. 29 unique states visited; 10 backtracks (26 transition replays, 65 states visited overall)
\ No newline at end of file
index 78bed01..fe7f6c9 100644 (file)
@@ -2,7 +2,7 @@
 
 ! expect return 1
 ! timeout 20
-$ $VALGRIND_NO_TRACE_CHILDREN ${bindir:=.}/../../../bin/simgrid-mc --cfg=model-check/sleep-set:true ${bindir:=.}/s4u-mc-failing-assert ${platfdir}/small_platform.xml "--log=root.fmt:[%10.6r]%e(%i:%a@%h)%e%m%n" --log=xbt_cfg.thresh:warning
+$ $VALGRIND_NO_TRACE_CHILDREN ${bindir:=.}/../../../bin/simgrid-mc ${bindir:=.}/s4u-mc-failing-assert ${platfdir}/small_platform.xml "--log=root.fmt:[%10.6r]%e(%i:%a@%h)%e%m%n" --log=xbt_cfg.thresh:warning
 > [  0.000000] (0:maestro@) Start a DFS exploration. Reduction is: dpor.
 > [  0.000000] (2:client1@Bourassa) Sent!
 > [  0.000000] (1:server@Boivin) OK
@@ -23,7 +23,7 @@ $ $VALGRIND_NO_TRACE_CHILDREN ${bindir:=.}/../../../bin/simgrid-mc --cfg=model-c
 
 ! expect return 1
 ! timeout 20
-$ $VALGRIND_NO_TRACE_CHILDREN ${bindir:=.}/../../../bin/simgrid-mc --cfg=model-check/sleep-set:true --cfg=model-check/strategy:min_match_comm ${bindir:=.}/s4u-mc-failing-assert ${platfdir}/small_platform.xml "--log=root.fmt:[%10.6r]%e(%i:%a@%h)%e%m%n" --log=xbt_cfg.thresh:warning
+$ $VALGRIND_NO_TRACE_CHILDREN ${bindir:=.}/../../../bin/simgrid-mc --cfg=model-check/strategy:min_match_comm ${bindir:=.}/s4u-mc-failing-assert ${platfdir}/small_platform.xml "--log=root.fmt:[%10.6r]%e(%i:%a@%h)%e%m%n" --log=xbt_cfg.thresh:warning
 > [  0.000000] (0:maestro@) Start a DFS exploration. Reduction is: dpor.
 > [  0.000000] (2:client1@Bourassa) Sent!
 > [  0.000000] (1:server@Boivin) OK
@@ -45,7 +45,7 @@ $ $VALGRIND_NO_TRACE_CHILDREN ${bindir:=.}/../../../bin/simgrid-mc --cfg=model-c
 
 ! expect return 1
 ! timeout 20
-$ $VALGRIND_NO_TRACE_CHILDREN ${bindir:=.}/../../../bin/simgrid-mc --cfg=model-check/sleep-set:true --cfg=model-check/strategy:max_match_comm ${bindir:=.}/s4u-mc-failing-assert ${platfdir}/small_platform.xml "--log=root.fmt:[%10.6r]%e(%i:%a@%h)%e%m%n" --log=xbt_cfg.thresh:warning
+$ $VALGRIND_NO_TRACE_CHILDREN ${bindir:=.}/../../../bin/simgrid-mc --cfg=model-check/strategy:max_match_comm ${bindir:=.}/s4u-mc-failing-assert ${platfdir}/small_platform.xml "--log=root.fmt:[%10.6r]%e(%i:%a@%h)%e%m%n" --log=xbt_cfg.thresh:warning
 > [  0.000000] (0:maestro@) Start a DFS exploration. Reduction is: dpor.
 > [  0.000000] (2:client1@Bourassa) Sent!
 > [  0.000000] (1:server@Boivin) OK
index 6e8010b..b17f900 100644 (file)
@@ -2,7 +2,9 @@
 
 $ $VALGRIND_NO_TRACE_CHILDREN ${bindir:=.}/../../../bin/simgrid-mc --log=mc_dfs.thres:verbose --log=root.fmt="[Checker]%e%m%n" -- ${bindir:=.}/s4u-synchro-barrier 1 --log=s4u_test.thres:critical --log=root.fmt="[App%e%e%e%e]%e%m%n"
 > [Checker] Start a DFS exploration. Reduction is: dpor.
+> [Checker] Sleep set actually containing:
 > [Checker] Execute 1: BARRIER_ASYNC_LOCK(barrier: 0) (stack depth: 1, state: 1, 0 interleaves)
+> [Checker] Sleep set actually containing:
 > [Checker] Execute 1: BARRIER_WAIT(barrier: 0) (stack depth: 2, state: 2, 0 interleaves)
 > [Checker] 0 actors remain, but none of them need to be interleaved (depth 4).
 > [Checker] Execution came to an end at 1;1 (state: 3, depth: 3)
@@ -11,15 +13,19 @@ $ $VALGRIND_NO_TRACE_CHILDREN ${bindir:=.}/../../../bin/simgrid-mc --log=mc_dfs.
 
 $ $VALGRIND_NO_TRACE_CHILDREN ${bindir:=.}/../../../bin/simgrid-mc --log=mc_dfs.thres:verbose --log=root.fmt="[Checker]%e%m%n" -- ${bindir:=.}/s4u-synchro-barrier 2 --log=s4u_test.thres:critical --log=root.fmt="[App%e%e%e%e]%e%m%n"
 > [Checker] Start a DFS exploration. Reduction is: dpor.
+> [Checker] Sleep set actually containing:
 > [Checker] Execute 1: BARRIER_ASYNC_LOCK(barrier: 0) (stack depth: 1, state: 1, 0 interleaves)
+> [Checker] Sleep set actually containing:
 > [Checker] Execute 2: BARRIER_ASYNC_LOCK(barrier: 0) (stack depth: 2, state: 2, 0 interleaves)
 > [Checker] INDEPENDENT Transitions:
 > [Checker]   BARRIER_ASYNC_LOCK(barrier: 0) (state=1)
 > [Checker]   BARRIER_ASYNC_LOCK(barrier: 0) (state=2)
+> [Checker] Sleep set actually containing:
 > [Checker] Execute 1: BARRIER_WAIT(barrier: 0) (stack depth: 3, state: 3, 0 interleaves)
 > [Checker] Dependent Transitions:
 > [Checker]   BARRIER_ASYNC_LOCK(barrier: 0) (state=2)
 > [Checker]   BARRIER_WAIT(barrier: 0) (state=3)
+> [Checker] Sleep set actually containing:
 > [Checker] Execute 2: BARRIER_WAIT(barrier: 0) (stack depth: 4, state: 4, 0 interleaves)
 > [Checker] INDEPENDENT Transitions:
 > [Checker]   BARRIER_WAIT(barrier: 0) (state=3)
@@ -30,34 +36,23 @@ $ $VALGRIND_NO_TRACE_CHILDREN ${bindir:=.}/../../../bin/simgrid-mc --log=mc_dfs.
 > [Checker] 0 actors remain, but none of them need to be interleaved (depth 6).
 > [Checker] Execution came to an end at 1;2;1;2 (state: 5, depth: 5)
 > [Checker] Backtracking from 1;2;1;2
+> [Checker] Sleep set actually containing:
+> [Checker]   <1,BARRIER_ASYNC_LOCK(barrier: 0)>
 > [Checker] Execute 2: BARRIER_ASYNC_LOCK(barrier: 0) (stack depth: 1, state: 1, 0 interleaves)
-> [Checker] Execute 1: BARRIER_ASYNC_LOCK(barrier: 0) (stack depth: 2, state: 6, 0 interleaves)
-> [Checker] INDEPENDENT Transitions:
-> [Checker]   BARRIER_ASYNC_LOCK(barrier: 0) (state=1)
-> [Checker]   BARRIER_ASYNC_LOCK(barrier: 0) (state=6)
-> [Checker] Execute 1: BARRIER_WAIT(barrier: 0) (stack depth: 3, state: 7, 0 interleaves)
-> [Checker] Dependent Transitions:
-> [Checker]   BARRIER_ASYNC_LOCK(barrier: 0) (state=1)
-> [Checker]   BARRIER_WAIT(barrier: 0) (state=7)
-> [Checker] Execute 2: BARRIER_WAIT(barrier: 0) (stack depth: 4, state: 8, 0 interleaves)
-> [Checker] INDEPENDENT Transitions:
-> [Checker]   BARRIER_WAIT(barrier: 0) (state=7)
-> [Checker]   BARRIER_WAIT(barrier: 0) (state=8)
-> [Checker] Dependent Transitions:
-> [Checker]   BARRIER_ASYNC_LOCK(barrier: 0) (state=6)
-> [Checker]   BARRIER_WAIT(barrier: 0) (state=8)
-> [Checker] 0 actors remain, but none of them need to be interleaved (depth 6).
-> [Checker] Execution came to an end at 2;1;1;2 (state: 9, depth: 5)
-> [Checker] Backtracking from 2;1;1;2
-> [Checker] DFS exploration ended. 9 unique states visited; 1 backtracks (0 transition replays, 10 states visited overall)
+> [Checker] 2 actors remain, but none of them need to be interleaved (depth 3).
+> [Checker] Backtracking from 2
+> [Checker] DFS exploration ended. 6 unique states visited; 1 backtracks (0 transition replays, 7 states visited overall)
 
 $ $VALGRIND_NO_TRACE_CHILDREN ${bindir:=.}/../../../bin/simgrid-mc --log=mc_dfs.thres:verbose --log=root.fmt="[Checker]%e%m%n" -- ${bindir:=.}/s4u-synchro-barrier 3 --log=s4u_test.thres:critical --log=root.fmt="[App%e%e%e%e]%e%m%n"
 > [Checker] Start a DFS exploration. Reduction is: dpor.
+> [Checker] Sleep set actually containing:
 > [Checker] Execute 1: BARRIER_ASYNC_LOCK(barrier: 0) (stack depth: 1, state: 1, 0 interleaves)
+> [Checker] Sleep set actually containing:
 > [Checker] Execute 2: BARRIER_ASYNC_LOCK(barrier: 0) (stack depth: 2, state: 2, 0 interleaves)
 > [Checker] INDEPENDENT Transitions:
 > [Checker]   BARRIER_ASYNC_LOCK(barrier: 0) (state=1)
 > [Checker]   BARRIER_ASYNC_LOCK(barrier: 0) (state=2)
+> [Checker] Sleep set actually containing:
 > [Checker] Execute 3: BARRIER_ASYNC_LOCK(barrier: 0) (stack depth: 3, state: 3, 0 interleaves)
 > [Checker] INDEPENDENT Transitions:
 > [Checker]   BARRIER_ASYNC_LOCK(barrier: 0) (state=2)
@@ -65,10 +60,12 @@ $ $VALGRIND_NO_TRACE_CHILDREN ${bindir:=.}/../../../bin/simgrid-mc --log=mc_dfs.
 > [Checker] INDEPENDENT Transitions:
 > [Checker]   BARRIER_ASYNC_LOCK(barrier: 0) (state=1)
 > [Checker]   BARRIER_ASYNC_LOCK(barrier: 0) (state=3)
+> [Checker] Sleep set actually containing:
 > [Checker] Execute 1: BARRIER_WAIT(barrier: 0) (stack depth: 4, state: 4, 0 interleaves)
 > [Checker] Dependent Transitions:
 > [Checker]   BARRIER_ASYNC_LOCK(barrier: 0) (state=3)
 > [Checker]   BARRIER_WAIT(barrier: 0) (state=4)
+> [Checker] Sleep set actually containing:
 > [Checker] Execute 2: BARRIER_WAIT(barrier: 0) (stack depth: 5, state: 5, 0 interleaves)
 > [Checker] INDEPENDENT Transitions:
 > [Checker]   BARRIER_WAIT(barrier: 0) (state=4)
@@ -76,6 +73,7 @@ $ $VALGRIND_NO_TRACE_CHILDREN ${bindir:=.}/../../../bin/simgrid-mc --log=mc_dfs.
 > [Checker] Dependent Transitions:
 > [Checker]   BARRIER_ASYNC_LOCK(barrier: 0) (state=3)
 > [Checker]   BARRIER_WAIT(barrier: 0) (state=5)
+> [Checker] Sleep set actually containing:
 > [Checker] Execute 3: BARRIER_WAIT(barrier: 0) (stack depth: 6, state: 6, 0 interleaves)
 > [Checker] INDEPENDENT Transitions:
 > [Checker]   BARRIER_WAIT(barrier: 0) (state=5)
@@ -89,39 +87,12 @@ $ $VALGRIND_NO_TRACE_CHILDREN ${bindir:=.}/../../../bin/simgrid-mc --log=mc_dfs.
 > [Checker] 0 actors remain, but none of them need to be interleaved (depth 8).
 > [Checker] Execution came to an end at 1;2;3;1;2;3 (state: 7, depth: 7)
 > [Checker] Backtracking from 1;2;3;1;2;3
+> [Checker] Sleep set actually containing:
+> [Checker]   <2,BARRIER_ASYNC_LOCK(barrier: 0)>
 > [Checker] Execute 3: BARRIER_ASYNC_LOCK(barrier: 0) (stack depth: 2, state: 2, 0 interleaves)
 > [Checker] INDEPENDENT Transitions:
 > [Checker]   BARRIER_ASYNC_LOCK(barrier: 0) (state=1)
 > [Checker]   BARRIER_ASYNC_LOCK(barrier: 0) (state=2)
-> [Checker] Execute 2: BARRIER_ASYNC_LOCK(barrier: 0) (stack depth: 3, state: 8, 0 interleaves)
-> [Checker] INDEPENDENT Transitions:
-> [Checker]   BARRIER_ASYNC_LOCK(barrier: 0) (state=2)
-> [Checker]   BARRIER_ASYNC_LOCK(barrier: 0) (state=8)
-> [Checker] INDEPENDENT Transitions:
-> [Checker]   BARRIER_ASYNC_LOCK(barrier: 0) (state=1)
-> [Checker]   BARRIER_ASYNC_LOCK(barrier: 0) (state=8)
-> [Checker] Execute 1: BARRIER_WAIT(barrier: 0) (stack depth: 4, state: 9, 0 interleaves)
-> [Checker] Dependent Transitions:
-> [Checker]   BARRIER_ASYNC_LOCK(barrier: 0) (state=8)
-> [Checker]   BARRIER_WAIT(barrier: 0) (state=9)
-> [Checker] Execute 2: BARRIER_WAIT(barrier: 0) (stack depth: 5, state: 10, 0 interleaves)
-> [Checker] INDEPENDENT Transitions:
-> [Checker]   BARRIER_WAIT(barrier: 0) (state=9)
-> [Checker]   BARRIER_WAIT(barrier: 0) (state=10)
-> [Checker] Dependent Transitions:
-> [Checker]   BARRIER_ASYNC_LOCK(barrier: 0) (state=2)
-> [Checker]   BARRIER_WAIT(barrier: 0) (state=10)
-> [Checker] Execute 3: BARRIER_WAIT(barrier: 0) (stack depth: 6, state: 11, 0 interleaves)
-> [Checker] INDEPENDENT Transitions:
-> [Checker]   BARRIER_WAIT(barrier: 0) (state=10)
-> [Checker]   BARRIER_WAIT(barrier: 0) (state=11)
-> [Checker] INDEPENDENT Transitions:
-> [Checker]   BARRIER_WAIT(barrier: 0) (state=9)
-> [Checker]   BARRIER_WAIT(barrier: 0) (state=11)
-> [Checker] Dependent Transitions:
-> [Checker]   BARRIER_ASYNC_LOCK(barrier: 0) (state=8)
-> [Checker]   BARRIER_WAIT(barrier: 0) (state=11)
-> [Checker] 0 actors remain, but none of them need to be interleaved (depth 8).
-> [Checker] Execution came to an end at 1;3;2;1;2;3 (state: 12, depth: 7)
-> [Checker] Backtracking from 1;3;2;1;2;3
-> [Checker] DFS exploration ended. 12 unique states visited; 1 backtracks (1 transition replays, 14 states visited overall)
\ No newline at end of file
+> [Checker] 3 actors remain, but none of them need to be interleaved (depth 4).
+> [Checker] Backtracking from 1;3
+> [Checker] DFS exploration ended. 8 unique states visited; 1 backtracks (1 transition replays, 10 states visited overall)
\ No newline at end of file
index b7944d8..07b0b62 100644 (file)
@@ -11,10 +11,10 @@ namespace sg4 = simgrid::s4u;
 /// Wait on the barrier then leave
 static void worker(sg4::BarrierPtr barrier)
 {
-    XBT_INFO("Waiting on the barrier");
-    barrier->wait();
+  XBT_INFO("Waiting on the barrier");
+  barrier->wait();
 
-    XBT_INFO("Bye");
+  XBT_INFO("Bye");
 }
 
 /// Spawn actor_count-1 workers and do a barrier with them
@@ -27,10 +27,10 @@ static void master(int actor_count)
     sg4::Actor::create("worker", sg4::Host::by_name("Jupiter"), worker, barrier);
   }
 
-    XBT_INFO("Waiting on the barrier");
-    barrier->wait();
+  XBT_INFO("Waiting on the barrier");
+  barrier->wait();
 
-    XBT_INFO("Bye");
+  XBT_INFO("Bye");
 }
 
 int main(int argc, char **argv)
index c67f1dc..d2a7187 100644 (file)
@@ -2,9 +2,8 @@
 
 p This file tests the cfg=model-check/checkpoint option for DFS explorer
 
-$ $VALGRIND_NO_TRACE_CHILDREN ${bindir:=.}/../../../bin/simgrid-mc --cfg=model-check/checkpoint:5 --cfg=model-check/sleep-set:true -- ${bindir:=.}/s4u-synchro-mutex --cfg=actors:2 --log=s4u_test.thres:critical
+$ $VALGRIND_NO_TRACE_CHILDREN ${bindir:=.}/../../../bin/simgrid-mc --cfg=model-check/checkpoint:5 -- ${bindir:=.}/s4u-synchro-mutex --cfg=actors:2 --log=s4u_test.thres:critical
 > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'model-check/checkpoint' to '5'
-> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'model-check/sleep-set' to 'true'
 > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'actors' to '2'
 > [0.000000] [mc_dfs/INFO] Start a DFS exploration. Reduction is: dpor.
 > [0.000000] [mc_dfs/INFO] DFS exploration ended. 66 unique states visited; 11 backtracks (22 transition replays, 99 states visited overall)
index dd4f3c1..f7f1a55 100644 (file)
@@ -5,9 +5,13 @@ p This file tests the dependencies between MUTEX transitions
 $ $VALGRIND_NO_TRACE_CHILDREN ${bindir:=.}/../../../bin/simgrid-mc --log=mc_dfs.thres:verbose --log=root.fmt="[Checker]%e%m%n" -- ${bindir:=.}/s4u-synchro-mutex --cfg=actors:1 --log=s4u_test.thres:critical --log=root.fmt="[App%e%e%e%e]%e%m%n"
 > [App    ] Configuration change: Set 'actors' to '1'
 > [Checker] Start a DFS exploration. Reduction is: dpor.
+> [Checker] Sleep set actually containing:
 > [Checker] Execute 1: MUTEX_ASYNC_LOCK(mutex: 0, owner: 1) (stack depth: 1, state: 1, 0 interleaves)
+> [Checker] Sleep set actually containing:
 > [Checker] Execute 1: MUTEX_WAIT(mutex: 0, owner: 1) (stack depth: 2, state: 2, 0 interleaves)
+> [Checker] Sleep set actually containing:
 > [Checker] Execute 1: MUTEX_UNLOCK(mutex: 0, owner: -1) (stack depth: 3, state: 3, 0 interleaves)
+> [Checker] Sleep set actually containing:
 > [Checker] Execute 2: MUTEX_ASYNC_LOCK(mutex: 0, owner: 2) (stack depth: 4, state: 4, 0 interleaves)
 > [Checker] INDEPENDENT Transitions:
 > [Checker]   MUTEX_UNLOCK(mutex: 0, owner: -1) (state=3)
@@ -18,10 +22,12 @@ $ $VALGRIND_NO_TRACE_CHILDREN ${bindir:=.}/../../../bin/simgrid-mc --log=mc_dfs.
 > [Checker] Dependent Transitions:
 > [Checker]   MUTEX_ASYNC_LOCK(mutex: 0, owner: 1) (state=1)
 > [Checker]   MUTEX_ASYNC_LOCK(mutex: 0, owner: 2) (state=4)
+> [Checker] Sleep set actually containing:
 > [Checker] Execute 2: MUTEX_WAIT(mutex: 0, owner: 2) (stack depth: 5, state: 5, 0 interleaves)
 > [Checker] Dependent Transitions:
 > [Checker]   MUTEX_UNLOCK(mutex: 0, owner: -1) (state=3)
 > [Checker]   MUTEX_WAIT(mutex: 0, owner: 2) (state=5)
+> [Checker] Sleep set actually containing:
 > [Checker] Execute 2: MUTEX_UNLOCK(mutex: 0, owner: -1) (stack depth: 6, state: 6, 0 interleaves)
 > [Checker] Dependent Transitions:
 > [Checker]   MUTEX_UNLOCK(mutex: 0, owner: -1) (state=3)
@@ -29,6 +35,8 @@ $ $VALGRIND_NO_TRACE_CHILDREN ${bindir:=.}/../../../bin/simgrid-mc --log=mc_dfs.
 > [Checker] 0 actors remain, but none of them need to be interleaved (depth 8).
 > [Checker] Execution came to an end at 1;1;1;2;2;2 (state: 7, depth: 7)
 > [Checker] Backtracking from 1;1;1;2;2;2
+> [Checker] Sleep set actually containing:
+> [Checker]   <1,MUTEX_UNLOCK(mutex: 0, owner: -1)>
 > [Checker] Execute 2: MUTEX_ASYNC_LOCK(mutex: 0, owner: 1) (stack depth: 3, state: 3, 0 interleaves)
 > [Checker] INDEPENDENT Transitions:
 > [Checker]   MUTEX_WAIT(mutex: 0, owner: 1) (state=2)
@@ -36,49 +44,42 @@ $ $VALGRIND_NO_TRACE_CHILDREN ${bindir:=.}/../../../bin/simgrid-mc --log=mc_dfs.
 > [Checker] Dependent Transitions:
 > [Checker]   MUTEX_ASYNC_LOCK(mutex: 0, owner: 1) (state=1)
 > [Checker]   MUTEX_ASYNC_LOCK(mutex: 0, owner: 1) (state=3)
-> [Checker] Execute 1: MUTEX_UNLOCK(mutex: 0, owner: 2) (stack depth: 4, state: 8, 0 interleaves)
-> [Checker] INDEPENDENT Transitions:
-> [Checker]   MUTEX_ASYNC_LOCK(mutex: 0, owner: 1) (state=3)
-> [Checker]   MUTEX_UNLOCK(mutex: 0, owner: 2) (state=8)
-> [Checker] Execute 2: MUTEX_WAIT(mutex: 0, owner: 2) (stack depth: 5, state: 9, 0 interleaves)
-> [Checker] Dependent Transitions:
-> [Checker]   MUTEX_UNLOCK(mutex: 0, owner: 2) (state=8)
-> [Checker]   MUTEX_WAIT(mutex: 0, owner: 2) (state=9)
-> [Checker] Execute 2: MUTEX_UNLOCK(mutex: 0, owner: -1) (stack depth: 6, state: 10, 0 interleaves)
-> [Checker] Dependent Transitions:
-> [Checker]   MUTEX_UNLOCK(mutex: 0, owner: 2) (state=8)
-> [Checker]   MUTEX_UNLOCK(mutex: 0, owner: -1) (state=10)
-> [Checker] 0 actors remain, but none of them need to be interleaved (depth 8).
-> [Checker] Execution came to an end at 1;1;2;1;2;2 (state: 11, depth: 7)
-> [Checker] Backtracking from 1;1;2;1;2;2
+> [Checker] 2 actors remain, but none of them need to be interleaved (depth 5).
+> [Checker] Backtracking from 1;1;2
+> [Checker] Sleep set actually containing:
+> [Checker]   <1,MUTEX_ASYNC_LOCK(mutex: 0, owner: 1)>
 > [Checker] Execute 2: MUTEX_ASYNC_LOCK(mutex: 0, owner: 2) (stack depth: 1, state: 1, 0 interleaves)
-> [Checker] Execute 1: MUTEX_ASYNC_LOCK(mutex: 0, owner: 2) (stack depth: 2, state: 12, 0 interleaves)
+> [Checker] Sleep set actually containing:
+> [Checker] Execute 1: MUTEX_ASYNC_LOCK(mutex: 0, owner: 2) (stack depth: 2, state: 9, 0 interleaves)
 > [Checker] Dependent Transitions:
 > [Checker]   MUTEX_ASYNC_LOCK(mutex: 0, owner: 2) (state=1)
-> [Checker]   MUTEX_ASYNC_LOCK(mutex: 0, owner: 2) (state=12)
-> [Checker] Execute 2: MUTEX_WAIT(mutex: 0, owner: 2) (stack depth: 3, state: 13, 0 interleaves)
+> [Checker]   MUTEX_ASYNC_LOCK(mutex: 0, owner: 2) (state=9)
+> [Checker] Sleep set actually containing:
+> [Checker] Execute 2: MUTEX_WAIT(mutex: 0, owner: 2) (stack depth: 3, state: 10, 0 interleaves)
 > [Checker] INDEPENDENT Transitions:
-> [Checker]   MUTEX_ASYNC_LOCK(mutex: 0, owner: 2) (state=12)
-> [Checker]   MUTEX_WAIT(mutex: 0, owner: 2) (state=13)
-> [Checker] Execute 2: MUTEX_UNLOCK(mutex: 0, owner: 1) (stack depth: 4, state: 14, 0 interleaves)
+> [Checker]   MUTEX_ASYNC_LOCK(mutex: 0, owner: 2) (state=9)
+> [Checker]   MUTEX_WAIT(mutex: 0, owner: 2) (state=10)
+> [Checker] Sleep set actually containing:
+> [Checker] Execute 2: MUTEX_UNLOCK(mutex: 0, owner: 1) (stack depth: 4, state: 11, 0 interleaves)
 > [Checker] INDEPENDENT Transitions:
-> [Checker]   MUTEX_ASYNC_LOCK(mutex: 0, owner: 2) (state=12)
-> [Checker]   MUTEX_UNLOCK(mutex: 0, owner: 1) (state=14)
-> [Checker] Execute 1: MUTEX_WAIT(mutex: 0, owner: 1) (stack depth: 5, state: 15, 0 interleaves)
+> [Checker]   MUTEX_ASYNC_LOCK(mutex: 0, owner: 2) (state=9)
+> [Checker]   MUTEX_UNLOCK(mutex: 0, owner: 1) (state=11)
+> [Checker] Sleep set actually containing:
+> [Checker] Execute 1: MUTEX_WAIT(mutex: 0, owner: 1) (stack depth: 5, state: 12, 0 interleaves)
 > [Checker] Dependent Transitions:
-> [Checker]   MUTEX_UNLOCK(mutex: 0, owner: 1) (state=14)
-> [Checker]   MUTEX_WAIT(mutex: 0, owner: 1) (state=15)
-> [Checker] Execute 1: MUTEX_UNLOCK(mutex: 0, owner: -1) (stack depth: 6, state: 16, 0 interleaves)
+> [Checker]   MUTEX_UNLOCK(mutex: 0, owner: 1) (state=11)
+> [Checker]   MUTEX_WAIT(mutex: 0, owner: 1) (state=12)
+> [Checker] Sleep set actually containing:
+> [Checker] Execute 1: MUTEX_UNLOCK(mutex: 0, owner: -1) (stack depth: 6, state: 13, 0 interleaves)
 > [Checker] Dependent Transitions:
-> [Checker]   MUTEX_UNLOCK(mutex: 0, owner: 1) (state=14)
-> [Checker]   MUTEX_UNLOCK(mutex: 0, owner: -1) (state=16)
+> [Checker]   MUTEX_UNLOCK(mutex: 0, owner: 1) (state=11)
+> [Checker]   MUTEX_UNLOCK(mutex: 0, owner: -1) (state=13)
 > [Checker] 0 actors remain, but none of them need to be interleaved (depth 8).
-> [Checker] Execution came to an end at 2;1;2;2;1;1 (state: 17, depth: 7)
+> [Checker] Execution came to an end at 2;1;2;2;1;1 (state: 14, depth: 7)
 > [Checker] Backtracking from 2;1;2;2;1;1
-> [Checker] DFS exploration ended. 17 unique states visited; 2 backtracks (2 transition replays, 21 states visited overall)
+> [Checker] DFS exploration ended. 14 unique states visited; 2 backtracks (2 transition replays, 18 states visited overall)
 
-$ $VALGRIND_NO_TRACE_CHILDREN ${bindir:=.}/../../../bin/simgrid-mc --cfg=model-check/sleep-set:true -- ${bindir:=.}/s4u-synchro-mutex --cfg=actors:2 --log=s4u_test.thres:critical
-> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'model-check/sleep-set' to 'true'
+$ $VALGRIND_NO_TRACE_CHILDREN ${bindir:=.}/../../../bin/simgrid-mc -- ${bindir:=.}/s4u-synchro-mutex --cfg=actors:2 --log=s4u_test.thres:critical
 > [0.000000] [xbt_cfg/INFO] Configuration change: Set 'actors' to '2'
 > [0.000000] [mc_dfs/INFO] Start a DFS exploration. Reduction is: dpor.
 > [0.000000] [mc_dfs/INFO] DFS exploration ended. 66 unique states visited; 11 backtracks (49 transition replays, 126 states visited overall)
index 3a82897..65836b1 100644 (file)
@@ -1,6 +1,5 @@
 #!/usr/bin/env tesh
 
-$ $VALGRIND_NO_TRACE_CHILDREN ${bindir:=.}/../../../bin/simgrid-mc --cfg=model-check/sleep-set:true --log=mc_dfs.thres:info --log=root.fmt="[Checker]%e%m%n" -- ${bindir:=.}/s4u-synchro-semaphore --log=sem_test.thres:critical --log=root.fmt="[App%e%e%e%e]%e%m%n"
-> [Checker] Configuration change: Set 'model-check/sleep-set' to 'true'
+$ $VALGRIND_NO_TRACE_CHILDREN ${bindir:=.}/../../../bin/simgrid-mc --log=mc_dfs.thres:info --log=root.fmt="[Checker]%e%m%n" -- ${bindir:=.}/s4u-synchro-semaphore --log=sem_test.thres:critical --log=root.fmt="[App%e%e%e%e]%e%m%n"
 > [Checker] Start a DFS exploration. Reduction is: dpor.
 > [Checker] DFS exploration ended. 33 unique states visited; 8 backtracks (84 transition replays, 125 states visited overall)
index 6301657..c0f6eb0 100644 (file)
@@ -3,7 +3,7 @@
 /* This program is free software; you can redistribute it and/or modify it
  * under the terms of the license (GNU LGPL) which comes with this package. */
 
-/* This example demonstrate basic use of the task plugin.
+/* This example demonstrate basic use of tasks.
  *
  * We model the following graph:
  *
  * comm is a communication task.
  */
 
-#include "simgrid/plugins/task.hpp"
 #include "simgrid/s4u.hpp"
+#include "simgrid/s4u/Task.hpp"
 #include <simgrid/plugins/file_system.h>
 
 XBT_LOG_NEW_DEFAULT_CATEGORY(task_simple, "Messages specific for this task example");
+namespace sg4 = simgrid::s4u;
 
 int main(int argc, char* argv[])
 {
-  simgrid::s4u::Engine e(&argc, argv);
+  sg4::Engine e(&argc, argv);
   e.load_platform(argv[1]);
-  simgrid::plugins::Task::init();
 
   // Retrieve hosts
   auto* bob  = e.host_by_name("bob");
   auto* carl = e.host_by_name("carl");
 
   // Create tasks
-  auto exec1 = simgrid::plugins::ExecTask::init("exec1", 1e9, bob);
-  auto exec2 = simgrid::plugins::ExecTask::init("exec2", 1e9, carl);
-  auto write = simgrid::plugins::IoTask::init("write", 1e7, bob->get_disks().front(), simgrid::s4u::Io::OpType::WRITE);
-  auto read  = simgrid::plugins::IoTask::init("read", 1e7, carl->get_disks().front(), simgrid::s4u::Io::OpType::READ);
+  auto exec1 = sg4::ExecTask::init("exec1", 1e9, bob);
+  auto exec2 = sg4::ExecTask::init("exec2", 1e9, carl);
+  auto write = sg4::IoTask::init("write", 1e7, bob->get_disks().front(), sg4::Io::OpType::WRITE);
+  auto read  = sg4::IoTask::init("read", 1e7, carl->get_disks().front(), sg4::Io::OpType::READ);
 
   // Create the graph by defining dependencies between tasks
   exec1->add_successor(write);
@@ -41,12 +41,11 @@ int main(int argc, char* argv[])
   read->add_successor(exec2);
 
   // Add a function to be called when tasks end for log purpose
-  simgrid::plugins::Task::on_end_cb([](const simgrid::plugins::Task* t) {
-    XBT_INFO("Task %s finished (%d)", t->get_name().c_str(), t->get_count());
-  });
+  sg4::Task::on_completion_cb(
+      [](const sg4::Task* t) { XBT_INFO("Task %s finished (%d)", t->get_name().c_str(), t->get_count()); });
 
-  // Enqueue two executions for task exec1
-  exec1->enqueue_execs(2);
+  // Enqueue two firings for task exec1
+  exec1->enqueue_firings(2);
 
   // Start the simulation
   e.run();
index 3e9d14f..2d7224f 100644 (file)
@@ -3,7 +3,7 @@
 /* This program is free software; you can redistribute it and/or modify it
  * under the terms of the license (GNU LGPL) which comes with this package. */
 
-/* This example demonstrate basic use of the task plugin.
+/* This example demonstrate basic use of tasks.
  *
  * We model the following graph:
  *
  * comm is a communication task.
  */
 
-#include "simgrid/plugins/task.hpp"
 #include "simgrid/s4u.hpp"
 
 XBT_LOG_NEW_DEFAULT_CATEGORY(task_simple, "Messages specific for this task example");
 
+namespace sg4 = simgrid::s4u;
+
 int main(int argc, char* argv[])
 {
-  simgrid::s4u::Engine e(&argc, argv);
+  sg4::Engine e(&argc, argv);
   e.load_platform(argv[1]);
-  simgrid::plugins::Task::init();
 
   // Retrieve hosts
   auto* tremblay = e.host_by_name("Tremblay");
   auto* jupiter  = e.host_by_name("Jupiter");
 
   // Create tasks
-  auto exec1 = simgrid::plugins::ExecTask::init("exec1", 1e9, tremblay);
-  auto exec2 = simgrid::plugins::ExecTask::init("exec2", 1e9, jupiter);
-  auto comm  = simgrid::plugins::CommTask::init("comm", 1e7, tremblay, jupiter);
+  auto exec1 = sg4::ExecTask::init("exec1", 1e9, tremblay);
+  auto exec2 = sg4::ExecTask::init("exec2", 1e9, jupiter);
+  auto comm  = sg4::CommTask::init("comm", 1e7, tremblay, jupiter);
 
   // Create the graph by defining dependencies between tasks
   exec1->add_successor(comm);
   comm->add_successor(exec2);
 
   // Add a function to be called when tasks end for log purpose
-  simgrid::plugins::Task::on_end_cb([](const simgrid::plugins::Task* t) {
-    XBT_INFO("Task %s finished (%d)", t->get_name().c_str(), t->get_count());
-  });
+  sg4::Task::on_completion_cb(
+      [](const sg4::Task* t) { XBT_INFO("Task %s finished (%d)", t->get_name().c_str(), t->get_count()); });
 
-  // Enqueue two executions for task exec1
-  exec1->enqueue_execs(2);
+  // Enqueue two firings for task exec1
+  exec1->enqueue_firings(2);
 
   // Start the simulation
   e.run();
diff --git a/examples/cpp/task-storm/s4u-task-storm.cpp b/examples/cpp/task-storm/s4u-task-storm.cpp
new file mode 100644 (file)
index 0000000..d290ca0
--- /dev/null
@@ -0,0 +1,123 @@
+/* Copyright (c) 2017-2023. The SimGrid Team. All rights reserved.          */
+
+/* This program is free software; you can redistribute it and/or modify it
+ * under the terms of the license (GNU LGPL) which comes with this package. */
+
+/* This example takes the main concepts of Apache Storm presented here
+   https://storm.apache.org/releases/2.4.0/Concepts.html and use them to build a simulation of a stream processing
+   application
+
+   Spout SA produces data every 100ms. The volume produced is alternatively 1e3, 1e6 and 1e9 bytes.
+   Spout SB produces 1e6 bytes every 200ms.
+
+   Bolt B1 and B2 processes data from Spout SA alternatively. The quantity of work to process this data is 10 flops per
+   bytes Bolt B3 processes data from Spout SB. Bolt B4 processes data from Bolt B3.
+
+                        Fafard
+                        ┌────┐
+                    ┌──►│ B1 │
+         Tremblay   │   └────┘
+          ┌────┐    │
+          │ SA ├────┤  Ginette
+          └────┘    │   ┌────┐
+                    └──►│ B2 │
+                        └────┘
+
+
+                       Bourassa
+         Jupiter     ┌──────────┐
+          ┌────┐     │          │
+          │ SB ├─────┤ B3 ──► B4│
+          └────┘     │          │
+                     └──────────┘
+ */
+
+#include "simgrid/s4u.hpp"
+
+XBT_LOG_NEW_DEFAULT_CATEGORY(task_storm, "Messages specific for this s4u example");
+namespace sg4 = simgrid::s4u;
+
+int main(int argc, char* argv[])
+{
+  sg4::Engine e(&argc, argv);
+  e.load_platform(argv[1]);
+
+  // Retrieve hosts
+  auto tremblay = e.host_by_name("Tremblay");
+  auto jupiter  = e.host_by_name("Jupiter");
+  auto fafard   = e.host_by_name("Fafard");
+  auto ginette  = e.host_by_name("Ginette");
+  auto bourassa = e.host_by_name("Bourassa");
+
+  // Create execution tasks
+  auto SA = sg4::ExecTask::init("SA", tremblay->get_speed() * 0.1, tremblay);
+  auto SB = sg4::ExecTask::init("SB", jupiter->get_speed() * 0.2, jupiter);
+  auto B1 = sg4::ExecTask::init("B1", 1e8, fafard);
+  auto B2 = sg4::ExecTask::init("B2", 1e8, ginette);
+  auto B3 = sg4::ExecTask::init("B3", 1e8, bourassa);
+  auto B4 = sg4::ExecTask::init("B4", 2e8, bourassa);
+
+  // Create communication tasks
+  auto SA_to_B1 = sg4::CommTask::init("SA_to_B1", 0, tremblay, fafard);
+  auto SA_to_B2 = sg4::CommTask::init("SA_to_B2", 0, tremblay, ginette);
+  auto SB_to_B3 = sg4::CommTask::init("SB_to_B3", 1e6, jupiter, bourassa);
+
+  // Create the graph by defining dependencies between tasks
+  // Some dependencies are defined dynamically
+  SA_to_B1->add_successor(B1);
+  SA_to_B2->add_successor(B2);
+  SB->add_successor(SB_to_B3);
+  SB_to_B3->add_successor(B3);
+  B3->add_successor(B4);
+
+  /* Dynamic modification of the graph and bytes sent
+     Alternatively we: remove/add the link between SA and SA_to_B2
+                       add/remove the link between SA and SA_to_B1
+  */
+  SA->on_this_start_cb([SA_to_B1, SA_to_B2](sg4::Task* t) {
+    int count = t->get_count();
+    sg4::CommTaskPtr comm;
+    if (count % 2 == 0) {
+      t->remove_successor(SA_to_B2);
+      t->add_successor(SA_to_B1);
+      comm = SA_to_B1;
+    } else {
+      t->remove_successor(SA_to_B1);
+      t->add_successor(SA_to_B2);
+      comm = SA_to_B2;
+    }
+    std::vector<double> amount = {1e3, 1e6, 1e9};
+    comm->set_amount(amount[count % 3]);
+    auto token = std::make_shared<sg4::Token>();
+    token->set_data(new double(amount[count % 3]));
+    t->set_token(token);
+  });
+
+  // The token sent by SA is forwarded by both communication tasks
+  SA_to_B1->on_this_start_cb([SA](sg4::Task* t) { t->set_token(t->get_next_token_from(SA)); });
+  SA_to_B2->on_this_start_cb([SA](sg4::Task* t) { t->set_token(t->get_next_token_from(SA)); });
+
+  /* B1 and B2 read the value of the token received by their predecessors
+     and use it to adapt their amount of work to do.
+  */
+  B1->on_this_start_cb([SA_to_B1](sg4::Task* t) {
+    auto data = t->get_next_token_from(SA_to_B1)->get_unique_data<double>();
+    t->set_amount(*data * 10);
+  });
+  B2->on_this_start_cb([SA_to_B2](sg4::Task* t) {
+    auto data = t->get_next_token_from(SA_to_B2)->get_unique_data<double>();
+    t->set_amount(*data * 10);
+  });
+
+  // Enqueue firings for tasks without predecessors
+  SA->enqueue_firings(5);
+  SB->enqueue_firings(5);
+
+  // Add a function to be called when tasks end for log purpose
+  sg4::Task::on_completion_cb(
+      [](const sg4::Task* t) { XBT_INFO("Task %s finished (%d)", t->get_name().c_str(), t->get_count()); });
+
+  // Start the simulation
+  e.run();
+  return 0;
+}
diff --git a/examples/cpp/task-storm/s4u-task-storm.tesh b/examples/cpp/task-storm/s4u-task-storm.tesh
new file mode 100644 (file)
index 0000000..d7c364a
--- /dev/null
@@ -0,0 +1,38 @@
+#!/usr/bin/env tesh
+
+$ ${bindir:=.}/s4u-task-storm ${platfdir}/small_platform.xml
+> [0.100000] [task_storm/INFO] Task SA finished (1)
+> [0.125841] [task_storm/INFO] Task SA_to_B1 finished (1)
+> [0.125972] [task_storm/INFO] Task B1 finished (1)
+> [0.200000] [task_storm/INFO] Task SB finished (1)
+> [0.200000] [task_storm/INFO] Task SA finished (2)
+> [0.300000] [task_storm/INFO] Task SA finished (3)
+> [0.364429] [task_storm/INFO] Task SA_to_B2 finished (1)
+> [0.400000] [task_storm/INFO] Task SB finished (2)
+> [0.400000] [task_storm/INFO] Task SA finished (4)
+> [0.416759] [task_storm/INFO] Task SA_to_B2 finished (2)
+> [0.500000] [task_storm/INFO] Task SA finished (5)
+> [0.557036] [task_storm/INFO] Task SB_to_B3 finished (1)
+> [0.570648] [task_storm/INFO] Task B2 finished (1)
+> [0.570855] [task_storm/INFO] Task B2 finished (2)
+> [0.600000] [task_storm/INFO] Task SB finished (3)
+> [0.800000] [task_storm/INFO] Task SB finished (4)
+> [0.867388] [task_storm/INFO] Task SB_to_B3 finished (2)
+> [1.000000] [task_storm/INFO] Task SB finished (5)
+> [1.177739] [task_storm/INFO] Task SB_to_B3 finished (3)
+> [1.488090] [task_storm/INFO] Task SB_to_B3 finished (4)
+> [1.798442] [task_storm/INFO] Task SB_to_B3 finished (5)
+> [2.619232] [task_storm/INFO] Task B3 finished (1)
+> [6.743624] [task_storm/INFO] Task B3 finished (2)
+> [10.868015] [task_storm/INFO] Task B3 finished (3)
+> [10.868015] [task_storm/INFO] Task B4 finished (1)
+> [14.992407] [task_storm/INFO] Task B3 finished (4)
+> [19.116799] [task_storm/INFO] Task B3 finished (5)
+> [19.116799] [task_storm/INFO] Task B4 finished (2)
+> [23.241190] [task_storm/INFO] Task B4 finished (3)
+> [27.365582] [task_storm/INFO] Task B4 finished (4)
+> [31.489974] [task_storm/INFO] Task B4 finished (5)
+> [133.367321] [task_storm/INFO] Task SA_to_B1 finished (2)
+> [133.525717] [task_storm/INFO] Task SA_to_B1 finished (3)
+> [264.435791] [task_storm/INFO] Task B1 finished (2)
+> [264.566859] [task_storm/INFO] Task B1 finished (3)
index 6ebca12..252f338 100644 (file)
  * With exec1 and exec2 on different hosts.
  */
 
-#include "simgrid/plugins/task.hpp"
 #include "simgrid/s4u.hpp"
 
 XBT_LOG_NEW_DEFAULT_CATEGORY(task_switch_host, "Messages specific for this task example");
+namespace sg4 = simgrid::s4u;
 
 int main(int argc, char* argv[])
 {
-  simgrid::s4u::Engine e(&argc, argv);
+  sg4::Engine e(&argc, argv);
   e.load_platform(argv[1]);
-  simgrid::plugins::Task::init();
 
   // Retrieve hosts
   auto* tremblay = e.host_by_name("Tremblay");
@@ -33,13 +32,13 @@ int main(int argc, char* argv[])
   auto* fafard   = e.host_by_name("Fafard");
 
   // Create tasks
-  auto comm0 = simgrid::plugins::CommTask::init("comm0");
+  auto comm0 = sg4::CommTask::init("comm0");
   comm0->set_bytes(1e7);
   comm0->set_source(tremblay);
-  auto exec1 = simgrid::plugins::ExecTask::init("exec1", 1e9, jupiter);
-  auto exec2 = simgrid::plugins::ExecTask::init("exec2", 1e9, fafard);
-  auto comm1 = simgrid::plugins::CommTask::init("comm1", 1e7, jupiter, tremblay);
-  auto comm2 = simgrid::plugins::CommTask::init("comm2", 1e7, fafard, tremblay);
+  auto exec1 = sg4::ExecTask::init("exec1", 1e9, jupiter);
+  auto exec2 = sg4::ExecTask::init("exec2", 1e9, fafard);
+  auto comm1 = sg4::CommTask::init("comm1", 1e7, jupiter, tremblay);
+  auto comm2 = sg4::CommTask::init("comm2", 1e7, fafard, tremblay);
 
   // Create the initial graph by defining dependencies between tasks
   comm0->add_successor(exec2);
@@ -47,15 +46,13 @@ int main(int argc, char* argv[])
   exec2->add_successor(comm2);
 
   // Add a function to be called when tasks end for log purpose
-  simgrid::plugins::Task::on_end_cb([](const simgrid::plugins::Task* t) {
-    XBT_INFO("Task %s finished (%d)", t->get_name().c_str(), t->get_count());
-  });
+  sg4::Task::on_completion_cb(
+      [](const sg4::Task* t) { XBT_INFO("Task %s finished (%d)", t->get_name().c_str(), t->get_count()); });
 
-  // Add a function to be called before each executions of comm0
+  // Add a function to be called before each firing of comm0
   // This function modifies the graph of tasks by adding or removing
   // successors to comm0
-  comm0->on_this_start_cb([exec1, exec2, jupiter, fafard](simgrid::plugins::Task* t) {
-    auto* comm0      = dynamic_cast<simgrid::plugins::CommTask*>(t);
+  comm0->on_this_start_cb([comm0, exec1, exec2, jupiter, fafard](sg4::Task*) {
     static int count = 0;
     if (count % 2 == 0) {
       comm0->set_destination(jupiter);
@@ -69,8 +66,8 @@ int main(int argc, char* argv[])
     count++;
   });
 
-  // Enqueue four executions for task comm0
-  comm0->enqueue_execs(4);
+  // Enqueue four firings for task comm0
+  comm0->enqueue_firings(4);
 
   // Start the simulation
   e.run();
index 960fb66..fff790d 100644 (file)
  * With a heavy load there is a burst of comm before the exec task can even finish once.
  */
 
-#include "simgrid/plugins/task.hpp"
 #include "simgrid/s4u.hpp"
 
 XBT_LOG_NEW_DEFAULT_CATEGORY(task_variable_load, "Messages specific for this s4u example");
+namespace sg4 = simgrid::s4u;
 
-static void variable_load(simgrid::plugins::TaskPtr t)
+static void variable_load(sg4::TaskPtr t)
 {
   XBT_INFO("--- Small load ---");
   for (int i = 0; i < 3; i++) {
-    t->enqueue_execs(1);
-    simgrid::s4u::this_actor::sleep_for(100);
+    t->enqueue_firings(1);
+    sg4::this_actor::sleep_for(100);
   }
-  simgrid::s4u::this_actor::sleep_until(1000);
+  sg4::this_actor::sleep_until(1000);
   XBT_INFO("--- Heavy load ---");
   for (int i = 0; i < 3; i++) {
-    t->enqueue_execs(1);
-    simgrid::s4u::this_actor::sleep_for(1);
+    t->enqueue_firings(1);
+    sg4::this_actor::sleep_for(1);
   }
 }
 
 int main(int argc, char* argv[])
 {
-  simgrid::s4u::Engine e(&argc, argv);
+  sg4::Engine e(&argc, argv);
   e.load_platform(argv[1]);
-  simgrid::plugins::Task::init();
 
   // Retreive hosts
   auto* tremblay = e.host_by_name("Tremblay");
   auto* jupiter  = e.host_by_name("Jupiter");
 
   // Create tasks
-  auto comm = simgrid::plugins::CommTask::init("comm", 1e7, tremblay, jupiter);
-  auto exec = simgrid::plugins::ExecTask::init("exec", 1e9, jupiter);
+  auto comm = sg4::CommTask::init("comm", 1e7, tremblay, jupiter);
+  auto exec = sg4::ExecTask::init("exec", 1e9, jupiter);
 
   // Create the graph by defining dependencies between tasks
   comm->add_successor(exec);
 
   // Add a function to be called when tasks end for log purpose
-  simgrid::plugins::Task::on_end_cb([](const simgrid::plugins::Task* t) {
-    XBT_INFO("Task %s finished (%d)", t->get_name().c_str(), t->get_count());
-  });
+  sg4::Task::on_completion_cb(
+      [](const sg4::Task* t) { XBT_INFO("Task %s finished (%d)", t->get_name().c_str(), t->get_count()); });
 
   // Create the actor that will inject load during the simulation
-  simgrid::s4u::Actor::create("input", tremblay, variable_load, comm);
+  sg4::Actor::create("input", tremblay, variable_load, comm);
 
   // Start the simulation
   e.run();
index b74c411..e75215a 100644 (file)
@@ -24,7 +24,6 @@ if __name__ == '__main__':
     args = parse()
     e = Engine(sys.argv)
     e.load_platform(args.platform)
-    Task.init()
 
     # Retrieve hosts
     bob = e.host_by_name('bob')
@@ -42,10 +41,10 @@ if __name__ == '__main__':
     read.add_successor(exec2)
 
     # Add a function to be called when tasks end for log purpose
-    Task.on_end_cb(callback)
+    Task.on_completion_cb(callback)
 
-    # Enqueue two executions for task exec1
-    exec1.enqueue_execs(2)
+    # Enqueue two firings for task exec1
+    exec1.enqueue_firings(2)
 
     # runs the simulation
     e.run()
index 1219906..23e9fc0 100644 (file)
@@ -34,7 +34,6 @@ if __name__ == '__main__':
     args = parse()
     e = Engine(sys.argv)
     e.load_platform(args.platform)
-    Task.init()
 
     # Retrieve hosts
     tremblay = e.host_by_name('Tremblay')
@@ -50,11 +49,10 @@ if __name__ == '__main__':
     comm.add_successor(exec2)
 
     # Add a function to be called when tasks end for log purpose
-    Task.on_end_cb(callback)
+    Task.on_completion_cb(callback)
 
-    # Enqueue two executions for task exec1
-    exec1.enqueue_execs(2)
+    # Enqueue two firings for task exec1
+    exec1.enqueue_firings(2)
 
     # runs the simulation
     e.run()
-
index a95db16..b2904c3 100644 (file)
@@ -55,7 +55,6 @@ if __name__ == '__main__':
     args = parse()
     e = Engine(sys.argv)
     e.load_platform(args.platform)
-    Task.init()
 
     # Retrieve hosts
     tremblay = e.host_by_name('Tremblay')
@@ -76,15 +75,15 @@ if __name__ == '__main__':
     exec2.add_successor(comm2)
 
     # Add a function to be called when tasks end for log purpose
-    Task.on_end_cb(callback)
+    Task.on_completion_cb(callback)
 
-    # Add a function to be called before each executions of comm0
+    # Add a function to be called before each firing of comm0
     # This function modifies the graph of tasks by adding or removing
     # successors to comm0
     comm0.on_this_start_cb(lambda t: switch(t, [jupiter, fafard], [exec1,exec2]))
 
-    # Enqueue two executions for task exec1
-    comm0.enqueue_execs(4)
+    # Enqueue two firings for task exec1
+    comm0.enqueue_firings(4)
 
     # runs the simulation
     e.run()
index 7310584..51dbc1a 100644 (file)
@@ -33,19 +33,18 @@ def callback(t):
 def variable_load(t):
     print('--- Small load ---')
     for _ in range(3):
-        t.enqueue_execs(1)
+        t.enqueue_firings(1)
         this_actor.sleep_for(100)
     this_actor.sleep_for(1000)
     print('--- Heavy load ---')
     for _ in range(3):
-        t.enqueue_execs(1)
+        t.enqueue_firings(1)
         this_actor.sleep_for(1)
 
 if __name__ == '__main__':
     args = parse()
     e = Engine(sys.argv)
     e.load_platform(args.platform)
-    Task.init()
 
     # Retrieve hosts
     tremblay = e.host_by_name('Tremblay')
@@ -59,7 +58,7 @@ if __name__ == '__main__':
     comm.add_successor(exec)
 
     # Add a function to be called when tasks end for log purpose
-    Task.on_end_cb(callback)
+    Task.on_completion_cb(callback)
 
     # Create the actor that will inject load during the simulation
     Actor.create("input", tremblay, variable_load, comm)
index eed3563..4f070ab 100644 (file)
@@ -10,4 +10,4 @@ $ $VALGRIND_NO_LEAK_CHECK ../../../smpi_script/bin/smpirun -wrapper "${bindir:=.
 > [0.000000] [mc_comm_determinism/INFO] The recv communications pattern of the actor 0 is different! Different source for communication #1
 > [0.000000] [mc_comm_determinism/INFO] Send-deterministic : Yes
 > [0.000000] [mc_comm_determinism/INFO] Recv-deterministic : No
-> [0.000000] [mc_dfs/INFO] DFS exploration ended. 98 unique states visited; 17 backtracks (47 transition replays, 162 states visited overall)
+> [0.000000] [mc_dfs/INFO] DFS exploration ended. 25 unique states visited; 6 backtracks (11 transition replays, 42 states visited overall)
index 08ea4b2..c09cc53 100644 (file)
@@ -9,14 +9,7 @@ $ $VALGRIND_NO_LEAK_CHECK ../../../smpi_script/bin/smpirun -quiet -wrapper "${bi
 > rank 0 recv the data
 > rank 1 recv the data
 > Sent 1 to rank 0
-> Sent 0 to rank 1
-> rank 0 recv the data
-> rank 1 recv the data
-> Sent 1 to rank 0
-> Sent 0 to rank 1
-> rank 0 recv the data
-> rank 1 recv the data
-> [0.000000] [mc_dfs/INFO] DFS exploration ended. 18 unique states visited; 2 backtracks (1 transition replays, 21 states visited overall)
+> [0.000000] [mc_dfs/INFO] DFS exploration ended. 9 unique states visited; 1 backtracks (0 transition replays, 10 states visited overall)
 
 p Testing the paranoid model
 ! timeout 60
index 6e5bc5f..55ecc95 100644 (file)
@@ -9,10 +9,7 @@ $ $VALGRIND_NO_TRACE_CHILDREN ${bindir:=.}/../../bin/simgrid-mc --cfg=model-chec
 > The thread 0 is terminating.
 > The thread 1 is terminating.
 > User's main is terminating.
-> The thread 0 is terminating.
-> The thread 1 is terminating.
-> User's main is terminating.
 > The thread 1 is terminating.
 > The thread 0 is terminating.
 > User's main is terminating.
-> [0.000000] [mc_dfs/INFO] DFS exploration ended. 23 unique states visited; 2 backtracks (2 transition replays, 27 states visited overall)
\ No newline at end of file
+> [0.000000] [mc_dfs/INFO] DFS exploration ended. 18 unique states visited; 2 backtracks (2 transition replays, 22 states visited overall)
\ No newline at end of file
index 5e6cac0..e95629c 100644 (file)
@@ -12,12 +12,6 @@ $ $VALGRIND_NO_TRACE_CHILDREN ${bindir:=.}/../../bin/simgrid-mc --cfg=model-chec
 > The thread 0 is terminating.
 > The thread 1 is terminating.
 > User's main is terminating.
-> The thread 0 is terminating.
-> The thread 1 is terminating.
-> User's main is terminating.
-> The thread 0 is terminating.
-> The thread 1 is terminating.
-> User's main is terminating.
 > [0.000000] [mc_global/INFO] **************************
 > [0.000000] [mc_global/INFO] *** DEADLOCK DETECTED ***
 > [0.000000] [mc_global/INFO] **************************
@@ -34,4 +28,4 @@ $ $VALGRIND_NO_TRACE_CHILDREN ${bindir:=.}/../../bin/simgrid-mc --cfg=model-chec
 > [0.000000] [mc_global/INFO]   3: MUTEX_WAIT(mutex: 1, owner: 3)
 > [0.000000] [mc_global/INFO]   3: MUTEX_ASYNC_LOCK(mutex: 0, owner: 2)
 > [0.000000] [mc_Session/INFO] You can debug the problem (and see the whole details) by rerunning out of simgrid-mc with --cfg=model-check/replay:'2;2;3;2;3;3'
-> [0.000000] [mc_dfs/INFO] DFS exploration ended. 38 unique states visited; 3 backtracks (11 transition replays, 52 states visited overall)
\ No newline at end of file
+> [0.000000] [mc_dfs/INFO] DFS exploration ended. 21 unique states visited; 3 backtracks (11 transition replays, 35 states visited overall)
\ No newline at end of file
index 84efe30..a9f5a72 100644 (file)
@@ -1,9 +1,19 @@
 # We ignore the LD_PRELOAD lines from the expected output because they contain the build path
 ! ignore .*LD_PRELOAD.*
 
-$ $VALGRIND_NO_TRACE_CHILDREN ${bindir:=.}/../../bin/simgrid-mc --cfg=model-check/sleep-set:true --cfg=model-check/setenv:LD_PRELOAD=${libdir:=.}/libsgmalloc.so:${libdir:=.}/libsthread.so ${bindir:=.}/pthread-producer-consumer -q -c 2 -C 1 -p 2 -P 1
-> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'model-check/sleep-set' to 'true'
+$ $VALGRIND_NO_TRACE_CHILDREN ${bindir:=.}/../../bin/simgrid-mc --cfg=model-check/setenv:LD_PRELOAD=${libdir:=.}/libsgmalloc.so:${libdir:=.}/libsthread.so ${bindir:=.}/pthread-producer-consumer -q  -C 1 -P 1
 > [0.000000] [sthread/INFO] Starting the simulation.
 > [0.000000] [mc_dfs/INFO] Start a DFS exploration. Reduction is: dpor.
-> [0.000000] [mc_dfs/INFO] DFS exploration ended. 103 unique states visited; 16 backtracks (163 transition replays, 282 states visited overall)
+> [0.000000] [mc_dfs/INFO] DFS exploration ended. 786 unique states visited; 97 backtracks (2049 transition replays, 2932 states visited overall)
 
+$ $VALGRIND_NO_TRACE_CHILDREN ${bindir:=.}/../../bin/simgrid-mc --cfg=model-check/reduction:sdpor --cfg=model-check/setenv:LD_PRELOAD=${libdir:=.}/libsgmalloc.so:${libdir:=.}/libsthread.so ${bindir:=.}/pthread-producer-consumer -q  -C 1 -P 1
+> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'model-check/reduction' to 'sdpor'
+> [0.000000] [sthread/INFO] Starting the simulation.
+> [0.000000] [mc_dfs/INFO] Start a DFS exploration. Reduction is: sdpor.
+> [0.000000] [mc_dfs/INFO] DFS exploration ended. 1186 unique states visited; 157 backtracks (3403 transition replays, 4746 states visited overall)
+
+$ $VALGRIND_NO_TRACE_CHILDREN ${bindir:=.}/../../bin/simgrid-mc --cfg=model-check/reduction:odpor --cfg=model-check/setenv:LD_PRELOAD=${libdir:=.}/libsgmalloc.so:${libdir:=.}/libsthread.so ${bindir:=.}/pthread-producer-consumer -q  -C 1 -P 1
+> [0.000000] [xbt_cfg/INFO] Configuration change: Set 'model-check/reduction' to 'odpor'
+> [0.000000] [sthread/INFO] Starting the simulation.
+> [0.000000] [mc_dfs/INFO] Start a DFS exploration. Reduction is: odpor.
+> [0.000000] [mc_dfs/INFO] DFS exploration ended. 39 unique states visited; 0 backtracks (0 transition replays, 39 states visited overall)
index da50b77..fefbd72 100644 (file)
@@ -4,8 +4,7 @@
 # We ignore the LD_PRELOAD lines from the expected output because they contain the build path
 ! ignore .*LD_PRELOAD.*
 
-$ $VALGRIND_NO_TRACE_CHILDREN ${bindir:=.}/../../../bin/simgrid-mc --cfg=model-check/sleep-set:true --cfg=model-check/setenv:LD_PRELOAD=${libdir:=.}/libsthread.so ${bindir:=.}/stdobject "--log=root.fmt:[%11.6r]%e(%a@%h)%e%m%n" --log=no_loc
-> [   0.000000] (maestro@) Configuration change: Set 'model-check/sleep-set' to 'true'
+$ $VALGRIND_NO_TRACE_CHILDREN ${bindir:=.}/../../../bin/simgrid-mc --cfg=model-check/setenv:LD_PRELOAD=${libdir:=.}/libsthread.so ${bindir:=.}/stdobject "--log=root.fmt:[%11.6r]%e(%a@%h)%e%m%n" --log=no_loc
 > [   0.000000] (maestro@) Starting the simulation.
 > starting two helpers...
 > waiting for helpers to finish...
index 63a44e4..4b14e56 100644 (file)
@@ -185,7 +185,7 @@ public:
   const char* what() const noexcept { return msg_.c_str(); }
 
   XBT_ATTRIB_NORETURN static void do_throw();
-  XBT_ATTRIB_DEPRECATED_v337("Please manifest if you actually need this function") static bool try_n_catch(
+  XBT_ATTRIB_DEPRECATED_v338("Please manifest if you actually need this function") static bool try_n_catch(
       const std::function<void()>& try_block);
 
 private:
index f39ff67..07e7cbc 100644 (file)
@@ -229,19 +229,7 @@ using s4u_Disk              = simgrid::s4u::Disk;
 using s4u_NetZone           = simgrid::s4u::NetZone;
 using s4u_VM                = simgrid::s4u::VirtualMachine;
 
-using smx_timer_t
-    XBT_ATTRIB_DEPRECATED_v335("Please use simgrid::kernel::timer::Timer*") = simgrid::kernel::timer::Timer*;
-using smx_actor_t
-    XBT_ATTRIB_DEPRECATED_v335("Please use simgrid::kernel::actor::ActorImpl*") = simgrid::kernel::actor::ActorImpl*;
 using smx_activity_t = simgrid::kernel::activity::ActivityImpl*;
-using smx_cond_t XBT_ATTRIB_DEPRECATED_v335("Please use simgrid::kernel::activity::ConditionVariableImpl*") =
-    simgrid::kernel::activity::ConditionVariableImpl*;
-using smx_mailbox_t XBT_ATTRIB_DEPRECATED_v335("Please use simgrid::kernel::activity::MailboxImpl*") =
-    simgrid::kernel::activity::MailboxImpl*;
-using smx_mutex_t XBT_ATTRIB_DEPRECATED_v335("Please use simgrid::kernel::activity::MutexImpl*") =
-    simgrid::kernel::activity::MutexImpl*;
-using smx_sem_t XBT_ATTRIB_DEPRECATED_v335("Please use simgrid::kernel::activity::SemaphoreImpl*") =
-    simgrid::kernel::activity::SemaphoreImpl*;
 #else
 
 typedef struct s4u_Actor s4u_Actor;
@@ -259,22 +247,13 @@ typedef struct s4u_Disk s4u_Disk;
 typedef struct s4u_NetZone s4u_NetZone;
 typedef struct s4u_VM s4u_VM;
 
-XBT_ATTRIB_DEPRECATED_v335("Please stop using this type alias") typedef struct s_smx_timer* smx_timer_t;
-XBT_ATTRIB_DEPRECATED_v335("Please stop using this type alias") typedef struct s_smx_actor* smx_actor_t;
 typedef struct s_smx_activity* smx_activity_t;
-XBT_ATTRIB_DEPRECATED_v335("Please stop using this type alias") typedef struct s_smx_cond_t* smx_cond_t;
-XBT_ATTRIB_DEPRECATED_v335("Please stop using this type alias") typedef struct s_smx_mailbox* smx_mailbox_t;
-XBT_ATTRIB_DEPRECATED_v335("Please stop using this type alias") typedef struct s_smx_mutex* smx_mutex_t;
-XBT_ATTRIB_DEPRECATED_v335("Please stop using this type alias") typedef struct s_smx_sem* smx_sem_t;
 
 #endif
 
 /** Pointer to a SimGrid barrier object */
 typedef s4u_Barrier* sg_bar_t;
-/** Constant pointer to a SimGrid barrier object */
-XBT_ATTRIB_DEPRECATED_v335("Please stop using this type alias") typedef const s4u_Barrier* const_sg_bar_t;
 typedef s4u_Comm* sg_comm_t;
-XBT_ATTRIB_DEPRECATED_v335("Please stop using this type alias") typedef const s4u_Comm* const_sg_comm_t;
 typedef s4u_Exec* sg_exec_t;
 typedef const s4u_Exec* const_sg_exec_t;
 typedef s4u_ConditionVariable* sg_cond_t;
index e828dce..57c0a94 100644 (file)
@@ -115,9 +115,6 @@ XBT_PUBLIC double sg_host_get_route_latency(const_sg_host_t from, const_sg_host_
 XBT_PUBLIC double sg_host_get_route_bandwidth(const_sg_host_t from, const_sg_host_t to);
 XBT_PUBLIC void sg_host_sendto(sg_host_t from, sg_host_t to, double byte_amount);
 
-XBT_ATTRIB_DEPRECATED_v335("Please manifest if you actually need this function") XBT_PUBLIC
-    void sg_host_dump(const_sg_host_t ws);
-
 XBT_PUBLIC void sg_host_get_actor_list(const_sg_host_t host, xbt_dynar_t whereto);
 SG_END_DECL
 
index f8cd62d..91ff4e9 100644 (file)
@@ -7,7 +7,6 @@
 #define INSTR_H_
 
 #include <simgrid/engine.h>
-#include <xbt/dynar.h> // XBT_ATTRIB_DEPRECATED_v334
 
 #ifdef __cplusplus
 #include <set>
@@ -80,92 +79,6 @@ XBT_PUBLIC void TRACE_host_set_state(const char* host, const char* state, const
 XBT_PUBLIC void TRACE_host_push_state(const char* host, const char* state, const char* value);
 XBT_PUBLIC void TRACE_host_pop_state(const char* host, const char* state);
 
-XBT_ATTRIB_DEPRECATED_v334("Please use simgrid::instr::platform_graph_export_graphviz") XBT_PUBLIC
-    int TRACE_platform_graph_export_graphviz(const char* filename);
-XBT_ATTRIB_DEPRECATED_v334("Please use simgrid::instr::declare_tracing_category") XBT_PUBLIC
-    void TRACE_category(const char* category);
-XBT_ATTRIB_DEPRECATED_v334("Please use simgrid::instr::declare_tracing_category") XBT_PUBLIC
-    void TRACE_category_with_color(const char* category, const char* color);
-XBT_ATTRIB_DEPRECATED_v334("Please use simgrid::instr::get_tracing_categories") XBT_PUBLIC xbt_dynar_t
-    TRACE_get_categories();
-XBT_ATTRIB_DEPRECATED_v334("Please use simgrid::instr::declare_mark") XBT_PUBLIC
-    void TRACE_declare_mark(const char* mark_type);
-XBT_ATTRIB_DEPRECATED_v334("Please use simgrid::instr::declare_mark_value") XBT_PUBLIC
-    void TRACE_declare_mark_value_with_color(const char* mark_type, const char* mark_value, const char* mark_color);
-XBT_ATTRIB_DEPRECATED_v334("Please use simgrid::instr::declare_mark_value") XBT_PUBLIC
-    void TRACE_declare_mark_value(const char* mark_type, const char* mark_value);
-XBT_ATTRIB_DEPRECATED_v334("Please use simgrid::instr::mark") XBT_PUBLIC
-    void TRACE_mark(const char* mark_type, const char* mark_value);
-XBT_ATTRIB_DEPRECATED_v334("Please use simgrid::instr::get_marks") XBT_PUBLIC xbt_dynar_t TRACE_get_marks();
-XBT_ATTRIB_DEPRECATED_v334("Please use simgrid::instr::declare_vm_variable") XBT_PUBLIC
-    void TRACE_vm_variable_declare(const char* variable);
-XBT_ATTRIB_DEPRECATED_v334("Please use simgrid::instr::declare_vm_variable") XBT_PUBLIC
-    void TRACE_vm_variable_declare_with_color(const char* variable, const char* color);
-XBT_ATTRIB_DEPRECATED_v334("Please use simgrid::instr::set_vm_variable") XBT_PUBLIC
-    void TRACE_vm_variable_set(const char* vm, const char* variable, double value);
-XBT_ATTRIB_DEPRECATED_v334("Please use simgrid::instr::add_vm_variable") XBT_PUBLIC
-    void TRACE_vm_variable_add(const char* vm, const char* variable, double value);
-XBT_ATTRIB_DEPRECATED_v334("Please use simgrid::instr::sub_vm_variable") XBT_PUBLIC
-    void TRACE_vm_variable_sub(const char* vm, const char* variable, double value);
-XBT_ATTRIB_DEPRECATED_v334("Please use simgrid::instr::set_vm_variable") XBT_PUBLIC
-    void TRACE_vm_variable_set_with_time(double time, const char* vm, const char* variable, double value);
-XBT_ATTRIB_DEPRECATED_v334("Please use simgrid::instr::add_vm_variable") XBT_PUBLIC
-    void TRACE_vm_variable_add_with_time(double time, const char* vm, const char* variable, double value);
-XBT_ATTRIB_DEPRECATED_v334("Please use simgrid::instr::sub_vm_variable") XBT_PUBLIC
-    void TRACE_vm_variable_sub_with_time(double time, const char* vm, const char* variable, double value);
-XBT_ATTRIB_DEPRECATED_v334("Please use simgrid::instr::declare_host_variable") XBT_PUBLIC
-    void TRACE_host_variable_declare(const char* variable);
-XBT_ATTRIB_DEPRECATED_v334("Please use simgrid::instr::declare_host_variable") XBT_PUBLIC
-    void TRACE_host_variable_declare_with_color(const char* variable, const char* color);
-XBT_ATTRIB_DEPRECATED_v334("Please use simgrid::instr::set_host_variable") XBT_PUBLIC
-    void TRACE_host_variable_set(const char* host, const char* variable, double value);
-XBT_ATTRIB_DEPRECATED_v334("Please use simgrid::instr::add_host_variable") XBT_PUBLIC
-    void TRACE_host_variable_add(const char* host, const char* variable, double value);
-XBT_ATTRIB_DEPRECATED_v334("Please use simgrid::instr::sub_host_variable") XBT_PUBLIC
-    void TRACE_host_variable_sub(const char* host, const char* variable, double value);
-XBT_ATTRIB_DEPRECATED_v334("Please use simgrid::instr::set_host_variable") XBT_PUBLIC
-    void TRACE_host_variable_set_with_time(double time, const char* host, const char* variable, double value);
-XBT_ATTRIB_DEPRECATED_v334("Please use simgrid::instr::add_host_variable") XBT_PUBLIC
-    void TRACE_host_variable_add_with_time(double time, const char* host, const char* variable, double value);
-XBT_ATTRIB_DEPRECATED_v334("Please use simgrid::instr::sub_host_variable") XBT_PUBLIC
-    void TRACE_host_variable_sub_with_time(double time, const char* host, const char* variable, double value);
-XBT_ATTRIB_DEPRECATED_v334("Please use simgrid::instr::get_host_variables") XBT_PUBLIC xbt_dynar_t
-    TRACE_get_host_variables();
-XBT_ATTRIB_DEPRECATED_v334("Please use simgrid::instr::declare_link_variable") XBT_PUBLIC
-    void TRACE_link_variable_declare(const char* var);
-XBT_ATTRIB_DEPRECATED_v334("Please use simgrid::instr::declare_link_variable") XBT_PUBLIC
-    void TRACE_link_variable_declare_with_color(const char* var, const char* color);
-XBT_ATTRIB_DEPRECATED_v334("Please use simgrid::instr::set_link_variable") XBT_PUBLIC
-    void TRACE_link_variable_set(const char* link, const char* variable, double value);
-XBT_ATTRIB_DEPRECATED_v334("Please use simgrid::instr::add_link_variable") XBT_PUBLIC
-    void TRACE_link_variable_add(const char* link, const char* variable, double value);
-XBT_ATTRIB_DEPRECATED_v334("Please use simgrid::instr::sub_link_variable") XBT_PUBLIC
-    void TRACE_link_variable_sub(const char* link, const char* variable, double value);
-XBT_ATTRIB_DEPRECATED_v334("Please use simgrid::instr::set_link_variable") XBT_PUBLIC
-    void TRACE_link_variable_set_with_time(double time, const char* link, const char* variable, double value);
-XBT_ATTRIB_DEPRECATED_v334("Please use simgrid::instr::add_link_variable") XBT_PUBLIC
-    void TRACE_link_variable_add_with_time(double time, const char* link, const char* variable, double value);
-XBT_ATTRIB_DEPRECATED_v334("Please use simgrid::instr::sub_link_variable") XBT_PUBLIC
-    void TRACE_link_variable_sub_with_time(double time, const char* link, const char* variable, double value);
-
-XBT_ATTRIB_DEPRECATED_v334("Please use simgrid::instr::set_link_variable") XBT_PUBLIC
-    void TRACE_link_srcdst_variable_set(const char* src, const char* dst, const char* variable, double value);
-XBT_ATTRIB_DEPRECATED_v334("Please use simgrid::instr::add_link_variable") XBT_PUBLIC
-    void TRACE_link_srcdst_variable_add(const char* src, const char* dst, const char* variable, double value);
-XBT_ATTRIB_DEPRECATED_v334("Please use simgrid::instr:sub_link_variable") XBT_PUBLIC
-    void TRACE_link_srcdst_variable_sub(const char* src, const char* dst, const char* variable, double value);
-XBT_ATTRIB_DEPRECATED_v334("Please use simgrid::instr::set_link_variable") XBT_PUBLIC
-    void TRACE_link_srcdst_variable_set_with_time(double time, const char* src, const char* dst, const char* variable,
-                                                  double value);
-XBT_ATTRIB_DEPRECATED_v334("Please use simgrid::instr::add_link_variable") XBT_PUBLIC
-    void TRACE_link_srcdst_variable_add_with_time(double time, const char* src, const char* dst, const char* variable,
-                                                  double value);
-XBT_ATTRIB_DEPRECATED_v334("Please use simgrid::instr:sub_link_variable") XBT_PUBLIC
-    void TRACE_link_srcdst_variable_sub_with_time(double time, const char* src, const char* dst, const char* variable,
-                                                  double value);
-XBT_ATTRIB_DEPRECATED_v334("Please use simgrid::instr::get_link_variables") XBT_PUBLIC xbt_dynar_t
-    TRACE_get_link_variables();
-
 SG_END_DECL
 
 #endif /* INSTR_H_ */
index b75750e..48b1143 100644 (file)
@@ -67,7 +67,6 @@ class XBT_PUBLIC Action {
 
   double cost_;
   Model* model_;
-  void* data_                       = nullptr; /**< for your convenience - XBT_ATTRIB_DEPRECATED_v334 */
   activity::ActivityImpl* activity_ = nullptr;
 
   /* LMM */
@@ -156,17 +155,6 @@ public:
   /** @brief Get the finish time of the current action */
   double get_finish_time() const { return finish_time_; }
 
-  /** @brief Get the user data associated to the current action */
-  XBT_ATTRIB_DEPRECATED_v334("Please manifest if you actually need this function") void* get_data() const
-  {
-    return data_;
-  }
-  /** @brief Set the user data associated to the current action */
-  XBT_ATTRIB_DEPRECATED_v334("Please manifest if you actually need this function") void set_data(void* data)
-  {
-    data_ = data;
-  }
-
   /** @brief Get the user data associated to the current action */
   activity::ActivityImpl* get_activity() const { return activity_; }
   /** @brief Set the user data associated to the current action */
index 3899ff0..d6d7e2c 100644 (file)
@@ -1,3 +1,7 @@
+/* Copyright (c) 2023. The SimGrid Team. All rights reserved.          */
+
+/* This program is free software; you can redistribute it and/or modify it
+ * under the terms of the license (GNU LGPL) which comes with this package. */
 #ifndef SIMGRID_PLUGINS_BATTERY_H_
 #define SIMGRID_PLUGINS_BATTERY_H_
 
index 7cc1f3b..3941751 100644 (file)
@@ -1,3 +1,7 @@
+/* Copyright (c) 2023. The SimGrid Team. All rights reserved.          */
+
+/* This program is free software; you can redistribute it and/or modify it
+ * under the terms of the license (GNU LGPL) which comes with this package. */
 #ifndef SIMGRID_PLUGINS_PHOTOVOLTAIC_H_
 #define SIMGRID_PLUGINS_PHOTOVOLTAIC_H_
 
index f694696..77a71df 100644 (file)
@@ -22,6 +22,7 @@
 #include <simgrid/s4u/Mutex.hpp>
 #include <simgrid/s4u/NetZone.hpp>
 #include <simgrid/s4u/Semaphore.hpp>
+#include <simgrid/s4u/Task.hpp>
 #include <simgrid/s4u/VirtualMachine.hpp>
 
 #include <simgrid/Exception.hpp>
index 3c6a4eb..46ab38b 100644 (file)
@@ -114,10 +114,6 @@ protected:
   virtual void fire_on_this_veto() const = 0;
 
 public:
-  XBT_ATTRIB_DEPRECATED_v334("All start() are vetoable now. Please use start() ") void vetoable_start()
-  {
-    start();
-  }
   void start()
   {
     state_ = State::STARTING;
@@ -267,10 +263,16 @@ public:
    *  dependency or no resource assigned) */
   void on_this_veto_cb(const std::function<void(AnyActivity&)>& cb) { on_this_veto.connect(cb); }
 
-  XBT_ATTRIB_DEPRECATED_v337("Please use on_suspend_cb() instead") static void on_suspended_cb(
-      const std::function<void(Activity const&)>& cb) { on_suspend.connect(cb); }
-  XBT_ATTRIB_DEPRECATED_v337("Please use on_resume_cb() instead") static void on_resumed_cb(
-      const std::function<void(Activity const&)>& cb) { on_resume.connect(cb);  }
+  XBT_ATTRIB_DEPRECATED_v338("Please use on_suspend_cb() instead") static void on_suspended_cb(
+      const std::function<void(Activity const&)>& cb)
+  {
+    on_suspend.connect(cb);
+  }
+  XBT_ATTRIB_DEPRECATED_v338("Please use on_resume_cb() instead") static void on_resumed_cb(
+      const std::function<void(Activity const&)>& cb)
+  {
+    on_resume.connect(cb);
+  }
 
   AnyActivity* add_successor(ActivityPtr a)
   {
@@ -299,20 +301,6 @@ public:
   }
   const std::string& get_tracing_category() const { return tracing_category_; }
 
-  XBT_ATTRIB_DEPRECATED_v334("Please use Activity::set_data()") AnyActivity* set_user_data(void* data)
-  {
-    set_data(data);
-    return static_cast<AnyActivity*>(this);
-  }
-
-  XBT_ATTRIB_DEPRECATED_v334("Please use Activity::get_data<>()") void* get_user_data() const
-  {
-    return get_data<void>();
-  }
-  XBT_ATTRIB_DEPRECATED_v334("All start() are vetoable now. Please use start() ") AnyActivity* vetoable_start()
-  {
-    return start();
-  }
   AnyActivity* start()
   {
     Activity::start();
index a92f87f..e5b8ad4 100644 (file)
@@ -39,7 +39,6 @@ class XBT_PUBLIC Comm : public Activity_T<Comm> {
   Comm() = default;
   Comm* do_start() override;
 
-protected:
   static xbt::signal<void(Comm const&)> on_send;
   xbt::signal<void(Comm const&)> on_this_send;
   static xbt::signal<void(Comm const&)> on_recv;
@@ -47,6 +46,7 @@ protected:
   inline static xbt::signal<void(Comm const&)> on_start;
   xbt::signal<void(Comm const&)> on_this_start;
 
+protected:
   void fire_on_completion() const override {
     /* The completion signal of a Comm has to be thrown only once and not by the sender AND the receiver.
        then Comm::on_completion is thrown in the kernel in CommImpl::finish.
@@ -79,9 +79,9 @@ public:
   void on_this_start_cb(const std::function<void(Comm const&)>& cb) { on_this_start.connect(cb); }
 
   CommPtr set_copy_data_callback(const std::function<void(kernel::activity::CommImpl*, void*, size_t)>& callback);
-  XBT_ATTRIB_DEPRECATED_v337("Please manifest if you actually need this function") static void copy_buffer_callback(
+  XBT_ATTRIB_DEPRECATED_v338("Please manifest if you actually need this function") static void copy_buffer_callback(
       kernel::activity::CommImpl*, void*, size_t);
-  XBT_ATTRIB_DEPRECATED_v337("Please manifest if you actually need this function") static void copy_pointer_callback(
+  XBT_ATTRIB_DEPRECATED_v338("Please manifest if you actually need this function") static void copy_pointer_callback(
       kernel::activity::CommImpl*, void*, size_t);
 
   ~Comm() override;
index 8a09719..eec006c 100644 (file)
@@ -150,7 +150,7 @@ public:
     on_this_onoff.connect(cb);
   }
 
-  XBT_ATTRIB_DEPRECATED_v337("Please use on_onoff_cb() instead") static void on_state_change_cb(
+  XBT_ATTRIB_DEPRECATED_v338("Please use on_onoff_cb() instead") static void on_state_change_cb(
       const std::function<void(Disk const&)>& cb)
   {
     on_onoff.connect(cb);
index 46f7ae2..d92987d 100644 (file)
@@ -40,9 +40,6 @@ public:
   ~Engine();
 #endif
 
-  /** Finalize the default engine and all its dependencies */
-  XBT_ATTRIB_DEPRECATED_v335("Users are not supposed to shutdown the Engine") void shutdown();
-
   /** Run the simulation until its end */
   void run() const;
 
index 5cd7857..7de8e8e 100644 (file)
@@ -36,14 +36,15 @@ class XBT_PUBLIC Exec : public Activity_T<Exec> {
 
   bool parallel_ = false;
 
+  inline static xbt::signal<void(Exec const&)> on_start;
+  xbt::signal<void(Exec const&)> on_this_start;
+
 protected:
   explicit Exec(kernel::activity::ExecImplPtr pimpl);
   Exec* do_start() override;
 
   void reset() const;
 
-  inline static xbt::signal<void(Exec const&)> on_start;
-  xbt::signal<void(Exec const&)> on_this_start;
   void fire_on_completion() const override { on_completion(*this); }
   void fire_on_this_completion() const override { on_this_completion(*this); }
   void fire_on_suspend() const override { on_suspend(*this); }
index d29468e..3b40ae7 100644 (file)
@@ -77,7 +77,7 @@ public:
   {
     on_onoff.connect(cb);
   }
-  XBT_ATTRIB_DEPRECATED_v337("Please use on_onoff_cb() instead") static void on_state_change_cb(
+  XBT_ATTRIB_DEPRECATED_v338("Please use on_onoff_cb() instead") static void on_state_change_cb(
       const std::function<void(Host const&)>& cb)
   {
     on_onoff.connect(cb);
index 3e0832b..c79ca46 100644 (file)
@@ -133,10 +133,7 @@ public:
   double get_load() const;
 
 #ifndef DOXYGEN
-  XBT_ATTRIB_DEPRECATED_v337("Please use get_load() instead") double get_usage() const
-  {
-    return get_load();
-  }
+  XBT_ATTRIB_DEPRECATED_v338("Please use get_load() instead") double get_usage() const { return get_load(); }
 #endif
 
   /** @brief Check if the Link is used (at least one flow uses the link) */
@@ -202,7 +199,7 @@ public:
     on_this_destruction.connect(cb);
   }
 
-  XBT_ATTRIB_DEPRECATED_v337("Please use on_onoff_cb() instead") static void on_state_change_cb(
+  XBT_ATTRIB_DEPRECATED_v338("Please use on_onoff_cb() instead") static void on_state_change_cb(
       const std::function<void(Link const&)>& cb)
   {
     on_onoff.connect(cb);
similarity index 53%
rename from include/simgrid/plugins/task.hpp
rename to include/simgrid/s4u/Task.hpp
index 8143333..5c8050b 100644 (file)
@@ -1,16 +1,17 @@
-#ifndef SIMGRID_PLUGINS_TASK_H_
-#define SIMGRID_PLUGINS_TASK_H_
+#ifndef SIMGRID_S4U_TASK_H_
+#define SIMGRID_S4U_TASK_H_
 
 #include <simgrid/s4u/Activity.hpp>
 #include <simgrid/s4u/Io.hpp>
 #include <xbt/Extendable.hpp>
 
 #include <atomic>
+#include <deque>
 #include <map>
 #include <memory>
 #include <set>
 
-namespace simgrid::plugins {
+namespace simgrid::s4u {
 
 class Task;
 using TaskPtr = boost::intrusive_ptr<Task>;
@@ -23,59 +24,68 @@ using CommTaskPtr = boost::intrusive_ptr<CommTask>;
 class IoTask;
 using IoTaskPtr = boost::intrusive_ptr<IoTask>;
 
-struct ExtendedAttributeActivity {
-  static simgrid::xbt::Extension<simgrid::s4u::Activity, ExtendedAttributeActivity> EXTENSION_ID;
-  Task* task_;
-};
+class XBT_PUBLIC Token : public xbt::Extendable<Token> {};
 
 class Task {
+  std::string name_;
+  double amount_;
+  int queued_firings_ = 0;
+  int count_          = 0;
+  bool working_       = false;
+
   std::set<Task*> successors_                 = {};
   std::map<Task*, unsigned int> predecessors_ = {};
+  std::atomic_int_fast32_t refcount_{0};
 
   bool ready_to_run() const;
   void receive(Task* source);
-  void complete();
+
+  std::shared_ptr<Token> token_ = nullptr;
+  std::deque<std::map<TaskPtr, std::shared_ptr<Token>>> tokens_received_;
+  ActivityPtr previous_activity_;
+  ActivityPtr current_activity_;
 
 protected:
-  std::string name_;
-  double amount_;
-  int queued_execs_ = 0;
-  int count_        = 0;
-  bool working_     = false;
-  s4u::ActivityPtr previous_activity_;
-  s4u::ActivityPtr current_activity_;
-  xbt::signal<void(Task*)> on_this_start_;
-  xbt::signal<void(Task*)> on_this_end_;
   explicit Task(const std::string& name);
-  virtual ~Task()     = default;
-  virtual void fire() = 0;
+  virtual ~Task() = default;
 
-  static xbt::signal<void(Task*)> on_start;
-  static xbt::signal<void(Task*)> on_end;
-  std::atomic_int_fast32_t refcount_{0};
+  virtual void fire();
+  void complete();
+
+  void set_current_activity(ActivityPtr a) { current_activity_ = a; }
+
+  inline static xbt::signal<void(Task*)> on_start;
+  xbt::signal<void(Task*)> on_this_start;
+  inline static xbt::signal<void(Task*)> on_completion;
+  xbt::signal<void(Task*)> on_this_completion;
 
 public:
-  static void init();
   const std::string& get_name() const { return name_; }
   const char* get_cname() const { return name_.c_str(); }
-  void enqueue_execs(int n);
   void set_amount(double amount);
   double get_amount() const { return amount_; }
+  int get_count() const { return count_; }
+
+  void set_token(std::shared_ptr<Token> token);
+  std::shared_ptr<Token> get_next_token_from(TaskPtr t);
+
   void add_successor(TaskPtr t);
   void remove_successor(TaskPtr t);
   void remove_all_successors();
   const std::set<Task*>& get_successors() const { return successors_; }
-  void on_this_start_cb(const std::function<void(Task*)>& func);
-  void on_this_end_cb(const std::function<void(Task*)>& func);
-  int get_count() const;
 
-  /** Add a callback fired before a task activity start.
+  void enqueue_firings(int n);
+
+  /** Add a callback fired before this task activity starts */
+  void on_this_start_cb(const std::function<void(Task*)>& func) { on_this_start.connect(func); }
+  /** Add a callback fired before a task activity starts.
    * Triggered after the on_this_start function**/
   static void on_start_cb(const std::function<void(Task*)>& cb) { on_start.connect(cb); }
-  /** Add a callback fired after a task activity end.
-   * Triggered after the on_this_end function, but before
-   * sending tokens to successors.**/
-  static void on_end_cb(const std::function<void(Task*)>& cb) { on_end.connect(cb); }
+  /** Add a callback fired before this task activity ends */
+  void on_this_completion_cb(const std::function<void(Task*)>& func) { on_this_completion.connect(func); };
+  /** Add a callback fired after a task activity ends.
+   * Triggered after the on_this_end function, but before sending tokens to successors.**/
+  static void on_completion_cb(const std::function<void(Task*)>& cb) { on_completion.connect(cb); }
 
 #ifndef DOXYGEN
   friend void intrusive_ptr_release(Task* o)
@@ -89,54 +99,57 @@ public:
 #endif
 };
 
-class ExecTask : public Task {
-  s4u::Host* host_;
+class CommTask : public Task {
+  Host* source_;
+  Host* destination_;
 
-  explicit ExecTask(const std::string& name);
+  explicit CommTask(const std::string& name);
   void fire() override;
 
 public:
-  static ExecTaskPtr init(const std::string& name);
-  static ExecTaskPtr init(const std::string& name, double flops, s4u::Host* host);
-  ExecTaskPtr set_host(s4u::Host* host);
-  s4u::Host* get_host() const { return host_; }
-  ExecTaskPtr set_flops(double flops);
-  double get_flops() const { return get_amount(); }
+  static CommTaskPtr init(const std::string& name);
+  static CommTaskPtr init(const std::string& name, double bytes, Host* source, Host* destination);
+
+  CommTaskPtr set_source(Host* source);
+  Host* get_source() const { return source_; }
+  CommTaskPtr set_destination(Host* destination);
+  Host* get_destination() const { return destination_; }
+  CommTaskPtr set_bytes(double bytes);
+  double get_bytes() const { return get_amount(); }
 };
 
-class CommTask : public Task {
-  s4u::Host* source_;
-  s4u::Host* destination_;
+class ExecTask : public Task {
+  Host* host_;
 
-  explicit CommTask(const std::string& name);
+  explicit ExecTask(const std::string& name);
   void fire() override;
 
 public:
-  static CommTaskPtr init(const std::string& name);
-  static CommTaskPtr init(const std::string& name, double bytes, s4u::Host* source, s4u::Host* destination);
-  CommTaskPtr set_source(s4u::Host* source);
-  s4u::Host* get_source() const { return source_; }
-  CommTaskPtr set_destination(s4u::Host* destination);
-  s4u::Host* get_destination() const { return destination_; }
-  CommTaskPtr set_bytes(double bytes);
-  double get_bytes() const { return get_amount(); }
+  static ExecTaskPtr init(const std::string& name);
+  static ExecTaskPtr init(const std::string& name, double flops, Host* host);
+
+  ExecTaskPtr set_host(Host* host);
+  Host* get_host() const { return host_; }
+  ExecTaskPtr set_flops(double flops);
+  double get_flops() const { return get_amount(); }
 };
 
 class IoTask : public Task {
-  s4u::Disk* disk_;
-  s4u::Io::OpType type_;
+  Disk* disk_;
+  Io::OpType type_;
   explicit IoTask(const std::string& name);
   void fire() override;
 
 public:
   static IoTaskPtr init(const std::string& name);
-  static IoTaskPtr init(const std::string& name, double bytes, s4u::Disk* disk, s4u::Io::OpType type);
-  IoTaskPtr set_disk(s4u::Disk* disk);
-  s4u::Disk* get_disk() const { return disk_; }
+  static IoTaskPtr init(const std::string& name, double bytes, Disk* disk, Io::OpType type);
+
+  IoTaskPtr set_disk(Disk* disk);
+  Disk* get_disk() const { return disk_; }
   IoTaskPtr set_bytes(double bytes);
   double get_bytes() const { return get_amount(); }
-  IoTaskPtr set_op_type(s4u::Io::OpType type);
-  s4u::Io::OpType get_op_type() const { return type_; }
+  IoTaskPtr set_op_type(Io::OpType type);
+  Io::OpType get_op_type() const { return type_; }
 };
-} // namespace simgrid::plugins
+} // namespace simgrid::s4u
 #endif
diff --git a/include/simgrid/simix.h b/include/simgrid/simix.h
deleted file mode 100644 (file)
index aa70ca6..0000000
+++ /dev/null
@@ -1,65 +0,0 @@
-/* Copyright (c) 2007-2023. The SimGrid Team. All rights reserved.          */
-
-/* This program is free software; you can redistribute it and/or modify it
- * under the terms of the license (GNU LGPL) which comes with this package. */
-
-#ifndef SIMGRID_SIMIX_H
-#define SIMGRID_SIMIX_H
-
-#include <simgrid/forward.h>
-
-// avoid deprecation warning on include (remove entire file with XBT_ATTRIB_DEPRECATED_v335)
-#ifndef SIMIX_H_NO_DEPRECATED_WARNING
-#warning simgrid/simix.h is deprecated and will be removed in v3.35.
-#endif
-
-#ifdef __cplusplus
-
-/******************************************************************************/
-/*                            SIMIX simcalls                                  */
-/******************************************************************************/
-/* These functions are a system call-like interface to the simulation kernel. */
-/* They can also be called from maestro's context, and they are thread safe.  */
-/******************************************************************************/
-
-/************************** Communication simcalls ****************************/
-
-XBT_ATTRIB_DEPRECATED_v335("Please use s4u::Comm::send()") XBT_PUBLIC
-    void simcall_comm_send(simgrid::kernel::actor::ActorImpl* sender, simgrid::kernel::activity::MailboxImpl* mbox,
-                           double task_size, double rate, void* src_buff, size_t src_buff_size,
-                           bool (*match_fun)(void*, void*, simgrid::kernel::activity::CommImpl*),
-                           void (*copy_data_fun)(simgrid::kernel::activity::CommImpl*, void*, size_t), void* data,
-                           double timeout);
-
-XBT_ATTRIB_DEPRECATED_v335("Please use s4u::Comm::isend()") XBT_PUBLIC simgrid::kernel::activity::ActivityImplPtr
-    simcall_comm_isend(simgrid::kernel::actor::ActorImpl* sender, simgrid::kernel::activity::MailboxImpl* mbox,
-                       double task_size, double rate, void* src_buff, size_t src_buff_size,
-                       bool (*match_fun)(void*, void*, simgrid::kernel::activity::CommImpl*), void (*clean_fun)(void*),
-                       void (*copy_data_fun)(simgrid::kernel::activity::CommImpl*, void*, size_t), void* data,
-                       bool detached);
-
-XBT_ATTRIB_DEPRECATED_v335("Please use s4u::Comm::recv()") XBT_PUBLIC
-    void simcall_comm_recv(simgrid::kernel::actor::ActorImpl* receiver, simgrid::kernel::activity::MailboxImpl* mbox,
-                           void* dst_buff, size_t* dst_buff_size,
-                           bool (*match_fun)(void*, void*, simgrid::kernel::activity::CommImpl*),
-                           void (*copy_data_fun)(simgrid::kernel::activity::CommImpl*, void*, size_t), void* data,
-                           double timeout, double rate);
-
-XBT_ATTRIB_DEPRECATED_v335("Please use s4u::Comm::irecv()") XBT_PUBLIC simgrid::kernel::activity::ActivityImplPtr
-    simcall_comm_irecv(simgrid::kernel::actor::ActorImpl* receiver, simgrid::kernel::activity::MailboxImpl* mbox,
-                       void* dst_buff, size_t* dst_buff_size,
-                       bool (*match_fun)(void*, void*, simgrid::kernel::activity::CommImpl*),
-                       void (*copy_data_fun)(simgrid::kernel::activity::CommImpl*, void*, size_t), void* data,
-                       double rate);
-
-XBT_ATTRIB_DEPRECATED_v335("Please use s4u::Comm::wait_any_for()") XBT_PUBLIC ssize_t
-    simcall_comm_waitany(simgrid::kernel::activity::CommImpl* comms[], size_t count, double timeout);
-XBT_ATTRIB_DEPRECATED_v335("Please use s4u::Comm::wait_for()") XBT_PUBLIC
-    void simcall_comm_wait(simgrid::kernel::activity::ActivityImpl* comm, double timeout);
-XBT_ATTRIB_DEPRECATED_v335("Please use s4u::Comm::test()") XBT_PUBLIC
-    bool simcall_comm_test(simgrid::kernel::activity::ActivityImpl* comm);
-XBT_ATTRIB_DEPRECATED_v335("Please use s4u::Comm::test_any()") XBT_PUBLIC ssize_t
-    simcall_comm_testany(simgrid::kernel::activity::CommImpl* comms[], size_t count);
-
-#endif
-#endif
index 8dbc3ab..54adb3e 100644 (file)
@@ -7,7 +7,6 @@
 #ifndef SIMGRID_XBT_LIB_HPP
 #define SIMGRID_XBT_LIB_HPP
 
-#include "xbt/base.h" // XBT_ATTRIB_DEPRECATED_v334
 #include <cstddef>
 #include <functional>
 #include <limits>
@@ -112,10 +111,6 @@ public:
   template <typename D> D* get_data() const { return static_cast<D*>(extensions_[0]); }
   template <typename D> std::unique_ptr<D> get_unique_data() { return std::unique_ptr<D>(get_data<D>()); }
 
-  XBT_ATTRIB_DEPRECATED_v334("Please use typed template Extendable::get_data<>()") void* get_data() const
-  {
-    return get_data<void>();
-  }
   // Convenience extension access when the type has an associated EXTENSION ID:
   template <class U> U* extension() const { return extension<U>(U::EXTENSION_ID); }
   template<class U> void extension_set(U* p) { extension_set<U>(U::EXTENSION_ID, p); }
index d12022c..a4c062d 100644 (file)
 #define XBT_ATTRIB_DEPRECATED(mesg) __attribute__((deprecated(mesg)))
 #endif
 
-#define XBT_ATTRIB_DEPRECATED_v334(mesg)                                                                               \
-  XBT_ATTRIB_DEPRECATED(mesg " (this compatibility wrapper will be dropped after v3.33)")
-#define XBT_ATTRIB_DEPRECATED_v335(mesg)                                                                               \
-  XBT_ATTRIB_DEPRECATED(mesg " (this compatibility wrapper will be dropped after v3.34)")
 #define XBT_ATTRIB_DEPRECATED_v336(mesg)                                                                               \
   XBT_ATTRIB_DEPRECATED(mesg " (this compatibility wrapper will be dropped after v3.35)")
-#define XBT_ATTRIB_DEPRECATED_v337(mesg)                                                                               \
-  XBT_ATTRIB_DEPRECATED(mesg " (this compatibility wrapper will be dropped after v3.36)")
+#define XBT_ATTRIB_DEPRECATED_v338(mesg)                                                                               \
+  XBT_ATTRIB_DEPRECATED(mesg " (this compatibility wrapper will be dropped after v3.37)")
+#define XBT_ATTRIB_DEPRECATED_v339(mesg)                                                                               \
+  XBT_ATTRIB_DEPRECATED(mesg " (this compatibility wrapper will be dropped after v3.38)")
 
 /* Work around https://github.com/microsoft/vscode-cpptools/issues/4503 */
 #ifdef __INTELLISENSE__
index ee9d548..601f7f4 100644 (file)
@@ -8,17 +8,15 @@
 #ifndef XBT_MODULE_H
 #define XBT_MODULE_H
 
-// avoid deprecation warning on include (remove entire file with XBT_ATTRIB_DEPRECATED_v337)
-#ifndef XBT_MODULE_H_NO_DEPRECATED_WARNING
-#warning xbt/module.h is deprecated and will be removed in v3.37.
-#endif
+// Deprecation warning on include (remove entire file with XBT_ATTRIB_DEPRECATED_v338)
+#warning xbt/module.h is deprecated and will be removed after v3.37.
 
 #include <simgrid/engine.h>
 #include <xbt/base.h>
 
 SG_BEGIN_DECL
 
-XBT_ATTRIB_DEPRECATED_v337("Please use simgrid_init(&argc, argv) instead") static void xbt_init(int* argc, char** argv)
+XBT_ATTRIB_DEPRECATED_v338("Please use simgrid_init(&argc, argv) instead") static void xbt_init(int* argc, char** argv)
 {
   simgrid_init(argc, argv);
 }
index 0789a9a..53ccfaf 100644 (file)
 #include <simgrid/actor.h>
 #include <xbt/base.h>
 
-// avoid deprecation warning on include (remove entire file with XBT_ATTRIB_DEPRECATED_v337)
-#ifndef XBT_VIRTU_H_NO_DEPRECATED_WARNING
-#warning xbt/virtu.h is deprecated and will be removed in v3.37.
-#endif
+// Deprecation warning on include (remove entire file with XBT_ATTRIB_DEPRECATED_v338)
+#warning xbt/virtu.h is deprecated and will be removed after v3.37.
 
 SG_BEGIN_DECL
 
-XBT_ATTRIB_DEPRECATED_v337("Please use sg_actor_self_get_name()") static const char* xbt_procname(void)
+XBT_ATTRIB_DEPRECATED_v338("Please use sg_actor_self_get_name()") static const char* xbt_procname(void)
 {
   return sg_actor_self_get_name();
 }
 
-XBT_ATTRIB_DEPRECATED_v337("Please use sg_actor_self_get_pid()") static int xbt_getpid(void)
+XBT_ATTRIB_DEPRECATED_v338("Please use sg_actor_self_get_pid()") static int xbt_getpid(void)
 {
   return sg_actor_self_get_pid();
 };
index 2c1807d..37aa580 100755 (executable)
--- a/setup.py
+++ b/setup.py
@@ -74,7 +74,7 @@ class CMakeBuild(build_ext):
 
 setup(
     name='simgrid',
-    version='3.32.1',
+    version='3.34.1',
     author='Da SimGrid Team',
     author_email='simgrid-community@inria.fr',
     description='Toolkit for scalable simulation of distributed applications',
index dc19f99..03c0472 100644 (file)
@@ -4,7 +4,7 @@
 sonar.organization=simgrid
 sonar.projectKey=simgrid_simgrid
 sonar.projectName=SimGrid
-sonar.projectVersion=3.32.1
+sonar.projectVersion=3.34.1
 
 sonar.links.homepage=https://simgrid.org
 sonar.links.issue=https://framagit.org/simgrid/simgrid/issues
index 5f0f335..268750f 100644 (file)
@@ -11,7 +11,6 @@
 #include "simgrid/kernel/ProfileBuilder.hpp"
 #include "simgrid/kernel/routing/NetPoint.hpp"
 #include <simgrid/Exception.hpp>
-#include <simgrid/plugins/task.hpp>
 #include <simgrid/s4u/Actor.hpp>
 #include <simgrid/s4u/Barrier.hpp>
 #include <simgrid/s4u/Comm.hpp>
@@ -25,6 +24,7 @@
 #include <simgrid/s4u/Mutex.hpp>
 #include <simgrid/s4u/NetZone.hpp>
 #include <simgrid/s4u/Semaphore.hpp>
+#include <simgrid/s4u/Task.hpp>
 #include <simgrid/version.h>
 
 #include <algorithm>
 #include <vector>
 
 namespace py = pybind11;
-using simgrid::plugins::CommTask;
-using simgrid::plugins::CommTaskPtr;
-using simgrid::plugins::ExecTask;
-using simgrid::plugins::ExecTaskPtr;
-using simgrid::plugins::IoTask;
-using simgrid::plugins::IoTaskPtr;
-using simgrid::plugins::Task;
-using simgrid::plugins::TaskPtr;
 using simgrid::s4u::Actor;
 using simgrid::s4u::ActorPtr;
 using simgrid::s4u::Barrier;
 using simgrid::s4u::BarrierPtr;
 using simgrid::s4u::Comm;
 using simgrid::s4u::CommPtr;
+using simgrid::s4u::CommTask;
+using simgrid::s4u::CommTaskPtr;
 using simgrid::s4u::Disk;
 using simgrid::s4u::Engine;
+using simgrid::s4u::ExecTask;
+using simgrid::s4u::ExecTaskPtr;
 using simgrid::s4u::Host;
 using simgrid::s4u::Io;
+using simgrid::s4u::IoTask;
+using simgrid::s4u::IoTaskPtr;
 using simgrid::s4u::Link;
 using simgrid::s4u::Mailbox;
 using simgrid::s4u::Mutex;
 using simgrid::s4u::MutexPtr;
 using simgrid::s4u::Semaphore;
 using simgrid::s4u::SemaphorePtr;
+using simgrid::s4u::Task;
+using simgrid::s4u::TaskPtr;
 
 XBT_LOG_NEW_DEFAULT_CATEGORY(python, "python");
 
@@ -171,54 +171,16 @@ PYBIND11_MODULE(simgrid, m)
              return new simgrid::s4u::Engine(&argc, argv.data());
            }),
            "The constructor should take the parameters from the command line, as is ")
-      .def_static("get_clock",
-                  []() // XBT_ATTRIB_DEPRECATED_v334
-                  {
-                    PyErr_WarnEx(
-                        PyExc_DeprecationWarning,
-                        "get_clock() is deprecated and  will be dropped after v3.33, use `Engine.clock` instead.", 1);
-                    return Engine::get_clock();
-                  })
       .def_property_readonly_static(
           "clock", [](py::object /* self */) { return Engine::get_clock(); },
           "The simulation time, ie the amount of simulated seconds since the simulation start.")
       .def_property_readonly_static(
           "instance", [](py::object /* self */) { return Engine::get_instance(); }, "Retrieve the simulation engine")
-      .def("get_all_hosts",
-           [](py::object self) // XBT_ATTRIB_DEPRECATED_v334
-           {
-             PyErr_WarnEx(PyExc_DeprecationWarning,
-                          "get_all_hosts() is deprecated and  will be dropped after v3.33, use all_hosts instead.", 1);
-             return self.attr("all_hosts");
-           })
       .def("host_by_name", &Engine::host_by_name_or_null,
            "Retrieve a host by its name, or None if it does not exist in the platform.")
       .def_property_readonly("all_hosts", &Engine::get_all_hosts, "Returns the list of all hosts found in the platform")
-      .def("get_all_links",
-           [](py::object self) // XBT_ATTRIB_DEPRECATED_v334
-           {
-             PyErr_WarnEx(PyExc_DeprecationWarning,
-                          "get_all_links() is deprecated and  will be dropped after v3.33, use all_links instead.", 1);
-             return self.attr("all_links");
-           })
       .def_property_readonly("all_links", &Engine::get_all_links, "Returns the list of all links found in the platform")
-      .def("get_all_netpoints",
-           [](py::object self) // XBT_ATTRIB_DEPRECATED_v334
-           {
-             PyErr_WarnEx(
-                 PyExc_DeprecationWarning,
-                 "get_all_netpoints() is deprecated and  will be dropped after v3.33, use all_netpoints instead.", 1);
-             return self.attr("all_netpoints");
-           })
       .def_property_readonly("all_netpoints", &Engine::get_all_netpoints)
-      .def("get_netzone_root",
-           [](py::object self) // XBT_ATTRIB_DEPRECATED_v334
-           {
-             PyErr_WarnEx(
-                 PyExc_DeprecationWarning,
-                 "get_netzone_root() is deprecated and  will be dropped after v3.33, use netzone_root instead.", 1);
-             return self.attr("netzone_root");
-           })
       .def_property_readonly("netzone_root", &Engine::get_netzone_root,
                              "Retrieve the root netzone, containing all others.")
       .def("netpoint_by_name", &Engine::netpoint_by_name_or_null)
@@ -311,13 +273,6 @@ PYBIND11_MODULE(simgrid, m)
       .def("create_router", &simgrid::s4u::NetZone::create_router, "Create a router")
       .def("set_parent", &simgrid::s4u::NetZone::set_parent, "Set the parent of this zone")
       .def("set_property", &simgrid::s4u::NetZone::set_property, "Add a property to this zone")
-      .def("get_netpoint",
-           [](py::object self) // XBT_ATTRIB_DEPRECATED_v334
-           {
-             PyErr_WarnEx(PyExc_DeprecationWarning,
-                          "get_netpoint() is deprecated and  will be dropped after v3.33, use netpoint instead.", 1);
-             return self.attr("netpoint");
-           })
       .def_property_readonly("netpoint", &simgrid::s4u::NetZone::get_netpoint,
                              "Retrieve the netpoint associated to this zone")
       .def("seal", &simgrid::s4u::NetZone::seal, "Seal this NetZone")
@@ -392,42 +347,11 @@ PYBIND11_MODULE(simgrid, m)
           "   \"\"\"\n\n"
           "The second function parameter is the periodicity: the time to wait after the last event to start again over "
           "the list. Set it to -1 to not loop over.")
-      .def("get_pstate_count",
-           [](py::object self) // XBT_ATTRIB_DEPRECATED_v334
-           {
-             PyErr_WarnEx(
-                 PyExc_DeprecationWarning,
-                 "get_pstate_count() is deprecated and  will be dropped after v3.33, use pstate_count instead.", 1);
-             return self.attr("pstate_count");
-           })
       .def_property_readonly("pstate_count", &Host::get_pstate_count, "Retrieve the count of defined pstate levels")
-      .def("get_pstate_speed",
-           [](py::object self, int state) // XBT_ATTRIB_DEPRECATED_v334
-           {
-             PyErr_WarnEx(
-                 PyExc_DeprecationWarning,
-                 "get_pstate_speed() is deprecated and  will be dropped after v3.33, use pstate_speed instead.", 1);
-             return self.attr("pstate_speed")(state);
-           })
       .def("pstate_speed", &Host::get_pstate_speed, "Retrieve the maximal speed at the given pstate")
-      .def("get_netpoint",
-           [](py::object self) // XBT_ATTRIB_DEPRECATED_v334
-           {
-             PyErr_WarnEx(PyExc_DeprecationWarning,
-                          "get_netpoint() is deprecated and  will be dropped after v3.33, use netpoint instead.", 1);
-             return self.attr("netpoint");
-           })
       .def_property_readonly("netpoint", &Host::get_netpoint, "Retrieve the netpoint associated to this zone")
       .def_property_readonly("disks", &Host::get_disks, "The list of disks on this host (read-only).")
       .def("get_disks", &Host::get_disks, "Retrieve the list of disks in this host")
-      .def("set_core_count",
-           [](py::object self, double count) // XBT_ATTRIB_DEPRECATED_v334
-           {
-             PyErr_WarnEx(PyExc_DeprecationWarning,
-                          "set_core_count() is deprecated and  will be dropped after v3.33, use core_count instead.",
-                          1);
-             self.attr("core_count")(count);
-           })
       .def_property("core_count", &Host::get_core_count,
                     py::cpp_function(&Host::set_core_count, py::call_guard<py::gil_scoped_release>()),
                     "Manage the number of cores in the CPU")
@@ -622,21 +546,7 @@ PYBIND11_MODULE(simgrid, m)
   /* Class Split-Duplex Link */
   py::class_<simgrid::s4u::SplitDuplexLink, Link, std::unique_ptr<simgrid::s4u::SplitDuplexLink, py::nodelete>>(
       m, "SplitDuplexLink", "Network split-duplex link")
-      .def("get_link_up",
-           [](py::object self) // XBT_ATTRIB_DEPRECATED_v334
-           {
-             PyErr_WarnEx(PyExc_DeprecationWarning,
-                          "get_link_up() is deprecated and  will be dropped after v3.33, use link_up instead.", 1);
-             return self.attr("link_up");
-           })
       .def_property_readonly("link_up", &simgrid::s4u::SplitDuplexLink::get_link_up, "Get link direction up")
-      .def("get_link_down",
-           [](py::object self) // XBT_ATTRIB_DEPRECATED_v334
-           {
-             PyErr_WarnEx(PyExc_DeprecationWarning,
-                          "get_link_down() is deprecated and  will be dropped after v3.33, use link_down instead.", 1);
-             return self.attr("link_down");
-           })
       .def_property_readonly("link_down", &simgrid::s4u::SplitDuplexLink::get_link_down, "Get link direction down");
 
   /* Class Mailbox */
@@ -921,7 +831,6 @@ PYBIND11_MODULE(simgrid, m)
 
   /* Class Task */
   py::class_<Task, TaskPtr>(m, "Task", "Task. See the C++ documentation for details.")
-      .def_static("init", &Task::init)
       .def_static(
           "on_start_cb",
           [](py::object cb) {
@@ -934,11 +843,11 @@ PYBIND11_MODULE(simgrid, m)
           },
           "Add a callback called when each task starts.")
       .def_static(
-          "on_end_cb",
+          "on_completion_cb",
           [](py::object cb) {
             cb.inc_ref(); // keep alive after return
             const py::gil_scoped_release gil_release;
-            Task::on_end_cb([cb_p = cb.ptr()](Task* op) {
+            Task::on_completion_cb([cb_p = cb.ptr()](Task* op) {
               const py::gil_scoped_acquire py_context; // need a new context for callback
               py::reinterpret_borrow<py::function>(cb_p)(op);
             });
@@ -948,8 +857,8 @@ PYBIND11_MODULE(simgrid, m)
       .def_property_readonly("count", &Task::get_count, "The execution count of this task (read-only).")
       .def_property_readonly("successors", &Task::get_successors, "The successors of this task (read-only).")
       .def_property("amount", &Task::get_amount, &Task::set_amount, "The amount of work to do for this task.")
-      .def("enqueue_execs", py::overload_cast<int>(&Task::enqueue_execs), py::call_guard<py::gil_scoped_release>(),
-           py::arg("n"), "Enqueue executions for this task.")
+      .def("enqueue_firings", py::overload_cast<int>(&Task::enqueue_firings), py::call_guard<py::gil_scoped_release>(),
+           py::arg("n"), "Enqueue firings for this task.")
       .def("add_successor", py::overload_cast<TaskPtr>(&Task::add_successor), py::call_guard<py::gil_scoped_release>(),
            py::arg("op"), "Add a successor to this task.")
       .def("remove_successor", py::overload_cast<TaskPtr>(&Task::remove_successor),
@@ -958,7 +867,7 @@ PYBIND11_MODULE(simgrid, m)
            "Remove all successors of this task.")
       .def("on_this_start_cb", py::overload_cast<const std::function<void(Task*)>&>(&Task::on_this_start_cb),
            py::arg("func"), "Add a callback called when this task starts.")
-      .def("on_this_end_cb", py::overload_cast<const std::function<void(Task*)>&>(&Task::on_this_end_cb),
+      .def("on_this_completion_cb", py::overload_cast<const std::function<void(Task*)>&>(&Task::on_this_completion_cb),
            py::arg("func"), "Add a callback called when this task ends.")
       .def(
           "__repr__", [](const TaskPtr op) { return "Task(" + op->get_name() + ")"; },
diff --git a/src/deprecated.cpp b/src/deprecated.cpp
deleted file mode 100644 (file)
index 7ea584c..0000000
+++ /dev/null
@@ -1,134 +0,0 @@
-/* This file only contains deprecated code, and will die with v3.25           */
-
-/* Copyright (c) 2010-2023. The SimGrid Team. All rights reserved.          */
-
-/* This program is free software; you can redistribute it and/or modify it
- * under the terms of the license (GNU LGPL) which comes with this package. */
-
-#include "simgrid/config.h"
-#include "simgrid/modelchecker.h"
-#include "src/kernel/EngineImpl.hpp"
-#include "src/kernel/activity/CommImpl.hpp"
-#include "src/kernel/actor/SimcallObserver.hpp"
-#include "src/mc/mc_replay.hpp"
-#include <simgrid/s4u/Activity.hpp>
-
-#define SIMIX_H_NO_DEPRECATED_WARNING // avoid deprecation warning on include (remove with XBT_ATTRIB_DEPRECATED_v335)
-#include <simgrid/simix.h>
-
-#include <cmath>
-
-void simcall_comm_send(simgrid::kernel::actor::ActorImpl* sender, simgrid::kernel::activity::MailboxImpl* mbox,
-                       double task_size, double rate, void* src_buff, size_t src_buff_size,
-                       bool (*match_fun)(void*, void*, simgrid::kernel::activity::CommImpl*),
-                       void (*copy_data_fun)(simgrid::kernel::activity::CommImpl*, void*, size_t), void* data,
-                       double timeout) // XBT_ATTRIB_DEPRECATED_v335
-{
-  xbt_assert(mbox, "No rendez-vous point defined for send");
-  simgrid::s4u::Comm::send(sender, mbox->get_iface(), task_size, rate, src_buff, src_buff_size, match_fun,
-                           copy_data_fun, data, timeout);
-}
-
-simgrid::kernel::activity::ActivityImplPtr
-simcall_comm_isend(simgrid::kernel::actor::ActorImpl* sender, simgrid::kernel::activity::MailboxImpl* mbox,
-                   double task_size, double rate, void* src_buff, size_t src_buff_size,
-                   bool (*match_fun)(void*, void*, simgrid::kernel::activity::CommImpl*), void (*clean_fun)(void*),
-                   void (*copy_data_fun)(simgrid::kernel::activity::CommImpl*, void*, size_t), void* data,
-                   bool detached) // XBT_ATTRIB_DEPRECATED_v335
-{
-  /* checking for infinite values */
-  xbt_assert(std::isfinite(task_size), "task_size is not finite!");
-  xbt_assert(std::isfinite(rate), "rate is not finite!");
-
-  xbt_assert(mbox, "No rendez-vous point defined for isend");
-
-  simgrid::kernel::actor::CommIsendSimcall observer(sender, mbox, task_size, rate,
-                                                    static_cast<unsigned char*>(src_buff), src_buff_size, match_fun,
-                                                    clean_fun, copy_data_fun, data, detached, "Isend");
-  return simgrid::kernel::actor::simcall_answered(
-      [&observer] { return simgrid::kernel::activity::CommImpl::isend(&observer); });
-}
-
-void simcall_comm_recv(simgrid::kernel::actor::ActorImpl* receiver, simgrid::kernel::activity::MailboxImpl* mbox,
-                       void* dst_buff, size_t* dst_buff_size,
-                       bool (*match_fun)(void*, void*, simgrid::kernel::activity::CommImpl*),
-                       void (*copy_data_fun)(simgrid::kernel::activity::CommImpl*, void*, size_t), void* data,
-                       double timeout, double rate) // XBT_ATTRIB_DEPRECATED_v335
-{
-  xbt_assert(mbox, "No rendez-vous point defined for recv");
-  simgrid::s4u::Comm::recv(receiver, mbox->get_iface(), dst_buff, dst_buff_size, match_fun, copy_data_fun, data,
-                           timeout, rate);
-}
-
-simgrid::kernel::activity::ActivityImplPtr
-simcall_comm_irecv(simgrid::kernel::actor::ActorImpl* receiver, simgrid::kernel::activity::MailboxImpl* mbox,
-                   void* dst_buff, size_t* dst_buff_size,
-                   bool (*match_fun)(void*, void*, simgrid::kernel::activity::CommImpl*),
-                   void (*copy_data_fun)(simgrid::kernel::activity::CommImpl*, void*, size_t), void* data,
-                   double rate) // XBT_ATTRIB_DEPRECATED_v335
-{
-  xbt_assert(mbox, "No rendez-vous point defined for irecv");
-
-  simgrid::kernel::actor::CommIrecvSimcall observer(receiver, mbox, static_cast<unsigned char*>(dst_buff),
-                                                    dst_buff_size, match_fun, copy_data_fun, data, rate, "Irecv");
-  return simgrid::kernel::actor::simcall_answered(
-      [&observer] { return simgrid::kernel::activity::CommImpl::irecv(&observer); });
-}
-
-ssize_t simcall_comm_waitany(simgrid::kernel::activity::CommImpl* comms[], size_t count,
-                             double timeout) // XBT_ATTRIB_DEPRECATED_v335
-{
-  std::vector<simgrid::kernel::activity::ActivityImpl*> activities;
-  for (size_t i = 0; i < count; i++)
-    activities.push_back(static_cast<simgrid::kernel::activity::ActivityImpl*>(comms[i]));
-  simgrid::kernel::actor::ActorImpl* issuer = simgrid::kernel::actor::ActorImpl::self();
-  simgrid::kernel::actor::ActivityWaitanySimcall observer{issuer, activities, timeout, "Waitany"};
-  ssize_t changed_pos = simgrid::kernel::actor::simcall_blocking(
-      [&observer] {
-        simgrid::kernel::activity::ActivityImpl::wait_any_for(observer.get_issuer(), observer.get_activities(),
-                                                              observer.get_timeout());
-      },
-      &observer);
-  if (changed_pos != -1)
-    activities.at(changed_pos)->get_iface()->complete(simgrid::s4u::Activity::State::FINISHED);
-  return changed_pos;
-}
-
-ssize_t simcall_comm_testany(simgrid::kernel::activity::CommImpl* comms[], size_t count) // XBT_ATTRIB_DEPRECATED_v335
-{
-  if (count == 0)
-    return -1;
-  std::vector<simgrid::kernel::activity::ActivityImpl*> activities;
-  for (size_t i = 0; i < count; i++)
-    activities.push_back(static_cast<simgrid::kernel::activity::ActivityImpl*>(comms[i]));
-
-  simgrid::kernel::actor::ActorImpl* issuer = simgrid::kernel::actor::ActorImpl::self();
-  simgrid::kernel::actor::ActivityTestanySimcall observer{issuer, activities, "Testany"};
-  ssize_t changed_pos = simgrid::kernel::actor::simcall_blocking(
-      [&observer] {
-        simgrid::kernel::activity::ActivityImpl::test_any(observer.get_issuer(), observer.get_activities());
-      },
-      &observer);
-  if (changed_pos != -1)
-    comms[changed_pos]->get_iface()->complete(simgrid::s4u::Activity::State::FINISHED);
-  return changed_pos;
-}
-
-void simcall_comm_wait(simgrid::kernel::activity::ActivityImpl* comm, double timeout) // XBT_ATTRIB_DEPRECATED_v335
-{
-  xbt_assert(std::isfinite(timeout), "timeout is not finite!");
-  simgrid::kernel::actor::ActorImpl* issuer = simgrid::kernel::actor::ActorImpl::self();
-  simgrid::kernel::actor::simcall_blocking([issuer, comm, timeout] { comm->wait_for(issuer, timeout); });
-}
-
-bool simcall_comm_test(simgrid::kernel::activity::ActivityImpl* comm) // XBT_ATTRIB_DEPRECATED_v335
-{
-  simgrid::kernel::actor::ActorImpl* issuer = simgrid::kernel::actor::ActorImpl::self();
-  simgrid::kernel::actor::ActivityTestSimcall observer{issuer, comm, "Test"};
-  if (simgrid::kernel::actor::simcall_blocking([&observer] { observer.get_activity()->test(observer.get_issuer()); },
-                                               &observer)) {
-    comm->get_iface()->complete(simgrid::s4u::Activity::State::FINISHED);
-    return true;
-  }
-  return false;
-}
index 106acd4..e444c0c 100644 (file)
@@ -332,248 +332,6 @@ const std::set<std::string, std::less<>>& get_tracing_categories()
 
 } // namespace simgrid::instr
 
-static xbt_dynar_t instr_set_to_dynar(const std::set<std::string, std::less<>>& filter) // XBT_ATTRIB_DEPRECATED_v334
-{
-  if (not TRACE_is_enabled() || not TRACE_needs_platform())
-    return nullptr;
-
-  xbt_dynar_t ret = xbt_dynar_new (sizeof(char*), &xbt_free_ref);
-  for (auto const& name : filter)
-    xbt_dynar_push_as(ret, char*, xbt_strdup(name.c_str()));
-
-  return ret;
-}
-
-void TRACE_category(const char* category) // XBT_ATTRIB_DEPRECATED_v334
-{
-  simgrid::instr::declare_tracing_category(category);
-}
-
-void TRACE_category_with_color(const char* category, const char* color) // XBT_ATTRIB_DEPRECATED_v334
-{
-  simgrid::instr::declare_tracing_category(category, color);
-}
-
-xbt_dynar_t TRACE_get_categories() // XBT_ATTRIB_DEPRECATED_v334
-{
-  if (not TRACE_is_enabled() || not TRACE_categorized())
-    return nullptr;
-  return instr_set_to_dynar(created_categories);
-}
-
-void TRACE_declare_mark(const char* mark_type) // XBT_ATTRIB_DEPRECATED_v334
-{
-  simgrid::instr::declare_mark(mark_type);
-}
-
-void TRACE_declare_mark_value_with_color(const char* mark_type, const char* mark_value,
-                                         const char* mark_color) // XBT_ATTRIB_DEPRECATED_v334
-{
-  simgrid::instr::declare_mark_value(mark_type, mark_value, mark_color);
-}
-
-void TRACE_declare_mark_value(const char* mark_type, const char* mark_value) // XBT_ATTRIB_DEPRECATED_v334
-{
-  simgrid::instr::declare_mark_value(mark_type, mark_value);
-}
-
-void TRACE_mark(const char* mark_type, const char* mark_value) // XBT_ATTRIB_DEPRECATED_v334
-{
-  simgrid::instr::mark(mark_type, mark_value);
-}
-
-xbt_dynar_t TRACE_get_marks() // XBT_ATTRIB_DEPRECATED_v334
-{
-  if (not TRACE_is_enabled())
-    return nullptr;
-
-  return instr_set_to_dynar(declared_marks);
-}
-
-int TRACE_platform_graph_export_graphviz(const char* filename) // XBT_ATTRIB_DEPRECATED_v334
-{
-  simgrid::instr::platform_graph_export_graphviz(filename);
-  return 1;
-}
-
-void TRACE_vm_variable_declare(const char* variable) // XBT_ATTRIB_DEPRECATED_v334
-{
-  instr_user_variable(0, "", variable, "VM", 0, InstrUserVariable::DECLARE, "", &user_vm_variables);
-}
-void TRACE_vm_variable_declare_with_color(const char* variable, const char* color) // XBT_ATTRIB_DEPRECATED_v334
-{
-  instr_user_variable(0, "", variable, "VM", 0, InstrUserVariable::DECLARE, color, &user_vm_variables);
-}
-
-void TRACE_vm_variable_set(const char* vm, const char* variable, double value) // XBT_ATTRIB_DEPRECATED_v334
-{
-  instr_user_variable(simgrid_get_clock(), vm, variable, "VM", value, InstrUserVariable::SET, "", &user_vm_variables);
-}
-
-void TRACE_vm_variable_add(const char* vm, const char* variable, double value) // XBT_ATTRIB_DEPRECATED_v334
-{
-  instr_user_variable(simgrid_get_clock(), vm, variable, "VM", value, InstrUserVariable::ADD, "", &user_vm_variables);
-}
-void TRACE_vm_variable_sub(const char* vm, const char* variable, double value) // XBT_ATTRIB_DEPRECATED_v334
-{
-  instr_user_variable(simgrid_get_clock(), vm, variable, "VM", value, InstrUserVariable::SUB, "", &user_vm_variables);
-}
-
-void TRACE_vm_variable_set_with_time(double time, const char* vm, const char* variable,
-                                     double value) // XBT_ATTRIB_DEPRECATED_v334
-{
-  instr_user_variable(time, vm, variable, "VM", value, InstrUserVariable::SET, "", &user_vm_variables);
-}
-
-void TRACE_vm_variable_add_with_time(double time, const char* vm, const char* variable,
-                                     double value) // XBT_ATTRIB_DEPRECATED_v334
-{
-  instr_user_variable(time, vm, variable, "VM", value, InstrUserVariable::ADD, "", &user_vm_variables);
-}
-void TRACE_vm_variable_sub_with_time(double time, const char* vm, const char* variable,
-                                     double value) // XBT_ATTRIB_DEPRECATED_v334
-{
-  instr_user_variable(time, vm, variable, "VM", value, InstrUserVariable::SUB, "", &user_vm_variables);
-}
-
-void TRACE_host_variable_declare(const char* variable) // XBT_ATTRIB_DEPRECATED_v334
-{
-  simgrid::instr::declare_host_variable(variable);
-}
-
-void TRACE_host_variable_declare_with_color(const char* variable, const char* color) // XBT_ATTRIB_DEPRECATED_v334
-{
-  simgrid::instr::declare_host_variable(variable, color);
-}
-
-void TRACE_host_variable_set(const char* host, const char* variable, double value) // XBT_ATTRIB_DEPRECATED_v334
-{
-  instr_user_variable(simgrid_get_clock(), host, variable, "HOST", value, InstrUserVariable::SET, "",
-                      &user_host_variables);
-}
-
-void TRACE_host_variable_add(const char* host, const char* variable, double value) // XBT_ATTRIB_DEPRECATED_v334
-{
-  instr_user_variable(simgrid_get_clock(), host, variable, "HOST", value, InstrUserVariable::ADD, "",
-                      &user_host_variables);
-}
-
-void TRACE_host_variable_sub(const char* host, const char* variable, double value) // XBT_ATTRIB_DEPRECATED_v334
-{
-  instr_user_variable(simgrid_get_clock(), host, variable, "HOST", value, InstrUserVariable::SUB, "",
-                      &user_host_variables);
-}
-
-void TRACE_host_variable_set_with_time(double time, const char* host, const char* variable,
-                                       double value) // XBT_ATTRIB_DEPRECATED_v334
-{
-  instr_user_variable(time, host, variable, "HOST", value, InstrUserVariable::SET, "", &user_host_variables);
-}
-
-void TRACE_host_variable_add_with_time(double time, const char* host, const char* variable,
-                                       double value) // XBT_ATTRIB_DEPRECATED_v334
-{
-  instr_user_variable(time, host, variable, "HOST", value, InstrUserVariable::ADD, "", &user_host_variables);
-}
-
-void TRACE_host_variable_sub_with_time(double time, const char* host, const char* variable,
-                                       double value) // XBT_ATTRIB_DEPRECATED_v334
-{
-  instr_user_variable(time, host, variable, "HOST", value, InstrUserVariable::SUB, "", &user_host_variables);
-}
-
-xbt_dynar_t TRACE_get_host_variables() // XBT_ATTRIB_DEPRECATED_v334
-{
-  return instr_set_to_dynar(user_host_variables);
-}
-
-void TRACE_link_variable_declare(const char* variable) // XBT_ATTRIB_DEPRECATED_v334
-{
-  simgrid::instr::declare_link_variable(variable);
-}
-
-void TRACE_link_variable_declare_with_color(const char* variable, const char* color) // XBT_ATTRIB_DEPRECATED_v334
-{
-  simgrid::instr::declare_link_variable(variable, color);
-}
-
-void TRACE_link_variable_set(const char* link, const char* variable, double value) // XBT_ATTRIB_DEPRECATED_v334
-{
-  instr_user_variable(simgrid_get_clock(), link, variable, "LINK", value, InstrUserVariable::SET, "",
-                      &user_link_variables);
-}
-
-void TRACE_link_variable_add(const char* link, const char* variable, double value) // XBT_ATTRIB_DEPRECATED_v334
-{
-  instr_user_variable(simgrid_get_clock(), link, variable, "LINK", value, InstrUserVariable::ADD, "",
-                      &user_link_variables);
-}
-
-void TRACE_link_variable_sub(const char* link, const char* variable, double value) // XBT_ATTRIB_DEPRECATED_v334
-{
-  instr_user_variable(simgrid_get_clock(), link, variable, "LINK", value, InstrUserVariable::SUB, "",
-                      &user_link_variables);
-}
-
-void TRACE_link_variable_set_with_time(double time, const char* link, const char* variable,
-                                       double value) // XBT_ATTRIB_DEPRECATED_v334
-{
-  instr_user_variable(time, link, variable, "LINK", value, InstrUserVariable::SET, "", &user_link_variables);
-}
-
-void TRACE_link_variable_add_with_time(double time, const char* link, const char* variable,
-                                       double value) // XBT_ATTRIB_DEPRECATED_v334
-{
-  instr_user_variable(time, link, variable, "LINK", value, InstrUserVariable::ADD, "", &user_link_variables);
-}
-
-void TRACE_link_variable_sub_with_time(double time, const char* link, const char* variable,
-                                       double value) // XBT_ATTRIB_DEPRECATED_v334
-{
-  instr_user_variable(time, link, variable, "LINK", value, InstrUserVariable::SUB, "", &user_link_variables);
-}
-
-void TRACE_link_srcdst_variable_set(const char* src, const char* dst, const char* variable,
-                                    double value) // XBT_ATTRIB_DEPRECATED_v334
-{
-  instr_user_srcdst_variable(simgrid_get_clock(), src, dst, variable, value, InstrUserVariable::SET);
-}
-
-void TRACE_link_srcdst_variable_add(const char* src, const char* dst, const char* variable,
-                                    double value) // XBT_ATTRIB_DEPRECATED_v334
-{
-  instr_user_srcdst_variable(simgrid_get_clock(), src, dst, variable, value, InstrUserVariable::ADD);
-}
-
-void TRACE_link_srcdst_variable_sub(const char* src, const char* dst, const char* variable,
-                                    double value) // XBT_ATTRIB_DEPRECATED_v334
-{
-  instr_user_srcdst_variable(simgrid_get_clock(), src, dst, variable, value, InstrUserVariable::SUB);
-}
-
-void TRACE_link_srcdst_variable_set_with_time(double time, const char* src, const char* dst, const char* variable,
-                                              double value) // XBT_ATTRIB_DEPRECATED_v334
-{
-  instr_user_srcdst_variable(time, src, dst, variable, value, InstrUserVariable::SET);
-}
-
-void TRACE_link_srcdst_variable_add_with_time(double time, const char* src, const char* dst, const char* variable,
-                                              double value) // XBT_ATTRIB_DEPRECATED_v334
-{
-  instr_user_srcdst_variable(time, src, dst, variable, value, InstrUserVariable::ADD);
-}
-
-void TRACE_link_srcdst_variable_sub_with_time(double time, const char* src, const char* dst, const char* variable,
-                                              double value) // XBT_ATTRIB_DEPRECATED_v334
-{
-  instr_user_srcdst_variable(time, src, dst, variable, value, InstrUserVariable::SUB);
-}
-
-xbt_dynar_t TRACE_get_link_variables() // XBT_ATTRIB_DEPRECATED_v334
-{
-  return instr_set_to_dynar(user_link_variables);
-}
-
 /** @ingroup TRACE_user_variables
  *  @brief Declare a new user state associated to hosts.
  *
index 0b6fc02..d1919db 100644 (file)
@@ -52,8 +52,7 @@ State::State(RemoteApp& remote_app) : num_(++expended_states_)
 State::State(RemoteApp& remote_app, std::shared_ptr<State> 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<BasicStrategy>();
   else if (_sg_mc_strategy == "max_match_comm")
     strategy_ = std::make_shared<MaxMatchComm>();
@@ -73,22 +72,20 @@ State::State(RemoteApp& remote_app, std::shared_ptr<State> parent_state)
                                                             *remote_app.get_remote_process_memory());
 #endif
 
-  /* If we want sleep set reduction, copy the sleep set and eventually removes things from it */
-  if (_sg_mc_sleep_set) {
-    /* 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 (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) {
-          XBT_DEBUG("Actor %ld will not be explored, for it is in the sleep set", aid);
-          strategy_->actors_to_run_.at(aid).mark_done();
-        }
-      } else
-        XBT_DEBUG("Transition >>%s<< removed from the sleep set because it was dependent with incoming >>%s<<",
-                  transition->to_string().c_str(), incoming_transition_->to_string().c_str());
-    }
+  /* Copy the sleep set and eventually removes things from it: */
+  /* 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 (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) {
+        XBT_DEBUG("Actor %ld will not be explored, for it is in the sleep set", aid);
+        strategy_->actors_to_run_.at(aid).mark_done();
+      }
+    } else
+      XBT_DEBUG("Transition >>%s<< removed from the sleep set because it was dependent with incoming >>%s<<",
+                transition->to_string().c_str(), incoming_transition_->to_string().c_str());
   }
 }
 
index ef7bee3..7ecb325 100644 (file)
@@ -36,12 +36,9 @@ public:
       return std::make_pair(aid, depth_);
     }
     return std::make_pair(-1, depth_);
-  
   }
-    
 
   void execute_next(aid_t aid, RemoteApp& app) override { return; }
-    
 };
 
 } // namespace simgrid::mc
index a2f1d60..0bc3dad 100644 (file)
@@ -13,7 +13,6 @@ namespace simgrid::mc {
 /** Wait MC guiding class that aims at minimizing the number of in-fly communication.
  *  When possible, it will try to match corresponding in-fly communications. */
 class MaxMatchComm : public Strategy {
-
   /** Stores for each mailbox what kind of transition is waiting on it.
    *  Negative number means that much recv are waiting on that mailbox, while
    *  a positiv number means that much send are waiting there. */
@@ -56,10 +55,9 @@ public:
          if (mailbox_.count(cast_recv->get_mailbox()) > 0 and
              mailbox_.at(cast_recv->get_mailbox()) > 0) { 
              aid_value--; // This means we have waiting recv corresponding to this recv
-         } else { 
-             aid_value++; 
-
-         }
+         } else {
+              aid_value++;
+          }
       }
    
       const CommSendTransition* cast_send = dynamic_cast<CommSendTransition const*>(transition);
@@ -92,7 +90,6 @@ public:
     if (cast_send != nullptr)
       last_mailbox_ = cast_send->get_mailbox();
   }
-
 };
 
 } // namespace simgrid::mc
index 665c92f..607a0a0 100644 (file)
@@ -13,8 +13,6 @@ namespace simgrid::mc {
 /** Wait MC guiding class that aims at maximizing the number of in-fly communication.
  *  When possible, it will try not to match communications. */
 class MinMatchComm : public Strategy {
-
-    
   /** Stores for each mailbox what kind of transition is waiting on it.
    *  Negative number means that much recv are waiting on that mailbox, while
    *  a positiv number means that much send are waiting there. */
@@ -93,7 +91,6 @@ public:
     if (cast_send != nullptr)
       last_mailbox_ = cast_send->get_mailbox();
   }
-
 };
 
 } // namespace simgrid::mc
index 8e9726f..cc5bd85 100644 (file)
@@ -59,9 +59,7 @@ public:
     return std::make_pair(-1, 0);
   }
 
-    
   void execute_next(aid_t aid, RemoteApp& app) override {}
-    
 };
 
 } // namespace simgrid::mc
index aa7fbb0..5bf8cd0 100644 (file)
@@ -198,7 +198,7 @@ void DFSExplorer::run()
       continue;
     }
 
-    if (_sg_mc_sleep_set && XBT_LOG_ISENABLED(mc_dfs, xbt_log_priority_verbose)) {
+    if (XBT_LOG_ISENABLED(mc_dfs, xbt_log_priority_verbose)) {
       XBT_VERB("Sleep set actually containing:");
       for (const auto& [aid, transition] : state->get_sleep_set())
         XBT_VERB("  <%ld,%s>", aid, transition->to_string().c_str());
@@ -561,14 +561,6 @@ DFSExplorer::DFSExplorer(const std::vector<char*>& args, ReductionMode mode, boo
   }
   if (stack_.back()->count_todo_multiples() > 1)
     opened_states_.emplace_back(stack_.back());
-
-  if (mode == ReductionMode::odpor && !_sg_mc_sleep_set) {
-    // ODPOR requires the use of sleep sets; SDPOR
-    // "likes" using sleep sets but it is not strictly
-    // required
-    XBT_INFO("Forcing the use of sleep sets for use with ODPOR");
-    _sg_mc_sleep_set = true;
-  }
 }
 
 Exploration* create_dfs_exploration(const std::vector<char*>& args, ReductionMode mode)
index 6c81203..9017fd8 100644 (file)
@@ -5,6 +5,7 @@
 
 #include "src/mc/explo/odpor/WakeupTreeIterator.hpp"
 #include "src/mc/explo/odpor/WakeupTree.hpp"
+#include "xbt/asserts.h"
 
 namespace simgrid::mc::odpor {
 
@@ -20,19 +21,19 @@ void WakeupTreeIterator::push_until_left_most_found()
   // there are no cycles. This means that at least
   // one node in the tree won't have any children,
   // so the loop will eventually terminate
-  auto* cur_top_node = *post_order_iteration.top();
+  WakeupTreeNode* cur_top_node = *post_order_iteration.top();
   while (not cur_top_node->is_leaf()) {
     // INVARIANT: Since we push children in
     // reverse order (right-most to left-most),
     // we ensure that we'll always process left-most
     // children first
     auto& children = cur_top_node->children_;
-
     for (auto iter = children.rbegin(); iter != children.rend(); ++iter) {
-      // iter.base() points one element past where we seek; hence,
-      // we move it over one position
+      // iter.base() points one element past where we seek; that is,
+      // we want the value one position forward
       post_order_iteration.push(std::prev(iter.base()));
     }
+    has_added_children.push(cur_top_node);
     cur_top_node = *post_order_iteration.top();
   }
 }
@@ -46,7 +47,6 @@ void WakeupTreeIterator::increment()
     return;
   }
 
-  auto prev_top_handle = post_order_iteration.top();
   post_order_iteration.pop();
 
   // If there are now no longer any nodes left,
@@ -57,15 +57,28 @@ void WakeupTreeIterator::increment()
     return;
   }
 
-  // Otherwise, look at the next top node. If
-  // `prev_top` is that node's right-most child,
-  // then we don't attempt to re-add `next_top`'s
-  // children again for we would have already seen them.
-  // To actually determine "right-most", we check if
-  // moving over to the right one spot brings us to the
-  // end of the candidate parent's list
-  const auto* next_top_node = *post_order_iteration.top();
-  if ((++prev_top_handle) != next_top_node->get_ordered_children().end()) {
+  xbt_assert(not has_added_children.empty(), "Invariant violated: There are more "
+                                             "nodes in the iteration that we must search "
+                                             "yet nobody has claimed to have added these nodes. "
+                                             "This implies that the algorithm is not iterating over "
+                                             "the wakeup tree is not following the post-fix order "
+                                             "correctly");
+
+  // Otherwise, look at what is the new, current top node.
+  // We're traversing the tree in
+  //
+  // If we've already added our children, we want
+  // to be sure not to add them again; but we ALSO
+  // want to be sure that we now start checking against
+  // the the node that's next in line as "finished"
+  //
+  // INVARIANT: Since we're searching in post-fix order,
+  // it always suffices to compare the current node
+  // with the top of the stack of nodes which have added their
+  // children
+  if (*post_order_iteration.top() == has_added_children.top()) {
+    has_added_children.pop();
+  } else {
     push_until_left_most_found();
   }
 }
index e42184c..c33d483 100644 (file)
@@ -56,6 +56,18 @@ private:
    */
   std::stack<node_handle> post_order_iteration;
 
+  /**
+   * @brief The nodes in the current ordering that have already
+   * added their own children
+   *
+   * We need to be able to determine whether to add the children
+   * of a given node. Eventually, we want to search that node itself,
+   * but we have to first search its children. Later, when we
+   * reach each node in this stack again, we'll remember not to add
+   * its children and will search the node in the stack instead.
+   */
+  std::stack<WakeupTreeNode*> has_added_children;
+
   /**
    * @brief Search the wakeup tree until a leaf node appears at the front
    * of the iteration, pushing all children towards the top of the stack
index deeec23..e2e2e67 100644 (file)
@@ -472,7 +472,6 @@ EventSet ExtensionSetCalculator::partially_extend_CommTest(const Configuration&
   } else if (const CommRecvTransition* e_issuer_recv =
                  dynamic_cast<const CommRecvTransition*>(e_issuer->get_transition());
              e_issuer_recv != nullptr) {
-
     for (const auto e : C) {
       // If the provider of the communication for `CommTest` is a
       // `CommRecv(m)`, then we only care about `e` if `λ(e) == `CommSend(m)`.
@@ -556,7 +555,6 @@ EventSet ExtensionSetCalculator::partially_extend_MutexAsyncLock(const Configura
     // Check for other locks on the same mutex
     if (const MutexTransition* e_mutex = dynamic_cast<const MutexTransition*>(e->get_transition());
         e_mutex != nullptr) {
-
       if (e_mutex->type_ == Transition::Type::MUTEX_ASYNC_LOCK && mutex_lock->get_mutex() == e_mutex->get_mutex()) {
         const EventSet K = EventSet({e, pre_event_a_C.value_or(e)});
         exC.insert(U->discover_event(std::move(K), mutex_lock));
@@ -590,7 +588,6 @@ EventSet ExtensionSetCalculator::partially_extend_MutexUnlock(const Configuratio
     // Check for MutexTest
     if (const MutexTransition* e_mutex = dynamic_cast<const MutexTransition*>(e->get_transition());
         e_mutex != nullptr) {
-
       if (e_mutex->type_ == Transition::Type::MUTEX_TEST || e_mutex->type_ == Transition::Type::MUTEX_WAIT) {
         // TODO: Check if dependent or not
         // This entails getting information about
index 571ec6e..bde1a6b 100644 (file)
@@ -57,15 +57,11 @@ int _sg_mc_max_visited_states = 0;
 static simgrid::config::Flag<std::string> cfg_mc_reduction{
     "model-check/reduction", "Specify the kind of exploration reduction (either none or DPOR)", "dpor",
     [](std::string_view value) {
-      if (value != "none" && value != "dpor" && value != "sdpor" && value != "odpor")
+      if (value != "none" && value != "dpor" && value != "sdpor" && value != "odpor" && value != "udpor")
         xbt_die("configuration option 'model-check/reduction' must be one of the following: "
-                " 'none', 'dpor', 'sdpor', or 'odpor'");
+                " 'none', 'dpor', 'sdpor', 'odpor', or 'udpor'");
     }};
 
-simgrid::config::Flag<bool> _sg_mc_sleep_set{
-    "model-check/sleep-set", "Whether to enable the use of sleep-set in the reduction algorithm", false,
-    [](bool) { _mc_cfg_cb_check("value to enable/disable the use of sleep-set in the reduction algorithm"); }};
-
 simgrid::config::Flag<std::string> _sg_mc_strategy{
     "model-check/strategy",
     "Specify the the kind of heuristic to use for guided model-checking",
index 07d199f..b581155 100644 (file)
@@ -29,7 +29,6 @@ extern XBT_PRIVATE simgrid::config::Flag<int> _sg_mc_random_seed;
 extern "C" XBT_PUBLIC int _sg_mc_max_visited_states;
 extern XBT_PRIVATE simgrid::config::Flag<std::string> _sg_mc_dot_output_file;
 extern XBT_PRIVATE simgrid::config::Flag<bool> _sg_mc_termination;
-extern XBT_PUBLIC simgrid::config::Flag<bool> _sg_mc_sleep_set;
 extern XBT_PUBLIC simgrid::config::Flag<std::string> _sg_mc_strategy;
 
 #endif
index 65077e9..b6cfd2a 100644 (file)
@@ -1,3 +1,7 @@
+/* Copyright (c) 2023. The SimGrid Team. All rights reserved.          */
+
+/* This program is free software; you can redistribute it and/or modify it
+ * under the terms of the license (GNU LGPL) which comes with this package. */
 #include <simgrid/Exception.hpp>
 #include <simgrid/plugins/battery.hpp>
 #include <simgrid/s4u/Actor.hpp>
index 5a4cd33..923153b 100644 (file)
@@ -1,3 +1,7 @@
+/* Copyright (c) 2023. The SimGrid Team. All rights reserved.          */
+
+/* This program is free software; you can redistribute it and/or modify it
+ * under the terms of the license (GNU LGPL) which comes with this package. */
 #include <simgrid/Exception.hpp>
 #include <simgrid/plugins/photovoltaic.hpp>
 #include <simgrid/s4u/Actor.hpp>
index d9a6101..a36df4e 100644 (file)
@@ -29,7 +29,7 @@ CommPtr Comm::set_copy_data_callback(const std::function<void(kernel::activity::
 }
 
 void Comm::copy_buffer_callback(kernel::activity::CommImpl* comm, void* buff,
-                                size_t buff_size) // XBT_ATTRIB_DEPRECATED_v337
+                                size_t buff_size) // XBT_ATTRIB_DEPRECATED_v338
 {
   XBT_DEBUG("Copy the data over");
   memcpy(comm->dst_buff_, buff, buff_size);
@@ -41,7 +41,7 @@ void Comm::copy_buffer_callback(kernel::activity::CommImpl* comm, void* buff,
 }
 
 void Comm::copy_pointer_callback(kernel::activity::CommImpl* comm, void* buff,
-                                 size_t buff_size) // XBT_ATTRIB_DEPRECATED_v337
+                                 size_t buff_size) // XBT_ATTRIB_DEPRECATED_v338
 {
   xbt_assert((buff_size == sizeof(void*)), "Cannot copy %zu bytes: must be sizeof(void*)", buff_size);
   *(void**)(comm->dst_buff_) = buff;
index 2aa9dbc..4bb9afd 100644 (file)
@@ -86,11 +86,6 @@ const std::vector<std::string>& Engine::get_cmdline() const
   return pimpl_->get_cmdline();
 }
 
-void Engine::shutdown() // XBT_ATTRIB_DEPRECATED_v335
-{
-  delete Engine::instance_;
-}
-
 double Engine::get_clock()
 {
   if (MC_is_active() || MC_record_replay_is_active()) {
index 91da353..62b4b12 100644 (file)
@@ -681,22 +681,6 @@ void sg_host_sendto(sg_host_t from, sg_host_t to, double byte_amount)
   simgrid::s4u::Comm::sendto(from, to, byte_amount);
 }
 
-/** @brief Displays debugging information about a host */
-void sg_host_dump(const_sg_host_t host) // XBT_ATTRIB_DEPRECATED_v335
-{
-  XBT_INFO("Displaying host %s", host->get_cname());
-  XBT_INFO("  - speed: %.0f", host->get_speed());
-  XBT_INFO("  - available speed: %.2f", sg_host_get_available_speed(host));
-  const std::unordered_map<std::string, std::string>* props = host->get_properties();
-
-  if (not props->empty()) {
-    XBT_INFO("  - properties:");
-    for (auto const& [key, value] : *props) {
-      XBT_INFO("    %s->%s", key.c_str(), value.c_str());
-    }
-  }
-}
-
 /** @brief Return the list of actors attached to a host.
  *
  * @param host a host
similarity index 57%
rename from src/plugins/task.cpp
rename to src/s4u/s4u_Task.cpp
index dca0c90..b6d8ccd 100644 (file)
@@ -1,23 +1,21 @@
+#include <memory>
 #include <simgrid/Exception.hpp>
-#include <simgrid/plugins/task.hpp>
 #include <simgrid/s4u/Comm.hpp>
 #include <simgrid/s4u/Exec.hpp>
 #include <simgrid/s4u/Io.hpp>
+#include <simgrid/s4u/Task.hpp>
 #include <simgrid/simix.hpp>
 
 #include "src/simgrid/module.hpp"
 
 SIMGRID_REGISTER_PLUGIN(task, "Battery management", nullptr)
-/** @defgroup plugin_task plugin_task Plugin Task
-
+/**
   @beginrst
 
-This is the task plugin, enabling management of Tasks.
-To activate this plugin, first call :cpp:func:`Task::init`.
 
 Tasks are designed to represent dataflows, i.e, graphs of Tasks.
 Tasks can only be instancied using either
-:cpp:func:`simgrid::plugins::ExecTask::init` or :cpp:func:`simgrid::plugins::CommTask::init`
+:cpp:func:`simgrid::s4u::ExecTask::init` or :cpp:func:`simgrid::s4u::CommTask::init`
 An ExecTask is an Execution Task. Its underlying Activity is an :ref:`Exec <API_s4u_Exec>`.
 A CommTask is a Communication Task. Its underlying Activity is a :ref:`Comm <API_s4u_Comm>`.
 
@@ -25,12 +23,7 @@ A CommTask is a Communication Task. Its underlying Activity is a :ref:`Comm <API
  */
 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(Task, kernel, "Logging specific to the task plugin");
 
-namespace simgrid::plugins {
-
-xbt::Extension<s4u::Activity, ExtendedAttributeActivity> ExtendedAttributeActivity::EXTENSION_ID;
-
-xbt::signal<void(Task*)> Task::on_start;
-xbt::signal<void(Task*)> Task::on_end;
+namespace simgrid::s4u {
 
 Task::Task(const std::string& name) : name_(name) {}
 
@@ -40,7 +33,7 @@ Task::Task(const std::string& name) : name_(name) {}
  */
 bool Task::ready_to_run() const
 {
-  return not working_ && queued_execs_ > 0;
+  return not working_ && queued_firings_ > 0;
 }
 
 /**
@@ -52,8 +45,11 @@ bool Task::ready_to_run() const
 void Task::receive(Task* source)
 {
   XBT_DEBUG("Task %s received a token from %s", name_.c_str(), source->name_.c_str());
-  predecessors_[source]++;
-  bool enough_tokens = true;
+  auto source_count = predecessors_[source]++;
+  if (tokens_received_.size() <= queued_firings_ + source_count)
+    tokens_received_.push_back({});
+  tokens_received_[queued_firings_ + source_count][source] = source->token_;
+  bool enough_tokens                                       = true;
   for (auto const& [key, val] : predecessors_)
     if (val < 1) {
       enough_tokens = false;
@@ -62,7 +58,7 @@ void Task::receive(Task* source)
   if (enough_tokens) {
     for (auto& [key, val] : predecessors_)
       val--;
-    enqueue_execs(1);
+    enqueue_firings(1);
   }
 }
 
@@ -77,11 +73,11 @@ void Task::receive(Task* source)
  */
 void Task::complete()
 {
-  xbt_assert(s4u::Actor::is_maestro());
+  xbt_assert(Actor::is_maestro());
   working_ = false;
   count_++;
-  on_this_end_(this);
-  Task::on_end(this);
+  on_this_completion(this);
+  on_completion(this);
   if (current_activity_)
     previous_activity_ = std::move(current_activity_);
   for (auto const& t : successors_)
@@ -90,42 +86,20 @@ void Task::complete()
     fire();
 }
 
-/** @ingroup plugin_task
- *  @brief Init the Task plugin.
- *  @note Add a completion callback to all Activities to call Task::complete().
- */
-void Task::init()
-{
-  static bool inited = false;
-  if (inited)
-    return;
-
-  inited                                  = true;
-  ExtendedAttributeActivity::EXTENSION_ID = simgrid::s4u::Activity::extension_create<ExtendedAttributeActivity>();
-  simgrid::s4u::Exec::on_completion_cb(
-      [](simgrid::s4u::Exec const& exec) { exec.extension<ExtendedAttributeActivity>()->task_->complete(); });
-  simgrid::s4u::Comm::on_completion_cb(
-      [](simgrid::s4u::Comm const& comm) { comm.extension<ExtendedAttributeActivity>()->task_->complete(); });
-  simgrid::s4u::Io::on_completion_cb(
-      [](simgrid::s4u::Io const& io) { io.extension<ExtendedAttributeActivity>()->task_->complete(); });
-}
-
-/** @ingroup plugin_task
- *  @param n The number of executions to enqueue.
- *  @brief Enqueue executions.
- *  @note Immediatly starts an execution if possible.
+/** @param n The number of firings to enqueue.
+ *  @brief Enqueue firing.
+ *  @note Immediatly fire an activity if possible.
  */
-void Task::enqueue_execs(int n)
+void Task::enqueue_firings(int n)
 {
   simgrid::kernel::actor::simcall_answered([this, n] {
-    queued_execs_ += n;
+    queued_firings_ += n;
     if (ready_to_run())
       fire();
   });
 }
 
-/** @ingroup plugin_task
- *  @param amount The amount to set.
+/** @param amount The amount to set.
  *  @brief Set the amout of work to do.
  *  @note Amount in flop for ExecTask and in bytes for CommTask.
  */
@@ -134,8 +108,34 @@ void Task::set_amount(double amount)
   simgrid::kernel::actor::simcall_answered([this, amount] { amount_ = amount; });
 }
 
-/** @ingroup plugin_task
- *  @param successor The Task to add.
+/** @param token The token to set.
+ *  @brief Set the token to send to successors.
+ *  @note The token is passed to each successor after the task end, i.e., after the on_end callback.
+ */
+void Task::set_token(std::shared_ptr<Token> token)
+{
+  simgrid::kernel::actor::simcall_answered([this, token] { token_ = token; });
+}
+
+/** @return Map of tokens received for the next execution.
+ *  @note If there is no queued execution for this task the map might not exist or be partially empty.
+ */
+std::shared_ptr<Token> Task::get_next_token_from(TaskPtr t)
+{
+  return tokens_received_.front()[t];
+}
+
+void Task::fire()
+{
+  on_this_start(this);
+  on_start(this);
+  working_        = true;
+  queued_firings_ = std::max(queued_firings_ - 1, 0);
+  if (tokens_received_.size() > 0)
+    tokens_received_.pop_front();
+}
+
+/** @param successor The Task to add.
  *  @brief Add a successor to this Task.
  *  @note It also adds this as a predecessor of successor.
  */
@@ -147,8 +147,7 @@ void Task::add_successor(TaskPtr successor)
   });
 }
 
-/** @ingroup plugin_task
- *  @param successor The Task to remove.
+/** @param successor The Task to remove.
  *  @brief Remove a successor from this Task.
  *  @note It also remove this from the predecessors of successor.
  */
@@ -171,34 +170,6 @@ void Task::remove_all_successors()
   });
 }
 
-/** @ingroup plugin_task
- *  @param func The function to set.
- *  @brief Set a function to be called before each execution.
- *  @note The function is called before the underlying Activity starts.
- */
-void Task::on_this_start_cb(const std::function<void(Task*)>& func)
-{
-  simgrid::kernel::actor::simcall_answered([this, &func] { on_this_start_.connect(func); });
-}
-
-/** @ingroup plugin_task
- *  @param func The function to set.
- *  @brief Set a function to be called after each execution.
- *  @note The function is called after the underlying Activity ends, but before sending tokens to successors.
- */
-void Task::on_this_end_cb(const std::function<void(Task*)>& func)
-{
-  simgrid::kernel::actor::simcall_answered([this, &func] { on_this_end_.connect(func); });
-}
-
-/** @ingroup plugin_task
- *  @brief Return the number of completed executions.
- */
-int Task::get_count() const
-{
-  return count_;
-}
-
 /**
  *  @brief Default constructor.
  */
@@ -215,7 +186,7 @@ ExecTaskPtr ExecTask::init(const std::string& name)
 /** @ingroup plugin_task
  *  @brief Smart Constructor.
  */
-ExecTaskPtr ExecTask::init(const std::string& name, double flops, s4u::Host* host)
+ExecTaskPtr ExecTask::init(const std::string& name, double flops, Host* host)
 {
   return init(name)->set_flops(flops)->set_host(host);
 }
@@ -227,25 +198,18 @@ ExecTaskPtr ExecTask::init(const std::string& name, double flops, s4u::Host* hos
  */
 void ExecTask::fire()
 {
-  on_this_start_(this);
-  Task::on_start(this);
-  working_          = true;
-  queued_execs_     = std::max(queued_execs_ - 1, 0);
-  s4u::ExecPtr exec = s4u::Exec::init();
-  exec->set_name(name_);
-  exec->set_flops_amount(amount_);
-  exec->set_host(host_);
+  Task::fire();
+  auto exec = Exec::init()->set_name(get_name())->set_flops_amount(get_amount())->set_host(host_);
   exec->start();
-  exec->extension_set(new ExtendedAttributeActivity());
-  exec->extension<ExtendedAttributeActivity>()->task_ = this;
-  current_activity_                                   = exec;
+  exec->on_this_completion_cb([this](Exec const&) { this->complete(); });
+  set_current_activity(exec);
 }
 
 /** @ingroup plugin_task
  *  @param host The host to set.
  *  @brief Set a new host.
  */
-ExecTaskPtr ExecTask::set_host(s4u::Host* host)
+ExecTaskPtr ExecTask::set_host(Host* host)
 {
   kernel::actor::simcall_answered([this, host] { host_ = host; });
   return this;
@@ -256,7 +220,7 @@ ExecTaskPtr ExecTask::set_host(s4u::Host* host)
  */
 ExecTaskPtr ExecTask::set_flops(double flops)
 {
-  kernel::actor::simcall_answered([this, flops] { amount_ = flops; });
+  kernel::actor::simcall_answered([this, flops] { set_amount(flops); });
   return this;
 }
 
@@ -276,7 +240,7 @@ CommTaskPtr CommTask::init(const std::string& name)
 /** @ingroup plugin_task
  *  @brief Smart constructor.
  */
-CommTaskPtr CommTask::init(const std::string& name, double bytes, s4u::Host* source, s4u::Host* destination)
+CommTaskPtr CommTask::init(const std::string& name, double bytes, Host* source, Host* destination)
 {
   return init(name)->set_bytes(bytes)->set_source(source)->set_destination(destination);
 }
@@ -288,24 +252,18 @@ CommTaskPtr CommTask::init(const std::string& name, double bytes, s4u::Host* sou
  */
 void CommTask::fire()
 {
-  on_this_start_(this);
-  Task::on_start(this);
-  working_          = true;
-  queued_execs_     = std::max(queued_execs_ - 1, 0);
-  s4u::CommPtr comm = s4u::Comm::sendto_init(source_, destination_);
-  comm->set_name(name_);
-  comm->set_payload_size(amount_);
+  Task::fire();
+  auto comm = Comm::sendto_init(source_, destination_)->set_name(get_name())->set_payload_size(get_amount());
   comm->start();
-  comm->extension_set(new ExtendedAttributeActivity());
-  comm->extension<ExtendedAttributeActivity>()->task_ = this;
-  current_activity_                                   = comm;
+  comm->on_this_completion_cb([this](Comm const&) { this->complete(); });
+  set_current_activity(comm);
 }
 
 /** @ingroup plugin_task
  *  @param source The host to set.
  *  @brief Set a new source host.
  */
-CommTaskPtr CommTask::set_source(s4u::Host* source)
+CommTaskPtr CommTask::set_source(Host* source)
 {
   kernel::actor::simcall_answered([this, source] { source_ = source; });
   return this;
@@ -315,7 +273,7 @@ CommTaskPtr CommTask::set_source(s4u::Host* source)
  *  @param destination The host to set.
  *  @brief Set a new destination host.
  */
-CommTaskPtr CommTask::set_destination(s4u::Host* destination)
+CommTaskPtr CommTask::set_destination(Host* destination)
 {
   kernel::actor::simcall_answered([this, destination] { destination_ = destination; });
   return this;
@@ -326,7 +284,7 @@ CommTaskPtr CommTask::set_destination(s4u::Host* destination)
  */
 CommTaskPtr CommTask::set_bytes(double bytes)
 {
-  kernel::actor::simcall_answered([this, bytes] { amount_ = bytes; });
+  kernel::actor::simcall_answered([this, bytes] { set_amount(bytes); });
   return this;
 }
 
@@ -346,7 +304,7 @@ IoTaskPtr IoTask::init(const std::string& name)
 /** @ingroup plugin_task
  *  @brief Smart Constructor.
  */
-IoTaskPtr IoTask::init(const std::string& name, double bytes, s4u::Disk* disk, s4u::Io::OpType type)
+IoTaskPtr IoTask::init(const std::string& name, double bytes, Disk* disk, Io::OpType type)
 {
   return init(name)->set_bytes(bytes)->set_disk(disk)->set_op_type(type);
 }
@@ -355,7 +313,7 @@ IoTaskPtr IoTask::init(const std::string& name, double bytes, s4u::Disk* disk, s
  *  @param disk The disk to set.
  *  @brief Set a new disk.
  */
-IoTaskPtr IoTask::set_disk(s4u::Disk* disk)
+IoTaskPtr IoTask::set_disk(Disk* disk)
 {
   kernel::actor::simcall_answered([this, disk] { disk_ = disk; });
   return this;
@@ -366,12 +324,12 @@ IoTaskPtr IoTask::set_disk(s4u::Disk* disk)
  */
 IoTaskPtr IoTask::set_bytes(double bytes)
 {
-  kernel::actor::simcall_answered([this, bytes] { amount_ = bytes; });
+  kernel::actor::simcall_answered([this, bytes] { set_amount(bytes); });
   return this;
 }
 
 /** @ingroup plugin_task */
-IoTaskPtr IoTask::set_op_type(s4u::Io::OpType type)
+IoTaskPtr IoTask::set_op_type(Io::OpType type)
 {
   kernel::actor::simcall_answered([this, type] { type_ = type; });
   return this;
@@ -379,19 +337,11 @@ IoTaskPtr IoTask::set_op_type(s4u::Io::OpType type)
 
 void IoTask::fire()
 {
-  on_this_start_(this);
-  Task::on_start(this);
-  working_      = true;
-  queued_execs_ = std::max(queued_execs_ - 1, 0);
-  s4u::IoPtr io = s4u::Io::init();
-  io->set_name(name_);
-  io->set_size(amount_);
-  io->set_disk(disk_);
-  io->set_op_type(type_);
+  Task::fire();
+  auto io = Io::init()->set_name(get_name())->set_size(get_amount())->set_disk(disk_)->set_op_type(type_);
   io->start();
-  io->extension_set(new ExtendedAttributeActivity());
-  io->extension<ExtendedAttributeActivity>()->task_ = this;
-  current_activity_                                 = io;
+  io->on_this_completion_cb([this](Io const&) { this->complete(); });
+  set_current_activity(io);
 }
 
-} // namespace simgrid::plugins
+} // namespace simgrid::s4u
index 9694c6b..7152419 100644 (file)
@@ -31,7 +31,7 @@ void ForcefulKillException::do_throw()
   throw ForcefulKillException();
 }
 
-bool ForcefulKillException::try_n_catch(const std::function<void()>& try_block) // XBT_ATTRIB_DEPRECATED_v337
+bool ForcefulKillException::try_n_catch(const std::function<void()>& try_block) // XBT_ATTRIB_DEPRECATED_v338
 {
   bool res;
   try {
index 351c4e4..8170ff0 100644 (file)
@@ -76,12 +76,11 @@ static void get_set_disk_data(simgrid::s4u::Disk* disk)
 {
   XBT_INFO("*** GET/SET DATA for disk: %s ***", disk->get_cname());
 
-  const std::string* data = disk->get_data<std::string>();
+  auto data = disk->get_unique_data<std::string>();
   XBT_INFO("Get data: '%s'", data ? data->c_str() : "No User Data");
   disk->set_data(new std::string("Some data"));
-  data = disk->get_data<std::string>();
+  data = disk->get_unique_data<std::string>();
   XBT_INFO("  Set and get data: '%s'", data->c_str());
-  delete data;
 }
 
 static void dump_platform_disks()
index 740b47a..ecdacc4 100644 (file)
@@ -1,7 +1,7 @@
 # Smpi Allreduce collectives tests
 
 p Test allreduce
-$ $VALGRIND_NO_LEAK_CHECK ${bindir:=.}/../../../smpi_script/bin/smpirun -wrapper "${bindir:=.}/../../../bin/simgrid-mc" -map -hostfile ../hostfile_coll -platform  ${platfdir:=.}/small_platform.xml --cfg=model-check/sleep-set:true -np 4 --log=xbt_cfg.thres:critical ${bindir:=.}/coll-allreduce-with-leaks --log=smpi_config.thres:warning --cfg=smpi/display-allocs:yes --cfg=smpi/simulate-computation:no --log=smpi_coll.thres:error --log=smpi_mpi.thres:error --cfg=smpi/list-leaks:10 --log=no_loc
+$ $VALGRIND_NO_LEAK_CHECK ${bindir:=.}/../../../smpi_script/bin/smpirun -wrapper "${bindir:=.}/../../../bin/simgrid-mc" -map -hostfile ../hostfile_coll -platform  ${platfdir:=.}/small_platform.xml -np 4 --log=xbt_cfg.thres:critical ${bindir:=.}/coll-allreduce-with-leaks --log=smpi_config.thres:warning --cfg=smpi/display-allocs:yes --cfg=smpi/simulate-computation:no --log=smpi_coll.thres:error --log=smpi_mpi.thres:error --cfg=smpi/list-leaks:10 --log=no_loc
 > [0.000000] [smpi/INFO] [rank 0] -> Tremblay
 > [0.000000] [smpi/INFO] [rank 1] -> Tremblay
 > [0.000000] [smpi/INFO] [rank 2] -> Tremblay
index 52c7828..01e9880 100644 (file)
@@ -6,9 +6,6 @@
 #include "simgrid/engine.h"
 #include <xbt.h>
 
-#define SIMIX_H_NO_DEPRECATED_WARNING // avoid deprecation warning on include (remove with XBT_ATTRIB_DEPRECATED_v335)
-#include "simgrid/simix.h" // we don't need it, but someone must check that this file is actually usable in plain C
-
 XBT_LOG_NEW_DEFAULT_CATEGORY(test, "Logging specific to this test");
 
 int main(int argc, char** argv)
index 5fa39d6..20baa0b 100644 (file)
@@ -25,7 +25,7 @@ set(EXTRA_DIST
   src/kernel/resource/models/network_ns3.hpp
   src/kernel/resource/models/ns3/ns3_simulator.hpp
   src/kernel/resource/models/ptask_L07.hpp
-  
+
   src/mc/datatypes.h
   src/mc/mc.h
   src/mc/mc_mmu.hpp
@@ -56,7 +56,7 @@ set(EXTRA_DIST
   src/xbt/log_private.hpp
   src/xbt/mallocator_private.h
   src/xbt/parmap.hpp
-  
+
   src/xbt/mmalloc/mmalloc.h
   src/xbt/mmalloc/mfree.c
   src/xbt/mmalloc/mm_legacy.c
@@ -305,8 +305,6 @@ set(NS3_SRC
   )
 
 set(KERNEL_SRC
-  src/deprecated.cpp
-
   src/kernel/EngineImpl.cpp
   src/kernel/EngineImpl.hpp
 
@@ -342,7 +340,7 @@ set(KERNEL_SRC
   src/kernel/actor/SimcallObserver.hpp
   src/kernel/actor/SynchroObserver.cpp
   src/kernel/actor/SynchroObserver.hpp
-  
+
   src/kernel/context/Context.cpp
   src/kernel/context/Context.hpp
   src/kernel/context/ContextRaw.cpp
@@ -454,7 +452,6 @@ set(PLUGINS_SRC
   src/plugins/vm/VmLiveMigration.hpp
   src/plugins/vm/dirty_page_tracking.cpp
   src/plugins/battery.cpp
-  src/plugins/task.cpp
   src/plugins/photovoltaic.cpp
   )
 
@@ -475,6 +472,7 @@ set(S4U_SRC
   src/s4u/s4u_Mutex.cpp
   src/s4u/s4u_Netzone.cpp
   src/s4u/s4u_Semaphore.cpp
+  src/s4u/s4u_Task.cpp
   src/s4u/s4u_VirtualMachine.cpp
 )
 
@@ -521,7 +519,7 @@ set(MC_SRC_BASE
   src/mc/mc_replay.hpp
   src/mc/transition/Transition.cpp
   )
-  
+
 set(MC_SRC_STATELESS
   src/mc/api/ActorState.hpp
   src/mc/api/ClockVector.cpp
@@ -530,7 +528,7 @@ set(MC_SRC_STATELESS
   src/mc/api/State.hpp
   src/mc/api/RemoteApp.cpp
   src/mc/api/RemoteApp.hpp
-  
+
   src/mc/explo/DFSExplorer.cpp
   src/mc/explo/DFSExplorer.hpp
   src/mc/explo/Exploration.cpp
@@ -577,7 +575,7 @@ set(MC_SRC_STATEFUL
   src/mc/explo/LivenessChecker.hpp
   src/mc/explo/UdporChecker.cpp
   src/mc/explo/UdporChecker.hpp
-  
+
   src/mc/explo/udpor/Comb.hpp
   src/mc/explo/udpor/Configuration.hpp
   src/mc/explo/udpor/Configuration.cpp
@@ -595,7 +593,7 @@ set(MC_SRC_STATEFUL
   src/mc/explo/udpor/Unfolding.hpp
   src/mc/explo/udpor/udpor_forward.hpp
   src/mc/explo/udpor/udpor_tests_private.hpp
-  
+
   src/mc/inspect/DwarfExpression.cpp
   src/mc/inspect/DwarfExpression.hpp
   src/mc/inspect/Frame.cpp
@@ -614,7 +612,7 @@ set(MC_SRC_STATEFUL
   src/mc/inspect/mc_unw.cpp
   src/mc/inspect/mc_unw.hpp
   src/mc/inspect/mc_unw_vmread.cpp
-  
+
   src/mc/sosp/ChunkedData.cpp
   src/mc/sosp/ChunkedData.hpp
   src/mc/sosp/PageStore.cpp
@@ -641,7 +639,7 @@ set(MC_SRC_STATEFUL
   src/mc/api/strategy/MinMatchComm.hpp
   src/mc/api/strategy/Strategy.hpp
   src/mc/api/strategy/UniformStrategy.hpp
-  
+
   src/xbt/mmalloc/mm_interface.c
   )
 
@@ -661,14 +659,12 @@ set(headers_to_install
   include/simgrid/plugins/file_system.h
   include/simgrid/plugins/live_migration.h
   include/simgrid/plugins/load.h
-  include/simgrid/plugins/task.hpp
   include/simgrid/plugins/photovoltaic.hpp
   include/simgrid/plugins/ProducerConsumer.hpp
   include/simgrid/instr.h
   include/simgrid/mailbox.h
   include/simgrid/modelchecker.h
   include/simgrid/forward.h
-  include/simgrid/simix.h
   include/simgrid/simix.hpp
   include/simgrid/kernel/ProfileBuilder.hpp
   include/simgrid/kernel/Timer.hpp
@@ -695,6 +691,7 @@ set(headers_to_install
   include/simgrid/s4u/Mutex.hpp
   include/simgrid/s4u/NetZone.hpp
   include/simgrid/s4u/Semaphore.hpp
+  include/simgrid/s4u/Task.hpp
   include/simgrid/s4u/VirtualMachine.hpp
   include/simgrid/s4u.hpp