Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
start rewriting the platform documentation now that AS are called netzones
[simgrid.git] / doc / doxygen / platform.doc
index 365daca..b35d4e5 100644 (file)
-/*! \page platform Step 1: %Model the underlying platform
+/*! \page platform Describing the virtual platform
 
 @tableofcontents
 
 In order to run any simulation, SimGrid must be provided with three things:
-something to run (i.e., your code), a description of the platform on which you
-want to simulate your application and lastly information about the deployment
-process: Which process should be deployed to which processor/core?
+something to run (i.e., your code), a description of the platform on which you want to simulate your application, and 
+information about the deployment of the application: Which process should be executed onto which processor/core?
 
-For the last two items, there are essentially two possible ways you can provide
+For the last two items, there are essentially three possible ways you can provide
 this information as an input:
-\li You can program it, either by using the Lua console (
-    \ref MSG_Lua_funct) or, if you're using MSG, some of MSG's platform and
-    deployment functions (\ref msg_simulation). If you want to use this,
-    check the particular documentation. (You can also check the section
-    \ref pf_flexml_bypassing, however, this documentation is deprecated;
-    there is a new, but undocumented, way to do it properly).
-\li You can use two XML files: one contains the platform description while
-    the other contains the deployment instructions.
-
-For more information on SimGrid's deployment features, please refer to
-the \ref deployment documentation.
-
-The platform description may be intricate. This documentation is all
-about how to write this file: The basic concepts are introduced. Furthermore,
-advanced options are explained. Additionally, some hints and tips on how to
-write a good platform description are given.
+\li You can program, if you're using MSG, some of the platform and
+    deployment functions. If you choose to follow this approach, check the dedicated documentation
+    (\ref msg_simulation).
+\li You can use two XML files: one for the platform description and the other for the deployment. 
+\li You can program the description of your platform  in Lua format.
+
+For more information on SimGrid's deployment features, please refer to the \ref deployment section.
+
+The platform description may be intricate. This documentation is all about how to write this file. First, the basic 
+concepts are introduced. Then, advanced options are explained. Finally, some hints and tips on how to write a better 
+platform description are given.
 
 \section pf_overview Some words about XML and DTD
 
-We chose to use XML not only because it's extensible but also because many
-tools (and plugins for existing tools) are available that facilitate editing and
-validating XML files. Furthermore, libraries that parse XML are often already
+We opted for XML not only because it is extensible but also because many tools (and plugins for existing tools) are 
+available that facilitate editing and validating XML files. Furthermore, libraries that parse XML are often already
 available and very well tested.
 
-The XML checking is done based on the Document Type Definition (DTD) file,
-available at
-<a href="http://simgrid.gforge.inria.fr/simgrid.dtd">http://simgrid.gforge.inria.fr/simgrid.dtd</a>.
+The XML checking is done based on the [simgrid.dtd](http://simgrid.gforge.inria.fr/simgrid/simgrid.dtd) Document Type 
+Definition (DTD) file.
 
 If you read the DTD, you should notice the following:
-\li The platform tags contain a version attribute; the current version is 3.
-    This property might be used in the future to provide backwards
-    compatibility.
-\li The DTD contains definitions for the two files used by SimGrid (i.e.,
-    platform description and deployment).
+\li The platform tag has a version attribute. The current version is <b>4</b>. This attribute might be used in the 
+    provide backward compatibility.
+\li The DTD contains definitions for both the platform description and deployment files used by SimGrid.
 
 \section pf_basics Basic concepts
 
-Nowadays, the Internet is composed of a bunch of independently managed
-networks. Within each of those networks, there are entry and exit
-points (most of the time, you can both enter and exit through the same
-point); this allows to leave the current network and reach other
-networks, possibly even in other locations.
-At the upper level, such a network is called
-<b>Autonomous System (AS)</b>, while at the lower level it is named
-sub-network, or LAN (local area network).
-They are indeed autonomous: routing is defined
-(within the limits of his network) by the administrator, and so, those
-networks can operate without a connection to other
-networks. So-called gateways allow you to go from one network to
-another, if such a (physical) connection exists. Every node in one network
-that can be directly reached (i.e., without traversing other nodes) from
-another network is called a gateway.
-Each autonomous system consists of equipment such as cables (network links),
-routers and switches as well as computers.
-
-The structure of the SimGrid platform description relies exactly on the same
-concept as a real-life platform (see above).  Every resource (computers,
-network equipment etc.) belongs to an AS, which can be defined by using the
-\<AS\> tag. Within an AS, the routing between its elements can be defined
-abitrarily. There are several modes for routing, and exactly one mode must be
-selected by specifying the routing attribute in the AS tag:
+It is certainly very tempting to defining how the information is
+routed in the simulated network in a way that is very similar to how
+it is defined on real network. One would have to define the routing
+tables of each routers interconnections sub-networks, just like in the
+real life. Given the daunting amount of configuration required, we
+could complete the information given by the user with classical
+protocols such as BGP and RIP. Many network simulator take such
+configuration as an input, for good reasons.
+
+This is not the way it goes in SimGrid: the network routing is defined
+in a global and compact way instead. This eases the modeling of very
+large systems, and allows highly optimized datastructures and
+algorithms in the simulator. The proposed description mechanism is
+thus much more convinient and efficient. In addition, it is more
+expressive than the classical solution based on forwarding tables on
+each host and router. 
+
+The price to pay is that this representation of networks is very
+specific to SimGrid, so you will have to read further to understand
+it, even if you already know how real networks work.
+
+The central notion here are \b Networking \b Zones. NetZones represent
+network areas in which the routing is done in an homogeneous way.
+Conceptually, netzones generalize from the ideas of local networks
+(such as Ethernet switched networks) and Autonomous System. The 
+network as a whole is represented as a single hierarchy of netzones,
+meaning that every netzone is part of another netzone (but the \c
+NetRoot, which is the top-level netzone).
+
+The main goal of the routing module is to provide a list of links
+traversed by a given communication and/or a latency to apply. These
+information are then used by the network model to compute the time
+that this communication takes. This information is retrieved by three
+combined algorithms: intra-zone routing, inter-zone routing, and the
+bypass mechanism.
+
+The <b>intra-zone level</b> is naturally handled by the netzones. Each
+netzone have to specify the routing algorithm it uses for that.
+@ref{FullZone} netzones have complete matrix where matrix(a,b)
+represents the full path (the list of links) between the hosts a and
+b. @ref{FloydZone} apply the Floyd-Warshall algorithm to compute the
+paths. @ref{ClusterZone} model classical switched or hub networks,
+where each component is connected through a private link onto a common
+backbone. Many other routing algorithms are provided to model the
+classical needs, but you can naturally define your own routing if the
+provided ones do not fit your needs.
+
+The <b>inter-zone algorithm</b> is used when the communication
+traverses more than one zone. The overall path goes from the source up
+in the netzones' tree, until the first common ancestor zone, and moves
+down to the destination. It crawls the differing netzones on its path
+according to the user-defined inter-zone routes, moving from gateway
+to gateway.
+
+You can also use the <b>bypass mechanism</b> to specify manually some
+shortcuts that directly provide the list of links interconnecting two
+given processes.
+
 
 \verbatim
-<AS id="AS0" routing="Full">
+<AS id="netzone0" routing="Full">
 \endverbatim
 
 \remark
   Other supported values for the routing attribute can be found below, Section
   \ref pf_raf.
 
-There is also the ``<route>`` tag; this tag takes two attributes, ``src`` (source)
-and ``dst`` (destination). Both source and destination must be valid identifiers
-for routers (these will be introduced later). Contained by the ``<route>`` are
-network links; these links must be used in order to communicate from the source
-to the destination specified in the tag. Hence, a route merely describes
+There is also the ``<route>`` tag; this tag takes two attributes,
+``src`` (source) and ``dst`` (destination). Both source and
+destination must be valid identifiers for routers (these will be
+introduced later). Contained by the ``<route>`` are network links;
+these links must be used in order to communicate from the source to
+the destination specified in the tag. Hence, a route merely describes
 how to reach a router from another router.
 
 \remark
   More information and (code-)examples can be found in Section \ref pf_rm.
 
-An AS can also contain itself one or more AS; this allows you to
-model the hierarchy of your platform.
+A netzone can also contain itself one or more netzone; this allows you to model
+the hierarchy of your platform.
 
 ### Within each AS, the following types of resources exist:
 
@@ -102,14 +127,15 @@ router          | \ref pf_router        | In SimGrid, routers are used to provid
 link            | \ref pf_link          | In SimGrid, (network)links define a connection between two or potentially even more resources. Every link has a bandwidth and a latency and may potentially experience congestion.
 cluster         | \ref pf_cluster       | In SimGrid, clusters were introduced to model large and homogenous environments. They are not really a resource by themselves - technically, they are only a shortcut, as they will internally set up all the hosts, network and routing for you, i.e., using this resource, one can easily setup thousands of hosts and links in a few lines of code. Each cluster is itself an AS.
 
-%As it is desirable to interconnect these resources, a routing has to be
-defined. The AS is supposed to be Autonomous, hence this has to be done at the
-AS level. The AS handles two different types of entities (<b>host/router</b>
-and <b>AS</b>). However, the user is responsible to define routes between those resources,
-otherwise entities will be unconnected and therefore unreachable from other
-entities. Although several routing algorithms are built into SimGrid (see
-\ref pf_rm), you might encounter a case where you want to define routes
-manually (for instance, due to specific requirements of your platform).
+As it is desirable to interconnect these resources, a routing has to
+be defined. The AS is supposed to be Autonomous, hence this has to be
+done at the AS level. The AS handles two different types of entities
+(<b>host/router</b> and <b>AS</b>). However, the user is responsible
+to define routes between those resources, otherwise entities will be
+unconnected and therefore unreachable from other entities. Although
+several routing algorithms are built into SimGrid (see \ref pf_rm),
+you might encounter a case where you want to define routes manually
+(for instance, due to specific requirements of your platform).
 
 There are three tags to use:
 \li <b>ASroute</b>: to define routes between two  <b>AS</b>
@@ -145,14 +171,14 @@ routing         | yes       | Full\| Floyd\| Dijkstra\| DijkstraCache\| None\| V
 
 
 <b>Example:</b>
-\verbatim
+\code
 <AS id="AS0" routing="Full">
-   <host id="host1" power="1000000000"/>
-   <host id="host2" power="1000000000"/>
+   <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>
 </AS>
-\endverbatim
+\endcode
 
 In this example, AS0 contains two hosts (host1 and host2). The route
 between the hosts goes through link1.
@@ -170,13 +196,12 @@ a host can contain more than 1 core.
 Attribute name  | Mandatory | Values | Description
 --------------- | --------- | ------ | -----------
 id              | yes       | String | The identifier of the host. facilitates referring to this AS.
-power           | yes       | double (must be > 0.0) | Computational power of every core of this host in FLOPS. Must be larger than 0.0.
-core            | no        | int (Default: 1) | The number of cores of this host. If more than one core is specified, the "power" parameter refers to every core, i.e., the total computational power is no_of_cores*power.<br /> If 6 cores are specified, up to 6 tasks can be executed without sharing the computational power; if more than 6 tasks are executed, computational power will be shared among these tasks. <br /> <b>Warning:</b> Although functional, this model was never scientifically assessed.
-availability    | no        | int    | <b>Specify if the percentage of power available.</b> (What? TODO)
+speed           | yes       | double (must be > 0.0) | Computational power of every core of this host in FLOPS. Must be larger than 0.0.
+core            | no        | int (Default: 1) | The number of cores of this host. If more than one core is specified, the "speed" parameter refers to every core, i.e., the total computational power is no_of_cores*speed.<br /> If 6 cores are specified, up to 6 tasks can be executed without sharing the computational power; if more than 6 tasks are executed, computational power will be shared among these tasks. <br /> <b>Warning:</b> Although functional, this model was never scientifically assessed.
 availability_file| no       | string | (Relative or absolute) filename to use as input; must contain availability traces for this host. The syntax of this file is defined below. <br /> <b>Note:</b> The filename must be specified with your system's format.
-state           | no        | ON\|OFF<br/> (Default: ON) | Is this host running or not?
 state_file      | no        | string |  Same mechanism as availability_file.<br /> <b>Note:</b> The filename must be specified with your system's format.
 coordinates     | no        | string | Must be provided when choosing the Vivaldi, coordinate-based routing model for the AS the host belongs to. More details can be found in the Section \ref pf_P2P_tags.
+pstate     | no        | double (Default: 0.0) | FIXME: Not yet documented.
 
 ### Possible children: ###
 
@@ -188,8 +213,8 @@ Tag name        | Description | Documentation
 ### Example ###
 
 \verbatim
-   <host id="host1" power="1000000000"/>
-   <host id="host2" power="1000000000">
+   <host id="host1" speed="1000000000"/>
+   <host id="host2" speed="1000000000">
        <prop id="color" value="blue"/>
        <prop id="rendershape" value="square"/>
    </host>
@@ -206,8 +231,8 @@ and a separate text file whose syntax is exemplified below.
 #### Adding a trace file ####
 
 \verbatim
-<platform version="1">
-  <host id="bob" power="500000000" availability_file="bob.trace" />
+<platform version="4">
+  <host id="bob" speed="500Gf" availability_file="bob.trace" />
 </platform>
 \endverbatim
 
@@ -241,8 +266,8 @@ It is also possible to specify whether the host is up or down by setting the
 #### Example: Expliciting the default value "ON" ####
 
 \verbatim
-<platform version="1">
-   <host id="bob" power="500000000" state="ON" />
+<platform version="4">
+   <host id="bob" speed="500Gf" state="ON" />
 </platform>
 \endverbatim
 
@@ -259,8 +284,8 @@ of such a file is presented below.
 #### Adding a state file ####
 
 \verbatim
-<platform version="1">
-  <host id="bob" power="500000000" state_file="bob.fail" />
+<platform version="4">
+  <host id="bob" power="500Gf" state_file="bob.fail" />
 </platform>
 \endverbatim
 
@@ -268,14 +293,14 @@ of such a file is presented below.
 
 ~~~{.py}
   PERIODICITY 10.0
-  1.0 -1.0
-  2.0 1.0
+  1.0 0
+  2.0 1
 ~~~
 
-A negative value means <b>down</b> (i.e., OFF) while a positive one means <b>up and
-  running</b> (i.e., ON). From time 0.0 to time 1.0, the host is on. At time 1.0, it is
-turned off and at time 2.0, it is turned on again until time 12 (2.0 plus the
-periodicity 10.0). It will be turned on again at time 13.0 until time 23.0, and
+A zero value means <b>down</b> (i.e., OFF) while a positive one means <b>up and
+  running</b> (i.e., ON). From time 0.0 to time 1.0, the host is on as usual. At time 1.0, it is
+turned off and at time 2.0, it is turned on again until time 12 (2 plus the
+periodicity 10). It will be turned off again at time 13.0 until time 23.0, and
 so on.
 
 
@@ -331,7 +356,7 @@ id              | yes       | string | The identifier of the cluster. Facilitate
 prefix          | yes       | string | Each node of the cluster has to have a name. This name will be prefixed with this prefix.
 suffix          | yes       | string | Each node of the cluster will be suffixed with this suffix
 radical         | yes       | string | Regexp used to generate cluster nodes name. 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. The produced number is concatenated between prefix and suffix to form machine names.
-power           | yes       | int    | Same as the ``power`` attribute of the ``\<host\>`` tag.
+speed           | yes       | int    | Same as the ``speed`` attribute of the ``\<host\>`` tag.
 core            | no        | int (default: 1) | Same as the ``core`` attribute of the ``\<host\>`` tag.
 bw              | yes       | int    | Bandwidth for the links between nodes and backbone (if any). See the \ref pf_link "link section" for syntax/details.
 lat             | yes       | int    | Latency for the links between nodes and backbone (if any). See <b>link</b> section for syntax/details.
@@ -339,14 +364,12 @@ sharing_policy  | no        | string | Sharing policy for the links between node
 bb_bw           | no        | int    | Bandwidth for backbone (if any). See <b>link</b> section for syntax/details. If bb_bw and bb_lat (see below) attributes are omitted, no backbone is created (alternative cluster architecture <b>described before</b>).
 bb_lat          | no        | int    | Latency for backbone (if any). See <b>link</b> section for syntax/details. If bb_lat and bb_bw (see above) attributes are omitted, no backbone is created (alternative cluster architecture <b>described before</b>).
 bb_sharing_policy | no      | string | Sharing policy for the backbone (if any). See <b>link</b> section for syntax/details.
-availability_file | no      | string | Allows you to use a file as input for availability. Similar to <b>hosts</b> attribute.
-state_file        | no      | string | Allows you to use a file as input for states.  Similar to <b>hosts</b> attribute.
+limiter_link      | no        | int    | Bandwidth for limiter link (if any). This adds a specific link for each node, to set the maximum bandwidth reached when communicating in both directions at the same time. In theory this value should be 2*bw for fullduplex 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. More details can be obtained in <a href="https://hal.inria.fr/hal-00919507/"> "Toward Better Simulation of MPI Applications on Ethernet/TCP Networks"</a>
 loopback_bw       | no      | int    | Bandwidth for loopback (if any). See <b>link</b> section for syntax/details. If loopback_bw and loopback_lat (see below) attributes are omitted, no loopback link is created and all intra-node communication will use the main network link of the node. Loopback link is a \ref pf_sharing_policy_fatpipe "\b FATPIPE".
 loopback_lat      | no      | int    | Latency for loopback (if any). See <b>link</b> section for syntax/details. See loopback_bw for more info.
-topology          | no      | FLAT\|TORUS\|FAT_TREE (default: FLAT) | Network topology to use. SimGrid currently supports FLAT (with or without backbone, as described before), <a href="http://en.wikipedia.org/wiki/Torus_interconnect">TORUS </a> and FAT_TREE attributes for this tag.
-topo_parameters   | no      | string | Specific parameters to pass for the topology defined in the topology tag. For torus networks, comma-separated list of the number of nodes in each dimension of the torus. For fat trees, refer to \ref AsClusterFatTree "AsClusterFatTree documentation".
+topology          | no      | FLAT\|TORUS\|FAT_TREE\|DRAGONFLY (default: FLAT) | Network topology to use. SimGrid currently supports FLAT (with or without backbone, as described before), <a href="http://en.wikipedia.org/wiki/Torus_interconnect">TORUS </a>, FAT_TREE, and DRAGONFLY attributes for this tag.
+topo_parameters   | no      | string | Specific parameters to pass for the topology defined in the topology tag. For torus networks, comma-separated list of the number of nodes in each dimension of the torus. For fat trees, refer to \ref simgrid::kernel::routing::AsClusterFatTree "AsClusterFatTree documentation". For dragonfly, refer to \ref simgrid::kernel::routing::AsClusterDragonfly "AsClusterDragonfly documentation".
 
-TODO
 
 the router name is defined as the resulting String in the following
 java line of code:
@@ -362,10 +385,10 @@ Consider the following two (and independent) uses of the ``cluster`` tag:
 
 \verbatim
 <cluster id="my_cluster_1" prefix="" suffix="" radical="0-262144"
-         power="1e9" bw="125e6" lat="5E-5"/>
+         speed="1e9" bw="125e6" lat="5E-5"/>
 
 <cluster id="my_cluster_2" prefix="c-" suffix=".me" radical="0-99"
-         power="1e9" bw="125e6" lat="5E-5"
+         speed="1e9" bw="125e6" lat="5E-5"
          bb_bw="2.25e9" bb_lat="5E-4"/>
 \endverbatim
 
@@ -399,7 +422,7 @@ id              | yes       | string | The identifier of the cabinet. Facilitate
 prefix          | yes       | string | Each node of the cabinet has to have a name. This name will be prefixed with this prefix.
 suffix          | yes       | string | Each node of the cabinet will be suffixed with this suffix
 radical         | yes       | string | Regexp used to generate cabinet nodes name. 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. The produced number is concatenated between prefix and suffix to form machine names.
-power           | yes       | int    | Same as the ``power`` attribute of the \ref pf_host "&lt;host&gt;" tag.
+speed           | yes       | int    | Same as the ``speed`` attribute of the \ref pf_host "&lt;host&gt;" tag.
 bw              | yes       | int    | Bandwidth for the links between nodes and backbone (if any). See the \ref pf_link "link section" for syntax/details.
 lat             | yes       | int    | Latency for the links between nodes and backbone (if any). See the \ref pf_link "link section" for syntax/details.
 
@@ -416,11 +439,11 @@ shows how to use the cabinet tag.
 \verbatim
   <AS  id="my_cluster1"  routing="Cluster">
     <cabinet id="cabinet1" prefix="host-" suffix=".cluster1"
-      power="1Gf" bw="125MBps" lat="100us" radical="1-10"/>
+      speed="1Gf" bw="125MBps" lat="100us" radical="1-10"/>
     <cabinet id="cabinet2" prefix="host-" suffix=".cluster1"
-      power="1Gf" bw="125MBps" lat="100us" radical="11-20"/>
+      speed="1Gf" bw="125MBps" lat="100us" radical="11-20"/>
     <cabinet id="cabinet3" prefix="host-" suffix=".cluster1"
-      power="1Gf" bw="125MBps" lat="100us" radical="21-30"/>
+      speed="1Gf" bw="125MBps" lat="100us" radical="21-30"/>
 
     <backbone id="backbone1" bandwidth="2.25GBps" latency="500us"/>
   </AS>
@@ -455,7 +478,7 @@ and values. These are:
 Attribute name  | Mandatory | Values | Description
 --------------- | --------- | ------ | -----------
 id              | yes       | string | The identifier of the peer. Facilitates referring to this peer.
-power           | yes       | int    | See the description of the ``host`` tag for this attribute
+speed           | yes       | int    | See the description of the ``host`` tag for this attribute
 bw_in           | yes       | int    | Bandwidth downstream
 bw_out          | yes       | int    | Bandwidth upstream
 lat             | yes       | double | Latency for both up- and downstream, in seconds.
@@ -468,7 +491,7 @@ Internally, SimGrid transforms any ``\<peer/\>`` construct such as
 \verbatim
 <peer id="FOO"
   coordinates="12.8 14.4 6.4"
-  power="1.5Gf"
+  speed="1.5Gf"
   bw_in="2.25GBps"
   bw_out="2.25GBps"
   lat="500us" />
@@ -478,7 +501,7 @@ is completely equivalent to the following declaration:
 
 \verbatim
 <AS id="as_FOO" routing="Cluster">
-   <host id="peer_FOO" power="1.5Gf"/>
+   <host id="peer_FOO" speed="1.5Gf"/>
    <link id="link_FOO_UP" bandwidth="2.25GBps" latency="500us"/>
    <link id="link_FOO_DOWN" bandwidth="2.25GBps" latency="500us"/>
    <router id="router_FOO" coordinates="25.5 9.4 1.4"/>
@@ -515,7 +538,7 @@ several other tags that are available only in certain contexts.
 
 \subsubsection pf_router &lt;router/&gt;
 
-%As said before, <b>router</b> is used only to give some information
+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 ####
@@ -523,7 +546,7 @@ for routing algorithms. So, it does not have any attributes except :
 Attribute name  | Mandatory | Values | Description
 --------------- | --------- | ------ | -----------
 id              | yes       | string | The identifier of the router to be used when referring to it.
-coordinates     | yes       | string | Must be provided when choosing the Vivaldi, coordinate-based routing model for the AS the router belongs to. More details can be found in the Section \ref pf_P2P_tags.
+coordinates     | no        | string | Must be provided when choosing the Vivaldi, coordinate-based routing model for the AS the router belongs to. More details can be found in the Section \ref pf_P2P_tags.
 
 #### Example ####
 
@@ -705,8 +728,8 @@ id              | yes       | string | Name of the link that is supposed to act
   is just some doc valuable only at the time of writing.
   This section describes the storage management under SimGrid ; nowadays
   it's only usable with MSG. It relies basically on linux-like concepts.
-  You also may want to have a look to its corresponding section in \ref
-  msg_file_management ; access functions are organized as a POSIX-like
+  You also may want to have a look to its corresponding section in 
+  @ref msg_file ; access functions are organized as a POSIX-like
   interface.
 
 \subsubsection pf_sto_conc Storage - Main Concepts
@@ -897,11 +920,11 @@ Here is a simple example, taken from the file ``examples/platform/storage.xml``:
              content="content/small_content.txt"
              content_type="txt_unix" attach="denise"/>
 
-    <host id="alice" power="1Gf">
+    <host id="alice" speed="1Gf">
       <mount storageId="Disk2" name="c:"/>
     </host>
 
-    <host id="denise" power="1Gf">
+    <host id="denise" speed="1Gf">
       <mount storageId="Disk2" name="c:"/>
       <mount storageId="Disk4" name="/home"/>
     </host>
@@ -927,17 +950,6 @@ required.
 
 \verbinclude example_filelist_xmltag_mount
 
-\anchor pf_storage_entity_mstorage
-#### &lt;mstorage&gt; ####
-\note
-    This is currently unused.
-
-<b>mstorage</b> attributes :
-\li <b>typeId (mandatory)</b>: the id of the <b>storage</b> that must
-    be mounted on that computer.
-\li <b>name (mandatory)</b>: the name that will be the logical
-    reference to this disk (the mount point).
-
 \subsubsection pf_storage_example_files Example files
 
 Several examples were already discussed above; if you're interested in full examples,
@@ -1074,11 +1086,11 @@ Floyd example:
 <AS  id="AS0"  routing="Floyd">
 
   <cluster id="my_cluster_1" prefix="c-" suffix=""
-           radical="0-1" power="1000000000" bw="125000000" lat="5E-5"
+           radical="0-1" speed="1000000000" bw="125000000" lat="5E-5"
            router_id="router1"/>
 
   <AS id="AS1" routing="None">
-    <host id="host1" power="1000000000"/>
+    <host id="host1" speed="1000000000"/>
   </AS>
 
   <link id="link1" bandwidth="100000" latency="0.01"/>
@@ -1112,12 +1124,12 @@ routing model (the path is given relative to SimGrid's source directory)
 
 \verbinclude example_filelist_routing_dijkstra
 
-Dijsktra example :
+Dijkstra example :
 \verbatim
- <AS id="AS_2" routing="Dijsktra">
-     <host id="AS_2_host1" power="1000000000"/>
-     <host id="AS_2_host2" power="1000000000"/>
-     <host id="AS_2_host3" power="1000000000"/>
+ <AS id="AS_2" routing="Dijkstra">
+     <host id="AS_2_host1" speed="1000000000"/>
+     <host id="AS_2_host2" speed="1000000000"/>
+     <host id="AS_2_host3" speed="1000000000"/>
      <link id="AS_2_link1" bandwidth="1250000000" latency="5E-4"/>
      <link id="AS_2_link2" bandwidth="1250000000" latency="5E-4"/>
      <link id="AS_2_link3" bandwidth="1250000000" latency="5E-4"/>
@@ -1135,10 +1147,10 @@ Dijsktra example :
 \anchor pf_routing_model_dijkstracache
 ### DijkstraCache ###
 
-DijsktraCache example:
+DijkstraCache example:
 \verbatim
-<AS id="AS_2" routing="DijsktraCache">
-     <host id="AS_2_host1" power="1000000000"/>
+<AS id="AS_2" routing="DijkstraCache">
+     <host id="AS_2_host1" speed="1000000000"/>
      ...
 (platform unchanged compared to upper example)
 \endverbatim
@@ -1165,8 +1177,8 @@ if there are no example files listed here, this is likely to be correct.
 Full example :
 \verbatim
 <AS  id="AS0"  routing="Full">
-   <host id="host1" power="1000000000"/>
-   <host id="host2" power="1000000000"/>
+   <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>
  </AS>
@@ -1300,11 +1312,11 @@ can only occur as a child of \ref pf_routing_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_fullduplex "FULLDUPLEX", this indicates which direction the route traverses through this link: UP or DOWN. If you don't use FULLDUPLEX, this attribute has no effect.
+| direction       | maybe     | UP\|DOWN | If the link referenced by \c id has been declared as \ref pf_sharing_policy_fullduplex "FULLDUPLEX", this indicates which direction the route traverses through this link: UP or DOWN. If you don't use FULLDUPLEX, 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;
+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
@@ -1329,12 +1341,12 @@ This is mainly useful when you're in the \ref pf_routing_model_full "Full routin
 \verbatim
 <AS  id="AS0"  routing="Full">
   <cluster id="my_cluster_1" prefix="c-" suffix=".me"
-               radical="0-149" power="1000000000"    bw="125000000"     lat="5E-5"
+               radical="0-149" speed="1000000000" bw="125000000" lat="5E-5"
         bb_bw="2250000000" bb_lat="5E-4"/>
 
   <cluster id="my_cluster_2" prefix="c-" suffix=".me"
-           radical="150-299" power="1000000000"        bw="125000000"  lat="5E-5"
-           bb_bw="2250000000" bb_lat="5E-4"/>
+    radical="150-299" speed="1000000000" bw="125000000" lat="5E-5"
+    bb_bw="2250000000" bb_lat="5E-4"/>
 
      <link id="backbone" bandwidth="1250000000" latency="5E-4"/>
 
@@ -1392,7 +1404,7 @@ A route in the \ref pf_routing_model_shortest_path "Shortest-Path routing model"
 
 \subsubsection pf_routing_tag_bypassasroute bypassASroute
 
-%As said before, once you choose
+As said before, once you choose
 a model, it (most likely; the constant network model, for example, doesn't) calculates routes for you. But maybe you want to
 define some of your routes, which will be specific. You may also want
 to bypass some routes defined in lower level AS at an upper stage:
@@ -1429,7 +1441,7 @@ attribute was not given, this route is presumed to be symmetrical.
 
 \subsubsection pf_routing_tag_bypassroute bypassRoute
 
-%As said before, once you choose
+As said before, once you choose
 a model, it (most likely; the constant network model, for example, doesn't) calculates routes for you. But maybe you want to
 define some of your routes, which will be specific. You may also want
 to bypass some routes defined in lower level AS at an upper stage :
@@ -1465,7 +1477,7 @@ and AS_2. If you want to make a host (h1) from AS_1 with another one
 (h2) from AS_2 then you'll have to proceed as follows:
 \li First, you have to ensure that a route is defined from h1 to the
     AS_1's exit gateway and from h2 to AS_2's exit gateway.
-\li Then, you'll have to define a route between AS_1 to AS_2. %As those
+\li Then, you'll have to define a route between AS_1 to AS_2. As those
     AS are both resources belonging to AS_Big, then it has to be done
     at AS_big level. To define such a route, you have to give the
     source AS (AS_1), the destination AS (AS_2), and their respective
@@ -1475,26 +1487,26 @@ and AS_2. If you want to make a host (h1) from AS_1 with another one
     defined inside AS_Big. If you choose some shortest-path model,
     this route will be computed automatically.
 
-%As said before, there are mainly 2 tags for routing :
+As said before, there are mainly 2 tags for routing :
 \li <b>ASroute</b>: to define routes between two  <b>AS</b>
 \li <b>route</b>: to define routes between two <b>host/router</b>
 
-%As we are dealing with routes between AS, it means that those we'll
+As we are dealing with routes between AS, it means that those we'll
 have some definition at AS_Big level. Let consider AS_1 contains 1
 host, 1 link and one router and AS_2 3 hosts, 4 links and one router.
 There will be a central router, and a cross-like topology. At the end
 of the crosses arms, you'll find the 3 hosts and the router that will
 act as a gateway. We have to define routes inside those two AS. Let
 say that AS_1 contains full routes, and AS_2 contains some Floyd
-routing (as we don't want to bother with defining all routes). %As
+routing (as we don't want to bother with defining all routes). As
 we're using some shortest path algorithms to route into AS_2, we'll
 then have to define some <b>route</b> to gives some topological
 information to SimGrid. Here is a file doing it all :
 
 \verbatim
-<AS  id="AS_Big"  routing="Dijsktra">
+<AS  id="AS_Big"  routing="Dijkstra">
   <AS id="AS_1" routing="Full">
-     <host id="AS_1_host1" power="1000000000"/>
+     <host id="AS_1_host1" speed="1000000000"/>
      <link id="AS_1_link" bandwidth="1250000000" latency="5E-4"/>
      <router id="AS_1_gateway"/>
      <route src="AS_1_host1" dst="AS_1_gateway">
@@ -1502,9 +1514,9 @@ information to SimGrid. Here is a file doing it all :
      </route>
   </AS>
   <AS id="AS_2" routing="Floyd">
-     <host id="AS_2_host1" power="1000000000"/>
-     <host id="AS_2_host2" power="1000000000"/>
-     <host id="AS_2_host3" power="1000000000"/>
+     <host id="AS_2_host1" speed="1000000000"/>
+     <host id="AS_2_host2" speed="1000000000"/>
+     <host id="AS_2_host3" speed="1000000000"/>
      <link id="AS_2_link1" bandwidth="1250000000" latency="5E-4"/>
      <link id="AS_2_link2" bandwidth="1250000000" latency="5E-4"/>
      <link id="AS_2_link3" bandwidth="1250000000" latency="5E-4"/>
@@ -1529,10 +1541,8 @@ information to SimGrid. Here is a file doing it all :
 
 \section pf_other_tags Tags not (directly) describing the platform
 
-There are 3 tags, that you can use inside a \<platform\> tag that are
-not describing the platform:
-\li \ref pf_random "random": it allows you to define random generators you want to use
-    for your simulation.
+The following tags can be used inside a \<platform\> tag even if they are not
+directly describing the platform:
 \li \ref pf_config "config": it allows you to pass some configuration stuff like, for
     example, the network model and so on. It follows the
 \li \ref pf_include "include": allows you to include another file into the current one.
@@ -1560,42 +1570,44 @@ Tag name        | Description | Documentation
 \verbatim
 <?xml version='1.0'?>
 <!DOCTYPE platform SYSTEM "http://simgrid.gforge.inria.fr/simgrid.dtd">
-<platform version="3">
+<platform version="4">
 <config id="General">
        <prop id="maxmin/precision" value="0.000010"></prop>
        <prop id="cpu/optim" value="TI"></prop>
        <prop id="host/model" value="compound"></prop>
        <prop id="network/model" value="SMPI"></prop>
        <prop id="path" value="~/"></prop>
-       <prop id="smpi/bw_factor" value="65472:0.940694;15424:0.697866;9376:0.58729"></prop>
+       <prop id="smpi/bw-factor" value="65472:0.940694;15424:0.697866;9376:0.58729"></prop>
 </config>
 
 <AS  id="AS0"  routing="Full">
 ...
 \endverbatim
 
+\subsection pf_include include
 
-\subsection pf_random random
+Even if it can be used in other contexts, this tag was originally created
+to be used with \ref pf_trace. The idea was to have a file describing the
+platform, and another file attaching traces of a given period to the platform.
 
-<b>This has not yet been implemented.</b>
+The drawback is that the file chuncks that will be included do not
+constitute valid XML files. This may explain why this feature was never really
+used in practice (as far as we know). Other mechanisms, such as the ability to load
+several platform files one after the other, could be considered in the future.
 
-\subsection pf_include include
-
-The \c include tag allows you to import other platforms into your
+In the meanwhile, the \c include tag allows you to import other platforms into your
 local file. This is done with the intention to help people
 combine their different AS and provide new platforms. Those files
 should contain XML that consists of 
 \ref pf_include "include", \ref pf_cluster "cluster", \ref pf_peer "peer", \ref pf_As "AS", \ref pf_trace "trace", \ref pf_trace "tags".
 
-\note
-    Due to some obscure technical reasons, you have to open
-    and close the tag in order to make it work.
+Do not forget to close the tag to make it work, or you will end up with an invalid XML file.
 
 #### Attributes ####
 
 | Attribute name  | Mandatory | Values                  | Description                                                                                                  |
 | --------------- | --------- | ----------------------  | -----------                                                                                                  |
-| file            | yes       | String                  | Filename of the path you want to include with either relative or absolute path. Syntax is defined by your OS |
+| file            | yes       | String                  | Filename of the path you want to include with either relative or absolute path. |
 
 
 #### Example ####
@@ -1606,8 +1618,8 @@ each of them will then be usable.
 
 \verbatim
 <?xml version='1.0'?>
-<!DOCTYPE platform SYSTEM "http://simgrid.gforge.inria.fr/simgrid.dtd">
-<platform version="3">
+<!DOCTYPE platform SYSTEM "http://simgrid.gforge.inria.fr/simgrid/simgrid.dtd">
+<platform version="4">
        <AS id="main" routing="Full">
                <include file="clusterA.xml"></include>
                <include file="clusterB.xml"></include>
@@ -1630,7 +1642,7 @@ entity.
 
 \verbatim
 <AS  id="AS0"  routing="Full">
-  <host id="bob" power="1000000000"/>
+  <host id="bob" speed="1000000000"/>
 </AS>
 <trace id="myTrace" file="bob.trace" periodicity="1.0"/>
 <trace_connect trace="myTrace" element="bob" kind="POWER"/>
@@ -1670,7 +1682,7 @@ Here is an example  of trace when no file name is provided:
 | trace           | yes       | String                 | Identifier of the referenced trace (specified of the trace's \c id attribute)                     |
 | element         | yes       | String                 | The identifier of the referenced entity as given by its \c id attribute                           |
 
-\section pf_hints Hints and tips, or how to write a platform efficiently
+\section pf_hints Hints, tips and frequently requested features
 
 Now you should know at least the syntax and be able to create a
 platform by your own. However, after having ourselves wrote some platforms, there
@@ -1678,6 +1690,22 @@ are some best practices you should pay attention to in order to
 produce good platform and some choices you can make in order to have
 faster simulations. Here's some hints and tips, then.
 
+@subsection Finding the platform example that you need
+
+Most platform files that we ship are in the @c examples/platforms
+folder. The good old @c grep tool can find the examples you need when
+wondering on a specific XML tag. Here is an example session searching
+for @ref pf_trace "trace_connect":
+
+@verbatim
+% cd examples/platforms
+% grep -R -i -n --include="*.xml" "trace_connect" .
+./two_hosts_platform_with_availability_included.xml:26:<trace_connect kind="SPEED" trace="A" element="Cpu A"/>
+./two_hosts_platform_with_availability_included.xml:27:<trace_connect kind="HOST_AVAIL" trace="A_failure" element="Cpu A"/>
+./two_hosts_platform_with_availability_included.xml:28:<trace_connect kind="SPEED" trace="B" element="Cpu B"/>
+./two_hosts.xml:17:  <trace_connect trace="Tremblay_power" element="Tremblay" kind="SPEED"/>
+@endverbatim
+
 \subsection pf_as_h AS Hierarchy
 The AS design allows SimGrid to go fast, because computing route is
 done only for the set of resources defined in this AS. If you're using
@@ -1701,16 +1729,15 @@ non-intuitive schema ... Something like that :
 <AS id="exitAS_4"  routing="Full">
        <router id="router_4"/>
 </AS>
-<cluster id="cl_4_1" prefix="c_4_1-" suffix="" radical="1-20" power="1000000000" bw="125000000" lat="5E-5" bb_bw="2250000000" bb_lat="5E-4"/>
-<cluster id="cl_4_2" prefix="c_4_2-" suffix="" radical="1-20" power="1000000000" bw="125000000" lat="5E-5" bb_bw="2250000000" bb_lat="5E-4"/>
+<cluster id="cl_4_1" prefix="c_4_1-" suffix="" radical="1-20" speed="1000000000" bw="125000000" lat="5E-5" bb_bw="2250000000" bb_lat="5E-4"/>
+<cluster id="cl_4_2" prefix="c_4_2-" suffix="" radical="1-20" speed="1000000000" bw="125000000" lat="5E-5" bb_bw="2250000000" bb_lat="5E-4"/>
 <link id="4_1" bandwidth="2250000000" latency="5E-5"/>
 <link id="4_2" bandwidth="2250000000" latency="5E-5"/>
 <link id="bb_4" bandwidth="2250000000" latency="5E-4"/>
 <ASroute src="cl_4_1"
        dst="cl_4_2"
        gw_src="c_4_1-cl_4_1_router"
-       gw_dst="c_4_2-cl_4_2_router"
-       symmetrical="YES">
+       gw_dst="c_4_2-cl_4_2_router">
                <link_ctn id="4_1"/>
                <link_ctn id="bb_4"/>
                <link_ctn id="4_2"/>
@@ -1718,16 +1745,14 @@ non-intuitive schema ... Something like that :
 <ASroute src="cl_4_1"
        dst="exitAS_4"
        gw_src="c_4_1-cl_4_1_router"
-       gw_dst="router_4"
-       symmetrical="YES">
+       gw_dst="router_4">
                <link_ctn id="4_1"/>
                <link_ctn id="bb_4"/>
 </ASroute>
 <ASroute src="cl_4_2"
        dst="exitAS_4"
        gw_src="c_4_2-cl_4_2_router"
-       gw_dst="router_4"
-       symmetrical="YES">
+       gw_dst="router_4">
                <link_ctn id="4_2"/>
                <link_ctn id="bb_4"/>
 </ASroute>
@@ -1748,43 +1773,44 @@ SimGrid allows you to use some coordinated-based system, like vivaldi,
 to describe a platform. The main concept is that you have some peers
 that are located somewhere: this is the function of the
 <b>coordinates</b> of the \<peer\> or \<host\> tag. There's nothing
-complicated in using it, here is an example of it:
+complicated in using it, here is an example:
 
 \verbatim
 <?xml version='1.0'?>
 <!DOCTYPE platform SYSTEM "http://simgrid.gforge.inria.fr/simgrid.dtd">
-<platform version="3">
+<platform version="4">
 
-<config id="General">
-       <prop id="network/coordinates" value="yes"></prop>
-</config>
  <AS  id="AS0"  routing="Vivaldi">
-       <host id="100030591" coordinates="25.5 9.4 1.4" power="1500000000.0" />
-       <host id="100036570" coordinates="-12.7 -9.9 2.1" power="730000000.0" />
+       <host id="100030591" coordinates="25.5 9.4 1.4" speed="1.5Gf" />
+       <host id="100036570" coordinates="-12.7 -9.9 2.1" speed="7.3Gf" />
        ...
-       <host id="100429957" coordinates="17.5 6.7 18.8" power="830000000.0" />
+       <host id="100429957" coordinates="17.5 6.7 18.8" speed="8.3Gf" />
        </AS>
 </platform>
 \endverbatim
 
-Coordinates are then used to calculate latency between two hosts by
-calculating the euclidean distance between the two hosts coordinates.
-The results express the latency in ms.
+Coordinates are then used to calculate latency (in microseconds)
+between two hosts by calculating the distance between the two hosts
+coordinates with the following formula: distance( (x1, y1, z1), (x2,
+y2, z2) ) = euclidian( (x1,y1), (x2,y2) ) + abs(z1) + abs(z2)
+
+In other words, we take the euclidian distance on the two first
+dimensions, and then add the absolute values found on the third
+dimension. This may seem strange, but it was found to allow better
+approximations of the latency matrices (see the paper describing
+Vivaldi).
 
 Note that the previous example defines a routing directly between hosts but it could be also used to define a routing between AS.
 That is for example what is commonly done when using peers (see Section \ref pf_peer).
 \verbatim
 <?xml version='1.0'?>
 <!DOCTYPE platform SYSTEM "http://simgrid.gforge.inria.fr/simgrid.dtd">
-<platform version="3">
+<platform version="4">
 
-<config id="General">
-       <prop id="network/coordinates" value="yes"></prop>
-</config>
  <AS  id="AS0"  routing="Vivaldi">
-   <peer id="peer-0" coordinates="173.0 96.8 0.1" power="730Mf" bw_in="13.38MBps" bw_out="1.024MBps" lat="500us"/>
-   <peer id="peer-1" coordinates="247.0 57.3 0.6" power="730Mf" bw_in="13.38MBps" bw_out="1.024MBps" lat="500us" />
-   <peer id="peer-2" coordinates="243.4 58.8 1.4" power="730Mf" bw_in="13.38MBps" bw_out="1.024MBps" lat="500us" />
+   <peer id="peer-0" coordinates="173.0 96.8 0.1" speed="730Mf" bw_in="13.38MBps" bw_out="1.024MBps" lat="500us"/>
+   <peer id="peer-1" coordinates="247.0 57.3 0.6" speed="730Mf" bw_in="13.38MBps" bw_out="1.024MBps" lat="500us" />
+   <peer id="peer-2" coordinates="243.4 58.8 1.4" speed="730Mf" bw_in="13.38MBps" bw_out="1.024MBps" lat="500us" />
 </AS>
 </platform>
 \endverbatim
@@ -1822,19 +1848,42 @@ characteristics (lookup : time to resolve a route):
 \li <b>Cluster</b>: Cluster routing, specific to cluster tag, should
     not be used.
 
-\subsection pf_switch Hey, I want to describe a switch but there is no switch tag !
+\subsection pf_switch I want to describe a switch but there is no switch tag!
+
+Actually we did not include switch tag. But when you're trying to
+simulate a switch, assuming 
+fluid bandwidth models are used (which SimGrid uses by default unless 
+ns-3 or constant network models are activated), the limiting factor is
+switch backplane bandwidth. So, essentially, at least from
+the simulation perspective, a switch is similar to a
+link: some device that is traversed by flows and with some latency and
+so,e maximum bandwidth. Thus, you can simply simulate a switch as a
+link. Many links
+can be connected to this "switch", which is then included in routes just
+as a normal link.
+
 
-Actually we did not include switch tag, ok. But when you're trying to
-simulate a switch, the only major impact it has when you're using
-fluid model (and SimGrid uses fluid model unless you activate 
-ns-3 or constant network mode) is the impact of the upper limit of
-the switch motherboard speed that will eventually be reached if you're
-using intensively your switch. So, the switch impact is similar to a
-link one. That's why we are used to describe a switch using a link tag
-(as a link is not an edge by a hyperedge, you can connect more than 2
-other links to it).
+\subsection pf_multicabinets I want to describe multi-cabinets clusters!
 
-\subsection pf_platform_multipath How to express multipath routing in platform files?
+You have several possibilities, as usual when modeling things. If your
+cabinets are homogeneous and the intercabinet network negligible for
+your study, you should just create a larger cluster with all hosts at
+the same layer. 
+
+In the rare case where your hosts are not homogeneous between the
+cabinets, you can create your cluster completely manually. For that,
+create an As using the Cluster routing, and then use one
+&lt;cabinet&gt; for each cabinet. This cabinet tag can only be used an
+As using the Cluster routing schema, and creating 
+
+Be warned that creating a cluster manually from the XML with
+&lt;cabinet&gt;, &lt;backbone&gt; and friends is rather tedious. The
+easiest way to retrieve some control of your model without diving into
+the &lt;cluster&gt; internals is certainly to create one separate
+&lt;cluster&gt; per cabinet and interconnect them together. This is
+what we did in the G5K example platform for the Graphen cluster.
+
+\subsection pf_platform_multipath I want to express multipath routing in platform files!
 
 It is unfortunately impossible to express the fact that there is more
 than one routing path between two given hosts. Let's consider the
@@ -1863,7 +1912,7 @@ id="3"/&gt;&lt;/route&gt;), without trying to build new routes by aggregating
 the provided ones.
 
 You are also free to declare platform where the routing is not
-symmetric. For example, add the following to the previous file:
+symmetrical. For example, add the following to the previous file:
 
 \verbatim
 <route src="C" dst="A">
@@ -1878,89 +1927,4 @@ we've seen ways more weird situation in real settings (in fact, that's
 the realism of very regular platforms which is questionable, but
 that's another story).
 
-\section pf_flexml_bypassing Bypassing the XML parser with your own C functions
-<b>NOTE THAT THIS DOCUMENTATION, WHILE STILL WORKING, IS STRONGLY DEPRECATED</b>
-
-So you want to bypass the XML files parser, uh? Maybe doing some parameter
-sweep experiments on your simulations or so? This is possible, and
-it's not even really difficult (well. Such a brutal idea could be
-harder to implement). Here is how it goes.
-
-For this, you have to first remember that the XML parsing in SimGrid is done
-using a tool called FleXML. Given a DTD, this gives a flex-based parser. If
-you want to bypass the parser, you need to provide some code mimicking what
-it does and replacing it in its interactions with the SURF code. So, let's
-have a look at these interactions.
-
-FleXML parser are close to classical SAX parsers. It means that a
-well-formed SimGrid platform XML file might result in the following
-"events":
-
-  - start "platform_description" with attribute version="2"
-  - start "host" with attributes id="host1" power="1.0"
-  - end "host"
-  - start "host" with attributes id="host2" power="2.0"
-  - end "host"
-  - start "link" with ...
-  - end "link"
-  - start "route" with ...
-  - start "link_ctn" with ...
-  - end "link_ctn"
-  - end "route"
-  - end "platform_description"
-
-The communication from the parser to the SURF code uses two means:
-Attributes get copied into some global variables, and a surf-provided
-function gets called by the parser for each event. For example, the event
-  - start "host" with attributes id="host1" power="1.0"
-
-let the parser do something roughly equivalent to:
-\verbatim
-  strcpy(A_host_id,"host1");
-  A_host_power = 1.0;
-  STag_host();
-\endverbatim
-
-In SURF, we attach callbacks to the different events by initializing the
-pointer functions to some the right surf functions. Since there can be
-more than one callback attached to the same event (if more than one
-model is in use, for example), they are stored in a dynar. Example in
-host_ptask_L07.c:
-\verbatim
-  /* Adding callback functions */
-  surf_parse_reset_parser();
-  surfxml_add_callback(STag_surfxml_host_cb_list, &parse_cpu_init);
-  surfxml_add_callback(STag_surfxml_prop_cb_list, &parse_properties);
-  surfxml_add_callback(STag_surfxml_link_cb_list, &parse_link_init);
-  surfxml_add_callback(STag_surfxml_route_cb_list, &parse_route_set_endpoints);
-  surfxml_add_callback(ETag_surfxml_link_c_ctn_cb_list, &parse_route_elem);
-  surfxml_add_callback(ETag_surfxml_route_cb_list, &parse_route_set_route);
-
-  /* Parse the file */
-  surf_parse_open(file);
-  xbt_assert(!surf_parse(), "Parse error in %s", file);
-  surf_parse_close();
-\endverbatim
-
-So, to bypass the FleXML parser, you need to write your own version of the
-surf_parse function, which should do the following:
-   - Fill the A_<tag>_<attribute> variables with the wanted values
-   - Call the corresponding STag_<tag>_fun function to simulate tag start
-   - Call the corresponding ETag_<tag>_fun function to simulate tag end
-   - (do the same for the next set of values, and loop)
-
-Then, tell SimGrid that you want to use your own "parser" instead of the stock one:
-\verbatim
-  surf_parse = surf_parse_bypass_environment;
-  MSG_create_environment(NULL);
-  surf_parse = surf_parse_bypass_application;
-  MSG_launch_application(NULL);
-\endverbatim
-
-A set of macros are provided at the end of
-include/surf/surfxml_parse.h to ease the writing of the bypass
-functions. An example of this trick is distributed in the file
-examples/msg/masterslave/masterslave_bypass.c
-
-
 */