Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Merge branch 'add_remaining_comm_sync_bindings' into 'master'
authorMartin Quinson <martin.quinson@ens-rennes.fr>
Fri, 11 Mar 2022 13:52:28 +0000 (13:52 +0000)
committerMartin Quinson <martin.quinson@ens-rennes.fr>
Fri, 11 Mar 2022 13:52:28 +0000 (13:52 +0000)
Add remaining Comm synchronisation Python bindings

See merge request simgrid/simgrid!81

1  2 
ChangeLog
docs/source/app_s4u.rst

diff --combined ChangeLog
+++ b/ChangeLog
@@@ -2,8 -2,8 +2,8 @@@ SimGrid (3.30.1) NOT RELEASED YET (v3.3
  
  MC:
   - Rework the internals, for simpler and modern code. This shall unlock many future improvements.
 - - You can now define plugins onto SafetyChecker (a simple DFS explorer), using the declared signals.
 -   See CommunicationDeterminism for an example.
 + - You can now define plugins onto the DFS explorer (previously called SafetyChecker), using the 
 +   declared signals. See CommunicationDeterminism for an example.
   - Support mutex, semaphore and barrier in DPOR reduction
   - Seems to work on Arm64 architectures too.
   - Display a nice error message when ptrace is not usable.
@@@ -21,14 -21,9 +21,14 @@@ SMPI
  
  S4U:
   - New signal: Engine::on_simulation_start_cb()
 + - Introduce a new execution mode with this_actor::thread_execute(). This simulate 
 +   the execution of a certain amount of flops by multiple threads ran by a host. Each
 +   thread executes the same number of flops, given as argument. An example of this new
 +   function can be found in examples/cpp/exec-threads.
   - Reimplementation of barriers natively. 
     Previously, they were implemented on top of s4u::Mutex and s4u::ConditionVariable. 
     The new version should be faster (and can be used in the model-checker).
 + - Actor::get_restart_count(): Returns the number of reboots that this actor did.
  
  MSG:
   - MSG_barrier_destroy now expects a non-const msg_barrier parameter.
@@@ -37,33 -32,21 +37,40 @@@ New plugin: the Chaos Monkey (killing a
   - Along with the new simgrid-monkey script, it tests whether your simulation 
     resists resource failures at any possible timestamp in your simulation. 
   - It is mostly intended to test the simgrid core in extreme conditions, 
 -   but users may find it interesting too.
 +   but some users may find it interesting too.
 +
 +Models:
 + - New model for parallel task: ptask_BMF.
 +   - More realistic sharing of heterogeneous resources compared to ptask_L07.
 +   - Implement the BMF (Bottleneck max fairness) fairness.
 +   - Improved resource sharing for parallel tasks with sub-flows (parallel
 +   communications between same source and destination inside the ptask).
 +   - Parameters:
 +     - "--cfg=host/model:ptask_BMF": enable the model.
 +     - "--cfg=bmf/max-iterations: <N>" - maximum number of iterations performed
 +           by BMF solver (default: 1000).
 +       - "--cfg=bmf/selective-update:<true/false>" - enable/disable the
 +          selective-update optimization. Only invalidates and recomputes modified
 +          parts of inequations system. May speed up simulation if sparse resource
 +          utilization (default: false).
 +   - ATTENTION: this model requires Eigen3 library. If you install SimGrid
 +     from source, please see the "Installing from source" section:
 +     https://simgrid.org/doc/latest/Installing_SimGrid.html#installing-from-the-source.
 +     No action is required if you use pre-compiled packages.
  
  XBT:
   - Drop xbt_dynar_shrink().
  
  Python:
-  - Added the following bindings: Comm.wait_for() and Comm.wait_any_for()
-    Example: examples/python/comm-waitfor/
+  - Fixed the following bindings:
+    - Actor.kill_all() [previously declared a member of the Actor class although it is a static member]
+  - Added the following bindings:
+      - this_actor.warning()
+      - Mailbox.put_init() [example: examples/python/comm-waitallfor]
+      - Comm.detach() [example: examples/python/comm-waitallfor]
+      - Comm.wait_for() [example: examples/python/comm-waitfor/]
+      - Comm.wait_any_for()
+      - Comm.wait_all_for() [example: examples/python/comm-waitallfor]
  
  Fixed bugs (FG#.. -> FramaGit bugs; FG!.. -> FG merge requests)
   (FG: issues on Framagit; GH: issues on GitHub)
diff --combined docs/source/app_s4u.rst
@@@ -598,7 -598,6 +598,7 @@@ Reacting to the end of actor
        .. doxygenfunction:: simgrid::s4u::Actor::join() const
        .. doxygenfunction:: simgrid::s4u::Actor::join(double timeout) const
        .. doxygenfunction:: simgrid::s4u::Actor::set_auto_restart(bool autorestart)
 +      .. doxygenfunction:: simgrid::s4u::Actor::get_restart_count()
  
     .. group-tab:: Python
  
@@@ -702,6 -701,7 +702,7 @@@ Logging message
  
         .. autofunction:: simgrid.this_actor.debug
         .. autofunction:: simgrid.this_actor.info
+        .. autofunction:: simgrid.this_actor.warning
         .. autofunction:: simgrid.this_actor.error
  
  Sleeping
@@@ -1048,6 -1048,7 +1049,7 @@@ Sending dat
  
        .. automethod:: simgrid.Mailbox.put
        .. automethod:: simgrid.Mailbox.put_async
+       .. automethod:: simgrid.Mailbox.put_init
  
     .. group-tab:: C
  
@@@ -1069,7 -1070,7 +1071,7 @@@ Receiving dat
        .. doxygenfunction:: simgrid::s4u::Mailbox::get(double timeout)
        .. doxygenfunction:: simgrid::s4u::Mailbox::get_async(T **data)
        .. doxygenfunction:: simgrid::s4u::Mailbox::get_init()
 -      .. doxygenfunction:: simgrid::s4u::Mailbox::iprobe(int type, bool(*match_fun)(void *, void *, kernel::activity::CommImpl *), void *data)
 +      .. doxygenfunction:: simgrid::s4u::Mailbox::iprobe(int type, const std::function<bool(void *, void *, kernel::activity::CommImpl *)>& match_fun, void *data)
        .. doxygenfunction:: simgrid::s4u::Mailbox::listen
        .. doxygenfunction:: simgrid::s4u::Mailbox::ready
  
@@@ -2162,6 -2163,7 +2164,6 @@@ Basic managemen
           #include <simgrid/comm.h>
  
        .. doxygentypedef:: sg_comm_t
 -      .. doxygentypedef:: const_sg_comm_t
  
  Querying info
  -------------
        .. doxygenfunction:: simgrid::s4u::Comm::set_dst_data(void **buff)
        .. doxygenfunction:: simgrid::s4u::Comm::set_dst_data(void **buff, size_t size)
        .. doxygenfunction:: simgrid::s4u::Comm::detach()
 -      .. doxygenfunction:: simgrid::s4u::Comm::detach(void(*clean_function)(void *))
 +      .. doxygenfunction:: simgrid::s4u::Comm::detach(const std::function<void(void*)>& clean_function)
        .. doxygenfunction:: simgrid::s4u::Comm::set_payload_size(uint64_t bytes)
        .. doxygenfunction:: simgrid::s4u::Comm::set_rate(double rate)
        .. doxygenfunction:: simgrid::s4u::Comm::set_src_data(void *buff)
        .. doxygenfunction:: simgrid::s4u::Comm::set_src_data(void *buff, size_t size)
        .. doxygenfunction:: simgrid::s4u::Comm::set_src_data_size(size_t size)
  
+    .. group-tab:: Python
+       .. automethod:: simgrid.Comm.detach
  Life cycle
  ----------
  
@@@ -2215,6 -2221,7 +2221,7 @@@ also start direct communications as sho
        .. automethod:: simgrid.Comm.wait
        .. automethod:: simgrid.Comm.wait_for
        .. automethod:: simgrid.Comm.wait_all
+       .. automethod:: simgrid.Comm.wait_all_for
        .. automethod:: simgrid.Comm.wait_any
        .. automethod:: simgrid.Comm.wait_any_for
  
@@@ -2516,9 -2523,10 +2523,9 @@@ Lockin
           #include <simgrid/barrier.hpp>
  
        .. doxygentypedef:: sg_bar_t
 -      .. doxygentypedef:: const_sg_bar_t
  
        .. doxygenfunction:: sg_barrier_init(unsigned int count)
 -      .. doxygenfunction:: sg_barrier_destroy(const_sg_bar_t bar)
 +      .. doxygenfunction:: sg_barrier_destroy(sg_bar_t bar)
        .. doxygenfunction:: sg_barrier_wait(sg_bar_t bar)