Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Improve and unify the doc of <cluster>
[simgrid.git] / docs / source / XML_reference.rst
1 .. raw:: html
2
3    <object id="TOC" data="graphical-toc.svg" type="image/svg+xml"></object>
4    <script>
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";
8    }
9    </script>
10    <br/>
11    <br/>
12
13 .. _platform_reference:
14
15 Complete XML Reference
16 **********************
17
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.
20
21 -------------------------------------------------------------------------------
22
23 .. _pf_tag_cluster:
24
25 <cluster>
26 ---------
27
28 This complex tag builds a full zone, with some hosts, links, a router, and the relevant routing algorithm. There is several
29 kind of specifically tailored cluster types: crossbar clusters (contention-free internal network), backbone clusters
30 (constrained internal network), fat-trees, DragonFly and Torus (star clusters are similar, but can only be created from the
31 C++ code). The ``topology`` attribute is used to choose the type of cluster while the ``topo_parameters`` attribute is used
32 to configure the topology. Please refer to the  :ref:`examples in the documentation <platform_examples>` for all details.
33
34 Regardless of its topology, each cluster comes with a router that can be used for inter-zone routing. Its name is defined
35 as ``${prefix}${clusterId}_router${suffix}``.
36
37 **Parent tags:** :ref:`pf_tag_platform`, :ref:`pf_tag_zone` |br|
38 **Children tags:** none |br|
39 **Attributes:**
40
41 :``id``: The identifier of the cluster. Facilitates referring to this cluster.
42 :``prefix``: Each node of the cluster has to have a name. This name will be prefixed with this prefix.
43 :``suffix``: Each node of the cluster will be suffixed with this suffix
44 :``radical``: Regexp used to generate cluster nodes name.
45
46     Syntax: "10-20" will give you 11 machines numbered from 10 to 20, "10-20;2" will give you 12 machines, one with the number 2, others numbered as before.
47
48     The produced number is concatenated between prefix and suffix to form machine names.
49 :``speed``: Same as the ``speed`` attribute of the :ref:`pf_tag_host` tag.
50 :``core``: Same as the ``core`` attribute of the :ref:`pf_tag_host` tag.
51 :``bw``: Bandwidth for the links between nodes and backbone (if any). See :ref:`pf_tag_link` for syntax/details.
52 :``lat``: Latency for the links between nodes and backbone (if any). See :ref:`pf_tag_link` for syntax/details.
53 :``sharing_policy``: Sharing policy for the links between nodes and backbone (if any). See :ref:`pf_tag_link` for syntax/details.
54 :``bb_bw``: Bandwidth for backbone (if any). See :ref:`pf_tag_link` for syntax/details.
55
56     If bb_bw and bb_lat attributes are omitted, no backbone is created (alternative cluster architecture described earlier).
57 :``bb_lat``: Latency for backbone (if any). See :ref:`pf_tag_link` section for syntax/details.
58
59     If bb_lat and bb_bw attributes are omitted, no backbone is created (alternative cluster architecture described earlier).
60 :``bb_sharing_policy``: Sharing policy for the backbone (if any). See :ref:`pf_tag_link` section for syntax/details.
61 :``limiter_link``: Bandwidth for limiter link (if any).
62
63     This adds a specific link for each node, to set the maximum bandwidth reached when communicating in both directions at the same time.
64
65     In theory this value should be 2*bw for splitduplex links, but in reality this might be less. This value will depend heavily on the communication model, and on the cluster's hardware, so no default value can be set, this has to be measured.
66
67     More details can be obtained in `Toward Better Simulation of MPI Applications on Ethernet/TCP Networks <https://hal.inria.fr/hal-00919507/>`_
68 :``loopback_bw``: Bandwidth for loopback (if any). See :ref:`pf_tag_link` section for syntax/details.
69
70     If loopback_bw and loopback_lat attributes are omitted, no loopback link is created and all intra-node communication will use the main network link of the node.
71
72     The sharing policy of a loopback link is **FATPIPE** :ref:`pf_tag_link`.
73 :``loopback_lat``: Latency for loopback (if any). See loopback_bw for more info.
74 :``topology``: Network topology to use.
75
76     SimGrid currently supports FLAT (with or without backbone, as described before), TORUS, FAT_TREE and DRAGONFLY attributes for this tag.
77
78     See :ref:`platform_examples` for more details.
79
80 :``topo_parameters``: Specific parameters to pass for the topology defined in the topology tag.
81
82     For torus networks, comma-separated list of the number of nodes in each dimension of the torus.
83
84     Please refer to :ref:`platform_examples`.
85
86 -------------------------------------------------------------------------------
87 .. _pf_tag_config:
88
89 <config>
90 --------
91
92 Adding configuration flags directly into the platform file becomes particularly
93 useful when the realism of the described platform depends on some specific
94 flags. For example, this could help you to finely tune SMPI. Almost all
95 :ref:`command-line configuration items <options_list>` can be configured this
96 way.
97
98 Each configuration flag is described as a :ref:`pf_tag_prop` whose ``id`` is the
99 name of the flag and ``value`` is what it has to be set to.
100
101 **Parent tags:** :ref:`pf_tag_platform` (must appear before any other tags) |br|
102 **Children tags:** :ref:`pf_tag_prop` |br|
103 **Attributes:** none
104
105 .. code-block:: xml
106
107    <?xml version = '1.0'?>
108    <!DOCTYPE platform SYSTEM "https://simgrid.org/simgrid.dtd">
109    <platform version = "4.1">
110      <config>
111        <prop id = "maxmin/precision" value = "0.000010" />
112        <prop id = "cpu/optim" value = "TI" />
113        <prop id = "network/model" value = "SMPI" />
114        <prop id = "smpi/bw-factor" value = "65472:0.940694;15424:0.697866;9376:0.58729" />
115      </config>
116
117      <!-- The rest of your platform -->
118    </platform>
119
120 -------------------------------------------------------------------------------
121
122 .. _pf_tag_disk:
123
124 <disk>
125 ------
126
127 SimGrid can simulate the time it takes to read or write data on disk, even if the stored data is not made persistent in
128 any way by SimGrid. This means that your application will correctly be slowed down when doing simulated I/O, but there
129 is no way to get the data stored this way.
130
131 We decided to not model anything beyond raw access in SimGrid because we believe that there is not single way of doing so.
132 We provide an example model of file system as a plugin, (sparsely) documented in :ref:`plugin_filesystem`.
133
134 **Parent tags:** :ref:`pf_tag_host` |br|
135 **Children tags:** :ref:`pf_tag_prop` |br|
136 **Attributes:**
137
138 :``id``: A name of your choice (must be unique on this host).
139 :``read_bw``: Read bandwidth for this disk. You must specify a unit as follows.
140
141    **Units in bytes and powers of 2** (1 KiBps = 1,024 Bps):
142      Bps, KiBps, MiBps, GiBps, TiBps, PiBps, or EiBps. |br|
143    **Units in bits  and powers of 2** (1 Bps = 8 bps):
144      bps, Kibps, Mibps, Gibps, Tibps, Pibps, or Eibps. |br|
145    **Units in bytes and powers of 10**  (1 KBps = 1,000 Bps):
146      Bps, KBps, MBps, GBps, TBps, PBps, or EBps. |br|
147    **Units in bits  and powers of 10:**
148      bps, Kbps, Mbps, Gbps, Tbps, Pbps, or Ebps.
149
150 :``write_bw``: Write bandwidth for this disk. You must specify a unit as for the read bandwidth.
151
152 .. code-block:: xml
153
154     <host id="alice" speed="1Gf">
155       <disk id="Disk1" read_bw="200MBps" write_bw="80MBps">
156         <!-- you can add properties for anything you want: they are not used by SimGrid -->
157         <prop id="content" value="storage/content/small_content.txt"/>
158       </disk>
159       <prop id="ram" value="100B" />
160     </host>
161
162 -------------------------------------------------------------------------------
163
164 .. _pf_tag_host:
165
166 <host>
167 ------
168
169 A host is the computing resource on which an actor can run. See :cpp:class:`simgrid::s4u::Host`.
170
171 **Parent tags:** :ref:`pf_tag_zone` (only leaf zones, i.e., zones containing neither inner zones nor clusters) |br|
172 **Children tags:** :ref:`pf_tag_mount`, :ref:`pf_tag_prop`, :ref:`pf_tag_disk` |br|
173 **Attributes:**
174
175 :``id``: Host name.
176    Must be unique over the whole platform.
177 :``speed``: Computational power (per core, in flop/s).
178    If you use DVFS, provide a comma-separated list of values for each pstate (see :ref:`howto_dvfs`).
179 :``core``: Amount of cores (default: 1).
180    See :ref:`howto_multicore`.
181 :``availability_file``:
182    File containing the availability profile.
183    Almost every lines of such files describe timed events as ``date ratio``.
184    Example:
185
186    .. code-block:: python
187
188       1 0.5
189       2 0.2
190       5 1
191       LOOPAFTER 5
192
193    - At time t = 1, half of the host computational power (0.5 means 50%) is used to process some background load, hence
194      only 50% of this initial power remains available to your own simulation.
195    - At time t = 2, the available power drops at 20% of the initial value.
196    - At time t = 5, the host can compute at full speed again.
197    - At time t = 10, the profile is reset (as we are 5 seconds after the last event). Then the available speed will drop
198      again to 50% at time t = 11.
199
200    If your profile does not contain any LOOPAFTER line, then it will
201    be executed only once and not repeated.
202
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.
205 :``state_file``: File containing the state profile.
206    Almost every lines of such files describe timed events as ``date boolean``.
207    Example:
208
209    .. code-block:: python
210
211       1 0
212       2 1
213       LOOPAFTER 8
214
215    - At time t = 1, the host is turned off (a zero value means OFF)
216    - At time t = 2, the host is turned back on (any other value than zero means ON)
217    - At time t = 10, the profile is reset (as we are 8 seconds after the last event). Then the host will be turned off
218      again at time t = 11.
219
220    If your profile does not contain any LOOPAFTER line, then it will
221    be executed only once and not repeated.
222
223 :``coordinates``: Vivaldi coordinates (meaningful for Vivaldi zones only).
224    See :ref:`pf_tag_peer`.
225 :``pstate``: Initial pstate (default: 0, the first one).
226    See :ref:`howto_dvfs`.
227
228 -------------------------------------------------------------------------------
229
230 .. _pf_tag_link:
231
232 <link>
233 ------
234
235 SimGrid links usually represent one-hop network connections (see :cpp:class:`simgrid::s4u::Link`), i.e., a single wire.
236 They can also be used to abstract a larger network interconnect, e.g., the entire transcontinental network, into a
237 single element. Links are characterized by their bandwidth and latency, and their sharing is realistic wrt TCP connexions.
238 Another unusual point is that SimGrid links can be used to connect more than two elements, just like
239 hyperlinks in an `hypergraph <https://en.wikipedia.org/wiki/Hypergraph>`_.
240
241 **Parent tags:** :ref:`pf_tag_zone` (both leaf zones and inner zones) |br|
242 **Children tags:** :ref:`pf_tag_prop` |br|
243 **Attributes:**
244
245 :``id``:  Link name. Must be unique over the whole platform.
246 :``bandwidth``: Maximum bandwidth for this link. You must specify a unit as follows.
247
248    **Units in bytes and powers of 2** (1 KiBps = 1,024 Bps):
249      Bps, KiBps, MiBps, GiBps, TiBps, PiBps, or EiBps. |br|
250    **Units in bits  and powers of 2** (1 Bps = 8 bps):
251      bps, Kibps, Mibps, Gibps, Tibps, Pibps, or Eibps. |br|
252    **Units in bytes and powers of 10**  (1 KBps = 1,000 Bps):
253      Bps, KBps, MBps, GBps, TBps, PBps, or EBps. |br|
254    **Units in bits  and powers of 10:**
255      bps, Kbps, Mbps, Gbps, Tbps, Pbps, or Ebps.
256
257 :``latency``: Latency for this link (default: 0.0). You must specify a unit as follows.
258
259    ==== =========== ======================
260    Unit Meaning     Duration in seconds
261    ==== =========== ======================
262    ps   picosecond  10⁻¹² = 0.000000000001
263    ns   nanosecond  10⁻⁹ = 0.000000001
264    us   microsecond 10⁻⁶ = 0.000001
265    ms   millisecond 10⁻³ = 0.001
266    s    second      1
267    m    minute      60
268    h    hour        60 * 60
269    d    day         60 * 60 * 24
270    w    week        60 * 60 * 24 * 7
271    ==== =========== ======================
272
273 :``sharing_policy``: Sharing policy for the link. Possible values are ``SHARED``, ``FATPIPE`` or ``SPLITDUPLEX``
274    (default: ``SPLITDUPLEX``).
275
276    If set to ``SPLITDUPLEX``, the link models the full-duplex
277    behavior, as meant in TCP or UDP. To that extend, the link is
278    actually split in two links whose names are suffixed with "_UP" and
279    "_DOWN". You should then specify the direction to use when
280    referring to that link in a :ref:`pf_tag_link_ctn`.
281
282    If set to ``FATPIPE``, flows have no impact on each other, hence
283    each flow can exploit the full bandwidth. This models Internet
284    backbones that cannot get saturated by your application. From your
285    application point of view, there is no congestion on these
286    backbones.
287
288    If set to ``SHARED``, the available bandwidth is fairly shared
289    among ALL flows traversing this link. The resulting link is not
290    full-duplex (as UDP or TCP would be): communications in both
291    directions share the same link. Prefer ``SPLITDUPLEX`` for TCP flows.
292
293 :``bandwidth_file``: File containing the bandwidth profile.
294    Almost every lines of such files describe timed events as ``date
295    bandwidth`` (in bytes per second).
296    Example:
297
298    .. code-block:: python
299
300       4.0 40000000
301       8.0 60000000
302       LOOPAFTER 12.0
303
304    - At time t = 4, the bandwidth is of 40 MBps.
305    - At time t = 8, it raises to 60MBps.
306    - At time t = 24, it drops at 40 MBps again.
307
308    If your profile does not contain any LOOPAFTER line, then it will
309    be executed only once and not repeated.
310
311    .. warning:: Don't get fooled: Bandwidth and Latency profiles of a :ref:`pf_tag_link` contain absolute values, while
312       Availability profiles of a :ref:`pf_tag_host` contain ratios.
313
314 :``latency_file``: File containing the latency profile.
315    Almost every lines of such files describe timed events as ``date
316    latency`` (in seconds).
317    Example:
318
319    .. code-block:: python
320
321       1.0 0.001
322       3.0 0.1
323       LOOPAFTER 5.0
324
325    - At time t = 1, the latency is of 1ms (0.001 second)
326    - At time t = 3, the latency is of 100ms (0.1 second)
327    - At time t = 8 (5 seconds after the last event), the profile loops.
328    - At time t = 9 (1 second after the loop reset), the latency is back at 1ms.
329
330    If your profile does not contain any LOOPAFTER line, then it will
331    be executed only once and not repeated.
332
333   .. warning:: Don't get fooled: Bandwidth and Latency profiles of a :ref:`pf_tag_link` contain absolute values, while
334       Availability profiles of a :ref:`pf_tag_host` contain ratios.
335
336 :``state_file``: File containing the state profile. See :ref:`pf_tag_host`.
337
338 -------------------------------------------------------------------------------
339
340 .. _pf_tag_link_ctn:
341
342 <link_ctn>
343 ----------
344
345 An element in a route, representing a previously defined link.
346
347 **Parent tags:** :ref:`pf_tag_route` |br|
348 **Children tags:** none |br|
349 **Attributes:**
350
351 :``id``: Link that is to be included in this route.
352 :``direction``: either ``UP`` (by default) or ``DOWN``, specifying whether to
353                 use the uplink or downlink component of the link (that must
354                 follow the ``SPLITDUPLEX`` sharing policy). |br|
355                 Please refer to the ``sharing_policy`` attribute in
356                 :ref:`pf_tag_link`.
357
358 -------------------------------------------------------------------------------
359
360 .. _pf_tag_peer:
361
362 <peer>
363 ------
364
365 This tag represents a peer, as in Peer-to-Peer (P2P) networks. It is
366 handy to model situations where hosts have an asymmetric
367 connectivity. Computers connected through set-top-boxes usually have a
368 much better download rate than their upload rate.  To model this,
369 <peer> creates and connects several elements: a host, an upload link
370 and a download link.
371
372 **Parent tags:** :ref:`pf_tag_zone` (only with Vivaldi routing) |br|
373 **Children tags:** none |br|
374 **Attributes:**
375
376 :``id``: Name of the host. Must be unique on the whole platform.
377 :``speed``: Computational power (in flop/s).
378
379    If you use DVFS, provide a comma-separated list of values for each pstate (see :ref:`howto_dvfs`).
380 :``bw_in``: Bandwidth of the private downstream link, along with its
381             unit. See :ref:`pf_tag_link`.
382 :``bw_out``: Bandwidth of the private upstream link, along with its
383              unit. See :ref:`pf_tag_link`.
384 :``lat``: Latency of both private links. See :ref:`pf_tag_link`.
385 :``coordinates``: Coordinates of the gateway for this peer.
386
387    The communication latency between a host A = (xA,yA,zA) and a host B = (xB,yB,zB) is computed as follows:
388
389    latency = sqrt( (xA-xB)² + (yA-yB)² ) + zA + zB
390
391    See the documentation of
392    :cpp:class:`simgrid::kernel::routing::VivaldiZone` for details on
393    how the latency is computed from the coordinates, and on how the up
394    and down bandwidth are used.
395 :``availability_file``: File containing the availability profile.
396    See the full description in :ref:`pf_tag_host`
397 :``state_file``: File containing the state profile.
398    See the full description in :ref:`pf_tag_host`
399
400 -------------------------------------------------------------------------------
401
402 .. _pf_tag_platform:
403
404 <platform>
405 ----------
406
407 **Parent tags:** none (this is the root tag of every file) |br|
408 **Children tags:** :ref:`pf_tag_config` (must come first),
409 :ref:`pf_tag_cluster`, :ref:`pf_tag_cabinet`, :ref:`pf_tag_peer`,
410 :ref:`pf_tag_zone`, :ref:`pf_tag_trace`, :ref:`pf_tag_trace_connect`, or
411 :ref:`pf_tag_actor` in :ref:`deployment <deploy>` files. |br|
412 **Attributes:**
413
414 :``version``: Version of the DTD, describing the whole XML format.
415               This versioning allow future evolutions, even if we
416               avoid backward-incompatible changes. The current version
417               is **4.1**. The ``simgrid_update_xml`` program can
418               upgrade most of the past platform files to the most recent
419               formalism.
420
421 -------------------------------------------------------------------------------
422
423 .. _pf_tag_prop:
424
425 <prop>
426 ------
427
428 This tag can be used to attach user-defined properties to some
429 platform elements. Both the name and the value can be any string of
430 your wish. You can use this to pass extra parameters to your code and
431 the plugins.
432
433 From your code, you can interact with these properties using the
434 following functions:
435
436 - Actor: :cpp:func:`simgrid::s4u::Actor::get_property` or :cpp:func:`MSG_process_get_property_value`
437 - Cluster: this is a zone, see below.
438 - Host: :cpp:func:`simgrid::s4u::Host::get_property` or :cpp:func:`MSG_host_get_property_value`
439 - Link: :cpp:func:`simgrid::s4u::Link::get_property`
440 - Disk: :cpp:func:`simgrid::s4u::Disk::get_property`
441 - Zone: :cpp:func:`simgrid::s4u::NetZone::get_property` of :cpp:func:`MSG_zone_get_property_value`
442
443 **Parent tags:** :ref:`pf_tag_actor`, :ref:`pf_tag_config`, :ref:`pf_tag_cluster`, :ref:`pf_tag_host`,
444 :ref:`pf_tag_link`, :ref:`pf_tag_disk`,:ref:`pf_tag_zone` |br|
445 **Children tags:** none |br|
446 **Attributes:**
447
448 :``id``: Name of the defined property.
449 :``value``: Value of the defined property.
450
451 -------------------------------------------------------------------------------
452
453 .. _pf_tag_route:
454
455 <route>
456 -------
457
458 A path between two network locations, composed of several occurrences of :ref:`pf_tag_link`. It is only relevant for
459 intra-:ref:`pf_tag_zone` routes. Inter-zone routes must be declared with :ref:`pf_tag_zoneRoute`. More detail can be
460 found in the following sections :ref:`pf_routes` and :ref:`pf_route_usage`.
461
462 **Parent tags:** :ref:`pf_tag_zone` |br|
463 **Children tags:** :ref:`pf_tag_link_ctn` |br|
464 **Attributes:**
465
466 :``src``: Host from which this route starts. Must be the name of an existing host.
467 :``dst``: Host to which this route leads. Must be the name of an existing host.
468 :``symmetrical``: Whether this route is symmetrical, ie, whether we
469                   are defining the route ``dst -> src`` at the same
470                   time. Valid values: ``yes``, ``no``, ``YES``, ``NO``
471                   (default: YES).
472
473 -------------------------------------------------------------------------------
474
475 .. _pf_tag_router:
476
477 <router>
478 --------
479
480 A router is similar to a :ref:`pf_tag_host`, but it cannot contain any actor. It is only useful to some routing
481 algorithms. In particular, they are useful when you want to use the NS3 bindings to break the routes that are longer
482 than 1 hop.
483
484 **Parent tags:** :ref:`pf_tag_zone` (only leaf zones, i.e., zones containing neither inner zones nor clusters) |br|
485 **Attributes:**
486
487 :``id``: Router name.
488    No other host or router may have the same name over the whole platform.
489 :``coordinates``: Vivaldi coordinates. See :ref:`pf_tag_peer`.
490
491 -------------------------------------------------------------------------------
492
493 .. _pf_tag_zone:
494
495 <zone>
496 ------
497
498 A networking zone is an area in which elements are located. See :cpp:class:`simgrid::s4u::NetZone`.
499
500 **Parent tags:** :ref:`pf_tag_platform`, :ref:`pf_tag_zone` (only internal nodes, i.e., zones
501 containing only inner zones or clusters but no basic
502 elements such as host or peer) |br|
503 **Children tags (if internal zone):** :ref:`pf_tag_cluster`, :ref:`pf_tag_link`, :ref:`pf_tag_zone` |br|
504 **Children tags (if leaf zone):** :ref:`pf_tag_host`, :ref:`pf_tag_link`, :ref:`pf_tag_peer` |br|
505 **Attributes:**
506
507 :``id``: Zone name.
508    No other zone may have the same name over the whole platform.
509 :``routing``: Routing algorithm to use.
510
511 -------------------------------------------------------------------------------
512
513 .. _pf_tag_zoneRoute:
514
515 <zoneRoute>
516 -----------
517
518 All information to factorize the routes between two zones; intra-zone paths must be declared with :ref:`pf_tag_route`.
519 Since zones form a tree, :ref:`pf_tag_zoneRoute` is probably best used to connect sibling zones.
520
521 When declaring a zoneRoute, you must give the source and destination zones, along with the gateway in each zone (i.e.,
522 the point to reach within that zone to reach the declared route), and the list of links to go from one zone to another.
523 More detail can be found in the following sections :ref:`pf_routes` and :ref:`pf_route_usage`.
524
525 **Parent tags:** :ref:`pf_tag_zone` |br|
526 **Children tags:** :ref:`pf_tag_link_ctn` |br|
527 **Attributes:**
528
529 :``src``: Zone from which this route starts. Must be an existing zone.
530 :``dst``: Zone to which this route leads. Must be an existing zone.
531 :``gw_src``: Netpoint (within src zone) from which this route starts. Must be an existing host/router.
532 :``gw_dst``: Netpoint (within dst zone) to which this route leads. Must be an existing host/router.
533 :``symmetrical``: Whether this route is symmetrical, ie, whether we are defining the route ``dst -> src`` at the same
534                   time. Valid values: ``yes``, ``no``, ``YES``, ``NO``. 
535
536 -------------------------------------------------------------------------------
537
538
539 .. _pf_tag_cabinet:
540
541 <cabinet>
542 ---------
543
544 .. note::
545     This tag is only available when the routing mode of the network zone
546     is set to ``Cluster``.
547
548 The cabinet tag is, like the :ref:`pf_tag_cluster` tag,
549 a meta-tag. This means that it is simply a shortcut for creating a set of (homogenous) hosts and links quickly;
550 unsurprisingly, this tag was introduced to setup cabinets in data centers. Unlike
551 :ref:`pf_tag_cluster`, however, the :ref:`pf_tag_cabinet` assumes that you create the backbone
552 and routers yourself; see our examples below.
553
554 **Parent tags:** :ref:`pf_tag_zone` |br|
555 **Children tags:** none |br|
556 **Attributes:**
557
558 :``id``: The identifier of the cabinet. Facilitates referring to it.
559 :``prefix``: Each node of the cabinet has to have a name. This name will be prefixed with this prefix.
560 :``suffix``: Each node of the cabinet will be suffixed with this suffix.
561 :``radical``: Regexp used to generate cabinet nodes name.
562     Syntax: "10-20" will give you 11 machines numbered from 10 to 20, "10-20;2" will give you 12 machines, one with the number 2, others numbered as before.
563
564     The produced number is concatenated between prefix and suffix to form machine names.
565 :``speed``: Same as the ``speed`` attribute of the :ref:`pf_tag_host` tag.
566 :``bw``: Bandwidth for the links between nodes and backbone (if any). See the :ref:`pf_tag_link` for syntax/details.
567 :``lat``: Latency for the links between nodes and backbone (if any). See the :ref:`pf_tag_link` for syntax/details.
568
569 .. note::
570     Please note that as of now, it is impossible to change attributes such as,
571     amount of cores (always set to 1), the initial state of hosts/links
572     (always set to ON), the sharing policy of the links (always set to **SPLITDUPLEX** :ref:`pf_tag_link` ).
573
574
575 Cabinet example
576 ^^^^^^^^^^^^^^^
577 The following example shows how to use the cabinet tag.
578
579 .. literalinclude:: ../../examples/platforms/meta_cluster.xml
580
581 \note
582    Please note that you must specify the :ref:`pf_backbone` tag by yourself;
583    this is not done automatically and there are no checks
584    that ensure this backbone was defined.
585
586 The hosts generated in the above example are named host-1.cluster, host-2.cluster1
587 etc.
588
589 .. TODO::
590
591    Missing tags: <host_link> <backbone> <bypassRoute> <bypassZoneRoute> <actor><argument>
592
593 .. |br| raw:: html
594      
595    <br />