Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Merge branch 'master' of scm.gforge.inria.fr:/gitroot/simgrid/simgrid
[simgrid.git] / doc / doxygen / deployment.doc
1 /*! @page deployment Deploy the simulation
2
3 @section dep_over Overview
4
5 When you want to simulate the behavior of your code with SimGrid, you need
6 to tell SimGrid exactly what code (that you wrote) is supposed to be run by which host - so you need to assign
7 processes/functions to hosts. The hosts in question here are the hosts of your platform model; see Section @ref platform for details on how to set one up.
8
9 This assignment of the form @c code -> @c host is what the deployment file is all about, which will
10 be discussed briefly here.
11
12 @note 
13     You can bypass the deployment file by hardcoding it in your user code, at least when you're using
14     MSG.
15
16 The deployment file looks just like a @ref platform "platform" file, except that in
17 this case, only two different tags are used: @c process and @c argument, whereas
18 the latter is just used to supply additional configuration options to the process; the
19 order in which the @c argument tags are given is important and depends on the application.
20
21 ### The process tag ###
22
23 #### Attribute list ####
24
25 %As already written above, the @c process tag is the tag that defines which host
26 executes which function (from your application). Hence, the @c host and @c function
27 attributes are mandatory; however, there are some optional attributes to the process tag. Here is a list of all attributes of this tag:
28
29 | Attribute name  | Mandatory | Values                 | Description                                                                                                               |
30 | --------------- | --------- | ---------------------- | -----------                                                                                                               |
31 | host            | yes       | String                 | Describes which host will be used to run this process. The host must be defined in the platform file!                     |
32 | function        | yes       | String                 | Name of a function that will be executed on this host; this function is written in userland code, for instance, C code. Valid values are functions that were registered by MSG_function_register() |
33 | start_time      | no        | int (Default: -1.0)    | The simulated time when this function will start to be computed.                                                          |
34 | kill_time       | no        | int (Default: -1.0)    | The simulated time when this function will end to be computed. By default, it stops only when it's done.                  |
35 | on_failure      | no        | DIE\|RESTART (Default: "DIE")   | What should be done when the process fails.                  |
36
37 #### An example ####
38
39 A complete example including a @ref MSG_ext_ms_application "deployment file" can be found 
40 in the Section @ref msg_ex_basics "MSG basics".
41
42 See also files such as @c examples/msg/masterslave/deployment_masterslave.xml.
43
44 ### The argument tag ###
45
46 This tag must always be contained by a @c process tag - it doesn't make sense
47 without it.
48
49 The way this works is that the order of arguments must be pre-defined <i>by the user</i>:
50 It is totally up to you what <i>your</i> code expects as arguments and in which
51 order. The arguments will be passed to your code (that is: to the function 
52 executed by this process) in the order you declare them.
53
54 #### Attribute list ####
55
56 | Attribute name  | Mandatory | Values                 | Description                                                                                                               |
57 | --------------- | --------- | ---------------------- | -----------                                                                                                               |
58 | value           | yes       | String                 | Contains the value for this parameter |
59
60 #### An example ####
61
62 A complete example including a @ref MSG_ext_ms_application "deployment file" can be found 
63 in the Section @ref msg_ex_basics "MSG basics".
64
65 See also files such as @c examples/msg/masterslave/deployment_masterslave.xml.
66
67 */