3 <object id="TOC" data="graphical-toc.svg" 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("ExamplesBox")
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_examples:
18 Simple Example with 3 hosts
19 ---------------------------
21 Imagine you want to describe a little platform with three hosts,
22 interconnected as follows:
24 .. image:: /tuto_smpi/3hosts.png
27 This can be done with the following platform file, that considers the
28 simulated platform as a graph of hosts and network links.
30 .. literalinclude:: /tuto_smpi/3hosts.xml
33 The elements basic elements (with :ref:`pf_tag_host` and
34 :ref:`pf_tag_link`) are described first, and then the routes between
35 any pair of hosts are explicitly given with :ref:`pf_tag_route`.
37 Any host must be given a computational speed in flops while links must
38 be given a latency and a bandwidth. You can write 1Gf for
39 1,000,000,000 flops (full list of units in the reference guide of
40 :ref:`pf_tag_host` and :ref:`pf_tag_link`).
42 Routes defined with :ref:`pf_tag_route` are symmetrical by default,
43 meaning that the list of traversed links from A to B is the same as
44 from B to A. Explicitly define non-symmetrical routes if you prefer.
46 The last thing you must know on SimGrid platform files is that the
47 root tag must be :ref:`pf_tag_platform`. If the ``version`` attribute
48 does not match what SimGrid expects, you will be hinted to use to the
49 ``simgrid_update_xml`` utility to update your file.
51 Cluster with a Crossbar
52 -----------------------
54 A very common parallel computing platform is a homogeneous cluster in
55 which hosts are interconnected via a crossbar switch with as many
56 ports as hosts, so that any disjoint pairs of hosts can communicate
57 concurrently at full speed. For instance:
59 .. literalinclude:: ../../examples/platforms/cluster_crossbar.xml
63 One specifies a name prefix and suffix for each host, and then give an
64 integer range. In the example the cluster contains 65535 hosts (!),
65 named ``node-0.simgrid.org`` to ``node-65534.simgrid.org``. All hosts
66 have the same power (1 Gflop/sec) and are connected to the switch via
67 links with same bandwidth (125 MBytes/sec) and latency (50
74 Cluster with a Shared Backbone
75 ------------------------------
77 Another popular model for a parallel platform is that of a set of
78 homogeneous hosts connected to a shared communication medium, a
79 backbone, with some finite bandwidth capacity and on which
80 communicating host pairs can experience contention. For instance:
83 .. literalinclude:: ../../examples/platforms/cluster_backbone.xml
87 The only differences with the crossbar cluster above are the ``bb_bw``
88 and ``bb_lat`` attributes that specify the backbone characteristics
89 (here, a 500 microseconds latency and a 2.25 GByte/sec
90 bandwidth). This link is used for every communication within the
91 cluster. The route from ``node-0.simgrid.org`` to ``node-1.simgrid.org``
92 counts 3 links: the private link of ``node-0.simgrid.org``, the backbone
93 and the private link of ``node-1.simgrid.org``.
102 Many HPC facilities use torus clusters to reduce sharing and
103 performance loss on concurrent internal communications. Modeling this
104 in SimGrid is very easy. Simply add a ``topology="TORUS"`` attribute
105 to your cluster. Configure it with the ``topo_parameters="X,Y,Z"``
106 attribute, where ``X``, ``Y`` and ``Z`` are the dimension of your
109 .. image:: ../../examples/platforms/cluster_torus.svg
112 .. literalinclude:: ../../examples/platforms/cluster_torus.xml
115 Note that in this example, we used ``loopback_bw`` and
116 ``loopback_lat`` to specify the characteristics of the loopback link
117 of each node (i.e., the link allowing each node to communicate with
118 itself). We could have done so in previous example too. When no
119 loopback is given, the communication from a node to itself is handled
120 as if it were two distinct nodes: it goes twice through the private
121 link and through the backbone (if any).
126 This topology was introduced to reduce the amount of links in the
127 cluster (and thus reduce its price) while maintaining a high bisection
128 bandwidth and a relatively low diameter. To model this in SimGrid,
129 pass a ``topology="FAT_TREE"`` attribute to your cluster. The
130 ``topo_parameters=#levels;#downlinks;#uplinks;link count`` follows the
131 semantic introduced in the `Figure 1B of this article
132 <http://webee.eedev.technion.ac.il/wp-content/uploads/2014/08/publication_574.pdf>`_.
134 Here is the meaning of this example: ``2 ; 4,4 ; 1,2 ; 1,2``
136 - That's a two-level cluster (thus the initial ``2``).
137 - Routers are connected to 4 elements below them, regardless of its
138 level. Thus the ``4,4`` component that is used as
139 ``#downlinks``. This means that the hosts are grouped by 4 on a
140 given router, and that there is 4 level-1 routers (in the middle of
142 - Hosts are connected to only 1 router above them, while these routers
143 are connected to 2 routers above them (thus the ``1,2`` used as
145 - Hosts have only one link to their router while every path between a
146 level-1 routers and level-2 routers use 2 parallel links. Thus the
147 ``1,2`` that is used as ``link count``.
149 .. image:: ../../examples/platforms/cluster_fat_tree.svg
152 .. literalinclude:: ../../examples/platforms/cluster_fat_tree.xml
160 This topology was introduced to further reduce the amount of links
161 while maintaining a high bandwidth for local communications. To model
162 this in SimGrid, pass a ``topology="DRAGONFLY"`` attribute to your
163 cluster. It's based on the implementation of the topology used on
164 Cray XC systems, described in paper
165 `Cray Cascade: A scalable HPC system based on a Dragonfly network <https://dl.acm.org/citation.cfm?id=2389136>`_.
167 System description follows the format ``topo_parameters=#groups;#chassis;#routers;#nodes``
168 For example, ``3,4 ; 3,2 ; 3,1 ; 2``:
170 - ``3,4``: There are 3 groups with 4 links between each (blue level).
171 Links to nth group are attached to the nth router of the group
172 on our implementation.
173 - ``3,2``: In each group, there are 3 chassis with 2 links between each nth router
174 of each group (black level)
175 - ``3,1``: In each chassis, 3 routers are connected together with a single link
177 - ``2``: Each router has two nodes attached (single link)
179 .. image:: ../../examples/platforms/cluster_dragonfly.svg
182 .. literalinclude:: ../../examples/platforms/cluster_dragonfly.xml
186 .. todo:: Complete this page of the manual.
188 SimGrid comes with an extensive set of platforms in the
189 `examples/platforms <https://framagit.org/simgrid/simgrid/tree/master/examples/platforms>`_
190 directory that should be described here.