.. _deploy: Deploying your Application ========================== .. raw:: html

There is several ways to deploy the :ref:`application ` you want to study on your :ref:`simulated platform `, i.e. to specify which actor should be started on which host. You can do so directly in your program (as shown in :ref:`these examples `), or using an XML deployment file. Unless you have a good reason, you should keep your application appart from the deployment as it will :ref:`ease your experimental campain afterward `. Deploying actors from XML is easy: it only involves 3 tags: :ref:`pf_tag_actor`, :ref:`pf_tag_argument`, and :ref:`pf_tag_prop`. They must be placed in an encompassing :ref:`pf_tag_platform`. Here is a first example (search in the archive for files named ``???_d.xml`` for more): .. code-block:: xml ------------------------------------------------------------------------------- .. _pf_tag_actor: -------- This tag starts a new actor executing the given function on a given host. **Parent tags:** :ref:`pf_tag_platform` (only in deployment files) |br| **Children tags:** :ref:`pf_tag_argument`, :ref:`pf_tag_prop` |br| **Attributes:** :``host``: Host on which this actor should be started (mandatory). :``function``: Code to execute. That function must be registered beforehand with :cpp:func:`simgrid::s4u::Engine::register_actor` or with :cpp:func:`simgrid::s4u::Engine::register_function`. If you are stuck with MSG, use :cpp:func:`MSG_process_create`, :cpp:func:`MSG_process_create_with_arguments` or :cpp:func:`MSG_process_create_with_environment`. There is nothing to do in Java, as SimGrid uses introspection abilities to retrieve the classes from their names. You must then use the full class name (including the package name) in your XML file. :``start_time``: Useful to delay the start of your actor. -1 starts the actor immediately. :``kill_time``: Time at which the actor should be killed. -1 means that the actor should not be killed automatically. :``on_failure``: What to do when the actor's host is turned off and back on. Either ``DIE`` (default -- don't restart the actor) or ``RESTART`` ------------------------------------------------------------------------------- .. _pf_tag_argument: ---------- Add a parameter to the actor, to its args vector. Naturally, the semantic of these parameters completely depend on your program. **Parent tags:** :ref:`pf_tag_actor` |br| **Children tags:** none |br| **Attributes:** :``value``: The string to add to the actor's args vector. .. |br| raw:: html