DTD 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.

<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 = "maxmin/precision" value = "0.000010" />
    <prop id = "cpu/optim" value = "TI" />
    <prop id = "network/model" value = "SMPI" />
    <prop id = "smpi/bw-factor" value = "65472:0.940694;15424:0.697866;9376:0.58729" />
  </config>

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


<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: pf_tag_mount, <prop>, pf_tag_storage
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 howto_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 in a repetitive way.

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 in a repetitive way.

coordinates:

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

pstate:

Initial pstate (default: 0, the first one). See howto_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: an 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 howto_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), pf_tag_cluster, pf_tag_cabinet, <peer>, <zone>, pf_tag_trace, pf_tag_trace_connect
Attributes:

version:Version of the DTD, describing the whole XML format. This versionning 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: pf_tag_actor, <config>, pf_tag_cluster, <host>, <link>, pf_tag_storage, <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 :ref:`pf_tag_link`s.

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

src:Host from which this route starts. Must be an existing host.
dst:Host to which this route leads. Must be 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.


<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)
Children tags: <prop>, pf_tag_storage
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::Zone.

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): pf_tag_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.