3 <object id="TOC" data="graphical-toc.svg" width="100%" type="image/svg+xml"></object>
5 window.onload=function() { // Wait for the SVG to be loaded before changing it
6 var elem=document.querySelector("#TOC").contentDocument.getElementById("ReferenceBox")
7 elem.style="opacity:0.93999999;fill:#ff0000;fill-opacity:0.1;stroke:#000000;stroke-width:0.35277778;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1";
13 .. _platform_reference:
15 Complete XML Reference
16 **********************
18 Your platform description should follow the specification presented in the
19 `simgrid.dtd <https://simgrid.org/simgrid.dtd>`_ DTD file. The same DTD is used for both platform and deployment files.
21 -------------------------------------------------------------------------------
28 Adding configuration flags directly into the platform file becomes particularly
29 useful when the realism of the described platform depends on some specific
30 flags. For example, this could help you to finely tune SMPI. Almost all
31 :ref:`command-line configuration items <options_list>` can be configured this
34 Each configuration flag is described as a :ref:`pf_tag_prop` whose ``id`` is the
35 name of the flag and ``value`` is what it has to be set to.
37 **Parent tags:** :ref:`pf_tag_platform` (must appear before any other tags) |br|
38 **Children tags:** :ref:`pf_tag_prop` |br|
43 <?xml version = '1.0'?>
44 <!DOCTYPE platform SYSTEM "https://simgrid.org/simgrid.dtd">
45 <platform version = "4.1">
47 <prop id = "maxmin/precision" value = "0.000010" />
48 <prop id = "cpu/optim" value = "TI" />
49 <prop id = "network/model" value = "SMPI" />
50 <prop id = "smpi/bw-factor" value = "65472:0.940694;15424:0.697866;9376:0.58729" />
53 <!-- The rest of your platform -->
56 -------------------------------------------------------------------------------
63 A host is the computing resource on which an actor can run. See :cpp:class:`simgrid::s4u::Host`.
65 **Parent tags:** :ref:`pf_tag_zone` (only leaf zones, i.e., zones containing neither inner zones nor clusters) |br|
66 **Children tags:** :ref:`pf_tag_mount`, :ref:`pf_tag_prop`, :ref:`pf_tag_storage` |br|
70 Must be unique over the whole platform.
71 :``speed``: Computational power (per core, in flop/s).
72 If you use DVFS, provide a comma-separated list of values for each pstate (see :ref:`howto_dvfs`).
73 :``core``: Amount of cores (default: 1).
74 See :ref:`howto_multicore`.
75 :``availability_file``:
76 File containing the availability profile.
77 Almost every lines of such files describe timed events as ``date ratio``.
80 .. code-block:: python
87 - At time t = 1, half of the host computational power (0.5 means 50%) is used to process some background load, hence
88 only 50% of this initial power remains available to your own simulation.
89 - At time t = 2, the available power drops at 20% of the initial value.
90 - At time t = 5, the host can compute at full speed again.
91 - At time t = 10, the profile is reset (as we are 5 seconds after the last event). Then the available speed will drop
92 again to 50% at time t = 11.
94 If your profile does not contain any LOOPAFTER line, then it will
95 be executed only once and not repeated.
97 .. warning:: Don't get fooled: Bandwidth and Latency profiles of a :ref:`pf_tag_link` contain absolute values, while
98 Availability profiles of a :ref:`pf_tag_host` contain ratios.
99 :``state_file``: File containing the state profile.
100 Almost every lines of such files describe timed events as ``date boolean``.
103 .. code-block:: python
109 - At time t = 1, the host is turned off (a zero value means OFF)
110 - At time t = 2, the host is turned back on (any other value than zero means ON)
111 - At time t = 10, the profile is reset (as we are 8 seconds after the last event). Then the host will be turned off
112 again at time t = 11.
114 If your profile does not contain any LOOPAFTER line, then it will
115 be executed only once and not repeated.
117 :``coordinates``: Vivaldi coordinates (meaningful for Vivaldi zones only).
118 See :ref:`pf_tag_peer`.
119 :``pstate``: Initial pstate (default: 0, the first one).
120 See :ref:`howto_dvfs`.
122 -------------------------------------------------------------------------------
129 SimGrid links usually represent one-hop network connections (see :cpp:class:`simgrid::s4u::Link`), i.e., a single wire.
130 They can also be used to abstract a larger network interconnect, e.g., the entire transcontinental network, into a
133 **Parent tags:** :ref:`pf_tag_zone` (both leaf zones and inner zones) |br|
134 **Children tags:** :ref:`pf_tag_prop` |br|
137 :``id``: Link name. Must be unique over the whole platform.
138 :``bandwidth``: Maximum bandwidth for this link. You must specify a unit as follows.
140 **Units in bytes and powers of 2** (1 KiBps = 1,024 Bps):
141 Bps, KiBps, MiBps, GiBps, TiBps, PiBps, or EiBps. |br|
142 **Units in bits and powers of 2** (1 Bps = 8 bps):
143 bps, Kibps, Mibps, Gibps, Tibps, Pibps, or Eibps. |br|
144 **Units in bytes and powers of 10** (1 KBps = 1,000 Bps):
145 Bps, KBps, MBps, GBps, TBps, PBps, or EBps. |br|
146 **Units in bits and powers of 10:**
147 bps, Kbps, Mbps, Gbps, Tbps, Pbps, or Ebps.
149 :``latency``: Latency for this link (default: 0.0). You must specify a unit as follows.
151 ==== =========== ======================
152 Unit Meaning Duration in seconds
153 ==== =========== ======================
154 ps picosecond 10⁻¹² = 0.000000000001
155 ns nanosecond 10⁻⁹ = 0.000000001
156 us microsecond 10⁻⁶ = 0.000001
157 ms millisecond 10⁻³ = 0.001
162 w week 60 * 60 * 24 * 7
163 ==== =========== ======================
165 :``sharing_policy``: Sharing policy for the link. Possible values are ``SHARED``, ``FATPIPE`` or ``SPLITDUPLEX``
166 (default: ``SPLITDUPLEX``).
168 If set to ``SPLITDUPLEX``, the link models the full-duplex
169 behavior, as meant in TCP or UDP. To that extend, the link is
170 actually split in two links whose names are suffixed with "_UP" and
171 "_DOWN". You should then specify the direction to use when
172 referring to that link in a :ref:`pf_tag_link_ctn`.
174 If set to ``FATPIPE``, flows have no impact on each other, hence
175 each flow can exploit the full bandwidth. This models Internet
176 backbones that cannot get saturated by your application. From your
177 application point of view, there is no congestion on these
180 If set to ``SHARED``, the available bandwidth is fairly shared
181 among ALL flows traversing this link. The resulting link is not
182 full-duplex (as UDP or TCP would be): communications in both
183 directions share the same link. Prefer ``SPLITDUPLEX`` for TCP flows.
185 :``bandwidth_file``: File containing the bandwidth profile.
186 Almost every lines of such files describe timed events as ``date
187 bandwidth`` (in bytes per second).
190 .. code-block:: python
196 - At time t = 4, the bandwidth is of 40 MBps.
197 - At time t = 8, it raises to 60MBps.
198 - At time t = 24, it drops at 40 MBps again.
200 If your profile does not contain any LOOPAFTER line, then it will
201 be executed only once and not repeated.
203 .. warning:: Don't get fooled: Bandwidth and Latency profiles of a :ref:`pf_tag_link` contain absolute values, while
204 Availability profiles of a :ref:`pf_tag_host` contain ratios.
206 :``latency_file``: File containing the latency profile.
207 Almost every lines of such files describe timed events as ``date
208 latency`` (in seconds).
211 .. code-block:: python
217 - At time t = 1, the latency is of 1ms (0.001 second)
218 - At time t = 3, the latency is of 100ms (0.1 second)
219 - At time t = 8 (5 seconds after the last event), the profile loops.
220 - At time t = 9 (1 second after the loop reset), the latency is back at 1ms.
222 If your profile does not contain any LOOPAFTER line, then it will
223 be executed only once and not repeated.
225 .. warning:: Don't get fooled: Bandwidth and Latency profiles of a :ref:`pf_tag_link` contain absolute values, while
226 Availability profiles of a :ref:`pf_tag_host` contain ratios.
228 :``state_file``: File containing the state profile. See :ref:`pf_tag_host`.
230 -------------------------------------------------------------------------------
237 An element in a route, representing a previously defined link.
239 **Parent tags:** :ref:`pf_tag_route` |br|
240 **Children tags:** none |br|
243 :``id``: Link that is to be included in this route.
244 :``direction``: either ``UP`` (by default) or ``DOWN``, specifying whether to
245 use the uplink or downlink component of the link (that must
246 follow the ``SPLITDUPLEX`` sharing policy). |br|
247 Please refer to the ``sharing_policy`` attribute in
250 -------------------------------------------------------------------------------
257 This tag represents a peer, as in Peer-to-Peer (P2P) networks. It is
258 handy to model situations where hosts have an asymmetric
259 connectivity. Computers connected through set-top-boxes usually have a
260 much better download rate than their upload rate. To model this,
261 <peer> creates and connects several elements: an host, an upload link
264 **Parent tags:** :ref:`pf_tag_zone` (only with Vivaldi routing) |br|
265 **Children tags:** none |br|
268 :``id``: Name of the host. Must be unique on the whole platform.
269 :``speed``: Computational power (in flop/s).
271 If you use DVFS, provide a comma-separated list of values for each pstate (see :ref:`howto_dvfs`).
272 :``bw_in``: Bandwidth of the private downstream link, along with its
273 unit. See :ref:`pf_tag_link`.
274 :``bw_out``: Bandwidth of the private upstream link, along with its
275 unit. See :ref:`pf_tag_link`.
276 :``lat``: Latency of both private links. See :ref:`pf_tag_link`.
277 :``coordinates``: Coordinates of the gateway for this peer.
279 The communication latency between a host A = (xA,yA,zA) and a host B = (xB,yB,zB) is computed as follows:
281 latency = sqrt( (xA-xB)² + (yA-yB)² ) + zA + zB
283 See the documentation of
284 :cpp:class:`simgrid::kernel::routing::VivaldiZone` for details on
285 how the latency is computed from the coordinates, and on how the up
286 and down bandwidth are used.
287 :``availability_file``: File containing the availability profile.
288 See the full description in :ref:`pf_tag_host`
289 :``state_file``: File containing the state profile.
290 See the full description in :ref:`pf_tag_host`
292 -------------------------------------------------------------------------------
299 **Parent tags:** none (this is the root tag of every file) |br|
300 **Children tags:** :ref:`pf_tag_config` (must come first),
301 :ref:`pf_tag_cluster`, :ref:`pf_tag_cabinet`, :ref:`pf_tag_peer`,
302 :ref:`pf_tag_zone`, :ref:`pf_tag_trace`, :ref:`pf_tag_trace_connect`, or
303 :ref:`pf_tag_actor` in :ref:`deployment <deploy>` files.|br|
306 :``version``: Version of the DTD, describing the whole XML format.
307 This versionning allow future evolutions, even if we
308 avoid backward-incompatible changes. The current version
309 is **4.1**. The ``simgrid_update_xml`` program can
310 upgrade most of the past platform files to the most recent
313 -------------------------------------------------------------------------------
320 This tag can be used to attach user-defined properties to some
321 platform elements. Both the name and the value can be any string of
322 your wish. You can use this to pass extra parameters to your code and
325 From your code, you can interact with these properties using the
328 - Actor: :cpp:func:`simgrid::s4u::Actor::get_property` or :cpp:func:`MSG_process_get_property_value`
329 - Cluster: this is a zone, see below.
330 - Host: :cpp:func:`simgrid::s4u::Host::get_property` or :cpp:func:`MSG_host_get_property_value`
331 - Link: :cpp:func:`simgrid::s4u::Link::get_property`
332 - Storage: :cpp:func:`simgrid::s4u::Storage::get_property` or :cpp:func:`MSG_storage_get_property_value`
333 - Zone: :cpp:func:`simgrid::s4u::Zone::get_property` of :cpp:func:`MSG_zone_get_property_value`
335 **Parent tags:** :ref:`pf_tag_actor`, :ref:`pf_tag_config`, :ref:`pf_tag_cluster`, :ref:`pf_tag_host`,
336 :ref:`pf_tag_link`, :ref:`pf_tag_storage`, :ref:`pf_tag_zone` |br|
337 **Children tags:** none |br|
340 :``id``: Name of the defined property.
341 :``value``: Value of the defined property.
343 -------------------------------------------------------------------------------
350 A path between two network locations, composed of several occurences
351 of :ref:`pf_tag_link` .
353 **Parent tags:** :ref:`pf_tag_zone` |br|
354 **Children tags:** :ref:`pf_tag_link_ctn` |br|
357 :``src``: Host from which this route starts. Must be an existing host.
358 :``dst``: Host to which this route leads. Must be an existing host.
359 :``symmetrical``: Whether this route is symmetrical, ie, whether we
360 are defining the route ``dst -> src`` at the same
361 time. Valid values: ``yes``, ``no``,``YES``, ``NO``.
363 -------------------------------------------------------------------------------
368 ------------------------------------------------------------------
370 A router is similar to a :ref:`pf_tag_host`, but it cannot contain
371 any actor. It is only useful to some routing algorithms. In
372 particular, they are useful when you want to use the NS3 bindings to
373 break the routes that are longer than 1 hop.
375 **Parent tags:** :ref:`pf_tag_zone` (only leaf zones, i.e., zones containing neither inner zones nor clusters) |br|
376 **Children tags:** :ref:`pf_tag_prop`, :ref:`pf_tag_storage` |br|
379 :``id``: Router name.
380 No other host or router may have the same name over the whole platform.
381 :``coordinates``: Vivaldi coordinates. See :ref:`pf_tag_peer`.
383 -------------------------------------------------------------------------------
390 A networking zone is an area in which elements are located. See :cpp:class:`simgrid::s4u::Zone`.
392 **Parent tags:** :ref:`pf_tag_platform`, :ref:`pf_tag_zone` (only internal nodes, i.e., zones
393 containing only inner zones or clusters but no basic
394 elements such as host or peer) |br|
395 **Children tags (if internal zone):** :ref:`pf_tag_cluster`, :ref:`pf_tag_link`, :ref:`pf_tag_zone` |br|
396 **Children tags (if leaf zone):** :ref:`pf_tag_host`, :ref:`pf_tag_link`, :ref:`pf_tag_peer` |br|
400 No other zone may have the same name over the whole platform.
401 :``routing``: Routing algorithm to use.