X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/e94c2a7fc81a82998524aa55db075be69990d4ea..8b2a80193ee04c5e996177003ba9ae27ced223a7:/docs/source/tuto_s4u.rst diff --git a/docs/source/tuto_s4u.rst b/docs/source/tuto_s4u.rst index 70818edab9..df2feec376 100644 --- a/docs/source/tuto_s4u.rst +++ b/docs/source/tuto_s4u.rst @@ -19,7 +19,7 @@ completion of these activities. Each actor executes a user-provided function on a simulated |Host|_ with which it can interact. Communications are not directly sent to actors, but posted onto a |Mailbox|_ that serve as rendez-vous point -between communicating processes. +between communicating actors. .. |Actors| replace:: **Actors** .. _Actors: api/classsimgrid_1_1s4u_1_1Actor.html @@ -143,7 +143,7 @@ That being said, an algorithm alone is not enough to define a simulation: SimGrid is a library, not a program. So you need to define your own ``main()`` function as follows. This function is in charge of creating a SimGrid simulation engine (on line 3), register the actor -functions to the engine (on lines 7 and 8), load the virtual platform +functions to the engine (on lines 7 and 8), load the simulated platform from its description file (on line 11), map actors onto that platform (on line 12) and run the simulation until its completion on line 15. @@ -159,7 +159,7 @@ file. Platform File ............. -Platform files define the virtual platform on which the provided +Platform files define the simulated platform on which the provided application will take place. In contains one or several **Network Zone** |api_s4u_NetZone|_ that contain both |Host|_ and |Link|_ Resources, as well as routing information. @@ -301,18 +301,18 @@ image. Once you `installed Docker itself .. code-block:: shell docker pull simgrid/tuto-s4u - docker run -it --rm --name simgrid --volume ~/simgrid-tutorial:/src/tutorial simgrid/tuto-s4u bash + docker run -it --rm --name simgrid --volume ~/simgrid-tutorial:/source/tutorial simgrid/tuto-s4u bash This will start a new container with all you need to take this tutorial, and create a ``simgrid-tutorial`` directory in your home on -your host machine that will be visible as ``/src/tutorial`` within the +your host machine that will be visible as ``/source/tutorial`` within the container. You can then edit the files you want with your favorite editor in ``~/simgrid-tutorial``, and compile them within the container to enjoy the provided dependencies. .. warning:: - Any change to the container out of ``/src/tutorial`` will be lost + Any change to the container out of ``/source/tutorial`` will be lost when you log out of the container, so don't edit the other files! All needed dependencies are already installed in this container @@ -320,14 +320,14 @@ All needed dependencies are already installed in this container optional in this tutorial, it is not installed to reduce the image size. -The code template is available under ``/src/simgrid-template-s4u`` in +The code template is available under ``/source/simgrid-template-s4u`` in the image. You should copy it to your working directory when you first log in: .. code-block:: shell - cp -r /src/simgrid-template-s4u/* /src/tutorial - cd /src/tutorial + cp -r /source/simgrid-template-s4u/* /source/tutorial + cd /source/tutorial Using your Computer Natively ............................ @@ -366,7 +366,6 @@ Discovering the Provided Code Please compile and execute the provided simulator as follows: - .. code-block:: shell make master-workers @@ -492,7 +491,7 @@ Creating the workers from the master For that, the master needs to retrieve the list of hosts declared in the platform with :cpp:func:`simgrid::s4u::Engine::get_all_hosts`. -Then, the master should start the worker processes with +Then, the master should start the worker actors with :cpp:func:`simgrid::s4u::Actor::create`. ``Actor::create(name, host, func, params...)`` is a very flexible