X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/c225312830f146ce85fcd8b48e705fbee707bcb0..fd07081f4b8805381e5b1b914df3b974e6b5e026:/examples/README.rst diff --git a/examples/README.rst b/examples/README.rst index 7d6dc0b499..9fe8b5f8cc 100644 --- a/examples/README.rst +++ b/examples/README.rst @@ -108,7 +108,7 @@ Actors can forcefully stop other actors. .. example-tab:: examples/python/actor-kill/actor-kill.py - See also :py:func:`simgrid.Actor.kill`, :py:func:`simgrid.Actor.kill_all`, :py:func:`simgrid.this_actor.exit`, + See also :py:func:`simgrid.Actor.kill()`, :py:func:`simgrid.Actor.kill_all()`, :py:func:`simgrid.this_actor.exit()`, :py:func:`simgrid.this_actor.on_exit`. .. example-tab:: examples/c/actor-kill/actor-kill.c @@ -216,7 +216,7 @@ Actors can move or be moved from a host to another very easily. It amounts to se .. example-tab:: examples/python/actor-migrate/actor-migrate.py - See also :py:func:`simgrid.this_actor.set_host()` and :py:func:`simgrid.Actor.set_host()`. + See also :py:attr:`simgrid.Actor.host`. .. example-tab:: examples/c/actor-migrate/actor-migrate.c @@ -319,6 +319,8 @@ the simulators (as detailed in Section :ref:`options`). .. example-tab:: examples/cpp/comm-pingpong/s4u-comm-pingpong.cpp + .. example-tab:: examples/python/comm-pingpong/comm-pingpong.py + .. example-tab:: examples/c/comm-pingpong/comm-pingpong.c @@ -353,6 +355,10 @@ This example is very similar to the previous one, simply adding how to declare t See also :cpp:func:`simgrid::s4u::Activity::wait_until()` and :cpp:func:`simgrid::s4u::Comm::wait_for()`. + .. example-tab:: examples/python/comm-waitfor/comm-waitfor.py + + See also :py:func:`simgrid.Comm.wait_for()` and :py:func:`simgrid.Comm.wait_any_for()` + Suspending communications ^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -367,6 +373,11 @@ The ``suspend()`` and ``resume()`` functions block the progression of a given co :cpp:func:`simgrid::s4u::Activity::resume()` and :cpp:func:`simgrid::s4u::Activity::is_suspended()`. + .. example-tab:: examples/python/comm-suspend/comm-suspend.py + + See also :py:func:`simgrid.Comm::suspend()` and + :py:func:`simgrid.Comm.resume()`. + Waiting for all communications in a set ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -416,6 +427,9 @@ The ``test_any()`` returns whether at least one activity of the set has complete See also :cpp:func:`simgrid::s4u::Comm::test_any()`. + .. example-tab:: examples/python/comm-testany/comm-testany.py + + See also :py:func:`simgrid.Comm.test_any()`. .. _s4u_ex_execution: @@ -467,12 +481,12 @@ You can start asynchronous executions, just like you would fire background threa .. example-tab:: examples/python/exec-async/exec-async.py See also :py:func:`simgrid.this_actor.exec_init()`, - :py:func:`simgrid.Activity.start()`, - :py:func:`simgrid.Activity.wait()`, - :py:func:`simgrid.Activity.get_remaining()`, - :py:func:`simgrid.Exec.get_remaining_ratio()`, + :py:func:`simgrid.Exec.start()`, + :py:func:`simgrid.Exec.wait()`, + :py:attr:`simgrid.Exec.remaining`, + :py:attr:`simgrid.Exec.remaining_ratio`, :py:func:`simgrid.this_actor.exec_async()` and - :py:func:`simgrid.Activity.cancel()`. + :py:func:`simgrid.Exec.cancel()`. .. example-tab:: examples/c/exec-async/exec-async.c @@ -497,12 +511,14 @@ You can start executions on remote hosts, or even change the host on which they .. example-tab:: examples/python/exec-remote/exec-remote.py - See also :py:func:`simgrid.Exec.set_host()`. + See also :py:attr:`simgrid.Exec.host`. .. example-tab:: examples/c/exec-remote/exec-remote.c See also :cpp:func:`sg_exec_set_host()`. +.. _s4u_ex_ptasks: + Parallel executions ^^^^^^^^^^^^^^^^^^^ @@ -542,7 +558,7 @@ of a host can then be accessed and changed from the program. .. example-tab:: examples/python/exec-dvfs/exec-dvfs.py - See also :py:func:`Host.get_pstate_speed` and :py:func:`Host.set_pstate`. + See also :py:func:`simgrid.Host.pstate_speed()` and :py:attr:`simgrid.Host.pstate`. .. example-tab:: examples/platforms/energy_platform.xml @@ -610,6 +626,8 @@ Shows how to use :cpp:type:`simgrid::s4u::Barrier` synchronization objects. .. example-tab:: examples/cpp/synchro-barrier/s4u-synchro-barrier.cpp + .. example-tab:: examples/python/synchro-barrier/synchro-barrier.py + Condition variable: basic usage ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -637,6 +655,8 @@ Shows how to use :cpp:type:`simgrid::s4u::Mutex` synchronization objects. .. example-tab:: examples/cpp/synchro-mutex/s4u-synchro-mutex.cpp + .. example-tab:: examples/python/synchro-mutex/synchro-mutex.py + Semaphore ^^^^^^^^^ @@ -735,6 +755,8 @@ Shows how to specify an external load to resources, variating their peak speed o .. example-tab:: examples/cpp/platform-profile/s4u-platform-profile.cpp + .. example-tab:: examples/python/platform-profile/platform-profile.py + .. group-tab:: XML .. showfile:: examples/platforms/small_platform_profile.xml @@ -1075,6 +1097,15 @@ Another well-known DHT protocol. .. showfile:: examples/c/dht-kademlia/node.c :language: cpp +Pastry +^^^^^^ + +Yet another well-known DHT protocol. + +.. tabs:: + + .. example-tab:: examples/c/dht-pastry/dht-pastry.c + .. _s4u_ex_clouds: Simulating Clouds