Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Added and corrected some stuff in platform.doc. Moved some stuff from FAQ concerning...
authorLaurent Bobelin <lbobelin@mintcar.lip.ens-lyon.fr>
Fri, 30 Mar 2012 10:46:20 +0000 (12:46 +0200)
committerLaurent Bobelin <lbobelin@mintcar.lip.ens-lyon.fr>
Fri, 30 Mar 2012 10:46:34 +0000 (12:46 +0200)
doc/FAQ.doc
doc/platform.doc

index 93f752d..88f7afc 100644 (file)
@@ -356,7 +356,7 @@ of processes in your simulations.
      file, so I wrote a little script
      <tt>examples/gras/mutual_exclusion/simple_token/make_deployment.pl</tt>, which you may
      want to adapt to your case. You could also think about hijacking
-     the SURFXML parser (have look at \ref faq_flexml_bypassing).
+     the SURFXML parser (have look at \ref pf_flexml_bypassing).
    - The deployment file became quite big, so I had to do what is in
      the FAQ entry \ref faq_flexml_limit
    - Each UNIX98 context has its own stack entry. As debugging this is
@@ -461,19 +461,6 @@ annotate Tiers-generated topologies. This perl-script is in
 <tt>tools/platform_generation/</tt> directory of the SVN. Dinda et Al.
 released a very comparable tool, and called it GridG.
 
-\subsubsection faq_SURF_multicore Modeling multi-core resources 
-
-Since version 3.6 of simgrid we can specify the core number of a resource.
-To use this feature use tag 'host' with 'core' attribute. 
-\verbatim
-<?xml version='1.0'?>
-<!DOCTYPE platform SYSTEM "http://simgrid.gforge.inria.fr/simgrid.dtd">
-<platform version="3">
-    <AS  id="AS0"  routing="Full">
-        <host id="Tremblay" power="98095000" core="6"/>
-    </AS>
-</platform>
-\endverbatim
 
 The specified computing power will be available to up to 6 sequential
 tasks without sharing. If more tasks are placed on this host, the
@@ -482,188 +469,8 @@ tasks on the host, each will get half of the computing power. Please
 note that although sound, this model were never scientifically
 assessed. Please keep this fact in mind when using it.
 
-\subsubsection faq_SURF_dynamic Modeling dynamic resource availability 
-
-A nice feature of SimGrid is that it enables you to seamlessly have
-resources whose availability change over time. When you build a
-platform, you generally declare hosts like that:
-
-\verbatim
-  <host id="host A" power="100.00"/>
-\endverbatim 
-
-If you want the availability of "host A" to change over time, the only
-thing you have to do is change this definition like that:
-
-\verbatim
-  <host id="host A" power="100.00" availability_file="trace_A.txt" state_file="trace_A_failure.txt"/>
-\endverbatim
-
-For hosts, availability files are expressed in fraction of available
-power. Let's have a look at what "trace_A.txt" may look like:
 
-\verbatim
-PERIODICITY 1.0
-0.0 1.0
-11.0 0.5
-20.0 0.9
-\endverbatim
-
-At time 0, our host will deliver 100 flop/s. At time 11.0, it will
-deliver only 50 flop/s until time 20.0 where it will start
-delivering 90 flop/s. Last at time 21.0 (20.0 plus the periodicity
-1.0), we'll be back to the beginning and it will deliver 100 flop/s.
-
-Now let's look at the state file:
-\verbatim
-PERIODICITY 10.0
-1.0 -1.0
-2.0 1.0
-\endverbatim
-
-A negative value means "off" while a positive one means "on". At 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 so on.
-
-Now, let's look how the same kind of thing can be done for network
-links. A usual declaration looks like:
-
-\verbatim
-  <link id="LinkA" bandwidth="10.0" latency="0.2"/>
-\endverbatim
-
-You have at your disposal the following options: bandwidth_file,
-latency_file and state_file. The only difference with hosts is that
-bandwidth_file and latency_file do not express fraction of available
-power but are expressed directly in bytes per seconds and seconds.
-
-\subsubsection faq_platform_multipath How 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
-following platform file:
-
-\verbatim
-<route src="A" dst="B">
-   <link_ctn id="1"/>
-</route>
-<route src="B" dst="C">
-  <link_ctn id="2"/>
-</route>
-<route src="A" dst="C">
-  <link_ctn id="3"/>
-</route>
-\endverbatim
-
-Although it is perfectly valid, it does not mean that data traveling
-from A to C can either go directly (using link 3) or through B (using
-links 1 and 2). It simply means that the routing on the graph is not
-trivial, and that data do not following the shortest path in number of
-hops on this graph. Another way to say it is that there is no implicit
-in these routing descriptions. The system will only use the routes you
-declare (such as &lt;route src="A" dst="C"&gt;&lt;link_ctn
-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:
-
-\verbatim
-<route src="C" dst="A">
-  <link_ctn id="2"/>
-  <link_ctn id="1"/>
-</route>
-\endverbatim
-
-This makes sure that data from C to A go through B where data from A
-to C go directly. Don't worry about realism of such settings since
-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).
-
-\subsubsection faq_flexml_bypassing Bypassing the XML parser with your own C functions
-
-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
-workstation_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
 
 \section faq_troubleshooting Troubleshooting
 
