LML Layout examples

Since LML version 1.2 LML can be used as communication interface split into LML request and LML response. The request contains a list of graphical components, which should be filled with status data by data providing applications such as LML_DA. The response contains the actual status data as requested in the corresponding LML request. An LML response can contain all LML elements, while an LML request contains only those elements, which are allowed in the layout_root type. This section is a guide to LML layouts and provides a set of documented LML layout examples and their visualization results.

Why do I need an LML layout?

An LML-Layout configures the layout and type of data, whenever LML is used as communication interface. A client requesting status data should send an LML Layout file as data request. The answering server will interpret the layout file and fill it with actual status data. Possible use-cases for configuring your own LML layout are the following:

Layout Structure

An LML layout can be created as stand-alone file:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<lml:layout 
xsi:schemaLocation="http://eclipse.org/ptp/lml layout.xsd" 
xmlns:lml="http://eclipse.org/ptp/lml" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <request>
        <driver name="LL_BG"/>
        <layoutManagement getDefaultData="true"/>
    </request>
</lml:layout>
In the latest Parallel Tools Platform (PTP) build it is also allowed to embed a customized LML layout into the monitor-data element of the target system configuration:
<monitor-data schedulerType="TORQUE">
	<rm:layout version="1.0" xmlns="" xmlns:rm="http://eclipse.org/ptp/rm">
		<tablelayout id="tl_Run"
			gid="org.eclipse.ptp.rm.lml.ui.ActiveJobsView" active="true"
			contenthint="jobs">
			<column cid="1" pos="0" width="0.5" active="true" key="step" />
		</tablelayout>
		<tablelayout id="tl_WAIT" gid="org.eclipse.ptp.rm.lml.ui.InactiveJobsView" active="true"
			contenthint="jobs">
			<column cid="1" pos="0" width="0.5" active="true"
				key="step" />
		</tablelayout>
		<nodedisplaylayout id="nodedisplay" gid="nd_1"
			active="true">
			<schemehint>
				<el1 tagname="node" min="1" max="206" mask="judge%03d">
					<el2 tagname="core" min="0" max="25" mask="-c%02d" />
				</el1>
			</schemehint>
			<el0 rows="10" maxlevel="2" cols="21" vgap="5">
			</el0>
		</nodedisplaylayout>
	</rm:layout>
</monitor-data>
These are just examples on embedding LML layouts into XML files. The most important layout components are tablelayout and nodedisplaylayout. You can find examples for both components in the above listing. A tablelayout configures the layout of the LML tables, which are mostly used for job lists. It allows for deactivating columns, filtering status data or changing the column widths. The nodedisplaylayout provides layout hints for the system view. Here one can setup the system's architecture or the arrangement of compute resources in a customized grid layout.

Table layout

The table layout defines, which columns should be active and therefore, which data should be sent to the client. For that reason, each column element has the active attribute. The key attribute specifies the attribute shown in the column, the cid is the column ID. With pos the position of the column within the table is set and the width attribute allows for adjusting the percentaged width of each column when rendered.
<tablelayout id="tl_Run" gid="ActiveJobsView" active="true" contenthint="jobs">
<column key="step"  cid="1" pos="0" width="0.1" active="true" />
<column key="owner" cid="2" pos="1" width="0.1" active="true" />
...
</tablelayout>

Nodedisplay Layout

The nodedisplay layout is divided into schemehint and el0 element. While schemehint defines the machine topology and how the compute resources are grouped, the el0 element configures how the compute resources are to be drawn.
<nodedisplaylayout id="nodedisplay" gid="nd_1" active="true">
<schemehint>
  <el1 tagname="node" min="1" max="206" mask="judge%03d">
    <el2 tagname="core" min="0" max="25" mask="-c%02d" />
  </el1>
</schemehint>
<el0 rows="10" cols="21" maxlevel="2" vgap="5"/>
</nodedisplaylayout>
In this listing a simple two level machine topology is configured consisting of 206 nodes with each 26 cores. The mask attribute maps the internal IDs of the nodes to the actual hardware names. Here the IDs 1..206 are mapped to the names judge001..judge206. The el2 element for the cores is not mapped on hardware names, but it should be added to the schemehint in order to display status information till core level. The el0 element configures how the nodes are arranged in a grid layout. Here a grid of 10 rows and 21 columns is set. The maxlevel attribute defines the level of detail, at which the system view should be rendered. If this attribute is set to 1, one rectangle per node would be drawn, while this example configures to paint one rectangle per core (maxlevel=2).

This nodedisplay layout could be rendered like this:

Judge visualization

Advanced nodedisplay layout

