Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Merge selected changes from branch 'simgrid-Jesse-McDonald-master-patch-09242'
[simgrid.git] / docs / source / Platform.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("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:
14
15 Describing your Simulated Platform
16 ##################################
17
18 In SimGrid, platforms are usually described in XML. This formalism has
19 some drawbacks, but using a specific format ensures that the platform
20 is not mixed with the tested application. This separation of concern
21 :ref:`is a must <howto_science>` for your Modeling and Simulation (M&S)
22 work. When XML is too limiting, you may describe your platforms using
23 directly :ref:`C++ code <platform_cpp>`.
24
25 Any simulated platform must contain **basic elements**, such as
26 :ref:`pf_tag_host`, :ref:`pf_tag_link`, :ref:`pf_tag_disk`, and similar.
27 SimGrid makes no assumption about the **routing of your platform**, so you must declare
28 explicitly the network path taken between each pair of hosts.
29 This can be done through a flat list of :ref:`pf_tag_route` for each pair of hosts (routes
30 are symmetrical by default), or you may use the advanced concept of :ref:`networking zone <platform_routing>`
31 to efficiently express the routing of your platform.
32 Finally, you may also describe an **experimental scenario**, with qualitative (e.g., bandwidth variations representing
33 an external load) and qualitative (e.g., representing how some elements fail and restart over time) changes.
34
35 Here is a minimalistic platform example, describing a zone in which routing is fully described, containing two hosts and a
36 link. You need to explicitly add a :ref:`pf_tag_route` between ``host0`` and ``host1`` for this link to get used during
37 communications.
38
39 .. code-block:: xml
40
41   <zone id="AS5-4" routing="Full">
42     <host id="host0" speed="1Gf"/>
43     <host id="host1" speed="2Gf"/>
44     <link id="link0" bandwidth="125MBps" latency="100us"/>
45     <route src="host0" dst="host1"><link_ctn id="link0"/></route>
46   </zone>
47
48 SimGrid only performs minimalistic verifications about the described platforms, to make things flexible and interesting.
49 It enables weird topologies, such as a single link used for all communications in a large platform, or a link used by
50 hosts from different zones, or even worse. It is also OK to not describe some routing paths. SimGrid won't complain
51 unless your application tries to actually use inexistant paths. In short, it is your responsibility to write proper
52 platform files, and SimGrid will not try to be smarter than you!
53
54 To learn further about platform descriptions, the easiest is to look at the
55 :ref:`many examples <platform_examples>` included in the archive and described
56 in the next section. This documentation also contains some :ref:`hints and
57 howtos <howto>`, as well as the full :ref:`XML reference guide
58 <platform_reference>`.
59
60 ..  LocalWords:  SimGrid