Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
c738a68ae94944b44a2071d9df8f808d9f284af5
[simgrid.git] / examples / msg / README.doc
1 This file follows the Doxygen syntax to be included in the
2 documentation, but it should remain readable directly.
3
4 /** 
5  @defgroup msg_examples MSG examples
6  @ingroup MSG_API
7  @brief Find the MSG example fitting your needs from the extensive set provided in the archive.
8
9   - @ref msg_ex_basics
10   - @ref msg_ex_process
11   - @ref msg_ex_tracing
12     - @ref msg_ex_tracing_user_variables
13   - @ref msg_ex_models
14     - @ref msg_ex_ns3
15
16 @section msg_ex_basics Basic examples and features
17
18  - <b>Master Workers</b>.
19    @ref examples/msg/app-masterworker/app-masterworker.c\n
20    Another good old example, where one Master process has a bunch of
21    task to dispatch to a set of several Worker processes.
22
23 @section msg_ex_process Acting on Processes
24
25   - <b>Creating processes</b>. 
26     @ref examples/msg/process-create/process-create.c \n
27     Most processes are started from the deployment XML file, but they
28     can also be used with the @ref MSG_process_create() function.
29
30 @section msg_ex_tracing Tracing and visualization features
31
32 Tracing can be activated by various configuration options which
33 are illustrated in these example. See also the 
34 @ref tracing_tracing_options "full list of options related to tracing".
35
36 It is interesting to run the process-create example with the following
37 options to see the task executions:
38
39   - <b>Setting Categories</b>.
40     @ref examples/msg/trace-categories/trace-categories.c \n
41     This example declares several tracing categories
42     to that are used to classify its tasks. When the program is executed,
43     the tracing mechanism registers the resource utilization of hosts
44     and links according to these categories. Recommanded options:
45     @verbatim --cfg=tracing:yes --cfg=tracing/categorized:yes --cfg=tracing/uncategorized:yes
46     @endverbatim
47     
48   - <b>Master Workers tracing</b>.
49     @ref examples/msg/trace-masterworker/trace-masterworker.c \n
50     This is an augmented version of our basic master/worker example
51     using several tracing features. It traces resource usage, sorted
52     out in several categories; Trace marks and user variables are also
53     used. Recommanded options:
54     @verbatim --cfg=tracing/categorized:yes --cfg=tracing/uncategorized:yes
55     @endverbatim
56     
57   - <b>Process migration tracing</b>.
58     @ref examples/msg/trace-process-migration/trace-process-migration.c \n
59     This version is enhanced so that the process migrations can be
60     displayed as arrows in a Gantt-chart visualization. Recommanded
61     options to that extend:
62     @verbatim -cfg=tracing:yes --cfg=tracing/msg/process:yes
63     @endverbatim 
64     
65 TODO: These tracing examples should be integrated in the examples to
66 not duplicate the C files. A full command line to see the result in
67 the right tool (vite/FrameSoc) should be given along with some
68 screenshots.
69
70 @subsection msg_ex_tracing_user_variables Tracing user variables
71
72 You can also attach your own variables to a any resource described in
73 the platform file. The following examples illustrate this feature.
74 They have to be run with the following options:
75 @verbatim --cfg=tracing:yes --cfg=tracing/platform:yes
76 @endverbatim
77
78   - <b>Attaching variables to Hosts</b>.
79     @ref examples/msg/trace-host-user-variables/trace-host-user-variables.c 
80
81   - <b>Attaching variables to Links</b>.
82     @ref examples/msg/trace-link-user-variables/trace-link-user-variables.c \n
83     The tricky part is that you have to know the name of the link you
84     want to enhance with a variable.
85
86   - <b>Attaching variables to network Routes</b>
87     @ref examples/msg/trace-route-user-variables/trace-route-user-variables.c \n
88     It is often easier to update a given variable for all links of a
89     given network path (identified by its source and destination
90     hosts) instead of knowing the name of each specific link.
91
92 @section msg_ex_models Models-related examples
93
94 @subsection msg_ex_ns3 NS3 as a SimGrid Network Model
95
96 This example demonstrates how to use the bindings to the Network
97 Simulator, as explained in @ref pls_ns3. The most
98 interesting is probably not the C files since they are unchanged from
99 the other simulations, but the associated files, such as the platform
100 file to see how to declare a platform to be used with the ns-3 bindings
101 of SimGrid and the tesh file to see how to actually start a simulation
102 in these settings.
103   
104   - @ref examples/msg/network-ns3/network-ns3.c. Simple ping-pong using
105     ns-3 instead of the SimGrid network models.
106
107 TODO: merge the C files
108
109 TODO: show the XML files instead if it's what is interesting. On a "XML example files" page that does not exist yet.
110
111 */
112
113 As a human, you can stop reading at this point. The rest is garbage:
114
115 Every example must be listed in the following, but it's not possible
116 to move this content upper as each @example directive seems to eat
117 everything until the next */ marker (and the content is placed at the
118 top of the example file). 
119
120
121 /**
122 @example examples/msg/app-masterworker/app-masterworker.c
123
124 @example examples/msg/process-create/process-create.c
125
126 @example examples/msg/trace-categories/trace-categories.c
127 @example examples/msg/trace-masterworker/trace-masterworker.c
128 @example examples/msg/trace-process-migration/trace-process-migration.c
129 @example examples/msg/trace-host-user-variables/trace-host-user-variables.c
130 @example examples/msg/trace-link-user-variables/trace-link-user-variables.c
131 @example examples/msg/trace-route-user-variables/trace-route-user-variables.c
132
133 @example examples/msg/network-ns3/network-ns3.c
134
135 */
136