The definition of nodedisplay layouts becomes more complex for systems with many hierarchy levels. E.g. the general purpose cluster JUROPA can be grouped into two partitions, each consisting of racks. Every rack contains compute nodes, each having 16 cores. A corresponding nodedisplay layout is given in the following:
<nodedisplaylayout id="nodedisplay" gid="nd_1">
<schemehint>
  <el1 tagname="part" min="0" max="0" map="jj">
    <el2 tagname="rack" min="1" max="25" mask="%02d">
      <el3 tagname="node" min="1" max="96" mask="c%02d">
      <el4 tagname="core" min="0" max="15" mask="-c%02d"/>
      </el3>
    </el2>
  </el1>
  <el1 tagname="part" min="1" max="1" map="jf">
    ...
  </el1>
</schemehint>
<el0 vgap="5" maxlevel="3" cols="1" rows="2" background="#aaa">
  <el1 min="0" max="0" showtitle="true" rows="1" cols="25" maxlevel="4">
    <img src="http://www...." align="WEST" width="0.3"/>
    <el2 min="1" max="25" showtitle="true" rows="32" cols="3"  maxlevel="4"/>
  </el1>
  ...
</el0>
</nodedisplaylayout>
It defines two partitions with the first having 25 racks. Each rack contains 96 nodes. The mask attributes have to be concatinated to construct a format string for mapping internal IDs to the hardware names. The concatinated node format string in this example is jj%02dc%02d. An example hardware name corresponding to that format is jj09c18. Note, that the first partition is prefixed with jj, while the second is prefixed with jf. Since there are no digits in this name part, the map attribute has to be used instead of the mask attribute. The map attribute contains a comma separated list of arbitrary names. The first name of this list is assigned to the element with the lowest ID on the particular tree level, the second name to the second ID and so forth.
The second part of the nodedisplay references the tree in the schemehint section. The el0 element sets the grid layout for the partitions, the el1 element sets the layout for the racks and so forth. Thus, the partitions should be rendered in a 2X1 grid, the racks in the first partition in a 1X25 grid. The referencing is done via the min/max attributes. E.g. the el1 element configures the range 0..0 of the partition level. I.e. it configures the layout for the first partition, which is the one prefixed with jj. This example also shows how to attach images to the compute resources. Here, an image is attached to the left side of each partition. The corresponding visualization would look like this:

Juropa visualization

JUQUEEN example

