Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Document simgrid.Engine.instance in Python
authorMartin Quinson <martin.quinson@ens-rennes.fr>
Fri, 21 Jan 2022 14:14:03 +0000 (15:14 +0100)
committerMartin Quinson <martin.quinson@ens-rennes.fr>
Fri, 21 Jan 2022 14:20:21 +0000 (15:20 +0100)
+ fix some doc issues

docs/source/Tutorial_Algorithms.rst
docs/source/app_s4u.rst

index ddf196b..fd8a689 100644 (file)
@@ -704,14 +704,14 @@ Creating the workers from the master
       ``Actor.create(name, host, func, params...)`` is a very flexible
       function. Its third parameter is the function that the actor should
       execute. This function can take any kind of parameter, provided that
-      you pass similar parameters to ``Actor?create()``. For example, you
+      you pass similar parameters to ``Actor.create()``. For example, you
       could have something like this:
 
-      .. code-block:: cpp
+      .. code-block:: python
 
-      def my_actor(param1, param2, param3):
-         ...
-      actor = simgrid.Actor.create("name", the_host, my_actor, 42, 3.14, "thevalue")
+         def my_actor(param1, param2, param3):
+            # your code comes here
+         actor = simgrid.Actor.create("name", the_host, my_actor, 42, 3.14, "thevalue")
 
 
 Master-Workers Communication
@@ -840,7 +840,7 @@ Retrieve a link from its name with :cpp:func:`simgrid::s4u::Link::by_name()` (C+
 
 Retrieve all links in the platform with :cpp:func:`simgrid::s4u::Engine::get_all_links()` (C++) or :py:func:`simgrid.Engine.get_all_links()` (python).
 
-Retrieve the list of links from one host to another with :cpp:func:`simgrid::s4u::Host::route_to` (C++) or :cpp:func:`simgrid.Host.route_to` (python).
+Retrieve the list of links from one host to another with :cpp:func:`simgrid::s4u::Host::route_to` (C++) or :py:func:`simgrid.Host.route_to` (python).
 
 Modify the bandwidth of a given link with :cpp:func:`simgrid::s4u::Link::set_bandwidth` (C++) or :py:func:`simgrid.Link.set_bandwidth` (python).
 You can even have the bandwidth automatically vary over time with :cpp:func:`simgrid::s4u::Link::set_bandwidth_profile` (C++) or :py:func:`simgrid.Link.set_bandwidth_profile` (python). 
index 8cdf561..36c6dd3 100644 (file)
@@ -798,8 +798,8 @@ Exiting
    
       .. autoclass:: simgrid.Engine
 
-Initialization
---------------
+Engin initialization
+--------------------
 
 .. tabs::
 
@@ -808,6 +808,23 @@ Initialization
       .. doxygenfunction:: simgrid::s4u::Engine::Engine(int *argc, char **argv)
       .. doxygenfunction:: simgrid::s4u::Engine::is_initialized()
       .. doxygenfunction:: simgrid::s4u::Engine::shutdown()
+      .. doxygenfunction:: simgrid::s4u::Engine::get_instance()
+
+   .. group-tab:: Python
+
+       .. automethod:: simgrid.Engine.instance
+
+   .. group-tab:: C
+
+      .. doxygenfunction:: simgrid_init
+
+Simulation setup
+----------------
+
+.. tabs::
+
+   .. group-tab:: C++
+
       .. doxygenfunction:: simgrid::s4u::Engine::set_config(const std::string &str)
       .. doxygenfunction:: simgrid::s4u::Engine::set_config(const std::string &name, bool value)
       .. doxygenfunction:: simgrid::s4u::Engine::set_config(const std::string &name, double value)
@@ -833,13 +850,12 @@ Initialization
 
    .. group-tab:: C
 
-      .. doxygenfunction:: simgrid_init
-
       .. doxygenfunction:: simgrid_load_deployment
       .. doxygenfunction:: simgrid_load_platform
       .. doxygenfunction:: simgrid_register_default
       .. doxygenfunction:: simgrid_register_function
 
+
 Run the simulation
 ------------------
 
@@ -921,7 +937,6 @@ Interacting with the routing
 
       .. doxygenfunction:: simgrid::s4u::Engine::get_all_netpoints
       .. doxygenfunction:: simgrid::s4u::Engine::get_filtered_netzones
-      .. doxygenfunction:: simgrid::s4u::Engine::get_instance()
       .. doxygenfunction:: simgrid::s4u::Engine::get_netzone_root
       .. doxygenfunction:: simgrid::s4u::Engine::netpoint_by_name_or_null
       .. doxygenfunction:: simgrid::s4u::Engine::netzone_by_name_or_null