The scope of the GT4 activity plugin is to enable the Generic Workflow Execution Service (GWES) to invoke remote command line programs via the Grid middleware Globus Toolkit 4.0.x (GT4) or 5.x (GT5) [1]. Using this plugin you can model command line programs within GWorkflowDL workflows by connecting transitions with the URL of the GT4 ManagedJobFactoryService or the GT5 gatekeeperServiceContact and the wrapper script of the command line program.
This plugin uses the Java Commodity Grid Kit libraries [2] to invoke Globus Toolkit services without the need to locally install the Globus Toolkit on the GWES server. The technical report [4] (in German) describes the requirements to the Grid nodes for resource providers.
Operation
Globus Toolkit 4.0.x
In order to invoke a remote command line program on a GT4 Grid node, the transition needs to contain an operation candidate of type "wsgram". The operation name is equal to the path of the wrapper script for the command line program. The type of the local resource manager (e.g., Fork, PBS, LSF, ...) is separated by a space. If the type of the local resource manager is omitted, then the plugin uses "Fork" as default .
The resource name is equal to the URL of the Grid node's ManagedJobFactoryService. The part after the "@" denotes the identifier of the D-GRDL resource description [5] in case you use the resource description database.
Example of a WS-GRAM operation without using the resource description database:
<transition ID="cat">
<description>concatenate two files</description>
<inputPlace placeID="d1" edgeExpression="input1" />
<inputPlace placeID="d2" edgeExpression="input2" />
<outputPlace placeID="d3" edgeExpression="stdout" />
<operation>
<oc:operationClass xmlns:oc="http://www.gridworkflow.org/gworkflowdl/operationclass" name="urn:dgrdl:software:cat">
<oc:operationCandidate type="wsgram"
operationName="/usr/local/gwes/cat/cat.sh@software:cat-fhrg PBS"
resourceName="https://grid2:8443/wsrf/services/ManagedJobFactoryService@hardware:grid2.net/PBS"
selected="true" />
</oc:operationClass>
</operation>
</transition>More examples are available in the examples section.
Globus Toolkit 5.x
The implementation for Globus Toolkit 5.x is still in a prototype testing phase. You may need to adjust the source code in order to get this plugin working for your Globus Toolkit 5.x-based Grid environment.
In order to invoke a remote command line program on a GT5 Grid node, the transition needs to contain an operation candidate of type "gram". The operation name is equal to the path of the wrapper script for the command line program.
The resource name is equal to the the Grid node's gatekeeperServiceContact. The part after the "@" denotes the identifier of the D-GRDL resource description [5] in case you use the resource description database.
Example of a (PRE-WS) GRAM operation without using the resource description database:
<transition ID="cat">
<description>concatenate two files</description>
<inputPlace placeID="d1" edgeExpression="input1" />
<inputPlace placeID="d2" edgeExpression="input2" />
<outputPlace placeID="d3" edgeExpression="stdout" />
<operation>
<oc:operationClass xmlns:oc="http://www.gridworkflow.org/gworkflowdl/operationclass" name="urn:dgrdl:software:cat">
<oc:operationCandidate type="gram"
operationName="/usr/local/gwes/cat/cat.sh@software:cat-fhrg"
resourceName="grid2.net:2119/jobmanager-pbs@hardware:grid2.net/PBS"
selected="true" />
</oc:operationClass>
</operation>
</transition>Inputs
If the transition is enabled, the plugin automatically generates a Globus Toolkit 4 job description (or Globus Toolkit 5 RSL) using the contents on the tokens from the corresponding read and input places. The incoming edge expressions map the tokens to the matching command line parameters. If the token contents begins with "gsiftp", then the GWES includes the corresponding file as file stage in into the job description.
Example:
<place ID="d1">
<token>
<data>
<file xmlns="">gsiftp://grid3//usr/local/gwes/cat/d1.dat</file>
</data>
</token>
</place>Outputs
The plugin generates automatically names for the output files of the remote command line parameters. After successful invocation of the command line program, the plugin puts these output file names as new tokens on the output places.
gwes-plugin-gt4activity-2.1.1.rc2-bin.tar.gz or gwes-plugin-gt4activity-2.1.1.rc2-bin.zip
from the GWES download section.
Alternatively download the plugin sources
gwes-plugin-gt4activity-2.1.1.rc2-src.tar.gz or gwes-plugin-gt4activity-2.1.1.rc2-src.zip
from the GWES download section and compile the java library by yourself using maven2 with the command
mvn clean package
Remark: You will need to exclude some of the JUnit tests in the file pom.xml if you have no valid Grid credential to access the test Grid nodes.
# from binary distribution cp gwes-plugin-gt4activity-2.1.1.rc2/lib/* $GWES_HOME/WEB-INF/lib
# from binary distribution: cp gwes-plugin-gt4activity-2.1.1.rc2/gwes-client-config.wsdd $GWES_HOME/WEB-INF/classes # OR from source distribution: cp gwes-plugin-gt4activity-2.1.1.rc2/src/main/config/gwes-client-config.wsdd $GWES_HOME/WEB-INF/classes
cp gwes-plugin-gt4activity-2.1.1.rc2/bin/* $GWES_HOME/bin/
# GT4.0.x gwes.activity.wsgram.class=de.fraunhofer.first.gwes.plugin.gt4activity.wsgram.WSGRAMActivity # GT2.x, GT5.x gwes.activity.gram.class=de.fraunhofer.first.gwes.plugin.gt4activity.gram.GRAMActivity
scp gwes-plugin-gt4activity-2.1.1.rc2/bin/gwes-command-line-operation.sh grid1.net:~/.gwes/
gsissh grid1.net mkdir ~/.gwes/activity-directory-template
$GWES_HOME/bin/gwes-cog-setup.sh
$GWES_HOME/bin/gwes-grid-proxy-init.sh
For a documentation of additional requirements on Grid nodes, please refer to [4].
The plugin supports the following properties:
Global GWES configuration file ($GWES_HOME/WEB-INF/classes/gwes.properties):
##################################
# GWES GT2/GT4/GT5 Activity Plugin
##################################
# Implementation of net.kwfgrid.gwes.Activity for operation type "wsgram" (GT4.0.x), e.g.,
# <oc:operationCandidate type="wsgram" operationName="software:cat" resourceName="hardware:server" selected="true" />
gwes.activity.wsgram.class=de.fraunhofer.first.gwes.plugin.gt4activity.wsgram.WSGRAMActivity
# Implementation of net.kwfgrid.gwes.Activity for operation type "gram" (PRE-WS, GT2 or GT5), e.g.,
# <oc:operationCandidate type="gram" operationName="software:cat" resourceName="hardware:server" selected="true" />
gwes.activity.gram.class=de.fraunhofer.first.gwes.plugin.gt4activity.gram.GRAMActivity
# local working directory home
# e.g. /tmp/.gwes or .gwes for ~/.gwes
# You can override this property for a specific resource by adding the property
# <simpleProperty ident="gwes.gram.home.directory" type="string" unit="">...</simpleProperty>
# to the corresponding D-GRDL database entry.
# REMARK: when using workflows with fileStageIn, the absolute path to the gwes working directory home must be the same
# on all grid nodes because there is a bug in Globus RFT when resolving ${GLOBUS_USER_HOME} for remote locations!
gwes.gram.home.directory=.gwes
# WS-GRAM batch mode
# true: use WS-GRAM in batch mode with status polling (firewall-friendly)
# false: use WS-GRAM in interactive mode with listener
gwes.gram.batch=true
# File name of the shell script to be used for executing WS-GRAM command line operations and creating
# the temporary working directory.
# Copy the script gwes/bin/gwes-command-line-operation.sh to all remote WS-GRAM resources.
# In addition you need to create an empty directory called "activity-directory-template" within the directory specified by
# the property "gwes.gram.home.directory".
# The path can be either relative to "gwes.gram.home.directory", or with leading "/" indicating an absolute path.
gwes.gram.executor.script=gwes-command-line-operation.sh
# Directory name of an (empty) directory which serves as template for working directories for activities.
# In case of a "file stage in" phase, the GWES makes a file stage in of this directory template to the working
# directory before invoking the activity. This is a workaround as Globus Toolkit does not directly support the
# creation of new directories within the job description.
# The path is relative to "gwes.gram.home.directory". Default value is "activity-directory-template".
gwes.gram.activity.directory.template=activity-directory-template
# Number of retries for refreshing the status of GRAM jobs after a Globus exception.
gwes.gram.status.retries=3
# Maximum number of retries for reliable file transfers: This is number of times RFT retries a transfer failed with
# a non-fatal error.
gwes.rft.maxattempts=3There are no special workflow or transition properties supported by this plugin. You may use the generic properties defined for all GWES activities to adjust fault tolerance or timeouts for this plugin, such as:
Please refer to GWES documentation for details, especially the JavaDoc of class net.kwfgrid.gwes.Constants.java.