Finally, an example for a six-level hierarchy of the BG/Q system JUQUEEN is given along with the corresponding visualization:
<rm:layout xmlns:rm="http://eclipse.org/ptp/rm" xmlns="">
	<tablelayout id="tl_Run"
		gid="org.eclipse.ptp.rm.lml.ui.ActiveJobsView" active="true"
		contenthint="jobs">
		<column cid="1" pos="0" width="0.1" active="true" key="step" />
		<column cid="2" pos="1" width="0.1" active="true" key="owner" />
		<column cid="3" pos="2" width="0.1" active="true" key="queue" />
		<column cid="4" pos="3" width="0.1" active="true" key="wall" />
		<column cid="5" pos="4" width="0.1" active="true" key="queuedate" />
		<column cid="6" pos="5" width="0.1" active="true" key="dispatchdate" />
		<column cid="7" pos="6" width="0.1" active="true" key="totalcores" />
		<column cid="8" pos="7" width="0.3" active="true" key="status">
			<pattern>
				<select rel="=" value="RUNNING" />
			</pattern>
		</column>
		<column cid="9" pos="8" width="1.0" active="false" key="bg_partalloc" />
		<column cid="10" pos="9" width="1.0" active="false" key="bg_shape_alloc" />
		<column cid="11" pos="10" width="1.0" active="false" key="bg_size_alloc" />
		<column cid="12" pos="11" width="1.0" active="false" key="bg_size_req" />
		<column cid="13" pos="12" width="1.0" active="false" key="bg_state" />
		<column cid="14" pos="13" width="1.0" active="false" key="classprio" />
		<column cid="15" pos="14" width="1.0" active="false" key="comment" />
		<column cid="16" pos="15" width="1.0" active="false" key="dependency" />
		<column cid="17" pos="16" width="1.0" active="false" key="favored" />
		<column cid="18" pos="17" width="1.0" active="false" key="group" />
		<column cid="19" pos="18" width="1.0" active="false" key="groupprio" />
		<column cid="20" pos="19" width="1.0" active="false" key="name" />
		<column cid="21" pos="20" width="1.0" active="false" key="nodelist" />
		<column cid="22" pos="21" width="1.0" active="false"
			key="nodelist_boards" />
		<column cid="23" pos="22" width="1.0" active="false" key="restart" />
		<column cid="24" pos="23" width="1.0" active="false" key="state" />
		<column cid="25" pos="24" width="1.0" active="false" key="sysprio" />
		<column cid="26" pos="25" width="1.0" active="false" key="totaltasks" />
		<column cid="27" pos="26" width="1.0" active="false" key="userprio" />
		<column cid="28" pos="27" width="1.0" active="false" key="wallsoft" />
	</tablelayout>
	<tablelayout id="tl_WAIT"
		gid="org.eclipse.ptp.rm.lml.ui.InactiveJobsView" active="true"
		contenthint="jobs">
		<column cid="1" pos="0" width="0.1" active="true" key="step" />
		<column cid="2" pos="1" width="0.1" active="true" key="owner" />
		<column cid="3" pos="2" width="0.1" active="true" key="queue" />
		<column cid="4" pos="3" width="0.1" active="true" key="wall" />
		<column cid="5" pos="4" width="0.1" active="true" key="queuedate" />
		<column cid="6" pos="5" width="0.1" active="true" key="dispatchdate" />
		<column cid="7" pos="6" width="0.1" active="true" key="totalcores" />
		<column cid="8" pos="7" width="0.3" active="true" key="status">
			<pattern>
				<select rel="!=" value="RUNNING" />
			</pattern>
		</column>
		<column cid="9" pos="8" width="1.0" active="false" key="bg_partalloc" />
		<column cid="10" pos="9" width="1.0" active="false" key="bg_partreq" />
		<column cid="11" pos="10" width="1.0" active="false" key="bg_shape_alloc" />
		<column cid="12" pos="11" width="1.0" active="false" key="bg_size_alloc" />
		<column cid="13" pos="12" width="1.0" active="false" key="bg_size_req" />
		<column cid="14" pos="13" width="1.0" active="false" key="classprio" />
		<column cid="15" pos="14" width="1.0" active="false" key="comment" />
		<column cid="16" pos="15" width="1.0" active="false" key="dependency" />
		<column cid="17" pos="16" width="1.0" active="false" key="detailedstatus" />
		<column cid="18" pos="17" width="1.0" active="false" key="favored" />
		<column cid="19" pos="18" width="1.0" active="false" key="group" />
		<column cid="20" pos="19" width="1.0" active="false" key="groupprio" />
		<column cid="21" pos="20" width="1.0" active="false" key="name" />
		<column cid="22" pos="21" width="1.0" active="false" key="nodelist" />
		<column cid="23" pos="22" width="1.0" active="false"
			key="nodelist_boards" />
		<column cid="24" pos="23" width="1.0" active="false" key="restart" />
		<column cid="25" pos="24" width="1.0" active="false" key="state" />
		<column cid="26" pos="25" width="1.0" active="false" key="sysprio" />
		<column cid="27" pos="26" width="1.0" active="false" key="totaltasks" />
		<column cid="28" pos="27" width="1.0" active="false" key="userprio" />
		<column cid="29" pos="28" width="1.0" active="false" key="wallsoft" />
	</tablelayout>
	<nodedisplaylayout id="nodedisplay" gid="nd_1"
		active="true">
		<schemehint>
			<el1 tagname="row" min="0" max="2" mask="R%02d">
				<el2 tagname="rack" min="0" max="3" mask="%02d">
					<el3 tagname="midplane" min="0" max="1" mask="-M%01d">
						<el4 tagname="nodecard" min="0" max="15" mask="-N%02d">
							<el5 tagname="computecard" min="0" max="31" mask="-C%02d">
								<el6 tagname="core" min="0" max="15" mask="-%01d">
								</el6>
							</el5>
						</el4>
					</el3>
				</el2>
			</el1>
		</schemehint>
		<el0 vgap="5" transparent="false" showtitle="false" rows="7"
			mouseborder="0" maxlevel="4" hgap="0" fontsize="10" fontfamily="Monospaced"
			cols="1" border="0" background="#777">
			<el1 showtitle="true" rows="1" min="0" maxlevel="4" max="6"
				cols="4">
				<el2 showtitle="true" showfulltitle="true" rows="2" min="0"
					maxlevel="4" max="3" highestrowfirst="true" cols="1">
					<el3 vgap="0" showtitle="true" showfulltitle="true" rows="4"
						min="0" maxlevel="5" max="1" highestrowfirst="true" hgap="0"
						fontsize="8" cols="4">
						<el4 rows="4" min="0" maxlevel="5" max="15" cols="8">
							<el5 rows="1" min="0" maxlevel="6" max="31" cols="4">
							</el5>
						</el4>
					</el3>
				</el2>
			</el1>
		</el0>
	</nodedisplaylayout>
</rm:layout>


Visualization in PTP:
Juqueen visualization
Home | last change 20.08.2013 | copyright see Copyright and Disclaimer | contact: c.karbach@fz-juelich.de