@@ -797,7 +604,7 @@ was done by William Dowling, who use it in his own work. The good point is
 that it now use a dynamic buffer, and that the memory usage was greatly
 improved. The downside is that William also changed some things internally,
 and it breaks the hack we devised to bypass the parser, as explained in 
-\ref faq_flexml_bypassing. Indeed, this is not a classical usage of the
+\ref pf_flexml_bypassing. Indeed, this is not a classical usage of the
 parser, and Will didn't imagine that we may have used (and even documented)
 such a crude usage of FleXML. So, we now have to repair the bypassing
 functionality to use the lastest FleXML version and fix the memory usage in
index e0042ac..c8ed826 100644 (file)
@@ -9,7 +9,7 @@ application, and finally it needs something to know where to deploy what.
 For the latest 2 entries, you have basically 2 ways to give it as an input :
 \li You can program it, either using the Lua console or if you're using MSG some 
 of its platform and deployments functions. If you want to use it, please refer 
-to its doc.
+to its doc. (you can also  check the section  \ref pf_flexml_bypassing but this is strongly deprecated, as there is a new way to do it properly, but not yet documented).
 \li You can use two XML files: a platform description file and a deployment 
 description one.
 
@@ -129,7 +129,13 @@ A <b>host</b> represents a computer, where you will be able to execute code and
 <b>host</b> attributes : 
 \li <b>id (mandatory)</b>: the identifier of the host to be used when referring to it.
 \li <b>power (mandatory)</b>:the peak number FLOPS the CPU can manage. Expressed in flop/s.
-\li <b>core</b>: The number of core of this host. If setted, the power gives the power of one core.
+\li <b>core</b>: The number of core of this host. If setted, the power gives the power of one core. The specified computing power will be available to up to 6 sequential
+tasks without sharing. If more tasks are placed on this host, the
+resource will be shared accordingly. For example, if you schedule 12
+tasks on the host, each will get half of the computing power. Please
+note that although sound, this model were never scientifically
+assessed. Please keep this fact in mind when using it.
+
 \li <b>availability</b>: specify if the percentage of power available. 
 \li <b>availability_file</b>: Allow you to use a file as input. This file will contain availability traces for this computer. The syntax of this file is defined below. Possible values : absolute or relative path, syntax similar to the one in use on your system.
 \li <b>state</b>: the computer state, as in : is that computer ON or OFF. Possible values : "ON" or "OFF".
@@ -336,7 +342,7 @@ By default a network link is SHARED, that is if more than one flow go through
 a link, each gets a share of the available bandwidth similar to the share TCP connections offers. 
 
 Conversely if a link is defined as a FATPIPE, each flow going through this link will get all the available bandwidth, whatever the number of flows. The FATPIPE
-behavior allows to describe big backbones that won't affect performances (except latency). Finally a link can be considered as FULLDUPLEX, XXX?
+behavior allows to describe big backbones that won't affect performances (except latency). Finally a link can be considered as FULLDUPLEX, that means that in the simulator, 2 links (one named UP and the other DOWN) will be created for each link, so as the 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 <b>link_ctn</b> description. 
 
 \verbatim
  <link id="SWITCH" bandwidth="125000000" latency="5E-5" sharing_policy="FATPIPE" />
