Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
cut some content of the old doc that was converted
[simgrid.git] / doc / doxygen / platform.doc
index 5b0cc66..db0a969 100644 (file)
 /*! @page platform Describing the virtual platform
 
-@tableofcontents
-
-@htmlonly
-<div align="center">
-@endhtmlonly
-@htmlinclude graphical-toc.svg
-@htmlonly
-</div>
-<script>
-document.getElementById("VirtualPlatform").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";
-</script>
-@endhtmlonly
-
-As @ref starting_components "explained in the introduction," any
-SimGrid study must entail the description of the platform on which you
-want to simulate your application. You have to describe **each element
-of your platform**, such as computing hosts, clusters, each disks,
-links, etc. You must also define the **routing on your platform**, ie
-which path is taken between two hosts. Finally, you may also describe
-an **experimental scenario**, with qualitative changes (e.g.,
-bandwidth changes representing an external load) and qualitative
-changes (representing how some elements fail and restart over time).
-
-You should really separate your application from the platform
-description, as it will ease your experimental campain afterward.
-Mixing them is seen as a really bad experimental practice. The easiest
-to enforce this split is to put the platform description in a XML
-file. Many example platforms are provided in the archive, and this
-page gives all needed details to write such files, as well as some
-hints and tricks about describing your platform.
-
-On the other side, XML is sometimes not expressive enough for some
-platforms, in particular large platforms exhibiting repetitive
-patterns that are not simply expressed in XML.  In practice, many
-users end up generating their XML platform files from some sort of
-scripts. It is probably preferable to rewrite your XML @ref
-platform_lua "platform using the lua scripting language" instead.
-In the future, it should be possible to describe the platform directly
-in C++, but this is not possible yet.
-
-As usual, SimGrid is a versatile framework, and you should find the
-way of describing your platform that best fits your experimental
-practice. 
-
-@section pf_overview Describing the platform with XML
-
-Your platform description should follow the specification presented in
-the [simgrid.dtd](https://simgrid.org/simgrid.dtd)
-DTD file. The same DTD is used for both the platform and deployment
-files.
-
-From time to time, this DTD evolves to introduce possibly
-backward-incompatible changes. That is why each platform desciption is
-enclosed within a @c platform tag, that have a @c version attribute. 
-The current version is <b>4.1</b>. The @c simgrid_update_xml program can
-upgrade most of the past platform files to the recent formalism.
-
-@section pf_first_example First Platform Example 
-
-Here is a very simple platform file, containing 3 resources (two hosts
-and one link), and explicitly giving the route between the hosts.
-
-@code{.xml}
-<?xml version='1.0'?>
-<!DOCTYPE platform SYSTEM "https://simgrid.org/simgrid.dtd">
-<platform version="4.1">
-  <zone id="first zone" routing="Full">
-    <!-- the resources -->
-    <host id="host1" speed="1Mf"/>
-    <host id="host2" speed="2Mf"/>
-    <link id="link1" bandwidth="125MBps" latency="100us"/>
-    <!-- the routing: specify how the hosts are interconnected -->
-    <route src="host1" dst="host2">
-      <link_ctn id="link1"/>
-    </route>
-  </zone>
-</platform>
-@endcode
-
-As we said, the englobing @ref pf_overview "&lt;platform&gt;" tag is
-used to specify the dtd version used for this file.
-
-Then, every resource (specified with @ref pf_tag_host, @ref
-pf_tag_link or others) must be located within a given **networking
-zone**.  Each zone is in charge of the routing between its
-resources. It means that when an host wants to communicate with
-another host of the same zone, it is the zone's duty to find the list
-of links that are involved in the communication. Here, since the @ref
-pf_tag_zone tag has **Full** as a **routing attribute**, all routes
-must be explicitely given using the @ref pf_tag_route and @ref
-pf_tag_linkctn tags (this @ref pf_rm "routing model" is both simple
-and inefficient :) It is OK to not specify the route between two
-hosts, as long as the processes located on them never try to
-communicate together.
-
-A zone can contain several zones itself, leading to a hierarchical
-decomposition of the platform. This can be more efficient (as the
-inter-zone routing gets factorized with @ref pf_tag_zoneroute), and
-allows to have more than one routing model in your platform. For
-example, you could have a coordinate-based routing for the WAN parts
-of your platforms, a full routing within each datacenter, and a highly
-optimized routing within each cluster of the datacenter.  In this
-case, determining the route between two given hosts gets @ref
-routing_basics "somewhat more complex" but SimGrid still computes
-these routes for you in a time- and space-efficient manner.
-Here is an illustration of these concepts:
-
-![A hierarchy of networking zones.](AS_hierarchy.png)
-
-Circles represent processing units and squares represent network
-routers. Bold lines represent communication links. The zone "AS2"
-models the core of a national network interconnecting a small flat
-cluster (AS4) and a larger hierarchical cluster (AS5), a subset of a
-LAN (AS6), and a set of peers scattered around the world (AS7).
 
 @section pf_res Resource description
 
 @subsection pf_res_computing Computing Resources
 
-@subsubsection pf_tag_host &lt;host&gt;
-
-An host is the computing resource on which an actor can execute.
-
-Attribute         | Values                                 | Description
------------------ | -------------------------------------- | -----------
-id                | String (mandatory)                     | The identifier of the host. facilitates referring to this AS.
-speed             | double (mandatory)                     | Computational power of every core of this host in FLOPS (must be positive)
-core              | int (defaults to 1)                    | Number of cores (see @ref howto_multicore)
-availability_file | File name (optional) | (Relative or absolute) filename to use as input; must contain availability traces for this host. The syntax of this file is defined below.
-state_file        | File name (optional) |  File to use as a state profile (see @ref howto_churn)
-coordinates       | String (mandatory when using Vivaldi routing) | The coordinates of this host (see @ref pf_P2P_tags).
-pstate     | Double (Defaults to 0) | FIXME: Not yet documented.
-
-#### Included tags ####
-
- - @ref pf_tag_mount Specifies the storages mounted on that host
- - @ref pf_tag_prop Specifies a user-defined property of that host, that you can retrieve with MSG_host_get_property_value() or simgrid::s4u::Host::property().
-
-#### Examples ####
-
-@code{.xml}
-<host id="host1" speed="1000000000"/>
-<host id="host2" speed="1000000000">
-   <prop id="color" value="blue"/>
-   <prop id="rendershape" value="square"/>
-</host>
-@endcode
-
-@anchor pf_host_dynamism
-### Expressing dynamism ###
-
-SimGrid provides mechanisms to change a hosts' availability over
-time, using the ``availability_file`` attribute to the ``@<host@>`` tag
-and a separate text file whose syntax is exemplified below.
-
-#### Adding a trace file ####
-
-@verbatim
-<platform version="4">
-  <host id="bob" speed="500Gf" availability_file="bob.trace" />
-</platform>
-@endverbatim
-
-#### Example of "bob.trace" file ####
-
-~~~~~~~~~~~~~~{.py}
-PERIODICITY 1.0
-  0.0 1.0
-  11.0 0.5
-  20.0 0.8
-~~~~~~~~~~~~~~
-
-Let us begin to explain this example by looking at line 2. (Line 1 will become clear soon).
-The first column describes points in time, in this case, time 0. The second column
-describes the relative amount of power this host is able to deliver (relative
-to the maximum performance specified in the ``@<host@>`` tag). (Clearly, the
-second column needs to contain values that are not smaller than 0 and not larger than 1).
-In this example, our host will deliver 500 Mflop/s at time 0, as 500 Mflop/s is the
-maximum performance of this host. At time 11.0, it will
-deliver half of its maximum performance, i.e., 250 Mflop/s until time 20.0 when it will
-will start delivering 80@% of its power. In this example, this amounts to 400 Mflop/s.
-
-Since the periodicity in line 1 was set to be 1.0, i.e., 1 timestep, this host will
-continue to provide 500 Mflop/s from time 21. From time 32 it will provide 250 MFlop/s and so on.
 
 @subsubsection pf_tag_cluster &lt;cluster&gt;
 
@@ -338,40 +159,6 @@ The hosts generated in the above example are named host-1.cluster, host-2.cluste
 etc.
 
 
-@subsubsection pf_peer &lt;peer&gt; (Vivaldi netzones only)
-
-This tag represents a peer, as in Peer-to-Peer (P2P) networks. This
-can only be used in Vivaldi NetZones. It creates the following
-resources to the NetZone:
-
-@li A host
-@li Two links: One for download and one for upload. This is
-    convenient to use and simulate stuff under the last mile model (e.g., ADSL peers).
-@li It connects the two links to the host
-
-#### Attributes ####
-
-Attribute name  | Mandatory | Values | Description
---------------- | --------- | ------ | -----------
-id              | yes       | string | The identifier of the peer. Facilitates referring to this peer.
-speed           | yes       | int    | See the description of the ``host`` tag for this attribute
-bw_in           | yes       | int    | Bandwidth of the private downstream link
-bw_out          | yes       | int    | Bandwidth of the private upstream link
-coordinates     | no        | string | Coordinates of the gateway for this peer. Example value: 12.8 14.4 6.4
-sharing_policy  | no        | SHARED@|SPLITDUPLEX (default: SPLITDUPLEX) | Sharing policy for links. See <b>link</b> description for details.
-availability_file| no       | string | Availability file for the peer. Same as host availability file. See <b>host</b> description for details.
-state_file      | no        | string | State file for the peer. Same as host state file. See <b>host</b> description for details.
-
-
-The communication latency between an host A=(xA,yA,zA) and an host
-B=(xB,yB,zB) is computed as follows:
- latency = sqrt( (xA-xB)² + (yA-yB)² ) + zA + zB
-
-See the documentation of simgrid::kernel::routing::VivaldiZone for
-details on how the latency is computed from the coordinate, and on the
-the up and down bandwidth are used.
-
 @subsection pf_ne Network equipments
 
 There are two tags at all times available to represent network entities and
@@ -398,178 +185,6 @@ several other tags that are available only in certain contexts.
     If you want to represent an entity like a switch, you must use ``<link>`` (see section). Routers are used
     to run some routing algorithm and determine routes (see Section @ref pf_routing for details).
 
-@subsubsection pf_router &lt;router/&gt;
-
-As said before, <b>router</b> is used only to give some information
-for routing algorithms. So, it does not have any attributes except:
-
-#### Attributes ####
-
-Attribute name  | Mandatory | Values | Description
---------------- | --------- | ------ | -----------
-id              | yes       | string | The identifier of the router to be used when referring to it.
-coordinates     | no        | string | Must be provided when choosing the Vivaldi, coordinate-based routing model for the network zone the router belongs to. More details can be found in the Section @ref pf_P2P_tags.
-
-#### Example ####
-
-@verbatim
- <router id="gw_dc1_horizdist"/>
-@endverbatim
-
-@subsubsection pf_tag_link &lt;link&gt;
-
-Network links can represent one-hop network connections. They are
-characterized by their id and their bandwidth; links can (but may not) be subject
-to latency.
-
-#### Attributes ####
-
-Attribute name  | Mandatory | Values | Description
---------------- | --------- | ------ | -----------
-id              | yes       | string | The identifier of the link to be used when referring to it.
-bandwidth       | yes       | string | Maximum bandwidth for this link, along with its unit.
-latency         | no        | double (default: 0.0) | Latency for this link.
-sharing_policy  | no        | @ref sharing_policy_shared "SHARED"@|@ref pf_sharing_policy_fatpipe "FATPIPE"@|@ref pf_sharing_policy_splitduplex "SPLITDUPLEX" (default: SHARED) | Sharing policy for the link.
-bandwidth_file  | no        | string | Allows you to use a file as input for bandwidth.
-latency_file    | no        | string | Allows you to use a file as input for latency.
-state_file      | no        | string | Allows you to use a file as input for states.
-
-
-#### Possible shortcuts for ``latency`` ####
-
-When using the latency attribute, you can specify the latency by using the scientific
-notation or by using common abbreviations. For instance, the following three tags
-are equivalent:
-
-@verbatim
- <link id="LINK1" bandwidth="125000000" latency="5E-6"/>
- <link id="LINK1" bandwidth="125000000" latency="5us"/>
- <link id="LINK1" bandwidth="125000000" latency="0.000005"/>
-@endverbatim
-
-Here, the second tag uses "us", meaning "microseconds". Other shortcuts are:
-
-Name | Abbreviation | Time (in seconds)
----- | ------------ | -----------------
-Week | w | 7 * 24 * 60 * 60
-Day  | d | 24 * 60 * 60
-Hour | h | 60 * 60
-Minute | m | 60
-Second | s | 1
-Millisecond | ms | 0.001 = 10^(-3)
-Microsecond | us | 0.000001 = 10^(-6)
-Nanosecond  | ns | 0.000000001 = 10^(-9)
-Picosecond  | ps | 0.000000000001 = 10^(-12)
-
-#### Sharing policy ####
-
-@anchor sharing_policy_shared
-By default a network link is @b SHARED, i.e., if two or more data flows go
-through a link, the bandwidth is shared fairly among all data flows. This
-is similar to the sharing policy TCP uses.
-
-@anchor pf_sharing_policy_fatpipe
-On the other hand, if a link is defined as a @b FATPIPE,
-each flow going through this link will be provided with the complete bandwidth,
-i.e., no sharing occurs and the bandwidth is only limiting each flow individually.
-Please note that this is really on a per-flow basis, not only on a per-host basis!
-The complete bandwidth provided by this link in this mode
-is ``number_of_flows*bandwidth``, with at most ``bandwidth`` being available per flow.
-
-Using the FATPIPE mode allows to model backbones that won't affect performance
-(except latency).
-
-@anchor pf_sharing_policy_splitduplex
-The last mode available is @b SPLITDUPLEX. This means that SimGrid will
-automatically generate two links (one carrying the suffix _UP and the other the
-suffix _DOWN) for each ``<link>`` tag. This models situations when the direction
-of traffic is important.
-
-@remark
-  Transfers from one side to the other will interact similarly as
-  TCP when ACK returning packets circulate on the other direction. More
-  discussion about it is available in the description of link_ctn description.
-
-In other words: The SHARED policy defines a physical limit for the bandwidth.
-The FATPIPE mode defines a limit for each application,
-with no upper total limit.
-
-@remark
-  Tip: By using the FATPIPE mode, you can model big backbones that
-  won't affect performance (except latency).
-
-#### Example ####
-
-@verbatim
- <link id="SWITCH" bandwidth="125000000" latency="5E-5" sharing_policy="FATPIPE" />
-@endverbatim
-
-#### Expressing dynamism and failures ####
-
-Similar to hosts, it is possible to declare links whose state, bandwidth
-or latency changes over time (see Section @ref pf_host_dynamism for details).
-
-In the case of network links, the ``bandwidth`` and ``latency`` attributes are
-replaced by the ``bandwidth_file`` and ``latency_file`` attributes.
-The following XML snippet demonstrates how to use this feature in the platform
-file. The structure of the files "link1.bw" and "link1.lat" is shown below.
-
-@verbatim
-<link id="LINK1" state_file="link1.fail" bandwidth="80000000" latency=".0001" bandwidth_file="link1.bw" latency_file="link1.lat" />
-@endverbatim
-
-@note
-  Even if the syntax is the same, the semantic of bandwidth and latency
-  trace files differs from that of host availability files. For bandwidth and
-  latency, the corresponding files do not
-  express availability as a fraction of the available capacity but directly in
-  bytes per seconds for the bandwidth and in seconds for the latency. This is
-  because most tools allowing to capture traces on real platforms (such as NWS)
-  express their results this way.
-
-##### Example of "link1.bw" file #####
-
-~~~{.py}
-PERIODICITY 12.0
-4.0 40000000
-8.0 60000000
-~~~
-
-In this example, the bandwidth changes repeatedly, with all changes
-being repeated every 12 seconds.
-
-At the beginning of the the simulation, the link's bandwidth is 80,000,000
-B/s (i.e., 80 Mb/s); this value was defined in the XML snippet above.
-After four seconds, it drops to 40 Mb/s (line 2), and climbs
-back to 60 Mb/s after another 4 seconds (line 3). The value does not change any
-more until the end of the period, that is, after 12 seconds have been simulated).
-At this point, periodicity kicks in and this behavior is repeated: Seconds
-12-16 will experience 80 Mb/s, 16-20 40 Mb/s etc.).
-
-##### Example of "link1.lat" file #####
-
-~~~{.py}
-PERIODICITY 5.0
-1.0 0.001
-2.0 0.01
-3.0 0.001
-~~~
-
-In this example, the latency varies with a period of 5 seconds.
-In the xml snippet above, the latency is initialized to be 0.0001s (100µs). This
-value will be kept during the first second, since the latency_file contains
-changes to this value at second one, two and three.
-At second one, the value will be 0.001, i.e., 1ms. One second later it will
-be adjusted to 0.01 (or 10ms) and one second later it will be set again to 1ms. The
-value will not change until second 5, when the periodicity defined in line 1
-kicks in. It then loops back, starting at 100µs (the initial value) for one second.
-
-#### The ``<prop/>`` tag ####
-
-Similar to the ``<host>`` tag, a link may also contain the ``<prop/>`` tag; see the host
-documentation (Section @ref pf_tag_host) for an example.
-
-
 @subsubsection pf_backbone <backbone/>
 
 @note
@@ -870,29 +485,6 @@ the shortest paths.
 
 @subsection  pf_tag_zone &lt;zone&gt;
 
-Before SimGrid v3.16, networking zones used to be called Autonomous
-Systems, but this was misleading as zones may include other zones in a
-hierarchical manner. If you find any remaining reference to network
-zones, please report this as a bug.
-
-Attribute   | Value                                             | Description
------------ | ------------------------------------------------- | ----------------------------------------------
-id          | String (mandatory)                                | The identifier of this zone (must be unique)
-routing     | One of the existing routing algorithm (mandatory) | See Section @ref pf_rm for details.
-
-<b>Example:</b>
-@code
-<zone id="zone0" routing="Full">
-   <host id="host1" speed="1000000000"/>
-   <host id="host2" speed="1000000000"/>
-   <link id="link1" bandwidth="125000000" latency="0.000100"/>
-   <route src="host1" dst="host2"><link_ctn id="link1"/></route>
-</zone>
-@endcode
-
-In this example, zone0 contains two hosts (host1 and host2). The route
-between the hosts goes through link1.
-
 @subsection pf_rm Routing models
 
 For each network zone, you must define explicitly which routing model will
@@ -1175,24 +767,6 @@ it means that it must pass through router1 to get out of the zone, then
 pass through link1, and get into zone2 by being received by router2.
 router1 must belong to zone1 and router2 must belong to zone2.
 
-@subsubsection pf_tag_linkctn &lt;link_ctn&gt;
-
-This entity has only one purpose: Refer to an already existing
-@ref pf_tag_link "&lt;link/&gt;" when defining a route, i.e., it
-can only occur as a child of @ref pf_tag_route "&lt;route/&gt;"
-
-| Attribute name  | Mandatory | Values | Description                                                   |
-| --------------- | --------- | ------ | -----------                                                   |
-| id              | yes       | String | The identifier of the link that should be added to the route. |
-| direction       | maybe     | UP@|DOWN | If the link referenced by @c id has been declared as @ref pf_sharing_policy_splitduplex "SPLITDUPLEX", this indicates which direction the route traverses through this link: UP or DOWN. If you don't use SPLITDUPLEX, do not use this attribute or SimGrid will not find the right link.
-
-#### Example Files ####
-
-This is an automatically generated list of example files that use the @c &lt;link_ctn/&gt;
-entity (the path is given relative to SimGrid's source directory):
-
-@verbinclude example_filelist_xmltag_linkctn
-
 @subsubsection pf_tag_zoneroute &lt;zoneRoute&gt;
 
 The purpose of this entity is to define a route between two
@@ -1430,60 +1004,6 @@ directly describing the platform:
   - @ref pf_tag_config passes configuration options, e.g. to change the network model;
   - @ref pf_tag_prop gives user-defined properties to various elements
 
-@subsection pf_tag_config &lt;config&gt;
-
-Adding configuration flags into the platform file is particularly
-useful when the described platform is best used with specific
-flags. For example, you could finely tune SMPI in your platform file directly.
-
-| Attribute  | Values              | Description                                    |
-| ---------- | ------------------- | ---------------------------------------------- |
-| id         | String (optional)   | This optional identifier is ignored by SimGrid |
-
-* **Included tags:** @ref pf_tag_prop to specify a given configuration item (see @ref options).
-
-Any such configuration must be given at the very top of the platform file.
-
-* **Example**
-
-@verbatim
-<?xml version='1.0'?>
-<!DOCTYPE platform SYSTEM "https://simgrid.org/simgrid.dtd">
-<platform version="4">
-<config>
-       <prop id="maxmin/precision" value="0.000010" />
-       <prop id="cpu/optim" value="TI" />
-       <prop id="network/model" value="SMPI" />
-       <prop id="smpi/bw-factor" value="65472:0.940694;15424:0.697866;9376:0.58729" />
-</config>
-
-<zone  id="zone0"  routing="Full">
-...
-@endverbatim
-
-@subsection pf_tag_prop &lt;prop&gt;
-
-Defines a user-defined property, identified with a name and having a
-value. You can specify such properties to most kind of resources:
-@ref pf_tag_zone, @ref pf_tag_host, @ref pf_tag_storage,
-@ref pf_tag_cluster and @ref pf_tag_link. These values can be retrieved
-at runtime with MSG_zone_property() or simgrid::s4u::NetZone::property(),
-or similar functions.
-
-| Attribute | Values                  | Description                                                                               |
-| --------- | ----------------------  | ----------------------------------------------------------------------------------------- |
-| id        | String (mandatory)      | Identifier of this property. Must be unique for a given property holder, eg host or link. |
-| value     | String (mandatory)      | Value of this property; The semantic is completely up to you.                             |
-
-* **Included tags:** none.
-
-#### Example ####
-
-@code{.xml}
-<prop id="Operating System" value="Linux" />
-@endcode
-
-
 @subsection pf_trace trace and trace_connect
 
 Both tags are an alternate way to pass files containing information on