blob: 6957ed0f0ffb799eb1f83a8600790b7260414a11 [file] [log] [blame]
<?xml version="1.0" encoding="UTF-8"?>
<!-- ******************************************************************************* -->
<!-- * Copyright (c) 2011 University of Illinois All rights reserved. This program -->
<!-- * and the accompanying materials are made available under the terms of the -->
<!-- * Eclipse Public License v1.0 which accompanies this distribution, and is -->
<!-- * available at http://www.eclipse.org/legal/epl-v10.html -->
<!-- * -->
<!-- * Contributors: -->
<!-- * Albert L. Rossi - design and implementation -->
<!-- ****************************************************************************** -->
<resource-manager-builder xmlns="http://org.eclipse.ptp/rm" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="resource_manager_type.xsd" name="pbs-generic-interactive">
<control-data>
<!-- this is a necessary property for the functioning of LML; link it to the batch-specific variable name -->
<property name="control.queue.name" visible="false">
<link-value-to>destination</link-value-to>
</property>
<property name="queues" visible="false"/>
<property name="mpiPrefix" visible="false">
<default>${ptp_rm:mpiCommand#value} -np ${ptp_rm:mpiCores#value}</default>
</property>
<property name="hostfilechecked" visible="false"/>
<property name="hostlistchecked" visible="false"/>
<attribute name="mpiCommand" type="choice">
<description>Which mpi command to use.</description>
<choice>,mpiexec,mpirun</choice>
</attribute>
<attribute name="mpiCores" min="1" type="integer">
<description>the '-np' value</description>
</attribute>
<attribute name="destination" type="string">
<description>Designation of the queue to which to submit the job.</description>
<tooltip>Format: queue[@server].</tooltip>
</attribute>
<attribute name="Resource_List.mem" type="string">
<description>Maximum amount of memory used by all concurrent processes in the job.</description>
<tooltip><![CDATA[Format: integer[suffix]; the suffix is a multiplier
in bytes or words (word size of the host): b (bytes),
w (words), kb/kw (kilo), mb/mw (mega), gb/bw (giga).]]></tooltip>
<default>20gb</default>
</attribute>
<attribute name="Resource_List.walltime" type="string">
<description>Maximum amount of real time during which the job can be in the running state.</description>
<tooltip>Format: [[hours:]minutes:]seconds[.milliseconds].</tooltip>
<default>00:30:00</default>
<validator>
<regex expression="\d\d:\d\d:\d\d"/>
<error-message>format must be hh:mm:ss</error-message>
</validator>
</attribute>
<start-up-command name="ompi_info">
<arg>ompi_info</arg>
<arg>-a</arg>
<arg>--parseable</arg>
<stdout-parser delim="\n">
<target type="attribute" allowOverwrites="true">
<match>
<expression>mca:.*:param:([^:]*):value:(.*)</expression>
<set field="name">
<entry valueGroup="1"/>
</set>
<set field="visible">
<entry value="true"/>
</set>
<set field="value">
<entry valueGroup="2"/>
</set>
</match>
<match>
<expression>mca:.*:param:([^:]*):status:(.*)</expression>
<set field="name">
<entry valueGroup="1"/>
</set>
<set field="status">
<entry valueGroup="2"/>
</set>
</match>
<match>
<expression>mca:.*:param:([^:]*):help:(.*)</expression>
<set field="name">
<entry valueGroup="1"/>
</set>
<set field="tooltip">
<entry valueGroup="2"/>
</set>
</match>
<test op="EQ">
<value>#status</value>
<value>read-only</value>
<set field="readOnly">
<entry value="true"/>
</set>
<else>
<set field="readOnly">
<entry value="false"/>
</set>
</else>
</test>
</target>
<target type="attribute">
<match>
<expression>ompi:version:full:([^:]*)</expression>
<set field="name">
<entry value="ompi_version"/>
</set>
<set field="value">
<entry valueGroup="1"/>
</set>
<set field="visible">
<entry value="true"/>
</set>
<set field="readOnly">
<entry value="true"/>
</set>
</match>
</target>
</stdout-parser>
</start-up-command>
<submit-interactive name="submit-interactive" directory="${ptp_rm:directory#value}" waitForId="true" keepOpen="true"
flags="ALLOCATE_PTY">
<arg>qsub</arg>
<arg>-I</arg>
<arg>-q ${ptp_rm:destination#value}</arg>
<arg>-l nodes=1,mem=${ptp_rm:Resource_List.mem#value},walltime=${ptp_rm:Resource_List.walltime#value}</arg>
<arg>-V</arg>
<input isUndefinedIfMatches=".+ -np">${ptp_rm:mpiPrefix#value}</input>
<input>${ptp_rm:executablePath#value} ${ptp_rm:progArgs#value}</input>
<stdout-parser delim="\n">
<target ref="@jobId">
<match>
<expression>qsub:.+job[\s]+([\d]+[.].+)[\s]to start[\s]*</expression>
<set field="name">
<entry valueGroup="1"/>
</set>
<set field="value">
<entry value="SUBMITTED"/>
</set>
</match>
</target>
<target ref="@jobId">
<match>
<expression>qsub:[\s]+job[\s]+([\d]+[.].+)[\s]ready[\s]*</expression>
<set field="name">
<entry valueGroup="1"/>
</set>
<set field="value">
<entry value="RUNNING"/>
</set>
</match>
</target>
<target ref="@jobId">
<match>
<expression>.*Job not submitted[\s]*</expression>
<set field="value">
<entry value="FAILED"/>
</set>
</match>
</target>
<exit-after>qsub:[\s]+job[\s]+([\d]+[.].+)[\s]ready[\s]*</exit-after>
</stdout-parser>
<stderr-parser delim="\n">
<target ref="@jobId">
<match>
<expression>.+</expression>
<set field="name">
<entry value="${ptp_rm:@jobId#name}"/>
</set>
<set field="value">
<entry value="FAILED"/>
</set>
</match>
</target>
</stderr-parser>
</submit-interactive>
<get-job-status name="get-job-status" ignoreExitStatus="true">
<arg>qstat</arg>
<arg>${ptp_rm:@jobId#name}</arg>
<stdout-parser delim="\n">
<target ref="@jobId">
<match>
<expression>[\d]+[.].+[\s]+.+[\s]+.+[\s]+.+[\s]+([A-Z])[\s]+.+</expression>
<set field="value">
<entry valueGroup="1"/>
</set>
</match>
<test op="EQ">
<value>#value</value>
<value>Q</value>
<set field="value">
<entry value="QUEUED_ACTIVE"/>
</set>
</test>
<test op="EQ">
<value>#value</value>
<value>R</value>
<set field="value">
<entry value="RUNNING"/>
</set>
</test>
<test op="EQ">
<value>#value</value>
<value>S</value>
<set field="value">
<entry value="SUSPENDED"/>
</set>
</test>
<test op="EQ">
<value>#value</value>
<value>C</value>
<set field="value">
<entry value="COMPLETED"/>
</set>
</test>
<test op="EQ">
<value>#value</value>
<value>E</value>
<set field="value">
<entry value="COMPLETED"/>
</set>
</test>
<test op="EQ">
<value>#value</value>
<value>H</value>
<set field="value">
<entry value="SYSTEM_ON_HOLD"/>
</set>
</test>
</target>
</stdout-parser>
<stderr-parser delim="\n">
<target ref="@jobId">
<match>
<expression>.+</expression>
<set field="value">
<entry value="COMPLETED"/>
</set>
</match>
</target>
</stderr-parser>
</get-job-status>
<launch-tab>
<dynamic>
<title>Basic Open MPI</title>
<layout>
<grid-layout numColumns="3"/>
</layout>
<widget type="label" style="SWT.NONE">
<fixed-text>Number of processes:</fixed-text>
</widget>
<widget type="spinner" style="SWT.BORDER" saveValueTo="numProcs">
<layout-data>
<grid-data horizontalAlign="SWT.LEFT" verticalAlign="SWT.CENTER" horizontalSpan="2"/>
</layout-data>
</widget>
<!-- Options group -->
<composite group="true">
<layout>
<grid-layout numColumns="4"/>
</layout>
<layout-data>
<grid-data horizontalAlign="SWT.FILL" verticalAlign="SWT.CENTER" grabExcessHorizontal="true" horizontalSpan="3"/>
</layout-data>
<title>Options</title>
<widget type="checkbox" title="By node"/>
<widget type="checkbox" title="By slot"/>
<widget type="checkbox" title="No oversubscribe"/>
<widget type="checkbox" title="No local"/>
<widget type="checkbox" title="Prefix:"/>
<widget type="text" style="SWT.BORDER" saveValueTo="prefix">
<layout-data>
<grid-data horizontalAlign="SWT.FILL" verticalAlign="SWT.CENTER" horizontalSpan="3" grabExcessHorizontal="true"/>
</layout-data>
</widget>
</composite>
<composite group="true">
<layout>
<grid-layout numColumns="3"/>
</layout>
<layout-data>
<grid-data horizontalAlign="SWT.FILL" verticalAlign="SWT.FILL" grabExcessHorizontal="true" grabExcessVertical="true"
horizontalSpan="2"/>
</layout-data>
<title>Hosts</title>
<widget type="checkbox" buttonId="001" title="Host file:" saveValueTo="hostfilechecked"/>
<browse textStyle="SWT.BORDER" title="Browse">
<text-layout-data>
<grid-data horizontalAlign="SWT.FILL" verticalAlign="SWT.CENTER" grabExcessHorizontal="true"/>
</text-layout-data>
<button-layout-data>
<grid-data horizontalAlign="SWT.RIGHT" verticalAlign="SWT.CENTER"/>
</button-layout-data>
<text-control-state>
<enable-if button="001" selected="true"/>
</text-control-state>
<button-control-state>
<enable-if button="001" selected="true"/>
</button-control-state>
</browse>
<widget type="checkbox" buttonId="002" title="Host list:" saveValueTo="hostlistchecked">
<layout-data>
<grid-data horizontalAlign="SWT.LEFT" verticalAlign="SWT.TOP"/>
</layout-data>
<control-state>
<show-if button="001" selected="true"/>
</control-state>
</widget>
<widget type="text" style="SWT.V_SCROLL | SWT.BORDER" saveValueTo="host_list">
<layout-data>
<grid-data horizontalAlign="SWT.FILL" verticalAlign="SWT.FILL" horizontalSpan="2" grabExcessHorizontal="true"
grabExcessVertical="true"/>
</layout-data>
<control-state>
<show-if button="001" selected="true"/>
<enable-if>
<and>
<rule button="001" selected="true"/>
<rule button="002" selected="true"/>
</and>
</enable-if>
</control-state>
</widget>
</composite>
</dynamic>
<dynamic>
<title>Advanced Open MPI</title>
<layout>
<grid-layout/>
</layout>
<!-- Launch group -->
<composite group="true">
<layout>
<grid-layout numColumns="2"/>
</layout>
<layout-data>
<grid-data horizontalAlign="SWT.FILL" verticalAlign="SWT.CENTER" grabExcessHorizontal="true"/>
</layout-data>
<title>Launch Arguments</title>
<widget type="checkbox" title="Use default arguments">
<layout-data>
<grid-data horizontalAlign="SWT.FILL" verticalAlign="SWT.CENTER" grabExcessHorizontal="true" horizontalSpan="2"/>
</layout-data>
</widget>
<widget type="label">
<layout-data>
<grid-data/>
</layout-data>
<fixed-text>Arguments:</fixed-text>
</widget>
<widget type="text" readOnly="true" style="SWT.BORDER | SWT.MULTI | SWT.WRAP | SWT.V_SCROLL">
<layout-data>
<grid-data heightHint="100" horizontalAlign="SWT.FILL" verticalAlign="SWT.CENTER" grabExcessHorizontal="true"/>
</layout-data>
<dynamic-text>
<arg>${ptp_rm:allAttributes#value}</arg>
</dynamic-text>
</widget>
</composite>
<!-- MCA group -->
<composite group="true">
<layout>
<grid-layout/>
</layout>
<layout-data>
<grid-data horizontalAlign="SWT.FILL" verticalAlign="SWT.FILL" grabExcessHorizontal="true" grabExcessVertical="true"/>
</layout-data>
<title>MCA Parameters</title>
<viewer name="allAttributes" style="SWT.BORDER | SWT.MULTI" sort="true" type="table" initialAllChecked="false">
<layout-data>
<grid-data horizontalAlign="SWT.FILL" grabExcessHorizontal="true"/>
</layout-data>
<column-data name="Name" width="175">
<tooltip>Double-click on selected rows toggles their checked value.</tooltip>
</column-data>
<column-data name="Value" width="200">
<tooltip>Click to activate value widget.</tooltip>
</column-data>
<items allDiscovered="true">
</items>
<value pattern="-mca @name &quot;@value&quot;"/>
</viewer>
</composite>
</dynamic>
</launch-tab>
</control-data>
<monitor-data schedulerType="PBS">
</monitor-data>
</resource-manager-builder>