@@ -380,7 +386,7 @@ at 100µs for one second.
 <b>link</b> attributes : 
 \li <b>id (mandatory)</b>: the identifier of the cluster to be used when referring to it.
 \li <b>bandwidth (mandatory)</b>: bandwidth for the link.
-\li <b>lat (mandatory)</b>: latency for the link.
+\li <b>lat </b>: latency for the link. Default is 0.0.
 \li <b>sharing_policy</b>: sharing policy for the link.
 \li <b>state</b>: Allow you to to set link as ON or OFF. Default is ON.
 \li <b>bandwidth_file</b>: Allow you to use a file as input for bandwidth.
@@ -540,7 +546,50 @@ XXX?
 \li <b>Vivaldi</b>: Vivaldi routing, so when you want to use coordinates. See the corresponding section P2P below for details.
 \li <b>Cluster</b>: Cluster routing, specific to cluster tag, should not be used, except internally.
 
-\subsection pf_asro ASroute
+\subsection ps_dec Defining routes
+
+The principle of route definition is the same for the 4 available tags for doing it. Those for tags are: 
+
+\li <b>route</b>: to define route between host/router
+\li <b>ASroute</b>: to define route between AS
+\li <b>bypassRoute</b>: to bypass normal routes as calculated by the network model between host/router
+\li <b>bypassASroute</b>: same as bypassRoute, but for AS
+
+Basically all those tags will contain an (ordered) list of references to link that compose the route you want to define. 
+
+Consider the example below: 
+
+\verbatim
+<route src="Alice" dst="Bob">
+       <link_ctn id="link1"/>
+       <link_ctn id="link2"/>
+       <link_ctn id="link3"/>
+   </route>
+\endverbatim
+
+The route here fom host Alice to Bob will be first link1, then link2, and finally link3. What about the reverse route ? <b>route</b> and <b>ASroute</b> have an optional attribute <b>symmetrical</b>, that can be either YES or NO. YES means that the reverse route is the same route in the inverse order, and is setted to YES by default. Note that this is not the case for bypass*Route, as it is more probable that you want to bypass only one default route.
+
+For an ASroute, things are just sligthly more complicated, as you have to give the id of the gateway which is inside the AS you're talking about you want to access ... So it looks like this : 
+
+
+\verbatim
+  <ASroute src="AS1" dst="AS2"
+    gw_src="router1" gw_dst="router2">
+    <link_ctn id="link1"/>
+  </ASroute>
+\endverbatim
+
+gw == gateway, so when any message are trying to go from AS1 to AS2, it means that it must pass through router1 to get out of the AS, then pass through link1, and get into AS2 by being received by router2. router1 must belong to AS1 and router2 must belong to AS2. 
+
+\subsubsection pf_linkctn link_ctn
+
+a <b>link_ctn</b> is the tag that is used in order to reference a <b>link</b> in a route. Its id is the link id it refers to.
+
+<b>link_ctn</b> attributes : 
+\li <b>id (mandatory)</b>: Id of the link this tag refers to
+\li <b>direction</b>: if the link referenced by <b>id</b> has been declared as FULLDUPLEX, this is used to indicate in which direction the route you're defining is going through this link. Possible values "UP" or "DOWN".
+
+\subsubsection pf_asro ASroute
 
 ASroute tag purpose is to let people write manually their routes between AS. It's usefull when you're in Full or Rule-based model.
 
@@ -586,7 +635,7 @@ ASroute tag purpose is to let people write manually their routes between AS. It'
 </AS>
 \endverbatim
 
-\subsection pf_ro route
+\subsubsection pf_ro route
 The principle is the same as ASroute : <b>route</b> contains list of links that are in the path between src and dst, except that it is for routes between a src that can be either <b>host</b> or \b router and a dst that can be either <b>host</b> or \b router. Usefull for Full and RuleBased, as well as for the shortest-paths based models, where you have to give topological informations.
 
 
@@ -610,22 +659,45 @@ The principle is the same as ASroute : <b>route</b> contains list of links that
 \endverbatim
 Note that when using route to give topological information, you have to give routes with one link only in it, as SimGrid needs to know which host are at the end of the link.
 
