Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
kill msg_mailbox_t entierely
[simgrid.git] / doc / doxygen / deployment.doc
1 /*! @page deployment Deploy the simulation
2
3 When you want to simulate the behavior of your code with SimGrid, you need
4 to tell SimGrid exactly what code (that you wrote) is supposed to be run by which host - so you need to assign
5 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.
6
7 This assignment of the form @c code -> @c host is what the deployment file is all about, which will
8 be discussed briefly here.
9
10 @note 
11     You can bypass the deployment file by hardcoding it in your user code, at least when you're using
12     MSG.
13
14 The deployment file looks just like a @ref platform "platform" file, except that in
15 this case, only two different tags are used: @c process and @c argument, whereas
16 the latter is just used to supply additional configuration options to the process; the
17 order in which the @c argument tags are given is important and depends on the application.
18
19 ### The process tag ###
20
21 #### Attribute list ####
22
23 %As already written above, the @c process tag is the tag that defines which host
24 executes which function (from your application). Hence, the @c host and @c function
25 attributes are mandatory; however, there are some optional attributes to the process tag. Here is a list of all attributes of this tag:
26
27 | Attribute name  | Mandatory | Values                 | Description                                                                                                               |
28 | --------------- | --------- | ---------------------- | -----------                                                                                                               |
29 | host            | yes       | String                 | Describes which host will be used to run this process. The host must be defined in the platform file!                     |
30 | 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() |
31 | start_time      | no        | int (Default: -1.0)    | The simulated time when this function will start to be computed.                                                          |
32 | 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.                  |
33 | on_failure      | no        | DIE\|RESTART (Default: "DIE")   | What should be done when the process fails.                  |
34
35 #### Examples ####
36
37 Almost any @ref MSG_examples include a deployment file.
38
39 ### The argument tag ###
40
41 This tag must always be contained by a @c process tag - it doesn't make sense
42 without it.
43
44 The way this works is that the order of arguments must be pre-defined <i>by the user</i>:
45 It is totally up to you what <i>your</i> code expects as arguments and in which
46 order. The arguments will be passed to your code (that is: to the function 
47 executed by this process) in the order you declare them.
48
49 #### Attribute list ####
50
51 | Attribute name  | Mandatory | Values                 | Description                                                                                                               |
52 | --------------- | --------- | ---------------------- | -----------                                                                                                               |
53 | value           | yes       | String                 | Contains the value for this parameter |
54
55 */