Logo AND Algorithmique Numérique Distribuée

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