-\subsection pf_byro bypassRoute
-
-As said before, once you choose a model, it (if so) 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 : <b>bypassRoute</b> is the tag you're looking for. It allows to bypass routes defined between already defined between AS (if you want to bypass route for a specific host, you should just XXX?). The principle is the same as ASroute : <b>bypassRoute</b> contains list of links that are in the path between src and dst.
+\subsubsection pf_byro bypassASroute
+<b>Note : bypassASroute and bypassRoute are under rewriting to perform better ; so you may not use it yet</b>
+As said before, once you choose a model, it (if so) 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 : <b>bypassASroute</b> is the tag you're looking for. It allows to bypass routes defined between already defined between AS (if you want to bypass route for a specific host, you should just use byPassRoute). The principle is the same as ASroute : <b>bypassASroute</b> contains list of links that are in the path between src and dst.
 
-<b>bypassRoute</b> attributes : 
+<b>bypassASroute</b> attributes : 
 \li <b>src (mandatory)</b>: the source AS id.
 \li <b>dst (mandatory)</b>: the destination AS id.
 \li <b>gw_src (mandatory)</b>: the gateway to be used within the AS. Can be any <b>host</b> or \b router defined into the \b src AS or into one of the AS it includes.  
 \li <b>gw_dst (mandatory)</b>: the gateway to be used within the AS. Can be any <b>host</b> or \b router defined into the \b dst AS or into one of the AS it includes.
 \li <b>symmetrical</b>: if the route is symmetric, the reverse route will be the opposite of the one defined. Can be either YES or NO, default is  YES.
 
-<b>bypassRoute Example</b>
+<b>bypassASroute Example</b>
 \verbatim
+    <bypassASRoute src="my_cluster_1" dst="my_cluster_2"
+     gw_src="my_cluster_1_router" 
+     gw_dst="my_cluster_2_router">
+        <link_ctn id="link_tmp"/>  
+     </bypassASroute>
+\endverbatim
+
+\subsubsection pf_byro bypassRoute
+<b>Note : bypassASRoute and bypassRoute are under rewriting to perform better ; so you may not use it yet</b>
+As said before, once you choose a model, it (if so) 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 : <b>bypassRoute</b> is the tag you're looking for. It allows to bypass routes defined between <b>host/router</b>. The principle is the same as route : <b>bypassRoute</b> contains list of links references of links that are in the path between src and dst.
+
+<b>bypassRoute</b> attributes : 
+\li <b>src (mandatory)</b>: the source AS id.
+\li <b>dst (mandatory)</b>: the destination AS id.
+\li <b>symmetrical</b>: if the route is symmetric, the reverse route will be the opposite of the one defined. Can be either YES or NO, default is  YES.
 
+<b>bypassRoute Example</b>
+\verbatim
+<b>bypassRoute Example</b>
+\verbatim
+    <bypassRoute src="host_1" dst="host_2">
+        <link_ctn id="link_tmp"/>  
+     </bypassRoute>
 \endverbatim
 
+
 \subsection pb_baroex Basic Routing Example
 
 Let's say you have an AS named AS_Big that contains two other AS, AS_1 and AS_2. If you want to make an host (h1) from AS_1 with another one (h2) from  AS_2 and you did not have choosen to use some routing model that compute routes automatically, then you'll have to proceed as follow: 
@@ -650,7 +722,7 @@ There are 3 tags, that you can use inside a \<platform\> tag that are not descri
 \li <b>id (mandatory)</b>: the identifier of the config to be used when referring to it.
 
 
-<b>config</b> tag only purpose is to include <b>prop</b> tags. Valid id are basically the same as the list of possible parameters you can use by command line, except that "/" are used for namespace definition.
+<b>config</b> tag only purpose is to include <b>prop</b> tags. Valid id are basically the same as the list of possible parameters you can use by command line, except that "/" are used for namespace definition. See the \ref options config and options page for more information.
 
 
 <b>config example</b>
@@ -673,10 +745,52 @@ There are 3 tags, that you can use inside a \<platform\> tag that are not descri
 
 
 \subsection pf_rand random
-Not yet in use XXX?
+Not yet in use, and possibly subject to huge modifications.
 
 \subsection pf_incl include
