Complete XML Reference

Your platform description should follow the specification presented in the simgrid.dtd DTD file. The same DTD is used for both platform and deployment files.

Here is the complete list of all existing tags in the DTD:

<actor>: request the creation of an actor (deployment file, not in the platform).
<argument>: pass parameters to the created actors (deployment file, not in the platform).
<backbone>: building clusters manually from the XML (deprecated, please use the C++ API).
<bypassRoute>: tweeking the routing (advanced tag).
<bypassZoneRoute>: tweeking the routing (expert-only tag).
<cabinet>: building clusters manually from the XML (deprecated, please use the C++ API).
<cluster>: building a cluster (aka, a full zone in one tag only).
<config>: pass simulation parameters from the XML file.
<disk>: storage resource.
<host>: computing resource.
<host_link>: building clusters manually from the XML (deprecated, please use the C++ API).
<link>: communication resource.
<link_ctn>: name of a link to be included in a route.
<peer>: host located in a Vivaldi zone.
<platform>: root tag of any platform description.
<prop>: attach used-defined properties to your <actor>, <disk>, <host>, <link> or <zone>.
<route>: intra-zone network path.
<router>: like an <host> that cannot host actors (for network routing algorithms).
<zone>: area of the network containing elements (<disk>, <host>, <link> and sub-<zone>).
<zoneRoute>: inter-zone network path.


<cluster>

This complex tag builds a full zone, with some hosts, links, a router, and the relevant routing algorithm. There is several kind of specifically tailored cluster types: crossbar clusters (contention-free internal network), backbone clusters (constrained internal network), fat-trees, DragonFly and Torus (star clusters are similar, but can only be created from the C++ code). The topology attribute is used to choose the type of cluster while the topo_parameters attribute is used to configure the topology. Please refer to the examples in the documentation for all details.

Regardless of its topology, each cluster comes with a router that can be used for inter-zone routing. Its name is defined as ${prefix}${clusterId}_router${suffix}.

Parent tags: <platform>, <zone>
Children tags: none
Attributes:

id:

The identifier of the cluster. Facilitates referring to this cluster.

prefix:

Each node of the cluster has to have a name. This name will be prefixed with this prefix.

suffix:

Each node of the cluster will be suffixed with this suffix

radical:

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.

speed:

Same as the speed attribute of the <host> tag.

core:

Same as the core attribute of the <host> tag.

bw:

Bandwidth for the links between nodes and backbone (if any). See <link> for syntax/details.

lat:

Latency for the links between nodes and backbone (if any). See <link> for syntax/details.

sharing_policy:

Sharing policy for the links between nodes and backbone (if any). See <link> for syntax/details.

bb_bw:

Bandwidth for backbone (if any). See <link> for syntax/details.

If bb_bw and bb_lat attributes are omitted, no backbone is created (alternative cluster architecture described earlier).

bb_lat:

Latency for backbone (if any). See <link> section for syntax/details.

If bb_lat and bb_bw attributes are omitted, no backbone is created (alternative cluster architecture described earlier).

bb_sharing_policy:

Sharing policy for the backbone (if any). See <link> section for syntax/details.

limiter_link:

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 splitduplex 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 Toward Better Simulation of MPI Applications on Ethernet/TCP Networks

loopback_bw:

Bandwidth for loopback (if any). See <link> section for syntax/details.

If loopback_bw and loopback_lat attributes are omitted, no loopback link is created and all intra-node communication will use the main network link of the node.

The sharing policy of a loopback link is FATPIPE <link>.

loopback_lat:

Latency for loopback (if any). See loopback_bw for more info.

topology:

Network topology to use.

SimGrid currently supports FLAT (with or without backbone, as described before), TORUS, FAT_TREE and DRAGONFLY attributes for this tag.

See Network Topology Examples for more details.

topo_parameters:

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.

Please refer to Network Topology Examples.


<config>

Adding configuration flags directly into the platform file becomes particularly useful when the realism of the described platform depends on some specific flags. For example, this could help you to finely tune SMPI. Almost all command-line configuration items can be configured this way.

Each configuration flag is described as a <prop> whose id is the name of the flag and value is what it has to be set to.

Parent tags: <platform> (must appear before any other tags)
Children tags: <prop>
Attributes: none

