Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
WIP - SMPI tuto - add parts about sampling and memory sharing
[simgrid.git] / docs / source / platform_examples.rst
1 .. raw:: html
2
3    <object id="TOC" data="graphical-toc.svg" width="100%" 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("PlatformBox")
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_examples:
14    
15 Platform Examples
16 =================
17
18 Here is a very simple platform file, containing 3 resources (two hosts
19 and one link), and explicitly giving the route between the hosts.
20
21 .. literalinclude:: ../../examples/platforms/two_hosts.xml
22    :language: xml   
23
24 The root tag must be ``<platform>``, and its ``version`` attribute
25 specifies the used DTD version. When the DTD evolutions introduce
26 backward-incompatible changes, this number gets updated. Use the
27 ``simgrid_update_xml`` utility to upgrade your platform files on need.
28
29
30 Then, every platform element must be located within a given
31 **networking zone** introduced with the :ref:`pf_tag_zone` tag.  Zones
32 are in charge of the routing: an host wants to communicate with
33 another host of the same zone, it is the zone's duty to find the list
34 of links that are involved in the communication. Here, since we use
35 ``routing="Full"``, all routes must be explicitly given using the
36 :ref:`pf_tag_route` and :ref:`pf_tag_linkctn` tags (this :ref:`routing
37 model <pf_rm>` is both simple and inefficient :) It is OK to not
38 specify each and every route between hosts, as long as you don't start
39 at runtime any communications on the missing routes.
40
41 Any zone may contain sub-zones itself, leading to a hierarchical
42 decomposition of the platform. This can be more efficient (as the
43 inter-zone routing gets factorized with :ref:`pf_tag_zoneroute`), and
44 allows to have more than one routing model in your platform. For
45 example, you could have a coordinate-based routing for the WAN parts
46 of your platforms, a full routing within each datacenter, and a highly
47 optimized routing within each cluster of the datacenter.  In this
48 case, determining the route between two given hosts gets @ref
49 routing_basics "somewhat more complex" but SimGrid still computes
50 these routes for you in a time- and space-efficient manner.
51 Here is an illustration of these concepts:
52
53 .. image:: img/zone_hierarchy.png
54
55 The zone "AS2" models the core of a national network interconnecting a
56 small flat cluster (AS4) and a larger hierarchical cluster (AS5), a
57 subset of a LAN (AS6), and a set of peers scattered around the world
58 (AS7).
59
60 .. todo:: Add more examples, such as the cloud example descibed in
61           previous paragraph
62