-Not yet in use XXX?
+<b>include</b> tag allows to import into a file platform parts located in another file. This is done with the intention to help people combine their different AS and provide new platforms. Those files should contains XML part that contains either <b>include,cluster,peer,AS,trace,trace_connect</b> tags.
+
+<b>include</b> attributes : 
+\li <b>file (mandatory)</b>: filename of the file to include. Possible values : absolute or relative path, syntax similar to the one in use on your system.
+
+<b>Note</b> : due to some obscure technical reasons, you have to open and close tag in order to let it work. 
+<b>include Example</b>
+\verbatim
+<?xml version='1.0'?>
+<!DOCTYPE platform SYSTEM "http://simgrid.gforge.inria.fr/simgrid.dtd">
+<platform version="3">
+       <AS id="main" routing="Full">
+               <include file="clusterA.xml"></include>
+               <include file="clusterB.xml"></include>
+       </AS>
+</platform>
+\endverbatim
+
+\subsection pf_tra trace and trace_connect
+Both tags are an alternate way to passe availability, state, and so on files to entity. Instead of refering to the file directly in the host, link, or cluster tag, you proceed by defining a trace with an id corresponding to a file, later an host/link/cluster, and finally using trace_connect you say that the file trace must be used by the entity. Get it ? Let's have a look at an example :
+
+\verbatim
+<AS  id="AS0"  routing="Full">
+  <host id="bob" power="1000000000"/>  
+</AS>
+  <trace id="myTrace" file="bob.trace" periodicity="1.0"/>
+  <trace_connect trace="myTrace" element="bob" kind="POWER"/>
+\endverbatim
+
+All constraints you have is that <b>trace_connect</b> is after <b>trace</b> and <b>host</b> definitions. 
+
+
+<b>trace</b> attributes : 
+\li <b>id (mandatory)</b>: the identifier of the trace to be used when referring to it.
+\li <b>file</b>: filename of the file to include. Possible values : absolute or relative path, syntax similar to the one in use on your system.
+\li <b>trace periodicity (mandatory)</b>: trace periodicity, same definition as in hosts (see upper for details).
+
+<b>trace_connect</b> attributes : 
+\li <b>kind</b>: the type of trace, possible values <b>HOST_AVAIL|POWER|LINK_AVAIL|BANDWIDTH|LATENCY,</b>  default: <b>HOST_AVAIL</b>
+\li <b>trace (mandatory)</b>: the identifier of the trace referenced.
+\li <b>element (mandatory)</b>: the identifier of the entity referenced.
+
+
 
 \section pf_hints Hints and tips, or how to write a platform efficiently
 
@@ -750,6 +864,7 @@ SimGrid allows you to use some coordinated-based system, like vivaldi, to descri
 </platform>
 \endverbatim
 
+Coordinates are then used to calculate latency between two hosts by calculating the euclidian distance between the two hosts coordinates. The results express the latency in ms.
 
 \subsection pf_wisely Choosing wisely the routing model to use
 
@@ -769,6 +884,134 @@ Choosing wisely the routing model to use can significantly fasten your simulatio
 
 \subsection pf_switch Hey, I want to describe a switch but there is no switch tag !
 
-Actually we did not include swith 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 GTNetS or ns-3 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).
+Actually we did not include swith 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 GTNetS, 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_platform_multipath How 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
+following platform file:
+
+\verbatim
+<route src="A" dst="B">
+   <link_ctn id="1"/>
+</route>
+<route src="B" dst="C">
+  <link_ctn id="2"/>
+</route>
+<route src="A" dst="C">
+  <link_ctn id="3"/>
+</route>
+\endverbatim
+
+Although it is perfectly valid, it does not mean that data traveling
+from A to C can either go directly (using link 3) or through B (using
+links 1 and 2). It simply means that the routing on the graph is not
+trivial, and that data do not following the shortest path in number of
+hops on this graph. Another way to say it is that there is no implicit
+in these routing descriptions. The system will only use the routes you
+declare (such as &lt;route src="A" dst="C"&gt;&lt;link_ctn
+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:
+
+\verbatim
+<route src="C" dst="A">
+  <link_ctn id="2"/>
+  <link_ctn id="1"/>
+</route>
+\endverbatim
+
+This makes sure that data from C to A go through B where data from A
+to C go directly. Don't worry about realism of such settings since
+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
+workstation_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
+
 
 */