<?xml version = '1.0'?>
<!DOCTYPE platform SYSTEM "https://simgrid.org/simgrid.dtd">
<platform version = "4.1">
  <config>
    <prop id = "precision/work-amount" value = "0.000010" />
    <prop id = "cpu/optim" value = "TI" />
    <prop id = "network/model" value = "SMPI" />
    <prop id = "network/bandwidth-factor" value = "65472:0.940694;15424:0.697866;9376:0.58729" />
  </config>

  <!-- The rest of your platform -->
</platform>

<disk>

SimGrid can simulate the time it takes to read or write data on disk, even if the stored data is not made persistent in any way by SimGrid. This means that your application will correctly be slowed down when doing simulated I/O, but there is no way to get the data stored this way.

We decided to not model anything beyond raw access in SimGrid because we believe that there is not single way of doing so. We provide an example model of file system as a plugin, (sparsely) documented in File System.

Parent tags: <host>
Children tags: <prop>
Attributes:

id:

A name of your choice (must be unique on this host).

read_bw:

Read bandwidth for this disk. You must specify a unit as follows.

Units in bytes and powers of 2 (1 KiBps = 1,024 Bps):

Bps, KiBps, MiBps, GiBps, TiBps, PiBps, or EiBps.

Units in bits and powers of 2 (1 Bps = 8 bps):

bps, Kibps, Mibps, Gibps, Tibps, Pibps, or Eibps.

Units in bytes and powers of 10 (1 KBps = 1,000 Bps):

Bps, KBps, MBps, GBps, TBps, PBps, or EBps.

Units in bits and powers of 10:

bps, Kbps, Mbps, Gbps, Tbps, Pbps, or Ebps.

write_bw:

Write bandwidth for this disk. You must specify a unit as for the read bandwidth.

<host id="alice" speed="1Gf">
  <disk id="Disk1" read_bw="200MBps" write_bw="80MBps">
    <!-- you can add properties for anything you want: they are not used by SimGrid -->
    <prop id="content" value="storage/content/small_content.txt"/>
  </disk>
  <prop id="ram" value="100B" />
</host>

<host>

A host is the computing resource on which an actor can run. See simgrid::s4u::Host.

Parent tags: <zone> (only leaf zones, i.e., zones containing neither inner zones nor clusters)
Children tags: <prop>, <disk>
Attributes:

id:

Host name. Must be unique over the whole platform.

speed:

Computational power (per core, in flop/s). If you use DVFS, provide a comma-separated list of values for each pstate (see DVFS).

core:

Amount of cores (default: 1). See Modeling multicore machines.

availability_file:

File containing the availability profile. Almost every lines of such files describe timed events as date ratio. Example:

1 0.5
2 0.2
5 1
LOOPAFTER 5
  • At time t = 1, half of the host computational power (0.5 means 50%) is used to process some background load, hence only 50% of this initial power remains available to your own simulation.

  • At time t = 2, the available power drops at 20% of the initial value.

  • At time t = 5, the host can compute at full speed again.

  • At time t = 10, the profile is reset (as we are 5 seconds after the last event). Then the available speed will drop again to 50% at time t = 11.

If your profile does not contain any LOOPAFTER line, then it will be executed only once and not repeated.

Warning

Don’t get fooled: Bandwidth and Latency profiles of a <link> contain absolute values, while Availability profiles of a <host> contain ratios.

state_file:

File containing the state profile. Almost every lines of such files describe timed events as date boolean. Example:

1 0
2 1
LOOPAFTER 8
  • At time t = 1, the host is turned off (a zero value means OFF)

  • At time t = 2, the host is turned back on (any other value than zero means ON)

  • At time t = 10, the profile is reset (as we are 8 seconds after the last event). Then the host will be turned off again at time t = 11.

If your profile does not contain any LOOPAFTER line, then it will be executed only once and not repeated.

coordinates:

Vivaldi coordinates (meaningful for Vivaldi zones only). See <peer>.

pstate:

Initial pstate (default: 0, the first one). See DVFS.


<peer>

This tag represents a peer, as in Peer-to-Peer (P2P) networks. It is handy to model situations where hosts have an asymmetric connectivity. Computers connected through set-top-boxes usually have a much better download rate than their upload rate. To model this, <peer> creates and connects several elements: a host, an upload link and a download link.

Parent tags: <zone> (only with Vivaldi routing)
Children tags: none
Attributes:

id:

Name of the host. Must be unique on the whole platform.

