| <?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="fragments"> |
| <control-data> |
| <property name="local.input.file" visible="false"/> |
| <property name="remote.input.file" visible="false"/> |
| <property name="remote.input.files" visible="false"/> |
| <managed-files> |
| <file-staging-location>.eclipsesettings</file-staging-location> |
| <file name="menu.input"> |
| <path>${ptp_rm:local.input.file#value}</path> |
| </file> |
| </managed-files> |
| <script> |
| <line> |
| <arg resolve="false"> COMMAND="${COMMAND} ${MPI_ARGS}</arg> |
| <arg>${ptp_rm:executablePath#value} ${ptp_rm:progArgs#value}</arg> |
| <arg resolve="false">${INPUT}"</arg> |
| </line> |
| <line> |
| <arg resolve="false">else</arg> |
| </line> |
| <line> |
| <arg> COMMAND="${ptp_rm:executablePath#value} ${ptp_rm:progArgs#value}</arg> |
| <arg resolve="false">${INPUT}"</arg> |
| </line> |
| <line> |
| <arg resolve="false">fi</arg> |
| </line> |
| </script> |
| <start-up-command name="get-input"> |
| <arg>ls</arg> |
| <arg>-l</arg> |
| <arg>${ptp_rm:directory#value}/input</arg> |
| <stdout-parser delim="\n"> |
| <target ref="remote.input.files"> |
| <match> |
| <expression>[-rwx+@]+[\s]+[\d]+[\s]+[\w]+[\s]+[\w]+[\s]+[\d]+[\s]+[\w]+[\s]+[\d]+[\s]+[\d:]+[\s]+(.+)</expression> |
| <add field="value"> |
| <entry valueGroup="1"/> |
| </add> |
| </match> |
| </target> |
| </stdout-parser> |
| </start-up-command> |
| <submit-batch name="submit-batch" waitForId="true"> |
| <arg>qsub</arg> |
| <arg>${ptp_rm:managed_file_for_script#value}</arg> |
| <environment name="INPUT"> |
| <arg isUndefinedIfMatches="-f">-f ${ptp_rm:remote.input.file#value}</arg> |
| <arg isUndefinedIfMatches="-f">-f ${ptp_rm:menu.input#value}</arg> |
| </environment> |
| <stdout-parser delim="\n" all="true" save="1"> |
| <target ref="@jobId"> |
| <match> |
| <expression>([\d]+)([.])(.+)[\s]+.*</expression> |
| <append field="name"> |
| <entry valueGroup="1"/> |
| <entry valueGroup="2"/> |
| <entry valueGroup="3"/> |
| </append> |
| <set field="default"> |
| <entry valueGroup="1"/> |
| </set> |
| <set field="value"> |
| <entry value="SUBMITTED"/> |
| </set> |
| </match> |
| <match> |
| <expression>([\d]+)[.].+</expression> |
| <set field="name"> |
| <entry valueGroup="0"/> |
| </set> |
| <set field="default"> |
| <entry valueGroup="1"/> |
| </set> |
| <set field="value"> |
| <entry value="SUBMITTED"/> |
| </set> |
| </match> |
| </target> |
| <target ref="@jobId"> |
| <match> |
| <expression flags="DOTALL">.*Job not submitted.*</expression> |
| <set field="value"> |
| <entry value="FAILED"/> |
| </set> |
| </match> |
| </target> |
| </stdout-parser> |
| <stderr-parser delim="\n"> |
| <target ref="@jobId"> |
| <match> |
| <expression>.*Job not submitted.*</expression> |
| <throw message="Job Submit Failed"/> |
| </match> |
| </target> |
| </stderr-parser> |
| </submit-batch> |
| <launch-tab> |
| <dynamic> |
| <title>Demo Example</title> |
| <composite group="true"> |
| <layout> |
| <grid-layout numColumns="4" makeColumnsEqualWidth="false" horizontalSpacing="10" verticalSpacing="15"/> |
| </layout> |
| <!-- row 1 --> |
| <widget type="label" style="SWT.LEFT"> |
| <layout-data> |
| <grid-data horizontalAlign="SWT.BEGINNING" grabExcessHorizontal="false"/> |
| </layout-data> |
| <fixed-text>Remote Input File: </fixed-text> |
| </widget> |
| <widget type="combo" style="SWT.BORDER" readOnly="true" saveValueTo="remote.input.file"> |
| <layout-data> |
| <grid-data horizontalAlign="SWT.FILL" horizontalSpan="3" grabExcessHorizontal="false"/> |
| </layout-data> |
| <items-from>remote.input.files</items-from> |
| </widget> |
| <!-- row 2 --> |
| <widget type="label" style="SWT.LEFT"> |
| <layout-data> |
| <grid-data horizontalAlign="SWT.BEGINNING" grabExcessHorizontal="false"/> |
| </layout-data> |
| <fixed-text>Local Input File: </fixed-text> |
| </widget> |
| <widget type="browse" style="SWT.BORDER" localOnly="true" title="Browse" saveValueTo="local.input.file"> |
| <layout-data> |
| <grid-data horizontalAlign="SWT.FILL" widthHint="200" horizontalSpan="2" grabExcessHorizontal="true"/> |
| </layout-data> |
| <sub-layout-data> |
| <grid-data horizontalAlign="SWT.BEGINNING" widthHint="100" horizontalSpan="1" grabExcessHorizontal="false"/> |
| </sub-layout-data> |
| </widget> |
| </composite> |
| </dynamic> |
| </launch-tab> |
| </control-data> |
| <monitor-data schedulerType="PBS"> |
| <driver> |
| <name></name> |
| </driver> |
| </monitor-data> |
| </resource-manager-builder> |