speed:

Computational power (in flop/s).

If you use DVFS, provide a comma-separated list of values for each pstate (see DVFS).

bw_in:

Bandwidth of the private downstream link, along with its unit. See <link>.

bw_out:

Bandwidth of the private upstream link, along with its unit. See <link>.

lat:

Latency of both private links. See <link>.

coordinates:

Coordinates of the gateway for this peer.

The communication latency between a host A = (xA,yA,zA) and a 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 coordinates, and on how the up and down bandwidth are used.

availability_file:

File containing the availability profile. See the full description in <host>

state_file:

File containing the state profile. See the full description in <host>


<platform>

Parent tags: none (this is the root tag of every file)
Children tags: <config> (must come first), <cluster>, <cabinet>, <peer>, <zone>, pf_tag_trace, pf_tag_trace_connect, or <actor> in deployment files.
Attributes:

version:

Version of the DTD, describing the whole XML format. This versioning allow future evolutions, even if we avoid backward-incompatible changes. The current version is 4.1. The simgrid_update_xml program can upgrade most of the past platform files to the most recent formalism.


<prop>

This tag can be used to attach user-defined properties to some platform elements. Both the name and the value can be any string of your wish. You can use this to pass extra parameters to your code and the plugins.

From your code, you can interact with these properties using the following functions:

Parent tags: <actor>, <config>, <cluster>, <host>, <link>, <disk>,:ref:pf_tag_zone
Children tags: none
Attributes:

id:

Name of the defined property.

value:

Value of the defined property.


<route>

A path between two network locations, composed of several occurrences of <link>. It is only relevant for intra-<zone> routes. Inter-zone routes must be declared with <zoneRoute>. More detail can be found in the following sections Describing routes and Calculating network paths.

Parent tags: <zone>
Children tags: <link_ctn>
Attributes:

src:

Host from which this route starts. Must be the name of an existing host.

dst:

Host to which this route leads. Must be the name of an existing host.

symmetrical:

Whether this route is symmetrical, ie, whether we are defining the route dst -> src at the same time. Valid values: yes, no, YES, NO (default: YES).


<router>

A router is similar to a <host>, but it cannot contain any actor. It is only useful to some routing algorithms. In particular, they are useful when you want to use the NS3 bindings to break the routes that are longer than 1 hop.

Parent tags: <zone> (only leaf zones, i.e., zones containing neither inner zones nor clusters)
Attributes:

id:

Router name. No other host or router may have the same name over the whole platform.

coordinates:

Vivaldi coordinates. See <peer>.


<zone>

A networking zone is an area in which elements are located. See simgrid::s4u::NetZone.

Parent tags: <platform>, <zone> (only internal nodes, i.e., zones containing only inner zones or clusters but no basic elements such as host or peer)
Children tags (if internal zone): <cluster>, <link>, <zone>
Children tags (if leaf zone): <host>, <link>, <peer>
Attributes:

id:

Zone name. No other zone may have the same name over the whole platform.

routing:

Routing algorithm to use.


<zoneRoute>

All information to factorize the routes between two zones; intra-zone paths must be declared with <route>. Since zones form a tree, <zoneRoute> is probably best used to connect sibling zones.

When declaring a zoneRoute, you must give the source and destination zones, along with the gateway in each zone (i.e., the point to reach within that zone to reach the declared route), and the list of links to go from one zone to another. More detail can be found in the following sections Describing routes and Calculating network paths.

Parent tags: <zone>
Children tags: <link_ctn>
Attributes:

src:

Zone from which this route starts. Must be an existing zone.

dst:

Zone to which this route leads. Must be an existing zone.

gw_src:

Netpoint (within src zone) from which this route starts. Must be an existing host/router.

gw_dst:

Netpoint (within dst zone) to which this route leads. Must be an existing host/router.

symmetrical:

Whether this route is symmetrical, ie, whether we are defining the route dst -> src at the same time. Valid values: yes, no, YES, NO.


Advanced tags

The following list contains some tags that are less often used. They are still valid, but unless you know what you are doing, there is a good chance that you don’t really want to use them.


<bypassRoute>

This tag can be used to completely bypass the classical routing algorithm for a pair of hosts. The provided list of links will be used directly, with no further routing computation. This is an advanced tag that is rarely used in practice.

Parent tags: <zone>
Children tags: <link_ctn>
Attributes:

src:

Host from which this route starts. Must be the name of an existing host.

dst:

Host to which this route leads. Must be the name of an existing host.

symmetrical:

Whether this route is symmetrical, ie, whether we are defining the route dst -> src at the same time. Valid values: yes, no, YES, NO (default: YES).


<bypassZoneRoute>

This tag can be used to completely bypass the classical routing algorithm between two zones. When provided, it breaks the recursive search and the provided links will be used instead. This tag should probably be reserved to experts.

Parent tags: <zone>
Children tags: <link_ctn>
Attributes:

src:

Zone from which this route starts. Must be an existing zone.

dst:

Zone to which this route leads. Must be an existing zone.

gw_src:

Netpoint (within src zone) from which this route starts. Must be an existing host/router.

gw_dst:

Netpoint (within dst zone) to which this route leads. Must be an existing host/router.

symmetrical:

Whether this route is symmetrical, ie, whether we are defining the route dst -> src at the same time. Valid values: yes, no, YES, NO.


<backbone>

Within a manually-built cluster, specify the backbone to use. See the documentation of <cabinet> for all details, even if you should probably stop using this tag and switch to the C++ interface.

Parent tags: <zone> with routing="Cluster" attribute
Children tags: none
Attributes:

id:

No other link in the platform shall have the same identifier.

bw:

Bandwidth, see the <link> for syntax/details.

lat:

Latency, see the <link> for syntax/details.


<cabinet>

The cabinet tag is a shortcut for creating a set of (homogenous) hosts and links quickly, as in cabinets of data centers. This is mostly useful when manually describing a cluster, i.e. a <zone routing="Cluster"> where you manually specify the content with <cabinet>, <backbone> and maybe <host_link>.

But this approach is somewhat deprecated now, as the C++ interface is both more convinient and more powerful. For example, the core amount or link characteristics cannot be changed with this tag.

Parent tags: <zone> with routing="Cluster" attribute
Children tags: none
Attributes:

id:

The identifier of the cabinet. Facilitates referring to it.

prefix:

Each node of the cabinet has to have a name. This name will be prefixed with this prefix.

suffix:

Each node of the cabinet will be suffixed with this suffix.

radical:

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.

speed:

Same as the speed attribute of the <host> tag.

bw:

Bandwidth for the links between nodes and backbone (if any). See the <link> for syntax/details.

lat:

Latency for the links between nodes and backbone (if any). See the <link> for syntax/details.

Example

<?xml version='1.0'?>
<!DOCTYPE platform SYSTEM "https://simgrid.org/simgrid.dtd">
<platform version="4.1">
  <zone id="AS0" routing="Full">
    <zone  id="my_cluster1"  routing="Cluster">
      <cabinet id="cabinet1" prefix="host-" suffix=".cluster1" speed="1Gf" bw="125MBps" lat="100us" radical="1-10"/>
      <cabinet id="cabinet2" prefix="host-" suffix=".cluster1" speed="1Gf" bw="125MBps" lat="100us" radical="11-20"/>
      <cabinet id="cabinet3" prefix="host-" suffix=".cluster1" speed="1Gf" bw="125MBps" lat="100us" radical="21-30"/>

      <router  id="router1"/>
      <backbone id="backbone1" bandwidth="2.25GBps" latency="500us"/>
    </zone>

    <zone  id="my_cluster2"  routing="Cluster">
      <cabinet id="cabinet1" prefix="host-" suffix=".cluster2" speed="1Gf" bw="125MBps" lat="100us" radical="1-10"/>
      <cabinet id="cabinet2" prefix="host-" suffix=".cluster2" speed="1Gf" bw="125MBps" lat="100us" radical="11-20"/>
      <cabinet id="cabinet3" prefix="host-" suffix=".cluster2" speed="1Gf" bw="125MBps" lat="100us" radical="21-30"/>

      <router  id="router2"/>
      <backbone id="backbone2" bandwidth="2.25GBps" latency="500us"/>
    </zone>

    <link id="link1-2" bandwidth="2.25GBps" latency="500us"/>

    <zoneRoute src="my_cluster1" dst="my_cluster2" gw_src="router1" gw_dst="router2">
      <link_ctn id="link1-2" />
    </zoneRoute>
  </zone>
</platform>

The hosts generated in the above example are named host-1.cluster, host-2.cluster1 etc.