Note: There is a newer version of Pegasus available. Please see the main documentation page.

Chapter 9. Reference Manual

9.1. Properties

This is the reference guide to all properties regarding the Pegasus Workflow Planner, and their respective default values. Please refer to the user guide for a discussion when and which properties to use to configure various components. Please note that the values rely on proper capitalization, unless explicitly noted otherwise.

Some properties rely with their default on the value of other properties. As a notation, the curly braces refer to the value of the named property. For instance, ${pegasus.home} means that the value depends on the value of the pegasus.home property plus any noted additions. You can use this notation to refer to other properties, though the extent of the subsitutions are limited. Usually, you want to refer to a set of the standard system properties. Nesting is not allowed. Substitutions will only be done once.

There is a priority to the order of reading and evaluating properties. Usually one does not need to worry about the priorities. However, it is good to know the details of when which property applies, and how one property is able to overwrite another. The following is a mutually exclusive list ( highest priority first ) of property file locations.

  1. --conf option to the tools. Almost all of the clients that use properties have a --conf option to specify the property file to pick up.
  2. submit-dir/pegasus.xxxxxxx.properties file. All tools that work on the submit directory ( i.e after pegasus has planned a workflow) pick up the pegasus.xxxxx.properties file from the submit directory. The location for the pegasus.xxxxxxx.propertiesis picked up from the braindump file.
  3. The properties defined in the user property file ${user.home}/.pegasusrc have lowest priority.

Commandline properties have the highest priority. These override any property loaded from a property file. Each commandline property is introduced by a -D argument. Note that these arguments are parsed by the shell wrapper, and thus the -D arguments must be the first arguments to any command. Commandline properties are useful for debugging purposes.

From Pegasus 3.1 release onwards, support has been dropped for the following properties that were used to signify the location of the properties file

  • pegasus.properties
  • pegasus.user.properties

The following example provides a sensible set of properties to be set by the user property file. These properties use mostly non-default settings. It is an example only, and will not work for you:

pegasus.catalog.replica              File
pegasus.catalog.replica.file         ${pegasus.home}/etc/sample.rc.data
pegasus.catalog.transformation       Text
pegasus.catalog.transformation.file  ${pegasus.home}/etc/sample.tc.text
pegasus.catalog.site                 XML3
pegasus.catalog.site.file            ${pegasus.home}/etc/sample.sites.xml3

If you are in doubt which properties are actually visible, pegasus during the planning of the workflow dumps all properties after reading and prioritizing in the submit directory in a file with the suffix properties.

9.1.1. pegasus.home

Systems: all
Type: directory location string
Default: "$PEGASUS_HOME"

The property pegasus.home cannot be set in the property file. This property is automatically set up by the pegasus clients internally by determining the installation directory of pegasus. Knowledge about this property is important for developers who want to invoke PEGASUS JAVA classes without the shell wrappers.

9.1.2. Local Directories

This section describes the GNU directory structure conventions. GNU distinguishes between architecture independent and thus sharable directories, and directories with data specific to a platform, and thus often local. It also distinguishes between frequently modified data and rarely changing data. These two axis form a space of four distinct directories.

9.1.2.1. pegasus.home.datadir

Systems: all
Type: directory location string
Default: ${pegasus.home}/share

The datadir directory contains broadly visiable and possilby exported configuration files that rarely change. This directory is currently unused.

9.1.2.2. pegasus.home.sysconfdir

Systems: all
Type: directory location string
Default: ${pegasus.home}/etc

The system configuration directory contains configuration files that are specific to the machine or installation, and that rarely change. This is the directory where the XML schema definition copies are stored, and where the base pool configuration file is stored.

9.1.2.3. pegasus.home.sharedstatedir

Systems: all
Type: directory location string
Default: ${pegasus.home}/com

Frequently changing files that are broadly visible are stored in the shared state directory. This is currently unused.

9.1.2.4. pegasus.home.localstatedir

Systems: all
Type: directory location string
Default: ${pegasus.home}/var

Frequently changing files that are specific to a machine and/or installation are stored in the local state directory. This directory is being used for the textual transformation catalog, and the file-based replica catalog.

9.1.2.5. pegasus.dir.submit.logs

System: Pegasus
Since: 2.4
Type: directory location string
Default: false

By default, Pegasus points the condor logs for the workflow to /tmp directory. This is done to ensure that the logs are created in a local directory even though the submit directory maybe on NFS. In the submit directory the symbolic link to the appropriate log file in the /tmp exists.

However, since /tmp is automatically purged in most cases, users may want to preserve their condor logs in a directory on the local filesystem other than /tmp

9.1.3. Site Directories

The site directory properties modify the behavior of remotely run jobs. In rare occasions, it may also pertain to locally run compute jobs.

9.1.3.1. pegasus.dir.useTimestamp

System: Pegasus
Since: 2.1
Type: Boolean
Default: false

While creating the submit directory, Pegasus employs a run numbering scheme. Users can use this property to use a timestamp based numbering scheme instead of the runxxxx scheme.

9.1.3.2. pegasus.dir.exec

System: Pegasus
Since: 2.0
Type: remote directory location string
Default: (no default)

This property modifies the remote location work directory in which all your jobs will run. If the path is relative then it is appended to the work directory (associated with the site), as specified in the site catalog. If the path is absolute then it overrides the work directory specified in the site catalog.

9.1.3.3. pegasus.dir.storage

System: Pegasus
Since: 2.0
Type: remote directory location string
Default: (no default)

This property modifies the remote storage location on various pools. If the path is relative then it is appended to the storage mount point specified in the pool.config file. If the path is absolute then it overrides the storage mount point specified in the pool config file.

9.1.3.4. pegasus.dir.storage.deep

System: Pegasus
Since: 2.1
Type: Boolean
Default: false
See Also: pegasus.dir.storage
See Also: pegasus.dir.useTimestamp

This property results in the creation of a deep directory structure on the output site, while populating the results. The base directory on the remote end is determined from the site catalog and the property pegasus.dir.storage.

To this base directory, the relative submit directory structure ( $user/$vogroup/$label/runxxxx ) is appended.

$storage = $base + $relative_submit_directory

Depending on the number of files being staged to the remote site a Hashed File Structure is created that ensures that only 256 files reside in one directory.

To create this directory structure on the storage site, Pegasus relies on the directory creation feature of the Grid FTP server, which appeared in globus 4.0.x

9.1.3.5. pegasus.dir.create.strategy

System: Pegasus
Since: 2.2
Type: enumeration
Value[0]: HourGlass
Value[1]: Tentacles
Default: Tentacles

If the

--randomdir

option is given to the Planner at runtime, the Pegasus planner adds nodes that create the random directories at the remote pool sites, before any jobs are actually run. The two modes determine the placement of these nodes and their dependencies to the rest of the graph.

HourGlass
It adds a make directory node at the top level of the graph, and all these concat to a single dummy job before branching out to the root nodes of the original/ concrete dag so far. So we introduce a classic X shape at the top of the graph. Hence the name HourGlass.
Tentacles
This option places the jobs creating directories at the top of the graph. However instead of constricting it to an hour glass shape, this mode links the top node to all the relevant nodes for which the create dir job is necessary. It looks as if the node spreads its tentacleas all around. This puts more load on the DAGMan because of the added dependencies but removes the restriction of the plan progressing only when all the create directory jobs have progressed on the remote pools, as is the case in the HourGlass model.

9.1.3.6. pegasus.dir.create.impl

System: Pegasus
Since: 2.2
Type: enumeration
Value[0]: DefaultImplementation
Value[1]: S3
Default: DefaultImpelmentation

This property is used to select the executable that is used to create the working directory on the compute sites.

DefaultImplementation
The default executable that is used to create a directory is the dirmanager executable shipped with Pegasus. It is found at $PEGASUS_HOME/bin/dirmanager in the pegasus distribution. An entry for transformation pegasus::dirmanager needs to exist in the Transformation Catalog or the PEGASUS_HOME environment variable should be specified in the site catalog for the sites for this mode to work.
S3
This option is used to create buckets in S3 instead of a directory. This should be set when running workflows on Amazon EC2. This implementation relies on s3cmd command line client to create the bucket. An entry for transformation amazon::s3cmd needs to exist in the Transformation Catalog for this to work.

9.1.4. Schema File Location Properties

This section defines the location of XML schema files that are used to parse the various XML document instances in the PEGASUS. The schema backups in the installed file-system permit PEGASUS operations without being online.

9.1.4.1. pegasus.schema.dax

Systems: Pegasus
Since: 2.0
Type: XML schema file location string
Value[0]: ${pegasus.home.sysconfdir}/dax-3.2.xsd
Default: ${pegasus.home.sysconfdir}/dax-3.2.xsd

This file is a copy of the XML schema that describes abstract DAG files that are the result of the abstract planning process, and input into any concrete planning. Providing a copy of the schema enables the parser to use the local copy instead of reaching out to the internet, and obtaining the latest version from the GriPhyN website dynamically.

9.1.4.2. pegasus.schema.sc

Systems: Pegasus
Since: 2.0
Type: XML schema file location string
Value[0]: ${pegasus.home.sysconfdir}/sc-3.0.xsd
Default: ${pegasus.home.sysconfdir}/sc-3.0.xsd

This file is a copy of the XML schema that describes the xml description of the site catalog, that is generated as a result of using genpoolconfig command. Providing a copy of the schema enables the parser to use the local copy instead of reaching out to the internet, and obtaining the latest version from the GriPhyN website dynamically.

9.1.4.3. pegasus.schema.ivr

Systems: all
Type: XML schema file location string
Value[0]: ${pegasus.home.sysconfdir}/iv-2.0.xsd
Default: ${pegasus.home.sysconfdir}/iv-2.0.xsd

This file is a copy of the XML schema that describes invocation record files that are the result of the a grid launch in a remote or local site. Providing a copy of the schema enables the parser to use the local copy instead of reaching out to the internet, and obtaining the latest version from the GriPhyN website dynamically.

9.1.5. Database Drivers For All Relational Catalogs

9.1.5.1. pegasus.catalog.*.db.driver

System: Pegasus
Type: Java class name
Value[0]: Postgres
Value[1]: MySQL
Value[2]: SQLServer2000 (not yet implemented!)
Value[3]: Oracle (not yet implemented!)
Default: (no default)
See also: pegasus.catalog.provenance

The database driver class is dynamically loaded, as required by the schema. Currently, only PostGreSQL 7.3 and MySQL 4.0 are supported. Their respective JDBC3 driver is provided as part and parcel of the PEGASUS.

A user may provide their own implementation, derived from org.griphyn.vdl.dbdriver.DatabaseDriver, to talk to a database of their choice.

For each schema in PTC, a driver is instantiated separately, which has the same prefix as the schema. This may result in multiple connections to the database backend. As fallback, the schema "*" driver is attempted.

The * in the property name can be replaced by a catalog name to apply the property only for that catalog. Valid catalog names are

replica
provenance

9.1.5.2. pegasus.catalog.*.db.url

System: PTC, ...
Type: JDBC database URI string
Default: (no default)
Example: jdbc:postgresql:${user.name}

Each database has its own string to contact the database on a given host, port, and database. Although most driver URLs allow to pass arbitrary arguments, please use the pegasus.catalog.[catalog-name].db.* keys or pegasus.catalog.*.db.* to preload these arguments. THE URL IS A MANDATORY PROPERTY FOR ANY DBMS BACKEND.

Postgres : jdbc:postgresql:[//hostname[:port]/]database
MySQL    : jdbc:mysql://hostname[:port]]/database
SQLServer: jdbc:microsoft:sqlserver://hostname:port
Oracle   : jdbc:oracle:thin:[user/password]@//host[:port]/service

The * in the property name can be replaced by a catalog name to apply the property only for that catalog. Valid catalog names are

replica
provenance

9.1.5.3. pegasus.catalog.*.db.user

System: PTC, ...
Type: string
Default: (no default)
Example: ${user.name}

In order to access a database, you must provide the name of your account on the DBMS. This property is database-independent. THIS IS A MANDATORY PROPERTY FOR MANY DBMS BACKENDS.

The * in the property name can be replaced by a catalog name to apply the property only for that catalog. Valid catalog names are

replica
provenance

9.1.5.4. pegasus.catalog.*.db.password

System: PTC, ...
Type: string
Default: (no default)
Example: ${user.name}

In order to access a database, you must provide an optional password of your account on the DBMS. This property is database-independent. THIS IS A MANDATORY PROPERTY, IF YOUR DBMS BACKEND ACCOUNT REQUIRES A PASSWORD.

The * in the property name can be replaced by a catalog name to apply the property only for that catalog. Valid catalog names are

replica
provenance

9.1.5.5. pegasus.catalog.*.db.*

System: PTC, RC

Each database has a multitude of options to control in fine detail the further behaviour. You may want to check the JDBC3 documentation of the JDBC driver for your database for details. The keys will be passed as part of the connect properties by stripping the "pegasus.catalog.[catalog-name].db." prefix from them. The catalog-name can be replaced by the following values provenance for Provenance Catalog (PTC), replica for Replica Catalog (RC)

Postgres 7.3 parses the following properties:

pegasus.catalog.*.db.user
pegasus.catalog.*.db.password
pegasus.catalog.*.db.PGHOST
pegasus.catalog.*.db.PGPORT
pegasus.catalog.*.db.charSet
pegasus.catalog.*.db.compatible

MySQL 4.0 parses the following properties:

pegasus.catalog.*.db.user
pegasus.catalog.*.db.password
pegasus.catalog.*.db.databaseName
pegasus.catalog.*.db.serverName
pegasus.catalog.*.db.portNumber
pegasus.catalog.*.db.socketFactory
pegasus.catalog.*.db.strictUpdates
pegasus.catalog.*.db.ignoreNonTxTables
pegasus.catalog.*.db.secondsBeforeRetryMaster
pegasus.catalog.*.db.queriesBeforeRetryMaster
pegasus.catalog.*.db.allowLoadLocalInfile
pegasus.catalog.*.db.continueBatchOnError
pegasus.catalog.*.db.pedantic
pegasus.catalog.*.db.useStreamLengthsInPrepStmts
pegasus.catalog.*.db.useTimezone
pegasus.catalog.*.db.relaxAutoCommit
pegasus.catalog.*.db.paranoid
pegasus.catalog.*.db.autoReconnect
pegasus.catalog.*.db.capitalizeTypeNames
pegasus.catalog.*.db.ultraDevHack
pegasus.catalog.*.db.strictFloatingPoint
pegasus.catalog.*.db.useSSL
pegasus.catalog.*.db.useCompression
pegasus.catalog.*.db.socketTimeout
pegasus.catalog.*.db.maxReconnects
pegasus.catalog.*.db.initialTimeout
pegasus.catalog.*.db.maxRows
pegasus.catalog.*.db.useHostsInPrivileges
pegasus.catalog.*.db.interactiveClient
pegasus.catalog.*.db.useUnicode
pegasus.catalog.*.db.characterEncoding

MS SQL Server 2000 support the following properties (keys are case-insensitive, e.g. both "user" and "User" are valid):

pegasus.catalog.*.db.User
pegasus.catalog.*.db.Password
pegasus.catalog.*.db.DatabaseName
pegasus.catalog.*.db.ServerName
pegasus.catalog.*.db.HostProcess
pegasus.catalog.*.db.NetAddress
pegasus.catalog.*.db.PortNumber
pegasus.catalog.*.db.ProgramName
pegasus.catalog.*.db.SendStringParametersAsUnicode
pegasus.catalog.*.db.SelectMethod

The * in the property name can be replaced by a catalog name to apply the property only for that catalog. Valid catalog names are

replica
provenance

9.1.6. Catalog Properties

9.1.6.1. Replica Catalog

9.1.6.1.1. pegasus.catalog.replica

System: Pegasus
Since: 2.0
Type: enumeration
Value[0]: RLS
Value[1]: LRC
Value[2]: JDBCRC
Value[3]: File
Value[4]: MRC
Default: RLS

Pegasus queries a Replica Catalog to discover the physical filenames (PFN) for input files specified in the DAX. Pegasus can interface with various types of Replica Catalogs. This property specifies which type of Replica Catalog to use during the planning process.

RLS
RLS (Replica Location Service) is a distributed replica catalog, which ships with GT4. There is an index service called Replica Location Index (RLI) to which 1 or more Local Replica Catalog (LRC) report. Each LRC can contain all or a subset of mappings. In this mode, Pegasus queries the central RLI to discover in which LRC's the mappings for a LFN reside. It then queries the individual LRC's for the PFN's. To use RLS, the user additionally needs to set the property pegasus.catalog.replica.url to specify the URL for the RLI to query. Details about RLS can be found at http://www.globus.org/toolkit/data/rls/
LRC
If the user does not want to query the RLI, but directly a single Local Replica Catalog. To use LRC, the user additionally needs to set the property pegasus.catalog.replica.url to specify the URL for the LRC to query. Details about RLS can be found at http://www.globus.org/toolkit/data/rls/
JDBCRC
In this mode, Pegasus queries a SQL based replica catalog that is accessed via JDBC. The sql schema's for this catalog can be found at $PEGASUS_HOME/sql directory. To use JDBCRC, the user additionally needs to set the following properties
  1. pegasus.catalog.replica.db.url
  2. pegasus.catalog.replica.db.user
  3. pegasus.catalog.replica.db.password
File

In this mode, Pegasus queries a file based replica catalog. It is neither transactionally safe, nor advised to use for production purposes in any way. Multiple concurrent instances will clobber each other!. The site attribute should be specified whenever possible. The attribute key for the site attribute is "pool".

The LFN may or may not be quoted. If it contains linear whitespace, quotes, backslash or an equality sign, it must be quoted and escaped. Ditto for the PFN. The attribute key-value pairs are separated by an equality sign without any whitespaces. The value may be in quoted. The LFN sentiments about quoting apply.

LFN PFN
LFN PFN a=b [..]
LFN PFN a="b" [..]
"LFN w/LWS" "PFN w/LWS" [..]

To use File, the user additionally needs to specify pegasus.catalog.replica.file property to specify the path to the file based RC.

MRC

In this mode, Pegasus queries multiple replica catalogs to discover the file locations on the grid. To use it set

pegasus.catalog.replica MRC

Each associated replica catalog can be configured via properties as follows.

The user associates a variable name referred to as [value] for each of the catalogs, where [value] is any legal identifier (concretely [A-Za-z][_A-Za-z0-9]*) For each associated replica catalogs the user specifies the following properties.

pegasus.catalog.replica.mrc.[value]       specifies the type of replica catalog.
pegasus.catalog.replica.mrc.[value].key   specifies a property name key for a
particular catalog

For example, if a user wants to query two lrc's at the same time he/she can specify as follows

pegasus.catalog.replica.mrc.lrc1 LRC
pegasus.catalog.replica.mrc.lrc2.url rls://sukhna
pegasus.catalog.replica.mrc.lrc2 LRC
pegasus.catalog.replica.mrc.lrc2.url rls://smarty

In the above example, lrc1, lrc2 are any valid identifier names and url is the property key that needed to be specified.

9.1.6.1.2. pegasus.catalog.replica.url

System: Pegasus
Since: 2.0
Type: URI string
Default: (no default)

When using the modern RLS replica catalog, the URI to the Replica catalog must be provided to Pegasus to enable it to look up filenames. There is no default.

9.1.6.1.3. pegasus.catalog.replica.chunk.size

System: Pegasus, rc-client
Since: 2.0
Type: Integer
Default: 1000

The rc-client takes in an input file containing the mappings upon which to work. This property determines, the number of lines that are read in at a time, and worked upon at together. This allows the various operations like insert, delete happen in bulk if the underlying replica implementation supports it.

9.1.6.1.4. pegasus.catalog.replica.lrc.ignore

System: Replica Catalog - RLS
Since: 2.0
Type: comma separated list of LRC urls
Default: (no default)
See also: pegasus.catalog.replica.lrc.restrict

Certain users may like to skip some LRCs while querying for the physical locations of a file. If some LRCs need to be skipped from those found in the rli then use this property. You can define either the full URL or partial domain names that need to be skipped. E.g. If a user wants rls://smarty.isi.edu and all LRCs on usc.edu to be skipped then the property will be set as pegasus.rls.lrc.ignore=rls://smarty.isi.edu,usc.edu

9.1.6.1.5. pegasus.catalog.replica.lrc.restrict

System: Replica Catalog - RLS
Since: 1.3.9
Type: comma separated list of LRC urls
Default: (no default)
See also: pegasus.catalog.replica.lrc.ignore

This property applies a tighter restriction on the results returned from the LRCs specified. Only those PFNs are returned that have a pool attribute associated with them. The property "pegasus.rc.lrc.ignore" has a higher priority than "pegasus.rc.lrc.restrict". For example, in case a LRC is specified in both properties, the LRC would be ignored (i.e. not queried at all instead of applying a tighter restriction on the results returned).

9.1.6.1.6. pegasus.catalog.replica.lrc.site.[site-name]

System: Replica Catalog - RLS
Since: 2.3.0
Type: LRC url
Default: (no default)

This property allows for the LRC url to be associated with site handles. Usually, a pool attribute is required to be associated with the PFN for Pegasus to figure out the site on which PFN resides. However, in the case where an LRC is responsible for only a single site's mappings, Pegasus can safely associate LRC url with the site. This association can be used to determine the pool attribute for all mappings returned from the LRC, if the mapping does not have a pool attribute associated with it.

The site_name in the property should be replaced by the name of the site. For example

pegasus.catalog.replica.lrc.site.isi  rls://lrc.isi.edu

tells Pegasus that all PFNs returned from LRC rls://lrc.isi.edu are associated with site isi.

The [site_name] should be the same as the site handle specified in the site catalog.

9.1.6.1.7. pegasus.catalog.replica.cache.asrc

System: Pegasus
Since: 2.0
Type: Boolean
Value[0]: false
Value[1]: true
Default: false
See also: pegasus.catalog.replica

This property determines whether to treat the cache file specified as a supplemental replica catalog or not. User can specify on the command line to pegasus-plan a comma separated list of cache files using the --cache option. By default, the LFN->PFN mappings contained in the cache file are treated as cache, i.e if an entry is found in a cache file the replica catalog is not queried. This results in only the entry specified in the cache file to be available for replica selection.

Setting this property to true, results in the cache files to be treated as supplemental replica catalogs. This results in the mappings found in the replica catalog (as specified by pegasus.catalog.replica) to be merged with the ones found in the cache files. Thus, mappings for a particular LFN found in both the cache and the replica catalog are available for replica selection.

9.1.6.2. Site Catalog

9.1.6.2.1. pegasus.catalog.site

System: Site Catalog
Since: 2.0
Type: enumeration
Value[0]: XML3
Value[1]: XML
Default: XML3

The site catalog file is available in three major flavors: The Text and and XML formats for the site catalog are deprecated. Users can use pegasus-sc-converter client to convert their site catalog to the newer XML3 format.

  1. THIS FORMAT IS DEPRECATED. WILL BE REMOVED IN COMING VERSIONS. USE pegasus-sc-converter to convert XML format to XML3 Format. The "XML" format is an XML-based file. The XML format reads site catalog conforming to the old site catalog schema available at http://pegasus.isi.edu/wms/docs/schemas/sc-2.0/sc-2.0.xsd
  2. The "XML3" format is an XML-based file. The XML format reads site catalog conforming to the old site catalog schema available at http://pegasus.isi.edu/wms/docs/schemas/sc-3.0/sc-3.0.xsd

9.1.6.2.2. pegasus.catalog.site.file

System: Site Catalog
Since: 2.0
Type: file location string
Default: ${pegasus.home.sysconfdir}/sites.xml3 |${pegasus.home.sysconfdir}/sites.xml
See also: pegasus.catalog.site

Running things on the grid requires an extensive description of the capabilities of each compute cluster, commonly termed "site". This property describes the location of the file that contains such a site description. As the format is currently in flow, please refer to the userguide and Pegasus for details which format is expected. The default value is dependant on the value specified for the property pegasus.catalog.site . If type of SiteCatalog used is XML3, then sites.xml3 is picked up from sysconfdir else sites.xml

9.1.6.3. Transformation Catalog

9.1.6.3.1. pegasus.catalog.transformation

System: Transformation Catalog
Since: 2.0
Type: enumeration
Value[0]: Text
Value[1]: File
Default: Text
See also: pegasus.catalog.transformation.file

Text

In this mode, a multiline file based format is understood. The file is read and cached in memory. Any modifications, as adding or deleting, causes an update of the memory and hence to the file underneath. All queries are done against the memory representation.

The file sample.tc.text in the etc directory contains an example

Here is a sample textual format for transfomation catalog containing one transformation on two sites

tr example::keg:1.0 {
#specify profiles that apply for all the sites for the transformation
#in each site entry the profile can be overriden
profile env "APP_HOME" "/tmp/karan"
profile env "JAVA_HOME" "/bin/app"
site isi {
profile env "me" "with"
profile condor "more" "test"
profile env "JAVA_HOME" "/bin/java.1.6"
pfn "/path/to/keg"
arch  "x86"
os    "linux"
osrelease "fc"
osversion "4"
type "INSTALLED"
site wind {
profile env "me" "with"
profile condor "more" "test"
pfn "/path/to/keg"
arch  "x86"
os    "linux"
osrelease "fc"
osversion "4"
type "STAGEABLE"

File
THIS FORMAT IS DEPRECATED. WILL BE REMOVED IN COMING VERSIONS. USE pegasus-tc-converter to convert File format to Text Format. In this mode, a file format is understood. The file is read and cached in memory. Any modifications, as adding or deleting, causes an update of the memory and hence to the file underneath. All queries are done against the memory representation. The new TC file format uses 6 columns:
  1. The resource ID is represented in the first column.
  2. The logical transformation uses the colonized format ns::name:vs.
  3. The path to the application on the system
  4. The installation type is identified by one of the following keywords - all upper case: INSTALLED, STAGEABLE. If not specified, or NULL is used, the type defaults to INSTALLED.
  5. The system is of the format ARCH::OS[:VER:GLIBC]. The following arch types are understood: "INTEL32", "INTEL64", "SPARCV7", "SPARCV9". The following os types are understood: "LINUX", "SUNOS", "AIX". If unset or NULL, defaults to INTEL32::LINUX.
  6. Profiles are written in the format NS::KEY=VALUE,KEY2=VALUE;NS2::KEY3=VALUE3 Multiple key-values for same namespace are seperated by a comma "," and multiple namespaces are seperated by a semicolon ";". If any of your profile values contains a comma you must not use the namespace abbreviator.

9.1.6.3.2. pegasus.catalog.transformation.file

Systems: Transformation Catalog
Type: file location string
Default: ${pegasus.home.sysconfdir}/tc.text | ${pegasus.home.sysconfdir}/tc.data
See also: pegasus.catalog.transformation

This property is used to set the path to the textual transformation catalogs of type File or Text. If the transformation catalog is of type Text then tc.text file is picked up from sysconfdir, else tc.data

9.1.6.4. Provenance Catalog

9.1.6.4.1. pegasus.catalog.provenance

System: Provenance Tracking Catalog (PTC)
Since: 2.0
Type: Java class name
Value[0]: InvocationSchema
Value[1]: NXDInvSchema
Default: (no default)
See also: pegasus.catalog.*.db.driver

This property denotes the schema that is being used to access a PTC. The PTC is usually not a standard installation. If you use a database backend, you most likely have a schema that supports PTCs. By default, no PTC will be used.

Currently only the InvocationSchema is available for storing the provenance tracking records. Beware, this can become a lot of data. The values are names of Java classes. If no absolute Java classname is given, "org.griphyn.vdl.dbschema." is prepended. Thus, by deriving from the DatabaseSchema API, and implementing the PTC interface, users can provide their own classes here.

Alternatively, if you use a native XML database like eXist, you can store data using the NXDInvSchema. This will avoid using any of the other database driver properties.

9.1.6.4.2. pegasus.catalog.provenance.refinement

System: PASOA Provenance Store
Since: 2.0.1
Type: Java class name
Value[0]: Pasoa
Value[1]: InMemory
Default: InMemory
See also: pegasus.catalog.*.db.driver

This property turns on the logging of the refinement process that happens inside Pegasus to the PASOA store. Not all actions are currently captured. It is still an experimental feature.

The PASOA store needs to run on localhost on port 8080 https://localhost:8080/prserv-1.0

9.1.7. Replica Selection Properties

9.1.7.1. pegasus.selector.replica

System: Replica Selection
Since: 2.0
Type: URI string
Default: default
See also: pegasus.replica.*.ignore.stagein.sites
See also: pegasus.replica.*.prefer.stagein.sites

Each job in the DAX maybe associated with input LFN's denoting the files that are required for the job to run. To determine the physical replica (PFN) for a LFN, Pegasus queries the replica catalog to get all the PFN's (replicas) associated with a LFN. Pegasus then calls out to a replica selector to select a replica amongst the various replicas returned. This property determines the replica selector to use for selecting the replicas.

Default
If a PFN that is a file URL (starting with file:///) and has a pool attribute matching to the site handle of the site where the compute is to be run is found, then that is returned. Else,a random PFN is selected amongst all the PFN's that have a pool attribute matching to the site handle of the site where a compute job is to be run. Else, a random pfn is selected amongst all the PFN's.
Restricted

This replica selector, allows the user to specify good sites and bad sites for staging in data to a particular compute site. A good site for a compute site X, is a preferred site from which replicas should be staged to site X. If there are more than one good sites having a particular replica, then a random site is selected amongst these preferred sites.

A bad site for a compute site X, is a site from which replica's should not be staged. The reason of not accessing replica from a bad site can vary from the link being down, to the user not having permissions on that site's data.

The good | bad sites are specified by the properties

pegasus.replica.*.prefer.stagein.sites
pegasus.replica.*.ignore.stagein.sites

where the * in the property name denotes the name of the compute site. A * in the property key is taken to mean all sites.

The pegasus.replica.*.prefer.stagein.sites property takes precedence over pegasus.replica.*.ignore.stagein.sites property i.e. if for a site X, a site Y is specified both in the ignored and the preferred set, then site Y is taken to mean as only a preferred site for a site X.

Regex

This replica selector allows the user allows the user to specific regex expressions that can be used to rank various PFN's returned from the Replica Catalog for a particular LFN. This replica selector selects the highest ranked PFN i.e the replica with the lowest rank value.

The regular expressions are assigned different rank, that determine the order in which the expressions are employed. The rank values for the regex can expressed in user properties using the property.

pegasus.selector.replica.regex.rank.[value]   regex-expression

The value is an integer value that denotes the rank of an expression with a rank value of 1 being the highest rank.

Please note that before applying any regular expressions on the PFN's, the file URL's that dont match the preferred site are explicitly filtered out.

Local
This replica selector prefers replicas from the local host and that start with a file: URL scheme. It is useful, when users want to stagin files to a remote site from your submit host using the Condor file transfer mechanism.

9.1.7.2. pegasus.selector.replica.*.ignore.stagein.sites

System: Replica Selection
Type: comma separated list of sites
Since: 2.0
Default: no default
See also: pegasus.selector.replica
See also: pegasus.selector.replica.*.prefer.stagein.sites

A comma separated list of storage sites from which to never stage in data to a compute site. The property can apply to all or a single compute site, depending on how the * in the property name is expanded.

The * in the property name means all compute sites unless replaced by a site name.

For e.g setting pegasus.selector.replica.*.ignore.stagein.sites to usc means that ignore all replicas from site usc for staging in to any compute site. Setting pegasus.replica.isi.ignore.stagein.sites to usc means that ignore all replicas from site usc for staging in data to site isi.

9.1.7.3. pegasus.selector.replica.*.prefer.stagein.sites

System: Replica Selection
Type: comma separated list of sites
Since: 2.0
Default: no default
See also: pegasus.selector.replica
See also: pegasus.selector.replica.*.ignore.stagein.sites

A comma separated list of preferred storage sites from which to stage in data to a compute site. The property can apply to all or a single compute site, depending on how the * in the property name is expanded.

The * in the property name means all compute sites unless replaced by a site name.

For e.g setting pegasus.selector.replica.*.prefer.stagein.sites to usc means that prefer all replicas from site usc for staging in to any compute site. Setting pegasus.replica.isi.prefer.stagein.sites to usc means that prefer all replicas from site usc for staging in data to site isi.

9.1.7.4. pegasus.selector.replica.regex.rank.[value]

System: Replica Selection
Type: Regex Expression
Since: 2.3.0
Default: no default
See also: pegasus.selector.replica

Specifies the regex expressions to be applied on the PFNs returned for a particular LFN. Refer to

http://java.sun.com/javase/6/docs/api/java/util/regex/Pattern.html

on information of how to construct a regex expression.

The [value] in the property key is to be replaced by an int value that designates the rank value for the regex expression to be applied in the Regex replica selector.

The example below indicates preference for file URL's over URL's referring to gridftp server at example.isi.edu

pegasus.selector.replica.regex.rank.1 file://.*
pegasus.selector.replica.regex.rank.2 gsiftp://example\.isi\.edu.*

9.1.8. Site Selection Properties

9.1.8.1. pegasus.selector.site

System: Pegasus
Since: 2.0
Type: enumeration
Value[0]: Random
Value[1]: RoundRobin
Value[2]: NonJavaCallout
Value[3]: Group
Value[4]: Heft
Default: Random
See also: pegasus.selector.site.path
See also: pegasus.selector.site.timeout
See also: pegasus.selector.site.keep.tmp
See also: pegasus.selector.site.env.*

The site selection in Pegasus can be on basis of any of the following strategies.

Random
In this mode, the jobs will be randomly distributed among the sites that can execute them.
RoundRobin
In this mode. the jobs will be assigned in a round robin manner amongst the sites that can execute them. Since each site cannot execute everytype of job, the round robin scheduling is done per level on a sorted list. The sorting is on the basis of the number of jobs a particular site has been assigned in that level so far. If a job cannot be run on the first site in the queue (due to no matching entry in the transformation catalog for the transformation referred to by the job), it goes to the next one and so on. This implementation defaults to classic round robin in the case where all the jobs in the workflow can run on all the sites.
NonJavaCallout

In this mode, Pegasus will callout to an external site selector.In this mode a temporary file is prepared containing the job information that is passed to the site selector as an argument while invoking it. The path to the site selector is specified by setting the property pegasus.site.selector.path. The environment variables that need to be set to run the site selector can be specified using the properties with a pegasus.site.selector.env. prefix. The temporary file contains information about the job that needs to be scheduled. It contains key value pairs with each key value pair being on a new line and separated by a =.

The following pairs are currently generated for the site selector temporary file that is generated in the NonJavaCallout.

version is the version of the site selector api,currently 2.0.
transformation is the fully-qualified definition identifier for the transformation (TR) namespace::name:version.
derivation is teh fully qualified definition identifier for the derivation (DV), namespace::name:version.
job.level is the job's depth in the tree of the workflow DAG.
job.id is the job's ID, as used in the DAX file.
resource.id is a pool handle, followed by whitespace, followed by a gridftp server. Typically, each gridftp server is enumerated once, so you may have multiple occurances of the same site. There can be multiple occurances of this key.
input.lfn is an input LFN, optionally followed by a whitespace and file size. There can be multiple occurances of this key,one for each input LFN required by the job.
wf.name label of the dax, as found in the DAX's root element. wf.index is the DAX index, that is incremented for each partition in case of deferred planning.
wf.time is the mtime of the workflow.
wf.manager is the name of the workflow manager being used .e.g condor
vo.name is the name of the virtual organization that is running this workflow. It is currently set to NONE
vo.group unused at present and is set to NONE.
 

Group
In this mode, a group of jobs will be assigned to the same site that can execute them. The use of the PEGASUS profile key group in the dax, associates a job with a particular group. The jobs that do not have the profile key associated with them, will be put in the default group. The jobs in the default group are handed over to the "Random" Site Selector for scheduling.
Heft

In this mode, a version of the HEFT processor scheduling algorithm is used to schedule jobs in the workflow to multiple grid sites. The implementation assumes default data communication costs when jobs are not scheduled on to the same site. Later on this may be made more configurable.

The runtime for the jobs is specified in the transformation catalog by associating the pegasus profile key runtime with the entries.

The number of processors in a site is picked up from the attribute idle-nodes associated with the vanilla jobmanager of the site in the site catalog.

9.1.8.2. pegasus.selector.site.path

System: Site Selector
Since: 2.0
Type: String

If one calls out to an external site selector using the NonJavaCallout mode, this refers to the path where the site selector is installed. In case other strategies are used it does not need to be set.

9.1.8.3. pegasus.site.selector.env.*

System: Pegasus
Since: 1.2.3
Type: String

The environment variables that need to be set while callout to the site selector. These are the variables that the user would set if running the site selector on the command line. The name of the environment variable is got by stripping the keys of the prefix "pegasus.site.selector.env." prefix from them. The value of the environment variable is the value of the property.

e.g pegasus.site.selector.path.LD_LIBRARY_PATH /globus/lib would lead to the site selector being called with the LD_LIBRARY_PATH set to /globus/lib.

9.1.8.4. pegasus.selector.site.timeout

System: Site Selector
Since: 2.0
Type: non negative integer
Default: 60

It sets the number of seconds Pegasus waits to hear back from an external site selector using the NonJavaCallout interface before timing out.

9.1.8.5. pegasus.selector.site.keep.tmp

System: Pegasus
Since: 2.0
Type: enumeration
Value[0]: onerror
Value[1]: always
Value[2]: never
Default: onerror

It determines whether Pegasus deletes the temporary input files that are generated in the temp directory or not. These temporary input files are passed as input to the external site selectors.

A temporary input file is created for each that needs to be scheduled.

9.1.9. Transfer Configuration Properties

9.1.9.1. pegasus.transfer.*.impl

System: Pegasus
Type: enumeration
Value[0]: Transfer3
Value[1]: GUC
Default: Transfer3
See also: pegasus.transfer.refiner
Since: 2.0

Each compute job usually has data products that are required to be staged in to the execution site, materialized data products staged out to a final resting place, or staged to another job running at a different site. This property determines the underlying grid transfer tool that is used to manage the transfers.

The * in the property name can be replaced to achieve finer grained control to dictate what type of transfer jobs need to be managed with which grid transfer tool.

Usually,the arguments with which the client is invoked can be specified by

- the property pegasus.transfer.arguments
- associating the PEGASUS profile key transfer.arguments

The table below illustrates all the possible variations of the property.

Property Name Applies to
pegasus.transfer.stagein.impl the stage in transfer jobs
pegasus.transfer.stageout.impl the stage out transfer jobs
pegasus.transfer.inter.impl the inter pool transfer jobs
pegasus.transfer.setup.impl the setup transfer job
pegasus.transfer.*.impl apply to types of transfer jobs
 

Note: Since version 2.2.0 the worker package is staged automatically during staging of executables to the remote site. This is achieved by adding a setup transfer job to the workflow. The setup transfer job by default uses GUC to stage the data. The implementation to use can be configured by setting the property

pegasus.transfer.setup.impl 

property. However, if you have pegasus.transfer.*.impl set in your properties file, then you need to set pegasus.transfer.setup.impl to GUC

The various grid transfer tools that can be used to manage data transfers are explained below

Transfer3

This results in pegasus-transfer to be used for transferring of files. It is a python based wrapper around various transfer clients like globus-url-copy, lcg-copy, wget, cp, ln . pegasus-transfer looks at source and destination url and figures out automatically which underlying client to use. pegasus-transfer is distributed with the PEGASUS and can be found at $PEGASUS_HOME/bin/pegasus-transfer.

For remote sites, Pegasus constructs the default path to pegasus-transfer on the basis of PEGASUS_HOME env profile specified in the site catalog. To specify a different path to the pegasus-transfer client , users can add an entry into the transformation catalog with fully qualified logical name as pegasus::pegasus-transfer

GUC
This refers to the new guc client that does multiple file transfers per invocation. The globus-url-copy client distributed with Globus 4.x is compatible with this mode.

9.1.9.2. pegasus.transfer.refiner

System: Pegasus
Type: enumeration
Value[0]: Bundle
Value[1]: Chain
Value[2]: Condor
Value[3]: Cluster
Default: Bundle
Since: 2.0
See also: pegasus.transfer.*.impl

This property determines how the transfer nodes are added to the workflow. The various refiners differ in the how they link the various transfer jobs, and the number of transfer jobs that are created per compute jobs.

Bundle
This is default refinement strategy in Pegasus. In this refinement strategy, the number of stage in transfer nodes that are constructed per execution site can vary. The number of transfer nodes can be specified, by associating the pegasus profile "bundle.stagein". The profile can either be associated with the execution site in the site catalog or with the "transfer" executable in the transformation catalog. The value in the transformation catalog overrides the one in the site catalog. This refinement strategy extends from the Default refiner, and thus takes care of file clobbering while staging in data.
Chain
In this refinement strategy, chains of stagein transfer nodes are constructed. A chain means that the jobs are sequentially dependant upon each other i.e. at any moment, only one stage in transfer job will run per chain. The number of chains can be specified by associating the pegasus profile "chain.stagein". The profile can either be associated with the execution site in the site catalog or with the "transfer" executable in the transformation catalog. The value in the transformation catalog overrides the one in the site catalog. This refinement strategy extends from the Default refiner, and thus takes care of file clobbering while staging in data.
Condor
In this refinement strategy, no additional staging transfer jobs are added to the workflow. Instead the compute jobs are modified to have the transfer_input_files and transfer_output_files set to pull the input data. To stage-out the data a separate stage-out is added. The stage-out job is a /bin/true job that uses the transfer_input_file and transfer_output_files to stage the data back to the submit host. This refinement strategy is used workflows are being executed on a Condor pool, and the submit node itself is a part of the Condor pool.
Cluster

In this refinement strategy, clusters of stage-in and stageout jobs are created per level of the workflow. It builds upon the Bundle refiner. The differences between the Bundle and Cluster refiner are as follows.

- stagein is also clustered/bundled per level. In Bundle it was
for the whole workflow.
- keys that control the clustering ( old name bundling are )
cluster.stagein and cluster.stageout

This refinement strategy also adds dependencies between the stagein transfer jobs on different levels of the workflow to ensure that stagein for the top level happens first and so on.

An image of the workflow with this refinement strategy can be found at

http://vtcpc.isi.edu/pegasus/index.php/ChangeLog#Added_a_Cluster_Transfer_Refiner

9.1.9.3. pegasus.transfer.sls.*.impl

System: Pegasus
Type: enumeration
Value[0]: Transfer3
Value[1]: S3
Default: Transfer3
Since: 2.2.0
See also: pegasus.execute.*.filesystem.local

This property specifies the transfer tool to be used for Second Level Staging (SLS) of input and output data between the head node and worker node filesystems.

Currently, the * in the property name CANNOT be replaced to achieve finer grained control to dictate what type of SLS transfers need to be managed with which grid transfer tool.

The various grid transfer tools that can be used to manage SLS data transfers are explained below

Transfer3

This results in pegasus-transfer to be used for transferring of files. It is a python based wrapper around various transfer clients like globus-url-copy, lcg-copy, wget, cp, ln . pegasus-transfer looks at source and destination url and figures out automatically which underlying client to use. pegasus-transfer is distributed with the PEGASUS and can be found at $PEGASUS_HOME/bin/pegasus-transfer.

For remote sites, Pegasus constructs the default path to pegasus-transfer on the basis of PEGASUS_HOME env profile specified in the site catalog. To specify a different path to the pegasus-transfer client , users can add an entry into the transformation catalog with fully qualified logical name as pegasus::pegasus-transfer

Condor

This results in Condor file transfer mechanism to be used to transfer the input data files from the submit host directly to the worker node directories. This is used when running in pure Condor mode or in a Condor pool that does not have a shared filesystem between the nodes.

When setting the SLS transfers to Condor make sure that the following properties are also set

pegasus.transfer.refiner   Condor
pegasus.selector.replica   Local
pegasus.execute.*.filesystem.local true

Also make sure that pegasus.gridstart is not set.

Please refer to the section on "Condor Pool Without a Shared Filesystem" in the chapter on Planning and Submitting.

S3

This implementation refers to the s3cmd transfer client that is used for second level staging of data in the cloud. The data can be staged between the filesystem on the worker nodes and the workflow specific bucket on S3.

There should be an entry in the transformation catalog with the fully qualified name as amazon::s3cmd for the site corresponding to the cloud.

9.1.9.4. pegasus.transfer.arguments

System: Pegasus
Since: 2.0
Type: String
Default: (no default)
See also: pegasus.transfer.sls.arguments

This determines the extra arguments with which the transfer implementation is invoked. The transfer executable that is invoked is dependant upon the transfer mode that has been selected. The property can be overloaded by associated the pegasus profile key transfer.arguments either with the site in the site catalog or the corresponding transfer executable in the transformation catalog.

9.1.9.5. pegasus.transfer.sls.arguments

System: Pegasus
Since: 2.4
Type: String
Default: (no default)
See also: pegasus.transfer.arguments
See also: pegasus.transfer.sls.*.impl

This determines the extra arguments with which the SLS transfer implementation is invoked. The transfer executable that is invoked is dependant upon the SLS transfer implementation that has been selected.

9.1.9.6. pegasus.transfer.stage.sls.file

System: Pegasus
Since: 3.0
Type: Boolean
Default: (no default)
See also: pegasus.gridstart
See also: pegasus.execute.*.filesystem.local

For executing jobs on the local filesystem, Pegasus creates sls files for each compute jobs. These sls files list the files that need to be staged to the worker node and the output files that need to be pushed out from the worker node after completion of the job. By default, pegasus will stage these SLS files to the shared filesystem on the head node as part of first level data stagein jobs. However, in the case where there is no shared filesystem between head nodes and the worker nodes, the user can set this property to false. This will result in the sls files to be transferred using the Condor File Transfer from the submit host.

9.1.9.7. pegasus.transfer.worker.package

System: Pegasus
Type: boolean
Default: false
Since: 3.0

By default, Pegasus relies on the worker package to be installed on the shared filesystem of the remote sites . Pegasus uses the value of PEGASUS_HOME environment profile in the site catalog for the remote sites, to then construct paths to pegasus auxillary executables like kickstart, pegasus-transfer, seqexec etc.

If the Pegasus worker package is not installed on the remote sites users can set this property to true to get Pegasus to deploy worker package shared scratch directory for the workflow on the remote sites.

9.1.9.8. pegasus.transfer.links

System: Pegasus
Type: boolean
Default: false
Since: 2.0
See also: pegasus.transfer
See also: pegasus.transfer.force

If this is set, and the transfer implementation is set to Transfer i.e. using the transfer executable distributed with the PEGASUS. On setting this property, if Pegasus while fetching data from the RLS sees a pool attribute associated with the PFN that matches the execution pool on which the data has to be transferred to, Pegasus instead of the URL returned by the RLS replaces it with a file based URL. This supposes that the if the pools match the filesystems are visible to the remote execution directory where input data resides. On seeing both the source and destination urls as file based URLs the transfer executable spawns a job that creates a symbolic link by calling ln -s on the remote pool. This ends up bypassing the GridFTP server and reduces the load on it, and is much faster.

9.1.9.9. pegasus.transfer.*.remote.sites

System: Pegasus
Type: comma separated list of sites
Default: no default
Since: 2.0

By default Pegasus looks at the source and destination URL's for to determine whether the associated transfer job runs on the submit host or the head node of a remote site, with preference set to run a transfer job to run on submit host.

Pegasus will run transfer jobs on the remote sites

-  if the file server for the compute site is a file server i.e url prefix file://
-  symlink jobs need to be added that require the symlink transfer jobs to
be run remotely.

This property can be used to change the default behaviour of Pegasus and force pegasus to run different types of transfer jobs for the sites specified on the remote site.

The table below illustrates all the possible variations of the property.

Property Name Applies to
pegasus.transfer.stagein.remote.sites the stage in transfer jobs
pegasus.transfer.stageout.remote.sites the stage out transfer jobs
pegasus.transfer.inter.remote.sites the inter pool transfer jobs
pegasus.transfer.*.remote.sites apply to types of transfer jobs
 

In addition * can be specified as a property value, to designate that it applies to all sites.

9.1.9.10. pegasus.transfer.staging.delimiter

System: Pegasus
Since: 2.0
Type: String
Default: :
See also: pegasus.transformation.selector

Pegasus supports executable staging as part of the workflow. Currently staging of statically linked executables is supported only. An executable is normally staged to the work directory for the workflow/partition on the remote site. The basename of the staged executable is derived from the namespace,name and version of the transformation in the transformation catalog. This property sets the delimiter that is used for the construction of the name of the staged executable.

9.1.9.11. pegasus.transfer.disable.chmod.sites

System: Pegasus
Since: 2.0
Type: comma separated list of sites
Default: no default

During staging of executables to remote sites, chmod jobs are added to the workflow. These jobs run on the remote sites and do a chmod on the staged executable. For some sites, this maynot be required. The permissions might be preserved, or there maybe an automatic mechanism that does it.

This property allows you to specify the list of sites, where you do not want the chmod jobs to be executed. For those sites, the chmod jobs are replaced by NoOP jobs. The NoOP jobs are executed by Condor, and instead will immediately have a terminate event written to the job log file and removed from the queue.

9.1.9.12. pegasus.transfer.proxy

System: Pegasus
Since: 2.0
Type: Boolean
Default: false

By default, CondorG transfers a limited proxy to the remote site, while running jobs in the grid universe. However, certain grid ftp servers (like those in front of SRB) require a fully user proxy. In this case, the planners need to transfer the proxy along with the transfer job using Condor file transfer mechanisms. This property triggers Pegasus into creating the appropriate condor commands, that transfer the proxy from the submit host to the remote host. The source location is determined from the value of the X509_USER_KEY env profile key , that is associated with site local in the site catalog.

9.1.9.13. pegasus.transfer.setup.source.base.url

System: Pegasus
Type: URL
Default: no default
Since: 2.3

This property specifies the base URL to the directory containing the Pegasus worker package builds. During Staging of Executable, the Pegasus Worker Package is also staged to the remote site. The worker packages are by default pulled from the http server at pegasus.isi.edu. This property can be used to override the location from where the worker package are staged. This maybe required if the remote computes sites don't allows files transfers from a http server.

9.1.10. Gridstart And Exitcode Properties

9.1.10.1. pegasus.gridstart

System: Pegasus
Since: 2.0
Type: enumeration
Value[0]: Kickstart
Value[1]: None
Value[2]: SeqExec
Default: Kickstart
See also: pegasus.execute.*.filesystem.local

Jobs that are launched on the grid maybe wrapped in a wrapper executable/script that enables information about about the execution, resource consumption, and - most importantly - the exitcode of the remote application. At present, a job scheduled on a remote site is launched with a gridstart if site catalog has the corresponding gridlaunch attribute set and the job being launched is not MPI.

Users can explicitly decide what gridstart to use for a job, by associating the pegasus profile key named gridstart with the job.

Kickstart
In this mode, all the jobs are lauched via kickstart. The kickstart executable is a light-weight program which connects the stdin,stdout and stderr filehandles for PEGASUS jobs on the remote site. Kickstart is an executable distributed with PEGASUS that can generally be found at ${pegasus.home.bin}/kickstart.
None
In this mode, all the jobs are launched directly on the remote site. Each job's stdin,stdout and stderr are connected to condor commands in a manner to ensure that they are sent back to the submit host.
SeqExec
In this mode, all the jobs are launched on the remote site via SeqExec clustering executable. This is useful when user wants to run on the local filesystem of the worker nodes. The generated input file to seqexec contains commands to create the directory on the worker node, pull data from the head node, execute the job , push data to the head node, and remove the directory on the worker node. This is still an experimental mode and will be refined more for 3.1.

Support for a new gridstart (K2) is expected to be added soon.

9.1.10.2. pegasus.gridstart.kickstart.set.xbit

System: Pegasus
Since: 2.4
Type: Boolean
Default: false
See also: pegasus.transfer.disable.chmod.sites

Kickstart has an option to set the X bit on an executable before it launches it on the remote site. In case of staging of executables, by default chmod jobs are launched that set the x bit of the user executables staged to a remote site.

On setting this property to true, kickstart gridstart module adds a -X option to kickstart arguments. The -X arguments tells kickstart to set the x bit of the executable before launching it.

User should usually disable the chmod jobs by setting the property pegasus.transfer.disable.chmod.sites , if they set this property to true.

9.1.10.3. pegasus.gridstart.kickstart.stat

System: Pegasus
Since: 2.1
Type: Boolean
Default: false
See also: pegasus.gridstart.generate.lof

Kickstart has an option to stat the input files and the output files. The stat information is collected in the XML record generated by kickstart. Since stat is an expensive operation, it is not turned on by on. Set this property to true if you want to see stat information for the input files and output files of a job in it's kickstart output.

9.1.10.4. pegasus.gridstart.generate.lof

System: Pegasus
Since: 2.1
Type: Boolean
Default: false
See also: pegasus.gridstart.kickstart.stat

For the stat option for kickstart, we generate 2 lof ( list of filenames ) files for each job. One lof file containing the input lfn's for the job, and the other containing output lfn's for the job. In some cases, it maybe beneficial to have these lof files generated but not do the actual stat. This property allows you to generate the lof files without triggering the stat in kickstart invocations.

9.1.10.5. pegasus.gridstart.invoke.always

System: Pegasus
Since: 2.0
Type: Boolean
Default: false
See also: pegasus.gridstart.invoke.length

Condor has a limit in it, that restricts the length of arguments to an executable to 4K. To get around this limit, you can trigger Kickstart to be invoked with the -I option. In this case, an arguments file is prepared per job that is transferred to the remote end via the Condor file transfer mechanism. This way the arguments to the executable are not specified in the condor submit file for the job. This property specifies whether you want to use the invoke option always for all jobs, or want it to be triggered only when the argument string is determined to be greater than a certain limit.

9.1.10.6. pegasus.gridstart.invoke.length

System: Pegasus
Since: 2.0
Type: Long
Default: 4000
See also: pegasus.gridstart.invoke.always

Gridstart is automatically invoked with the -I option, if it is determined that the length of the arguments to be specified is going to be greater than a certain limit. By default this limit is set to 4K. However, it can overriden by specifying this property.

9.1.11. Interface To Condor And Condor Dagman

The Condor DAGMan facility is usually activate using the condor_submit_dag command. However, many shapes of workflows have the ability to either overburden the submit host, or overflow remote gatekeeper hosts. While DAGMan provides throttles, unfortunately these can only be supplied on the command-line. Thus,PEGASUS provides a versatile wrapper to invoke DAGMan, called pegasus-submit-dag. It can be configured from the command-line, from user- and system properties, and by defaults.

9.1.11.1. pegasus.condor.logs.symlink

System: Condor
Type: Boolean
Default: true
Since: 3.0

By default pegasus has the Condor common log [dagname]-0.log in the submit file as a symlink to a location in /tmp . This is to ensure that condor common log does not get written to a shared filesystem. If the user knows for sure that the workflow submit directory is not on the shared filesystem, then they can opt to turn of the symlinking of condor common log file by setting this property to false.

9.1.11.2. pegasus.condor.arguments.quote

System: Condor
Type: Boolean
Default: true
Since: 2.0
Old Name: pegasus.condor.arguments.quote

This property determines whether to apply the new Condor quoting rules for quoting the argument string. The new argument quoting rules appeared in Condor 6.7.xx series. We have verified it for 6.7.19 version. If you are using an old condor at the submit host, set this property to false.

9.1.11.3. pegasus.dagman.nofity

System: DAGman wrapper
Type: Case-insensitive enumeration
Value[0]: Complete
Value[1]: Error
Value[2]: Never
Default: Error
Document: http://www.cs.wisc.edu/condor/manual/v6.9/condor_submit_dag.html
Document: http://www.cs.wisc.edu/condor/manual/v6.9/condor_submit.html

The pegasus-submit-dag wrapper processes properties to set DAGMan commandline arguments. The argument sets the e-mail notification for DAGMan itself. This information will be used within the Condor submit description file for DAGMan. This file is produced by the the condor_submit_dag. See notification within the section of submit description file commands in the condor_submit manual page for specification of value. Many users prefer the value NEVER.

9.1.11.4. pegasus.dagman.verbose

System: DAGman wrapper
Type: Boolean
Value[0]: false
Value[1]: true
Default: false
Document: http://www.cs.wisc.edu/condor/manual/v6.9/condor_submit_dag.html

The pegasus-submit-dag wrapper processes properties to set DAGMan commandline arguments. If set and true, the argument activates verbose output in case of DAGMan errors.

9.1.11.5. pegasus.dagman.[category].maxjobs

System: DAGman wrapper
Type: Integer
Since: 2.2
Default: no default
Document: http://vtcpc.isi.edu/pegasus/index.php/ChangeLog\#Support_for_DAGMan_node_categories

DAGMan now allows for the nodes in the DAG to be grouped in category. The tuning parameters like maxjobs then can be applied per category instead of being applied to the whole workflow. To use this facility users need to associate the dagman profile key named category with their jobs. The value of the key is the category to which the job belongs to.

You can then use this property to specify the value for a category. For the above example you will set pegasus.dagman.short-running.maxjobs

9.1.12. Monitoring Properties

9.1.12.1. pegasus.monitord.events

System: Pegasus-monitord
Type: Boolean
Default: true
Since: 3.0.2
See Also: pegasus.monitord.output

This property determines whether pegasus-monitord generates log events. If log events are disabled using this property, no bp file, or database will be created, even if the pegasus.monitord.output property is specified.

9.1.12.2. pegasus.monitord.output

System: Pegasus-monitord
Type: String
Since: 3.0.2
See Also: pegasus.monitord.events

This property specifies the destination for generated log events in pegasus-monitord. By default, events are stored in a sqlite database in the workflow directory, which will be created with the workflow's name, and a ".stampede.db" extension. Users can specify an alternative database by using a SQLAlchemy connection string. Details are available at:

http://www.sqlalchemy.org/docs/05/reference/dialects/index.html

It is important to note that users will need to have the appropriate db interface library installed. Which is to say, SQLAlchemy is a wrapper around the mysql interface library (for instance), it does not provide a MySQL driver itself. The Pegasus distribution includes both SQLAlchemy and the SQLite Python driver. As a final note, it is important to mention that unlike when using SQLite databases, using SQLAlchemy with other database servers, e.g. MySQL or Postgres , the target database needs to exist. Users can also specify a file name using this property in order to create a file with the log events.

Example values for the SQLAlchemy connection string for various end points are listed below

SQL Alchemy End Point Example Value
Netlogger BP File file:///submit/dir/myworkflow.bp
SQL Lite Database sqlite:///submit/dir/myworkflow.db
MySQL Database mysql://user:password@host:port/databasename
 

9.1.12.3. pegasus.monitord.notifications

System: Pegasus-monitord
Type: Boolean
Default: true
Since: 3.1
See Also: pegasus.monitord.notifications.max
See Also: pegasus.monitord.notifications.timeout

This property determines whether pegasus-monitord processes notifications. When notifications are enabled, pegasus-monitord will parse the .notify file generated by pegasus-plan and will invoke notification scripts whenever conditions matches one of the notifications.

9.1.12.4. pegasus.monitord.notifications.max

System: Pegasus-monitord
Type: Integer
Default: 10
Since: 3.1
See Also: pegasus.monitord.notifications
See Also: pegasus.monitord.notifications.timeout

This property determines how many notification scripts pegasus-monitord will call concurrently. Upon reaching this limit, pegasus-monitord will wait for one notification script to finish before issuing another one. This is a way to keep the number of processes under control at the submit host. Setting this property to 0 will disable notifications completely.

9.1.12.5. pegasus.monitord.notifications.timeout

System: Pegasus-monitord
Type: Integer
Default: 0
Since: 3.1
See Also: pegasus.monitord.notifications
See Also: pegasus.monitord.notifications.max

This property determines how long will pegasus-monitord let notification scripts run before terminating them. When this property is set to 0 (default), pegasus-monitord will not terminate any notification scripts, letting them run indefinitely. If some notification scripts missbehave, this has the potential problem of starving pegasus-monitord's notification slots (see the pegasus.monitord.notifications.max property), and block further notifications. In addition, users should be aware that pegasus-monitord will not exit until all notification scripts are finished.

9.1.13. Job Clustering Properties

9.1.13.1. pegasus.clusterer.job.aggregator

System: Job Clustering
Since: 2.0
Type: String
Value[0]: seqexec
Value[1]: mpiexec
Default: seqexec

A large number of workflows executed through the Virtual Data System, are composed of several jobs that run for only a few seconds or so. The overhead of running any job on the grid is usually 60 seconds or more. Hence, it makes sense to collapse small independent jobs into a larger job. This property determines, the executable that will be used for running the larger job on the remote site.

seqexec
In this mode, the executable used to run the merged job is seqexec that runs each of the smaller jobs sequentially on the same node. The executable "seqexec" is a PEGASUS tool distributed in the PEGASUS worker package, and can be usually found at {pegasus.home}/bin/seqexec.
mpiexec
In this mode, the executable used to run the merged job is mpiexec that runs the smaller jobs via mpi on n nodes where n is the nodecount associated with the merged job. The executable "mpiexec" is a PEGASUS tool distributed in the PEGASUS worker package, and can be usually found at {pegasus.home}/bin/mpiexec.

9.1.13.2. pegasus.clusterer.job.aggregator.seqexec.log

System: Job Clustering
Type: Boolean
Default: false
Since: 2.3
See also: pegasus.clusterer.job.aggregator
See also: pegasus.clusterer.job.aggregator.seqexec.log.global

Seqexec logs the progress of the jobs that are being run by it in a progress file on the remote cluster where it is executed.

This property sets the Boolean flag, that indicates whether to turn on the logging or not.

9.1.13.3. pegasus.clusterer.job.aggregator.seqexec.log.global

System: Job Clustering
Type: Boolean
Default: true
Since: 2.3
See also: pegasus.clusterer.job.aggregator
See also: pegasus.clusterer.job.aggregator.seqexec.log
Old Name: pegasus.clusterer.job.aggregator.seqexec.hasgloballog

Seqexec logs the progress of the jobs that are being run by it in a progress file on the remote cluster where it is executed. The progress log is useful for you to track the progress of your computations and remote grid debugging. The progress log file can be shared by multiple seqexec jobs that are running on a particular cluster as part of the same workflow. Or it can be per job.

This property sets the Boolean flag, that indicates whether to have a single global log for all the seqexec jobs on a particular cluster or progress log per job.

9.1.13.4. pegasus.clusterer.job.aggregator.seqexec.firstjobfail

System: Job Clustering
Type: Boolean
Default: true
Since: 2.2
See also: pegasus.clusterer.job.aggregator

By default seqexec does not stop execution even if one of the clustered jobs it is executing fails. This is because seqexec tries to get as much work done as possible.

This property sets the Boolean flag, that indicates whether to make seqexec stop on the first job failure it detects.

9.1.13.5. pegasus.clusterer.label.key

System: Job Clustering
Type: String
Default: label
Since: 2.0
See also: pegasus.partitioner.label.key

While clustering jobs in the workflow into larger jobs, you can optionally label your graph to control which jobs are clustered and to which clustered job they belong. This done using a label based clustering scheme and is done by associating a profile/label key in the PEGASUS namespace with the jobs in the DAX. Each job that has the same value/label value for this profile key, is put in the same clustered job.

This property allows you to specify the PEGASUS profile key that you want to use for label based clustering.

9.1.14. Logging Properties

9.1.14.1. pegasus.log.manager

System: Pegasus
Since: 2.2.0
Type: Enumeration
Value[0]: Default
Value[1]: Log4j
Default: Default
See also: pegasus.log.manager.formatter

This property sets the logging implementation to use for logging.

Default
This implementation refers to the legacy Pegasus logger, that logs directly to stdout and stderr. It however, does have the concept of levels similar to log4j or syslog.
Log4j
This implementation, uses Log4j to log messages. The log4j properties can be specified in a properties file, the location of which is specified by the property
pegasus.log.manager.log4j.conf

9.1.14.2. pegasus.log.manager.formatter

System: Pegasus
Since: 2.2.0
Type: Enumeration
Value[0]: Simple
Value[1]: Netlogger
Default: Simple
See also: pegasus.log.manager.formatter

This property sets the formatter to use for formatting the log messages while logging.

Simple
This formats the messages in a simple format. The messages are logged as is with minimal formatting. Below are sample log messages in this format while ranking a dax according to performance.
event.pegasus.ranking dax.id se18-gda.dax  - STARTED
event.pegasus.parsing.dax dax.id se18-gda-nested.dax  - STARTED
event.pegasus.parsing.dax dax.id se18-gda-nested.dax  - FINISHED
job.id jobGDA
job.id jobGDA query.name getpredicted performace time 10.00
event.pegasus.ranking dax.id se18-gda.dax  - FINISHED
Netlogger

This formats the messages in the Netlogger format , that is based on key value pairs. The netlogger format is useful for loading the logs into a database to do some meaningful analysis. Below are sample log messages in this format while ranking a dax according to performance.

ts=2008-09-06T12:26:20.100502Z event=event.pegasus.ranking.start \
msgid=6bc49c1f-112e-4cdb-af54-3e0afb5d593c \
eventId=event.pegasus.ranking_8d7c0a3c-9271-4c9c-a0f2-1fb57c6394d5 \
dax.id=se18-gda.dax prog=Pegasus
ts=2008-09-06T12:26:20.100750Z event=event.pegasus.parsing.dax.start \
msgid=fed3ebdf-68e6-4711-8224-a16bb1ad2969 \
eventId=event.pegasus.parsing.dax_887134a8-39cb-40f1-b11c-b49def0c5232\
dax.id=se18-gda-nested.dax prog=Pegasus
ts=2008-09-06T12:26:20.100894Z event=event.pegasus.parsing.dax.end \
msgid=a81e92ba-27df-451f-bb2b-b60d232ed1ad \
eventId=event.pegasus.parsing.dax_887134a8-39cb-40f1-b11c-b49def0c5232
ts=2008-09-06T12:26:20.100395Z event=event.pegasus.ranking \
msgid=4dcecb68-74fe-4fd5-aa9e-ea1cee88727d \
eventId=event.pegasus.ranking_8d7c0a3c-9271-4c9c-a0f2-1fb57c6394d5 \
job.id="jobGDA"
ts=2008-09-06T12:26:20.100395Z event=event.pegasus.ranking \
msgid=4dcecb68-74fe-4fd5-aa9e-ea1cee88727d \
eventId=event.pegasus.ranking_8d7c0a3c-9271-4c9c-a0f2-1fb57c6394d5 \
job.id="jobGDA" query.name="getpredicted performace" time="10.00"
ts=2008-09-06T12:26:20.102003Z event=event.pegasus.ranking.end \
msgid=31f50f39-efe2-47fc-9f4c-07121280cd64 \
eventId=event.pegasus.ranking_8d7c0a3c-9271-4c9c-a0f2-1fb57c6394d5

9.1.14.3. pegasus.log.*

System: Pegasus
Since: 2.0
Type: String
Default: No default

This property sets the path to the file where all the logging for Pegasus can be redirected to. Both stdout and stderr are logged to the file specified.

9.1.14.4. pegasus.log.metrics

System: Pegasus
Since: 2.1.0
Type: Boolean
Default: true
See also: pegasus.log.metrics.file

This property enables the logging of certain planning and workflow metrics to a global log file. By default the file to which the metrics are logged is ${pegasus.home}/var/pegasus.log.

9.1.14.5. pegasus.log.metrics.file

System: Pegasus
Since: 2.1.0
Type: Boolean
Default: ${pegasus.home}/var/pegasus.log
See also: pegasus.log.metrics

This property determines the file to which the workflow and planning metrics are logged if enabled.

9.1.15. Miscellaneous Properties

9.1.15.1. pegasus.code.generator

System: Pegasus
Since: 3.0
Type: enumeration
Value[0]: Condor
Value[1]: Shell
Default: Condor

This property is used to load the appropriate Code Generator to use for writing out the executable workflow.

Condor
This is the default code generator for Pegasus . This generator generates the executable workflow as a Condor DAG file and associated job submit files. The Condor DAG file is passed as input to Condor DAGMan for job execution.
Shell
This Code Generator generates the executable workflow as a shell script that can be executed on the submit host. While using this code generator, all the jobs should be mapped to site local i.e specify --sites local to pegasus-plan.

9.1.15.2. pegasus.data.configuration

System: Pegasus
Since: 3.1
Type: enumeration
Value[0]: Condor
Value[1]: S3
Default: No default

This property sets up Pegasus to run in a non shared filesystem mode using either Condor file transfers for data transfers from the submit host or using S3 block storage for running in a cloud environment.

Condor
If this is set, Pegasus will run jobs in a non shared fileystem setup. The data transfers to and from the worker nodes ( where the jobs run) are done using Condor File Transfers from the submit host. On loading this property, internally the following properies are set
pegasus.transfer.refiner		 = Condor
pegasus.transfer.sls.*.impl 	 = Condor
pegasus.selector.replica    	 = Local
pegasus.execute.*.filesystem.local = true
S3
If this is set, Pegasus will run jobs in a non shared fileystem setup in a cloud environment. The workflows will rely on the S3 block storage for data transfers. On loading this property, internally the following properies are set
pegasus.execute.*.filesystem.local = true
pegasus.dir.create.impl		 = S3
pegasus.file.cleanup.impl		 = S3
pegasus.transfer.*.impl 		 = S3
pegasus.transfer.stage.sls.file 	 = false
pegasus.gridstart			 = SeqExec

9.1.15.3. pegasus.job.priority.assign

System: Pegasus
Since: 3.0.3
Type: Boolean
Default: true

This property can be used to turn of the default level based condor priorities that are assigned to jobs in the executable workflow.

9.1.15.4. pegasus.file.cleanup.strategy

System: Pegasus
Since: 2.2
Type: enumeration
Value[0]: InPlace
Default: InPlace

This property is used to select the strategy of how the the cleanup nodes are added to the executable workflow.

InPlace
This is the only mode available .

9.1.15.5. pegasus.file.cleanup.impl

System: Pegasus
Since: 2.2
Type: enumeration
Value[0]: Cleanup
Value[1]: RM
Value[2]: S3
Default: Cleanup

This property is used to select the executable that is used to create the working directory on the compute sites.

Cleanup
The default executable that is used to delete files is the dirmanager executable shipped with Pegasus. It is found at $PEGASUS_HOME/bin/dirmanager in the pegasus distribution. An entry for transformation pegasus::dirmanager needs to exist in the Transformation Catalog or the PEGASUS_HOME environment variable should be specified in the site catalog for the sites for this mode to work.
RM
This mode results in the rm executable to be used to delete files from remote directories. The rm executable is standard on *nix systems and is usually found at /bin/rm location.
S3
This mode is used to delete files/objects from the buckets in S3 instead of a directory. This should be set when running workflows on Amazon EC2. This implementation relies on s3cmd command line client to create the bucket. An entry for transformation amazon::s3cmd needs to exist in the Transformation Catalog for this to work.

9.1.15.6. pegasus.file.cleanup.scope

System: Pegasus
Since: 2.3.0
Type: enumeration
Value[0]: fullahead
Value[1]: deferred
Default: fullahead

By default in case of deferred planning InPlace file cleanup is turned OFF. This is because the cleanup algorithm does not work across partitions. This property can be used to turn on the cleanup in case of deferred planning.

fullahead
This is the default scope. The pegasus cleanup algorithm does not work across partitions in deferred planning. Hence the cleanup is always turned OFF , when deferred planning occurs and cleanup scope is set to full ahead.
deferred
If the scope is set to deferred, then Pegasus will not disable file cleanup in case of deferred planning. This is useful for scenarios where the partitions themselves are independant ( i.e. dont share files ). Even if the scope is set to deferred, users can turn off cleanup by specifying --nocleanup option to pegasus-plan.

9.1.15.7. pegasus.catalog.transformation.mapper

System: Staging of Executables
Since: 2.0
Type: enumeration
Value[0]: All
Value[1]: Installed
Value[2]: Staged
Value[3]: Submit
Default: All
See also: pegasus.transformation.selector

Pegasus now supports transfer of statically linked executables as part of the concrete workflow. At present, there is only support for staging of executables referred to by the compute jobs specified in the DAX file. Pegasus determines the source locations of the binaries from the transformation catalog, where it searches for entries of type STATIC_BINARY for a particular architecture type. The PFN for these entries should refer to a globus-url-copy valid and accessible remote URL. For transfer of executables, Pegasus constructs a soft state map that resides on top of the transformation catalog, that helps in determining the locations from where an executable can be staged to the remote site.

This property determines, how that map is created.

All
In this mode, all sources with entries of type STATIC_BINARY for a particular transformation are considered valid sources for the transfer of executables. This the most general mode, and results in the constructing the map as a result of the cartesian product of the matches.
Installed
In this mode, only entries that are of type INSTALLED are used while constructing the soft state map. This results in Pegasus never doing any transfer of executables as part of the workflow. It always prefers the installed executables at the remote sites.
Staged
In this mode, only entries that are of type STATIC_BINARY are used while constructing the soft state map. This results in the concrete workflow referring only to the staged executables, irrespective of the fact that the executables are already installed at the remote end.
Submit
In this mode, only entries that are of type STATIC_BINARY and reside at the submit host (pool local), are used while constructing the soft state map. This is especially helpful, when the user wants to use the latest compute code for his computations on the grid and that relies on his submit host.

9.1.15.8. pegasus.selector.transformation

System: Staging of Executables
Since: 2.0
Type: enumeration
Value[0]: Random
Value[1]: Installed
Value[2]: Staged
Value[3]: Submit
Default: Random
See also: pegasus.catalog.transformation

In case of transfer of executables, Pegasus could have various transformations to select from when it schedules to run a particular compute job at a remote site. For e.g it can have the choice of staging an executable from a particular remote pool, from the local (submit host) only, use the one that is installed on the remote site only.

This property determines, how a transformation amongst the various candidate transformations is selected, and is applied after the property pegasus.tc has been applied. For e.g specifying pegasus.tc as Staged and then pegasus.transformation.selector as INSTALLED does not work, as by the time this property is applied, the soft state map only has entries of type STAGED.

Random
In this mode, a random matching candidate transformation is selected to be staged to the remote execution pool.
Installed
In this mode, only entries that are of type INSTALLED are selected. This means that the concrete workflow only refers to the transformations already pre installed on the remote pools.
Staged
In this mode, only entries that are of type STATIC_BINARY are selected, ignoring the ones that are installed at the remote site.
Submit
In this mode, only entries that are of type STATIC_BINARY and reside at the submit host (pool local), are selected as sources for staging the executables to the remote execution pools.

9.1.15.9. pegasus.execute.*.filesystem.local

System: Pegasus
Type: Boolean
Default: false
Since: 2.1.0
See also: pegasus.gridstart

Normally, Pegasus transfers the data to and from a directory on the shared filesystem on the head node of a compute site. The directory needs to be visible to both the head node and the worker nodes for the compute jobs to execute correctly.

By setting this property to true, you can get Pegasus to execute jobs on the worker node filesystem. In this case, when the jobs are launched on the worker nodes, the jobs grab the input data from the workflow specific execution directory on the compute site and push the output data to the same directory after completion. The transfer of data to and from the worker node directory is referred to as Second Level Staging ( SLS ).

It is recommended that a user when setting this property to true, also sets the following property, unless the user is running in a Condor Pool without a shared filesystem and is relying on Condor to transfer the files.

pegasus.gridstart    SeqExec

9.1.15.10. pegasus.parser.dax.preserver.linebreaks

System: Pegasus
Type: Boolean
Default: false
Since: 2.2.0

The DAX Parser normally does not preserve line breaks while parsing the CDATA section that appears in the arguments section of the job element in the DAX. On setting this to true, the DAX Parser preserves any line line breaks that appear in the CDATA section.

9.2. Profiles

The Pegasus Workflow Mapper uses the concept of profiles to encapsulate configurations for various aspects of dealing with the Grid infrastructure. Profiles provide an abstract yet uniform interface to specify configuration options for various layers from planner/mapper behavior to remote environment settings. At various stages during the mapping process, profiles may be added associated with the job.

This document describes various types of profiles, levels of priorities for intersecting profiles, and how to specify profiles in different contexts.

9.2.1. Profile Structure Heading

All profiles are triples comprised of a namespace, a name or key, and a value. The namespace is a simple identifier. The key has only meaning within its namespace, and it’s yet another identifier. There are no constraints on the contents of a value

Profiles may be represented with different syntaxes in different context. However, each syntax will describe the underlying triple.

9.2.2. Profile Namespaces

Each namespace refers to a different aspect of a job’s runtime settings. A profile’s representation in the concrete plan (e.g. the Condor submit files) depends its namespace. Pegasus supports the following Namespaces for profiles:

  • env permits remote environment variables to be set.

  • globus sets Globus RSL parameters.

  • condor sets Condor configuration parameters for the submit file.

  • dagman introduces Condor DAGMan configuration parameters.

  • pegasus configures the behaviour of various planner/mapper components.

9.2.2.1. The env Profile Namespace

The env namespace allows users to specify environment variables of remote jobs. Globus transports the environment variables, and ensure that they are set before the job starts.

The key used in conjunction with an env profile denotes the name of the environment variable. The value of the profile becomes the value of the remote environment variable.

Grid jobs usually only set a minimum of environment variables by virtue of Globus. You cannot compare the environment variables visible from an interactive login with those visible to a grid job. Thus, it often becomes necessary to set environment variables like LD_LIBRARY_PATH for remote jobs.

If you use any of the Pegasus worker package tools like transfer or the rc-client, it becomes necessary to set PEGASUS_HOME and GLOBUS_LOCATION even for jobs that run locally

Table 9.1. Table 1: Useful Environment Settings

Environment Variable Description
PEGASUS_HOME Used by auxillary jobs created by Pegasus both on remote site and local site. Should be set usually set in the Site Catalog for the sites
GLOBUS_LOCATION Used by auxillary jobs created by Pegasus both on remote site and local site. Should be set usually set in the Site Catalog for the sites
LD_LIBRARY_PATH Point this to $GLOBUS_LOCATION/lib, except you cannot use the dollar variable. You must use the full path. Applies to both, local and remote jobs that use Globus components and should be usually set in the site catalog for the sites

Even though Condor and Globus both permit environment variable settings through their profiles, all remote environment variables must be set through the means of env profiles.

9.2.2.2. The Globus Profile Namespace

The globus profile namespace encapsulates Globus resource specification language (RSL) instructions. The RSL configures settings and behavior of the remote scheduling system. Some systems require queue name to schedule jobs, a project name for accounting purposes, or a run-time estimate to schedule jobs. The Globus RSL addresses all these issues.

A key in the globus namespace denotes the command name of an RLS instruction. The profile value becomes the RSL value. Even though Globus RSL is typically shown using parentheses around the instruction, the out pair of parentheses is not necessary in globus profile specifications

Table 2 shows some commonly used RSL instructions. For an authoritative list of all possible RSL instructions refer to the Globus RSL specification.

Table 9.2. Table 2: Useful Globus RSL Instructions

Key Description
count the number of times an executable is started.
jobtype specifies how the job manager should start the remote job. While Pegasus defaults to single, use mpi when running MPI jobs.
maxcputime the max cpu time for a single execution of a job.
maxmemory the maximum memory in MB required for the job
maxtime the maximum time or walltime for a single execution of a job.
maxwalltime the maximum walltime for a single execution of a job.
minmemory the minumum amount of memory required for this job
project associates an account with a job at the remote end.
queue the remote queue in which the job should be run. Used when remote scheduler is PBS that supports queues.

Pegasus prevents the user from specifying certain RSL instructions as globus profiles, because they are either automatically generated or can be overridden through some different means. For instance, if you need to specify remote environment settings, do not use the environment key in the globus profiles. Use one or more env profiles instead.

Table 9.3. Table 3: RSL Instructions that are not permissible

Key Reason for Prohibition
arguments you specify arguments in the arguments section for a job in the DAX
directory the site catalog and properties determine which directory a job will run in.
environment use multiple env profiles instead
executable the physical executable to be used is specified in the transformation catalog and is also dependant on the gridstart module being used. If you are launching jobs via kickstart then the executable created is the path to kickstart and the application executable path appears in the arguments for kickstart
stdin you specify in the DAX for the job
stdout you specify in the DAX for the job
stderr you specify in the DAX for the job

9.2.2.3. The Condor Profile Namespace

The Condor submit file controls every detail how and where a job is run. The condor profiles permit to add or overwrite instructions in the Condor submit file.

The condor namespace directly sets commands in the Condor submit file for a job the profile applies to. Keys in the condor profile namespace denote the name of the Condor command. The profile value becomes the command's argument. All condor profiles are translated into key=value lines in the Condor submit file

Some of the common condor commands that a user may need to specify are listed below. For an authoritative list refer to the online condor documentation. Note: Pegasus Workflow Planner/Mapper by default specify a lot of condor commands in the submit files depending upon the job, and where it is being run.

Table 9.4. Table 4: Useful Condor Commands

Key Description
universe Pegasus defaults to either globus or scheduler universes. Set to standard for compute jobs that require standard universe. Set to vanilla to run natively in a condor pool, or to run on resources grabbed via condor glidein.
periodic_release is the number of times job is released back to the queue if it goes to HOLD, e.g. due to Globus errors. Pegasus defaults to 3.
periodic_remove is the number of times a job is allowed to get into HOLD state before being removed from the queue. Pegasus defaults to 3.
filesystemdomain Useful for Condor glide-ins to pin a job to a remote site.
stream_error boolean to turn on the streaming of the stderr of the remote job back to submit host.
stream_output boolean to turn on the streaming of the stdout of the remote job back to submit host.
priority integer value to assign the priority of a job. Higher value means higher priority. The priorities are only applied for vanilla / standard/ local universe jobs. Determines the order in which a users own jobs are executed.

Other useful condor keys, that advanced users may find useful and can be set by profiles are

  1. should_transfer_files

  2. transfer_output

  3. transfer_error

  4. whentotransferoutput

  5. requirements

  6. rank

Pegasus prevents the user from specifying certain Condor commands in condor profiles, because they are automatically generated or can be overridden through some different means. Table 5 shows prohibited Condor commands.

Table 9.5. Table 5: Condor commands prohibited in condor profiles

Key Reason for Prohibition
arguments you specify arguments in the arguments section for a job in the DAX
environment use multiple env profiles instead
executable the physical executable to be used is specified in the transformation catalog and is also dependant on the gridstart module being used. If you are launching jobs via kickstart then the executable created is the path to kickstart and the application executable path appears in the arguments for kickstart

9.2.2.4. The Dagman Profile Namespace

DAGMan is Condor's workflow manager. While planners generate most of DAGMan's configuration, it is possible to tweak certain job-related characteristics using dagman profiles. A dagman profile can be used to specify a DAGMan pre- or post-script.

Pre- and post-scripts execute on the submit machine. Both inherit the environment settings from the submit host when pegasus-submit-dag or pegasus-run is invoked.

By default, kickstart launches all jobs except standard universe and MPI jobs. Kickstart tracks the execution of the job, and returns usage statistics for the job. A DAGMan post-script starts the Pegasus application exitcode to determine, if the job succeeded. DAGMan receives the success indication as exit status from exitcode.

If you need to run your own post-script, you have to take over the job success parsing. The planner is set up to pass the file name of the remote job's stdout, usually the output from kickstart, as sole argument to the post-script.

Table 6 shows the keys in the dagman profile domain that are understood by Pegasus and can be associated at a per job basis.

Table 9.6. Table 6: Useful dagman Commands that can be associated at a per job basis

Key Description
PRE is the path to the pre-script. DAGMan executes the pre-script before it runs the job.
PRE.ARGUMENTS are command-line arguments for the pre-script, if any.
POST is the postscript type/mode that a user wants to associate with a job.
  1. pegasus-exitcode - pegasus will by default associate this postscript with all jobs launched via kickstart, as long the POST.SCOPE value is not set to NONE.

  2. none -means that no postscript is generated for the jobs. This is useful for MPI jobs that are not launched via kickstart currently.

  3. any legal identifier - Any other identifier of the form ([_A-Za-z][_A-Za-z0-9]*), than one of the 2 reserved keywords above, signifies a user postscript. This allows the user to specify their own postscript for the jobs in the workflow. The path to the postscript can be specified by the dagman profile POST.PATH.[value] where [value] is this legal identifier specified. The user postscript is passed the name of the .out file of the job as the last argument on the command line.

    For e.g. if the following dagman profiles were associated with a job X

    1. POST with value user_script /bin/user_postscript

    2. POST.PATH.user_script with value /path/to/user/script

    3. POST.ARGUMENTS with value -verbose

    then the following postscript will be associated with the job X in the .dag file

    /path/to/user/script -verbose X.out where X.out contains the stdout of the job X

POST.PATH.* ( where * is replaced by the value of the POST Profile ) the path to the post script on the submit host.
POST.ARGUMENTS are the command line arguments for the post script, if any.
RETRY is the number of times DAGMan retries the full job cycle from pre-script through post-script, if failure was detected.
CATEGORY the DAGMan category the job belongs to.
PRIORITY the priority to apply to a job. DAGMan uses this to select what jobs to release when MAXJOBS is enforced for the DAG.


Table 7 shows the keys in the dagman profile domain that are understood by Pegasus and can be used to apply to the whole workflow. These are used to control DAGMan's behavior at the workflow level, and are recommended to be specified in the properties file.

Table 9.7. Table 7: Useful dagman Commands that can be specified in the properties file.

Key Description
MAXPRE sets the maximum number of PRE scripts within the DAG that may be running at one time
MAXPOST sets the maximum number of PRE scripts within the DAG that may be running at one time
MAXJOBS sets the maximum number of jobs within the DAG that will be submitted to Condor at one time.
MAXIDLE sets the maximum number of idle jobs within the DAG that will be submitted to Condor at one time.
[CATEGORY-NAME].MAXJOBS is the value of maxjobs for a particular category. Users can associate different categories to the jobs at a per job basis. However, the value of a dagman knob for a category can only be specified at a per workflow basis in the properties.
POST.SCOPE scope for the postscripts.
  1. If set to all , means each job in the workflow will have a postscript associated with it.

  2. If set to none , means no job has postscript associated with it. None mode should be used if you are running vanilla / standard/ local universe jobs, as in those cases Condor traps the remote exitcode correctly. None scope is not recommended for grid universe jobs.

  3. If set to essential, means only essential jobs have post scripts associated with them. At present the only non essential job is the replica registration job.


9.2.2.5. The Pegasus Profile Namespace

The pegasus profiles allow users to configure extra options to the Pegasus Workflow Planner that can be applied selectively to a job or a group of jobs. Site selectors may use a sub-set of pegasus profiles for their decision-making.

Table 8 shows some of the useful configuration option Pegasus understands.

Table 9.8. Table 8: Useful pegasus Profiles.

Key Description
workdir Sets the remote initial dir for a Condor-G job. Overrides the work directory algorithm that uses the site catalog and properties.
clusters.num Please refer to the Pegasus Clustering Guide for detailed description. This option determines the total number of clusters per level. Jobs are evenly spread across clusters.
clusters.size Please refer to the Pegasus Clustering Guide for detailed description. This profile determines the number of jobs in each cluster. The number of clusters depends on the total number of jobs on the level.
collapser Indicates the clustering executable that is used to run the clustered job on the remote site.
gridstart Determines the executable for launching a job. Possible values are Kickstart | NoGridStart at the moment.
gridstart.path Sets the path to the gridstart . This profile is best set in the Site Catalog.
gridstart.arguments Sets the arguments with which GridStart is used to launch a job on the remote site.
stagein.clusters This key determines the maximum number of stage-in jobs that are can executed locally or remotely per compute site per workflow. This is used to configure the Bundle Transfer Refiner, which is the Default Refiner used in Pegasus. This profile is best set in the Site Catalog or in the Properties file
stagein.local.clusters This key provides finer grained control in determining the number of stage-in jobs that are executed locally and are responsible for staging data to a particular remote site. This profile is best set in the Site Catalog or in the Properties file
stagein.remote.clusters This key provides finer grained control in determining the number of stage-in jobs that are executed remotely on the remote site and are responsible for staging data to it. This profile is best set in the Site Catalog or in the Properties file
stageout.clusters This key determines the maximum number of stage-out jobs that are can executed locally or remotely per compute site per workflow. This is used to configure the Bundle Transfer Refiner, , which is the Default Refiner used in Pegasus.
stageout.local.clusters This key provides finer grained control in determining the number of stage-out jobs that are executed locally and are responsible for staging data from a particular remote site. This profile is best set in the Site Catalog or in the Properties file
stageout.remote.clusters This key provides finer grained control in determining the number of stage-out jobs that are executed remotely on the remote site and are responsible for staging data from it. This profile is best set in the Site Catalog or in the Properties file
group Tags a job with an arbitrary group identifier. The group site selector makes use of the tag.
change.dir If true, tells kickstart to change into the remote working directory. Kickstart itself is executed in whichever directory the remote scheduling system chose for the job.
create.dir If true, tells kickstart to create the the remote working directory before changing into the remote working directory. Kickstart itself is executed in whichever directory the remote scheduling system chose for the job.
transfer.proxy If true, tells Pegasus to explicitly transfer the proxy for transfer jobs to the remote site. This is useful, when you want to use a full proxy at the remote end, instead of the limited proxy that is transferred by CondorG.
transfer.arguments Allows the user to specify the arguments with which the transfer executable is invoked. However certain options are always generated for the transfer executable(base-uri se-mount-point).
style Sets the condor submit file style. If set to globus, submit file generated refers to CondorG job submissions. If set to condor, submit file generated refers to direct Condor submission to the local Condor pool. It applies for glidein, where nodes from remote grid sites are glided into the local condor pool. The default style that is applied is globus.

9.2.3. Sources for Profiles

Profiles may enter the job-processing stream at various stages. Depending on the requirements and scope a profile is to apply, profiles can be associated at

  • as user property settings.

  • dax level

  • in the site catalog

  • in the transformation catalog

Unfortunately, a different syntax applies to each level and context. This section shows the different profile sources and syntaxes. However, at the foundation of each profile lies the triple of namespace, key and value.

9.2.3.1. User Profiles in Properties

Users can specify all profiles in the properties files where the property name is [namespace].key and value of the property is the value of the profile.

Namespace can be env|condor|globus|dagman|pegasus

Any profile specified as a property applies to the whole workflow unless overridden at the DAX level , Site Catalog , Transformation Catalog Level.

Some profiles that they can be set in the properties file are listed below

env.JAVA_HOME "/software/bin/java"

condor.periodic_release 5
condor.periodic_remove  my_own_expression
condor.stream_error true
condor.stream_output fa

globus.maxwalltime  1000
globus.maxtime      900
globus.maxcputime   10
globus.project      test_project
globus.queue        main_queue

dagman.post.arguments --test arguments
dagman.retry  4
dagman.post simple_exitcode
dagman.post.path.simple_exitcode  /bin/exitcode/exitcode.sh
dagman.post.scope all
dagman.maxpre  12
dagman.priority 13

dagman.bigjobs.maxjobs 1


pegasus.clusters.size 5

pegasus.stagein.clusters 3

9.2.3.2. Profiles in DAX

The user can associate profiles with logical transformations in DAX. Environment settings required by a job's application, or a maximum estimate on the run-time are examples for profiles at this stage.

<job id="ID000001" namespace="asdf" name="preprocess" version="1.0"
 level="3" dv-namespace="voeckler" dv-name="top" dv-version="1.0">
  <argument>-a top -T10  -i <filename file="voeckler.f.a"/>
 -o <filename file="voeckler.f.b1"/>
 <filename file="voeckler.f.b2"/></argument>
  <profile namespace="pegasus" key="walltime">2</profile>
  <profile namespace="pegasus" key="diskspace">1</profile>
  &mldr;
</job>

9.2.3.3. Profiles in Site Catalog

If it becomes necessary to limit the scope of a profile to a single site, these profiles should go into the site catalog. A profile in the site catalog applies to all jobs and all application run at the site. Commonly, site catalog profiles set environment settings like the LD_LIBRARY_PATH, or globus rsl parameters like queue and project names.

Currently, there is no tool to manipulate the site catalog, e.g. by adding profiles. Modifying the site catalog requires that you load it into your editor.

The XML version of the site catalog uses the following syntax:

<profile namespace="namespace" key="key">value</profile>

The XML schema requires that profiles are the first children of a pool element. If the element ordering is wrong, the XML parser will produce errors and warnings:

<pool handle="isi_condor" gridlaunch="/home/shared/pegasus/bin/kickstart">
  <profile namespace="env"
   key="GLOBUS_LOCATION">/home/shared/globus/</profile>
  <profile namespace="env"
   key="LD_LIBRARY_PATH" >/home/shared/globus/lib</profile>
  <lrc url="rls://sukhna.isi.edu" />
  &mldr;
</pool>

The multi-line textual version of the site catalog uses the following syntax:

profile namespace "key" "value"

The order within the textual pool definition is not important. Profiles can appear anywhere:

pool isi_condor {
  gridlaunch "/home/shared/pegasus/bin/kickstart"
  profile env "GLOBUS_LOCATION" "/home/shared/globus"
  profile env "LD_LIBRARY_PATH" "/home/shared/globus/lib"
  &mldr;
}

9.2.3.4. Profiles in Transformation Catalog

Some profiles require a narrower scope than the site catalog offers. Some profiles only apply to certain applications on certain sites, or change with each application and site. Transformation-specific and CPU-specific environment variables, or job clustering profiles are good candidates. Such profiles are best specified in the transformation catalog.

Profiles associate with a physical transformation and site in the transformation catalog. The Database version of the transformation catalog also permits the convenience of connecting a transformation with a profile.

The Pegasus tc-client tool is a convenient helper to associate profiles with transformation catalog entries. As benefit, the user does not have to worry about formats of profiles in the various transformation catalog instances.

tc-client -a -P -E -p /home/shared/executables/analyze -t INSTALLED -r isi_condor -e env::GLOBUS_LOCATION=&rdquor;/home/shared/globus&rdquor;

The above example adds an environment variable GLOBUS_LOCATION to the application /home/shared/executables/analyze on site isi_condor. The transformation catalog guide has more details on the usage of the tc-client.

9.2.4. Profiles Conflict Resolution

Irrespective of where the profiles are specified, eventually the profiles are associated with jobs. Multiple sources may specify the same profile for the same job. For instance, DAX may specify an environment variable X. The site catalog may also specify an environment variable X for the chosen site. The transformation catalog may specify an environment variable X for the chosen site and application. When the job is concretized, these three conflicts need to be resolved.

Pegasus defines a priority ordering of profiles. The higher priority takes precedence (overwrites) a profile of a lower priority.

  1. Transformation Catalog Profiles

  2. Site Catalog Profiles

  3. DAX Profiles

  4. Profiles in Properties

9.2.5. Details of Profile Handling

The previous sections omitted some of the finer details for the sake of clarity. To understand some of the constraints that Pegasus imposes, it is required to look at the way profiles affect jobs.

9.2.5.1. Details of env Profiles

Profiles in the env namespace are translated to a semicolon-separated list of key-value pairs. The list becomes the argument for the Condor environment command in the job's submit file.

######################################################################
# Pegasus WMS  SUBMIT FILE GENERATOR
# DAG : black-diamond, Index = 0, Count = 1
# SUBMIT FILE NAME : findrange_ID000002.sub
######################################################################
globusrsl = (jobtype=single)
environment=GLOBUS_LOCATION=/shared/globus;LD_LIBRARY_PATH=/shared/globus/lib;
executable = /shared/software/linux/pegasus/default/bin/kickstart
globusscheduler = columbus.isi.edu/jobmanager-condor
remote_initialdir = /shared/CONDOR/workdir/isi_hourglass
universe = globus
&mldr;
queue
######################################################################
# END OF SUBMIT FILE

Condor-G, in turn, will translate the environment command for any remote job into Globus RSL environment settings, and append them to any existing RSL syntax it generates. To permit proper mixing, all environment setting should solely use the env profiles, and none of the Condor nor Globus environment settings.

If kickstart starts a job, it may make use of environment variables in its executable and arguments setting.

9.2.5.2. Details of globus Profiles

Profiles in the globus Namespaces are translated into a list of paranthesis-enclosed equal-separated key-value pairs. The list becomes the value for the Condor globusrsl setting in the job's submit file:

######################################################################
# Pegasus WMS SUBMIT FILE GENERATOR
# DAG : black-diamond, Index = 0, Count = 1
# SUBMIT FILE NAME : findrange_ID000002.sub
######################################################################
globusrsl = (jobtype=single)(queue=fast)(project=nvo)
executable = /shared/software/linux/pegasus/default/bin/kickstart
globusscheduler = columbus.isi.edu/jobmanager-condor
remote_initialdir = /shared/CONDOR/workdir/isi_hourglass
universe = globus
&mldr;
queue
######################################################################
# END OF SUBMIT FILE

For this reason, Pegasus prohibits the use of the globusrsl key in the condor profile namespace.

9.3. Replica Selection

Each job in the DAX maybe associated with input LFN&rsquor;s denoting the files that are required for the job to run. To determine the physical replica (PFN) for a LFN, Pegasus queries the Replica catalog to get all the PFN&rsquor;s (replicas) associated with a LFN. The Replica Catalog may return multiple PFN's for each of the LFN's queried. Hence, Pegasus needs to select a single PFN amongst the various PFN's returned for each LFN. This process is known as replica selection in Pegasus. Users can specify the replica selector to use in the properties file.

This document describes the various Replica Selection Strategies in Pegasus.

9.3.1. Configuration

The user properties determine what replica selector Pegasus Workflow Mapper uses. The property pegasus.selector.replica is used to specify the replica selection strategy. Currently supported Replica Selection strategies are

  1. Default

  2. Restricted

  3. Regex

The values are case sensitive. For example the following property setting will throw a Factory Exception .

pegasus.selector.replica  default

The correct way to specify is

pegasus.selector.replica  Default

9.3.2. Supported Replica Selectors

The various Replica Selectors supported in Pegasus Workflow Mapper are explained below

9.3.2.1. Default

This is the default replica selector used in the Pegasus Workflow Mapper. If the property pegasus.selector.replica is not defined in properties, then Pegasus uses this selector.

This selector looks at each PFN returned for a LFN and checks to see if

  1. the PFN is a file URL (starting with file:///)

  2. the PFN has a pool attribute matching to the site handle of the site where the compute job that requires the input file is to be run.

If a PFN matching the conditions above exists then that is returned by the selector .

Else, a random PFN is selected amongst all the PFN&rsquor;s that have a pool attribute matching to the site handle of the site where a compute job is to be run.

Else, a random pfn is selected amongst all the PFN&rsquor;s

To use this replica selector set the following property

pegasus.selector.replica                  Default

9.3.2.2. Restricted

This replica selector, allows the user to specify good sites and bad sites for staging in data to a particular compute site. A good site for a compute site X, is a preferred site from which replicas should be staged to site X. If there are more than one good sites having a particular replica, then a random site is selected amongst these preferred sites.

A bad site for a compute site X, is a site from which replica&rsquor;s should not be staged. The reason of not accessing replica from a bad site can vary from the link being down, to the user not having permissions on that site&rsquor;s data.

The good | bad sites are specified by the following properties

pegasus.replica.*.prefer.stagein.sites
pegasus.replica.*.ignore.stagein.sites

where the * in the property name denotes the name of the compute site. A * in the property key is taken to mean all sites. The value to these properties is a comma separated list of sites.

For example the following settings

pegasus.selector.replica.*.prefer.stagein.sites            usc
pegasus.replica.uwm.prefer.stagein.sites                   isi,cit

means that prefer all replicas from site usc for staging in to any compute site. However, for uwm use a tighter constraint and prefer only replicas from site isi or cit. The pool attribute associated with the PFN's tells the replica selector to what site a replica/PFN is associated with.

The pegasus.replica.*.prefer.stagein.sites property takes precedence over pegasus.replica.*.ignore.stagein.sites property i.e. if for a site X, a site Y is specified both in the ignored and the preferred set, then site Y is taken to mean as only a preferred site for a site X.

To use this replica selector set the following property

pegasus.selector.replica                  Restricted

9.3.2.3. Regex

This replica selector allows the user allows the user to specific regex expressions that can be used to rank various PFN&rsquor;s returned from the Replica Catalog for a particular LFN. This replica selector selects the highest ranked PFN i.e the replica with the lowest rank value.

The regular expressions are assigned different rank, that determine the order in which the expressions are employed. The rank values for the regex can expressed in user properties using the property.

pegasus.selector.replica.regex.rank.[value]                  regex-expression

The [value] in the above property is an integer value that denotes the rank of an expression with a rank value of 1 being the highest rank.

For example, a user can specify the following regex expressions that will ask Pegasus to prefer file URL's over gsiftp url's from example.isi.edu

pegasus.selector.replica.regex.rank.1                       file://.*
pegasus.selector.replica.regex.rank.2                       gsiftp://example\.isi\.edu.*

User can specify as many regex expressions as they want.

Since Pegasus is in Java , the regex expression support is what Java supports. It is pretty close to what is supported by Perl. More details can be found at http://java.sun.com/j2se/1.5.0/docs/api/java/util/regex/Pattern.html

Before applying any regular expressions on the PFN&rsquor;s for a particular LFN that has to be staged to a site X, the file URL&rsquor;s that don't match the site X are explicitly filtered out.

To use this replica selector set the following property

pegasus.selector.replica                  Regex

9.3.2.4. Local

This replica selector always prefers replicas from the local host ( pool attribute set to local ) and that start with a file: URL scheme. It is useful, when users want to stagein files to a remote site from the submit host using the Condor file transfer mechanism.

To use this replica selector set the following property

pegasus.selector.replica                  Default

9.4. Job Clustering

A large number of workflows executed through the Pegasus Workflow Management System, are composed of several jobs that run for only a few seconds or so. The overhead of running any job on the grid is usually 60 seconds or more. Hence, it makes sense to cluster small independent jobs into a larger job. This is done while mapping an abstract workflow to a concrete workflow. Site specific or transformation specific criteria are taken into consideration while clustering smaller jobs into a larger job in the concrete workflow. The user is allowed to control the granularity of this clustering on a per transformation per site basis.

9.4.1. Overview

The abstract workflow is mapped onto the various sites by the Site Selector. This semi executable workflow is then passed to the clustering module. The clustering of the workflow can be either be

  • level based (horizontal clustering )

  • label based (label clustering)

The clustering module clusters the jobs into larger/clustered jobs, that can then be executed on the remote sites. The execution can either be sequential on a single node or on multiple nodes using MPI. To specify which clustering technique to use the user has to pass the --cluster option to pegasus-plan .

9.4.1.1. Generating Clustered Concrete DAG

The clustering of a workflow is activated by passing the --cluster|-C option to pegasus-plan. The clustering granularity of a particular logical transformation on a particular site is dependant upon the clustering techniques being used. The executable that is used for running the clustered job on a particular site is determined as explained in section 7.

#Running pegasus-plan to generate clustered workflows

$ pegasus-plan &ndash;-dax example.dax --dir ./dags &ndash;p siteX &ndash;-output local
               --cluster [ comma separated list of clustering techniques]  &ndash;verbose

Valid clustering techniques are horizontal and label.

The naming convention of submit files of the clustered jobs is merge_NAME_IDX.sub . The NAME is derived from the logical transformation name. The IDX is an integer number between 1 and the total number of jobs in a cluster. Each of the submit files has a corresponding input file, following the naming convention merge_NAME_IDX.in . The input file contains the respective execution targets and the arguments for each of the jobs that make up the clustered job.

9.4.1.1.1. Horizontal Clustering

In case of horizontal clustering, each job in the workflow is associated with a level. The levels of the workflow are determined by doing a modified Breadth First Traversal of the workflow starting from the root nodes. The level associated with a node, is the furthest distance of it from the root node instead of it being the shortest distance as in normal BFS. For each level the jobs are grouped by the site on which they have been scheduled by the Site Selector. Only jobs of same type (txnamespace, txname, txversion) can be clustered into a larger job. To use horizontal clustering the user needs to set the --cluster option of pegasus-plan to horizontal .

9.4.1.1.1.1. Controlling Clustering Granularity

The number of jobs that have to be clustered into a single large job, is determined by the value of two parameters associated with the smaller jobs. Both these parameters are specified by the use of a PEGASUS namespace profile keys. The keys can be specified at any of the placeholders for the profiles (abstract transformation in the DAX, site in the site catalog, transformation in the transformation catalog). The normal overloading semantics apply i.e. profile in transformation catalog overrides the one in the site catalog and that in turn overrides the one in the DAX. The two parameters are described below.

  • clusters.size factor

    The clusters.size factor denotes how many jobs need to be merged into a single clustered job. It is specified via the use of a PEGASUS namespace profile key &ldquo;clusters.size&rdquor;. for e.g. if at a particular level, say 4 jobs referring to logical transformation B have been scheduled to a siteX. The clusters.size factor associated with job B for siteX is say 3. This will result in 2 clustered jobs, one composed of 3 jobs and another of 2 jobs. The clusters.size factor can be specified in the transformation catalog as follows

    #site   transformation   pfn            type               architecture  profiles
    
    siteX    B     /shared/PEGASUS/bin/jobB INSTALLED       INTEL32::LINUX  PEGASUS::clusters.size=3
    siteX    C     /shared/PEGASUS/bin/jobC INSTALLED       INTEL32::LINUX  PEGASUS::clusters.size=2
    

    Figure 9.1. 


  • clusters.num factor

    The clusters.num factor denotes how many clustered jobs does the user want to see per level per site. It is specified via the use of a PEGASUS namespace profile key &ldquo;clusters.num&rdquor;. for e.g. if at a particular level, say 4 jobs referring to logical transformation B have been scheduled to a siteX. The &ldquo;clusters.num&rdquor; factor associated with job B for siteX is say 3. This will result in 3 clustered jobs, one composed of 2 jobs and others of a single job each. The clusters.num factor in the transformation catalog can be specified as follows

    #site  transformation      pfn           type            architecture    profiles
    
    siteX    B     /shared/PEGASUS/bin/jobB INSTALLED       INTEL32::LINUX  PEGASUS::clusters.num=3
    siteX    C     /shared/PEGASUS/bin/jobC INSTALLED       INTEL32::LINUX  PEGASUS::clusters.num=2
    

    In the case, where both the factors are associated with the job, the clusters.num value supersedes the clusters.size value.

    #site  transformation   pfn             type             architecture   profiles
    
    siteX    B     /shared/PEGASUS/bin/jobB INSTALLED       INTEL32::LINUX PEGASUS::clusters.size=3,clusters.num=3
    

    In the above case the jobs referring to logical transformation B scheduled on siteX will be clustered on the basis of &ldquo;clusters.num&rdquor; value. Hence, if there are 4 jobs referring to logical transformation B scheduled to siteX, then 3 clustered jobs will be created.

    Figure 9.2. 


9.4.1.1.2. Label Clustering

In label based clustering, the user labels the workflow. All jobs having the same label value are clustered into a single clustered job. This allows the user to create clusters or use a clustering technique that is specific to his workflows. If there is no label associated with the job, the job is not clustered and is executed as is

Figure 9.3. 


Since, the jobs in a cluster in this case are not independent, it is important the jobs are executed in the correct order. This is done by doing a topological sort on the jobs in each cluster. To use label based clustering the user needs to set the --cluster option of pegasus-plan to label.

9.4.1.1.2.1. Labelling the Workflow

The labels for the jobs in the workflow are specified by associated pegasus profile keys with the jobs during the DAX generation process. The user can choose which profile key to use for labeling the workflow. By default, it is assumed that the user is using the PEGASUS profile key label to associate the labels. To use another key, in the pegasus namespace the user needs to set the following property

  • pegasus.clusterer.label.key

For example if the user sets pegasus.clusterer.label.key to user_label then the job description in the DAX looks as follows

<adag >
&mldr;
  <job id="ID000004" namespace="app" name="analyze" version="1.0" level="1" >
    <argument>-a bottom -T60  -i <filename file="user.f.c1"/>  -o <filename file="user.f.d"/></argument>
    <profile namespace=&ldquo;pegasus&rdquor; key=&ldquo;user_label&rdquor;>p1</profile>
    <uses file="user.f.c1" link="input" dontRegister="false" dontTransfer="false"/>
    <uses file="user.f.c2" link="input" dontRegister="false" dontTransfer="false"/>
    <uses file="user.f.d" link="output" dontRegister="false" dontTransfer="false"/>
  </job>
&mldr;
</adag>
  • The above states that the pegasus profiles with key as user_label are to be used for designating clusters.

  • Each job with the same value for pegasus profile key user_label appears in the same cluster.

9.4.1.1.3. Recursive Clustering

In some cases, a user may want to use a combination of clustering techniques. For e.g. a user may want some jobs in the workflow to be horizontally clustered and some to be label clustered. This can be achieved by specifying a comma separated list of clustering techniques to the &ndash;-cluster option of pegasus-plan. In this case the clustering techniques are applied one after the other on the workflow in the order specified on the command line.

For example

$ pegasus-plan &ndash;-dax example.dax --dir ./dags --cluster label,horizontal &ndash;s siteX &ndash;-output local --verbose

Figure 9.4. 


9.4.1.2. Execution of the Clustered Job

The execution of the clustered job on the remote site, involves the execution of the smaller constituent jobs either

  • sequentially on a single node of the remote site

    The clustered job is executed using seqexec, a wrapper tool written in C that is distributed as part of the PEGASUS. It takes in the jobs passed to it, and ends up executing them sequentially on a single node. To use &ldquo;seqexec&rdquor; for executing any clustered job on a siteX, there needs to be an entry in the transformation catalog for an executable with the logical name seqexec and namespace as pegasus.

    #site  transformation   pfn            type                 architecture    profiles
    
    siteX    pegasus::seqexec     /shared/PEGASUS/bin/seqexec INSTALLED       INTEL32::LINUX NULL

    By default, the entry for seqexec on a site is automatically picked up if $PEGASUS_HOME or $VDS_HOME is specified in the site catalog for that site.

  • On multiple nodes of the remote site using MPI

    The clustered job is executed using mpiexec, a wrapper mpi program written in C that is distributed as part of the PEGASUS. It is only distributed as source not as binary. The wrapper ends up being run on every mpi node, with the first one being the master and the rest of the ones as workers. The number of instances of mpiexec that are invoked is equal to the value of the globus rsl key nodecount. The master distributes the smaller constituent jobs to the workers.

    For e.g. If there were 10 jobs in the merged job and nodecount was 5, then one node acts as master, and the 10 jobs are distributed amongst the 4 slaves on demand. The master hands off a job to the slave node as and when it gets free. So initially all the 4 nodes are given a single job each, and then as and when they get done are handed more jobs till all the 10 jobs have been executed.

    To use &ldquo;mpiexec&rdquor; for executing the clustered job on a siteX, there needs to be an entry in the transformation catalog for an executable with the logical name mpiexec and namespace as pegasus.

    #site  transformation   pfn            type                 architecture    profiles
    
    siteX    pegasus::seqexec     /shared/PEGASUS/bin/mpiexec INSTALLED       INTEL32::LINUX NULL

    Another added advantage of using mpiexec, is that regular non mpi code can be run via MPI.

    Both the clustered job and the smaller constituent jobs are invoked via kickstart, unless the clustered job is being run via mpi (mpiexec). Kickstart is unable to launch mpi jobs. If kickstart is not installed on a particular site i.e. the gridlaunch attribute for site is not specified in the site catalog, the jobs are invoked directly.

9.4.1.2.1. Specification of Method of Execution for Clustered Jobs

The method execution of the clustered job(whether to launch via mpiexec or seqexec) can be specified

  1. globally in the properties file

    The user can set a property in the properties file that results in all the clustered jobs of the workflow being executed by the same type of executable.

    #PEGASUS PROPERTIES FILE
    pegasus.clusterer.job.aggregator seqexec|mpiexec

    In the above example, all the clustered jobs on the remote sites are going to be launched via the property value, as long as the property value is not overridden in the site catalog.

  2. associating profile key &ldquo;collapser&rdquor; with the site in the site catalog

    <site handle="siteX" gridlaunch = "/shared/PEGASUS/bin/kickstart">
        <profile namespace="env" key="GLOBUS_LOCATION" >/home/shared/globus</profile>
        <profile namespace="env" key="LD_LIBRARY_PATH">/home/shared/globus/lib</profile>
        <profile namespace="pegasus" key="collapser" >seqexec</profile>
        <lrc url="rls://siteX.edu" />
        <gridftp  url="gsiftp://siteX.edu/" storage="/home/shared/work" major="2" minor="4" patch="0" />
        <jobmanager universe="transfer" url="siteX.edu/jobmanager-fork" major="2" minor="4" patch="0" />
        <jobmanager universe="vanilla" url="siteX.edu/jobmanager-condor" major="2" minor="4" patch="0" />
        <workdirectory >/home/shared/storage</workdirectory>
      </site>

    In the above example, all the clustered jobs on a siteX are going to be executed via seqexec, as long as the value is not overridden in the transformation catalog.

  3. associating profile key &ldquo;collapser&rdquor; with the transformation that is being clustered, in the transformation catalog

    #site  transformation   pfn            type                architecture profiles
    
    siteX    B     /shared/PEGASUS/bin/jobB INSTALLED       INTEL32::LINUX pegasus::clusters.size=3,collapser=mpiexec

    In the above example, all the clustered jobs that consist of transformation B on siteX will be executed via mpiexec.

    Note

    The clustering of jobs on a site only happens only if

    • there exists an entry in the transformation catalog for the clustering executable that has been determined by the above 3 rules

    • the number of jobs being clustered on the site are more than 1

9.4.1.3. Outstanding Issues

  1. Label Clustering

    More rigorous checks are required to ensure that the labeling scheme applied by the user is valid.

9.5. Data Transfers

As part of the Workflow Mapping Process, Pegasus does data management for the executable workflow . It queries a Replica Catalog to discover the locations of the input datasets and adds data movement and registration nodes in the workflow to

  1. stage-in input data to the compute sites ( where the jobs in the workflow are executed )

  2. stage-out output data generated by the workflow to the final storage site.

  3. stage-in intermediate data between compute sites if required.

  4. data registration nodes to catalog the locations of the output data on the final storage site into the replica catalog.

The separate data movement jobs that are added to the executable workflow are responsible for staging data to a workflow specific directory accessible to the staging server on a staging site associated with the compute sites. Currently, the staging site for a compute site is the compute site itself. In the default case, the staging server is usually on the headnode of the compute site and has access to the shared filesystem between the worker nodes and the head node. Pegasus adds a directory creation job in the executable workflow that creates the workflow specific directory on the staging server.

Figure 9.5. Default Transfer Case : Input Data To Workflow Specific Directory on Shared File System

Default Transfer Case : Input Data To Workflow Specific Directory on Shared File System

In addition to data, Pegasus does transfer user executables to the compute sites if the executables are not installed on the remote sites before hand. This chapter gives an overview of how transfers of data and executables is managed in Pegasus.

9.5.1. Local versus Remote Transfers

As far as possible, Pegasus will ensure that the transfer jobs added to the executable workflow are executed on the submit host. By default, Pegasus will schedule a transfer to be executed on the remote compute site only if there is no way to execute it on the submit host. For e.g if the file server specified for the compute site is a file server, then Pegasus will schedule all the stage in data movement jobs on the compute site to stage-in the input data for the workflow. Another case would be if a user has symlinking turned on. In that case, the transfer jobs that symlink against the input data on the compute site, will be executed remotely ( on the compute site ).

Users can specify the property pegasus.transfer.*.remote.sites to change the default behaviour of Pegasus and force pegasus to run different types of transfer jobs for the sites specified on the remote site. The value of the property is a comma separated list of compute sites for which you want the transfer jobs to run remotely.

The table below illustrates all the possible variations of the property.

Table 9.9. Property Variations for pegasus.transfer.*.remote.sites

Property Name Applies to
pegasus.transfer.stagein.remote.sites the stage in transfer jobs
pegasus.transfer.stageout.remote.sites the stage out transfer jobs
pegasus.transfer.inter.remote.sites the inter site transfer jobs
pegasus.transfer.*.remote.sites all types of transfer jobs

The prefix for the transfer job name indicates whether the transfer job is to be executed locallly ( on the submit host ) or remotely ( on the compute site ). For example stage_in_local_ in a transfer job name stage_in_local_isi_viz_0 indicates that the transfer job is a stage in transfer job that is executed locally and is used to transfer input data to compute site isi_viz. The prefix naming scheme for the transfer jobs is [stage_in|stage_out|inter]_[local|remote]_ .

9.5.2. Symlinking Against Input Data

If input data for a job already exists on a compute site, then it is possible for Pegasus to symlink against that data. In this case, the remote stage in transfer jobs that Pegasus adds to the executable workflow will symlink instead of doing a copy of the data.

Pegasus determines whether a file is on the same site as the compute site, by inspecting the pool attribute associated with the URL in the Replica Catalog. If the pool attribute of an input file location matches the compute site where the job is scheduled, then that particular input file is a candidate for symlinking.

For Pegasus to symlink against existing input data on a compute site, following must be true

  1. Property pegasus.transfer.links is set to true

  2. The input file location in the Replica Catalog has the pool attribute matching the compute site.

Tip

To confirm if a particular input file is symlinked instead of being copied, look for the destination URL for that file in stage_in_remote*.in file. The destination URL will start with symlink:// .

In the symlinking case, Pegasus strips out URL prefix from a URL and replaces it with a file URL.

For example if a user has the following URL catalogued in the Replica Catalog for an input file f.input

f.input   gsiftp://server.isi.edu/shared/storage/input/data/f.input pool="isi"

and the compute job that requires this file executes on a compute site named isi , then if symlinking is turned on the data stage in job (stage_in_remote_viz_0 ) will have the following source and destination specified for the file

#viz viz
file:///shared/storage/input/data/f.input  symlink://shared-scratch/workflow-exec-dir/f.input

9.5.3. Addition of Separate Data Movement Nodes to Executable Workflow

Pegasus relies on a Transfer Refiner that comes up with the strategy on how many data movement nodes are added to the executable workflow. All the compute jobs scheduled to a site share the same workflow specific directory. The transfer refiners ensure that only one copy of the input data is transferred to the workflow execution directory. This is to prevent data clobbering . Data clobbering can occur when compute jobs of a workflow share some input files, and have different stage in transfer jobs associated with them that are staging the shared files to the same destination workflow execution directory.

The default Transfer Refiner used in Pegasus is the Bundle Refiner that allows the user to specify how many local|remote stagein|stageout jobs are created per execution site.

The behavior of the refiner is controlled by specifying certain pegasus profiles

  1. either with the execution sites in the site catalog

  2. OR globally in the properties file

Table 9.10. Pegasus Profile Keys For the Bundle Transfer Refiner

Profile Key Description
stagein.clusters This key determines the maximum number of stage-in jobs that are can executed locally or remotely per compute site per workflow.
stagein.local.clusters This key provides finer grained control in determining the number of stage-in jobs that are executed locally and are responsible for staging data to a particular remote site.
stagein.remote.clusters This key provides finer grained control in determining the number of stage-in jobs that are executed remotely on the remote site and are responsible for staging data to it.
stageout.clusters This key determines the maximum number of stage-out jobs that are can executed locally or remotely per compute site per workflow.
stageout.local.clusters This key provides finer grained control in determining the number of stage-out jobs that are executed locally and are responsible for staging data from a particular remote site.
stageout.remote.clusters This key provides finer grained control in determining the number of stage-out jobs that are executed remotely on the remote site and are responsible for staging data from it.

Figure 9.6. Default Transfer Case : Input Data To Workflow Specific Directory on Shared File System

Default Transfer Case : Input Data To Workflow Specific Directory on Shared File System

9.5.4. Executable Used for Transfer Jobs

Pegasus refers to a python script called pegasus-transfer as the executable in the transfer jobs to transfer the data. pegasus-transfer is a python based wrapper around various transfer clients . pegasus-transfer looks at source and destination url and figures out automatically which underlying client to use. pegasus-transfer is distributed with the PEGASUS and can be found at $PEGASUS_HOME/bin/pegasus-transfer.

Currently, pegasus-transfer interfaces with the following transfer clients

Table 9.11. Transfer Clients interfaced to by pegasus-transfer

Transfer Client Used For
globus-url-copy staging files to and from a gridftp server.
lcg-copy staging files to and from a SRM server.
wget staging files from a HTTP server.
cp copying files from a POSIX filesystem .
ln symlinking against input files.

For remote sites, Pegasus constructs the default path to pegasus-transfer on the basis of PEGASUS_HOME env profile specified in the site catalog. To specify a different path to the pegasus-transfer client , users can add an entry into the transformation catalog with fully qualified logical name as pegasus::pegasus-transfer

9.5.5. Staging of Executables

Users can get Pegasus to stage the user executables ( executables that the jobs in the DAX refer to ) as part of the transfer jobs to the workflow specific execution directory on the compute site. The URL locations of the executables need to be specified in the transformation catalog as the PFN and the type of executable needs to be set to STAGEABLE .

The location of a transformation can be specified either in

  • DAX in the executables section. More details here .

  • Transformation Catalog. More details here .

A particular transformation catalog entry of type STAGEABLE is compatible with a compute site only if all the System Information attributes associated with the entry match with the System Information attributes for the compute site in the Site Catalog. The following attributes make up the System Information attributes

  1. arch

  2. os

  3. osrelease

  4. osversion

9.5.5.1. Transformation Mappers

Pegasus has a notion of transformation mappers that determines what type of executables are picked up when a job is executed on a remote compute site. For transfer of executables, Pegasus constructs a soft state map that resides on top of the transformation catalog, that helps in determining the locations from where an executable can be staged to the remote site.

Users can specify the following property to pick up a specific transformation mapper

pegasus.catalog.transformation.mapper 

Currently, the following transformation mappers are supported.

Table 9.12. Transformation Mappers Supported in Pegasus

Transformation Mapper Description
Installed This mapper only relies on transformation catalog entries that are of type INSTALLED to construct the soft state map. This results in Pegasus never doing any transfer of executables as part of the workflow. It always prefers the installed executables at the remote sites
Staged This mapper only relies on matching transformation catalog entries that are of type STAGEABLE to construct the soft state map. This results in the executable workflow referring only to the staged executables, irrespective of the fact that the executables are already installed at the remote end
All This mapper relies on all matching transformation catalog entries of type STAGEABLE or INSTALLED for a particular transformation as valid sources for the transfer of executables. This the most general mode, and results in the constructing the map as a result of the cartesian product of the matches.
Submit This mapper only on matching transformation catalog entries that are of type STAGEABLE and reside at the submit host (pool local), are used while constructing the soft state map. This is especially helpful, when the user wants to use the latest compute code for his computations on the grid and that relies on his submit host.

9.5.6. Staging of Pegasus Worker Package

Pegasus can optionally stage the pegasus worker package as part of the executable workflow to remote workflow specific execution directory. The pegasus worker package contains the pegasus auxillary executables that are required on the remote site. If the worker package is not staged as part of the executable workflow, then Pegasus relies on the installed version of the worker package on the remote site. To determine the location of the installed version of the worker package on a remote site, Pegasus looks for an environment profile PEGASUS_HOME for the site in the Site Catalog.

Users can set the following property to true to turn on worker package staging

pegasus.transfer.worker.package          true 

By default, when worker package staging is turned on pegasus pulls the compatible worker package from the Pegasus Website. To specify a different worker package location, users can specify the transformation pegasus::worker in the transformation catalog with

  • type set to STAGEABLE

  • System Information attributes of the transformation catalog entry match the System Information attributes of the compute site.

  • the PFN specified should be a remote URL that can be pulled to the compute site.

9.5.7. Second Level Staging

By default, Pegasus executes the jobs in the workflow specific directory created on the shared filesystem of a compute site. However, if a user wants Pegasus can execute the jobs on the worker nodes filesystem. When the jobs are executed on the worker node, they pull the input data for the job from the workflow specific directory on the staging server ( usually the shared filesystem on the compute site ) to a directory on the worker node filesystem, and after the job has completed stages out the output files from the worker node to the workflow specific execution directory.

The separate data stagein and stageout jobs are still added to the workflow. They are responsible for getting the input data to the workflow specific directory on the staging server ( usually the shared filesystem on the compute site ) , and pushing out the output data to final storage site from that directory.

Figure 9.7. Second Level Staging : Getting Data to and from a directory on the worker nodes

Second Level Staging : Getting Data to and from a directory on the worker nodes

This mode is especially useful for running in the cloud environments where you don't want to setup a shared filesystem between the worker nodes. Running in that mode is explained in detail here.

To turn on second level staging for the workflows users should set the following properties

pegasus.execute.*.filesystem.local = true       # Turn on second-level staging (SLS)
pegasus.transfer.sls.s3.stage.sls.file = false  # Do not transfer .sls files via transfer jobs
pegasus.gridstart = SeqExec                     # Use SeqExec to launch the jobs

9.6. Hierarchical Workflows

9.6.1. Introduction

The Abstract Workflow in addition to containing compute jobs, can also contain jobs that refer to other workflows. This is useful for running large workflows or ensembles of workflows.

Users can embed two types of workflow jobs in the DAX

  1. daxjob - refers to a sub workflow represented as a DAX. During the planning of a workflow, the DAX jobs are mapped to condor dagman jobs that have pegasus plan invocation on the dax ( referred to in the DAX job ) as the prescript.

    Figure 9.8. Planning of a DAX Job

    Planning of a DAX Job

  2. dagjob - refers to a sub workflow represented as a DAG. During the planning of a workflow, the DAG jobs are mapped to condor dagman and refer to the DAG file mentioned in the DAG job.

    Figure 9.9. Planning of a DAG Job

    Planning of a DAG Job

9.6.2. Specifying a DAX Job in the DAX

Specifying a DAXJob in a DAX is pretty similar to how normal compute jobs are specified. There are minor differences in terms of the xml element name ( dax vs job ) and the attributes specified. DAXJob XML specification is described in detail in the chapter on DAX API . An example DAX Job in a DAX is shown below

  <dax id="ID000002" name="black.dax" node-label="bar" >
    <profile namespace="dagman" key="maxjobs">10</profile>
    <argument>-Xmx1024 -Xms512 -Dpegasus.dir.storage=storagedir  -Dpegasus.dir.exec=execdir -o local -vvvvv --force -s dax_site </argument>
  </dax>

9.6.2.1. DAX File Locations

The name attribute in the dax element refers to the LFN ( Logical File Name ) of the dax file. The location of the DAX file can be catalogued either in the

  1. Replica Catalog

  2. Replica Catalog Section in the DAX .

    Note

    Currently, only file url's on the local site ( submit host ) can be specified as DAX file locations.

9.6.2.2. Arguments for a DAX Job

Users can specify specific arguments to the DAX Jobs. The arguments specified for the DAX Jobs are passed to the pegasus-plan invocation in the prescript for the corresponding condor dagman job in the executable workflow.

The following options for pegasus-plan are inherited from the pegasus-plan invocation of the parent workflow. If an option is specified in the arguments section for the DAX Job then that overrides what is inherited.

Table 9.13. Options inherited from parent workflow

Option Name Description
--sites list of execution sites.

It is highly recommended that users dont specify directory related options in the arguments section for the DAX Jobs. Pegasus assigns values to these options for the sub workflows automatically.

  1. --relative-dir

  2. --dir

  3. --relative-submit-dir

9.6.2.3. Profiles for DAX Job

Users can choose to specify dagman profiles with the DAX Job to control the behavior of the corresponding condor dagman instance in the executable workflow. In the example above maxjobs is set to 10 for the sub workflow.

9.6.2.4. Execution of the PRE script and Condor DAGMan instance

The pegasus plan that is invoked as part of the prescript to the condor dagman job is executed on the submit host. The log from the output of pegasus plan is redirected to a file ( ending with suffix pre.log ) in the submit directory of the workflow that contains the DAX Job. The path to pegasus-plan is automatically determined.

The DAX Job maps to a Condor DAGMan job. The path to condor dagman binary is determined according to the following rules -

  1. entry in the transformation catalog for condor::dagman for site local, else

  2. pick up the value of CONDOR_HOME from the environment if specified and set path to condor dagman as $CONDOR_HOME/bin/condor_dagman , else

  3. pick up the value of CONDOR_LOCATION from the environment if specified and set path to condor dagman as $CONDOR_LOCATION/bin/condor_dagman , else

  4. pick up the path to condor dagman from what is defined in the user's PATH

Tip

It is recommended that user dagman.maxpre in their properties file to control the maximum number of pegasus plan instances launched by each running dagman instance.

9.6.3. Specifying a DAG Job in the DAX

Specifying a DAGJob in a DAX is pretty similar to how normal compute jobs are specified. There are minor differences in terms of the xml element name ( dag vs job ) and the attributes specified. For DAGJob XML details,see the API Reference chapter . An example DAG Job in a DAX is shown below

  <dag id="ID000003" name="black.dag" node-label="foo" >
    <profile namespace="dagman" key="maxjobs">10</profile>
    <profile namespace="dagman" key="DIR">/dag-dir/test</profile>
  </dag>

9.6.3.1. DAG File Locations

The name attribute in the dag element refers to the LFN ( Logical File Name ) of the dax file. The location of the DAX file can be catalogued either in the

  1. Replica Catalog

  2. Replica Catalog Section in the DAX.

    Note

    Currently, only file url's on the local site ( submit host ) can be specified as DAG file locations.

9.6.3.2. Profiles for DAG Job

Users can choose to specify dagman profiles with the DAX Job to control the behavior of the corresponding condor dagman instance in the executable workflow. In the example above, maxjobs is set to 10 for the sub workflow.

The dagman profile DIR allows users to specify the directory in which they want the condor dagman instance to execute. In the example above black.dag is set to be executed in directory /dag-dir/test . The /dag-dir/test should be created beforehand.

9.6.4. File Dependencies Across DAX Jobs

In hierarchal workflows , if a sub workflow generates some output files required by another sub workflow then there should be an edge connecting the two dax jobs. Pegasus will ensure that the prescript for the child sub-workflow, has the path to the cache file generated during the planning of the parent sub workflow. The cache file in the submit directory for a workflow is a textual replica catalog that lists the locations of all the output files created in the remote workflow execution directory when the workflow executes.

This automatic passing of the cache file to a child sub-workflow ensures that the datasets from the same workflow run are used. However, the passing of the locations in a cache file also ensures that Pegasus will prefer them over all other locations in the Replica Catalog. If you need the Replica Selection to consider locations in the Replica Catalog also, then set the following property.

pegasus.catalog.replica.cache.asrc  true

The above is useful in the case, where you are staging out the output files to a storage site, and you want the child sub workflow to stage these files from the storage output site instead of the workflow execution directory where the files were originally created.

9.6.5. Recursion in Hierarchal Workflows

It is possible for a user to add a dax jobs to a dax that already contain dax jobs in them. Pegasus does not place a limit on how many levels of recursion a user can have in their workflows. From Pegasus perspective recursion in hierarchal workflows ends when a DAX with only compute jobs is encountered . However, the levels of recursion are limited by the system resources consumed by the DAGMan processes that are running (each level of nesting produces another DAGMan process) .

The figure below illustrates an example with recursion 2 levels deep.

Figure 9.10. Recursion in Hierarchal Workflows

Recursion in Hierarchal Workflows

The execution time-line of the various jobs in the above figure is illustrated below.

Figure 9.11. Execution Time-line for Hierarchal Workflows

Execution Time-line for Hierarchal Workflows

9.6.6. Example

The Galactic Plane workflow is a Hierarchical workflow of many Montage workflows. For details, see Workflow of Workflows.

9.7. Notifications

The Pegasus Workflow Mapper now supports job and workflow level notifications. You can specify in the DAX with the job or the workflow

  • the event when the notification needs to be sent

  • the executable that needs to be invoked.

The notifications are issued from the submit host by the pegasus-monitord daemon that monitors the Condor logs for the workflow. When a notification is issued, pegasus-monitord while invoking the notifying executable sets certain environment variables that contain information about the job and workflow state.

The Pegasus release comes with default notification clients that send notifications via email or jabber.

9.7.1. Specifying Notifications in the DAX

Currently, you can specify notifications for the jobs and the workflow by the use of invoke elements.

Invoke elements can be sub elements for the following elements in the DAX schema.

  • job - to associate notifications with a compute job in the DAX.

  • dax - to associate notifications with a dax job in the DAX.

  • dag - to associate notifications with a dag job in the DAX.

  • executable - to associate notifications with a job that uses a particular notification

The invoke element can be specified at the root element level of the DAX to indicate workflow level notifications.

The invoke element may be specified multiple times, as needed. It has a mandatory when attribute with the following value set

Table 9.14. Table 1. Invoke Element attributes and meaning.

Enumeration of Values for when attribute Meaning
never (default). Never notify of anything. This is useful to temporarily disable an existing notifications.
start create a notification when the job is submitted.
on_error after a job finishes with failure (exitcode != 0).
on_success after a job finishes with success (exitcode == 0).
at_end after a job finishes, regardless of exitcode.
all like start and at_end combined.

You can specify multiple invoke elements corresponding to same when attribute value in the DAX. This will allow you to have multiple notifications for the same event.

Here is an example that illustrates that.

<job id="ID000001" namespace="example" name="mDiffFit" version="1.0" 
       node-label="preprocess" >
    <argument>-a top -T 6  -i <file name="f.a"/>  -o <file name="f.b1"/></argument>

    <!-- profiles are optional -->
    <profile namespace="execution" key="site">isi_viz</profile>
    <profile namespace="condor" key="getenv">true</profile>

    <uses name="f.a" link="input"  register="false" transfer="true" type="data" />
    <uses name="f.b" link="output" register="false" transfer="true" type="data" />
    
    <!-- 'WHEN' enumeration: never, start, on_error, on_success, on_end, all -->
    <invoke when="start">/path/to/notify1 arg1 arg2</invoke>
    <invoke when="start">/path/to/notify1 arg3 arg4</invoke>
    <invoke when="on_success">/path/to/notify2 arg3 arg4</invoke>
  </job>

In the above example the executable notify1 will be invoked twice when a job is submitted ( when="start" ), once with arguments arg1 and arg2 and second time with arguments arg3 and arg4.

The DAX Generator API chapter has information about how to add notifications to the DAX using the DAX api's.

9.7.2. Notify File created by Pegasus in the submit directory

Pegasus while planning a workflow writes out a notify file in the submit directory that contains all the notifications that need to be sent for the workflow. pegasus-monitord picks up this notifications file to determine what notifications need to be sent and when.

  1. ENTITY_TYPE ID NOTIFICATION_CONDITION ACTION

    • ENTITY_TYPE can be either of the following keywords

      • WORKFLOW - indicates workflow level notification

      • JOB - indicates notifications for a job in the executable workflow

      • DAXJOB - indicates notifications for a DAX Job in the executable workflow

      • DAGJOB - indicates notifications for a DAG Job in the executable workflow

    • ID indicates the identifier for the entity. It has different meaning depending on the entity type - -

      • workflow - ID is wf_uuid

      • JOB|DAXJOB|DAGJOB - ID is the job identifier in the executable workflow ( DAG ).

    • NOTIFICATION_CONDITION is the condition when the notification needs to be sent. The notification conditions are enumerated in Table 1

    • ACTION is what needs to happen when condition is satisfied. It is executable + arguments

  2. INVOCATION JOB_IDENTIFIER INV.ID NOTIFICATION_CONDITION ACTION

    The INVOCATION lines are only generated for clustered jobs, to specifiy the finer grained notifications for each constitutent job/invocation .

    • JOB IDENTIFIER is the job identifier in the executable workflow ( DAG ).

    • INV.ID indicates the index of the task in the clustered job for which the notification needs to be sent.

    • NOTIFICATION_CONDITION is the condition when the notification needs to be sent. The notification conditions are enumerated in Table 1

    • ACTION is what needs to happen when condition is satisfied. It is executable + arguments

A sample notifications file generated is listed below.

WORKFLOW d2c4f79c-8d5b-4577-8c46-5031f4d704e8 on_error /bin/date1

INVOCATION merge_vahi-preprocess-1.0_PID1_ID1 1 on_success /bin/date_executable
INVOCATION merge_vahi-preprocess-1.0_PID1_ID1 1 on_success /bin/date_executable
INVOCATION merge_vahi-preprocess-1.0_PID1_ID1 1 on_error /bin/date_executable

INVOCATION merge_vahi-preprocess-1.0_PID1_ID1 2 on_success /bin/date_executable
INVOCATION merge_vahi-preprocess-1.0_PID1_ID1 2 on_error /bin/date_executable

DAXJOB subdax_black_ID000003 on_error /bin/date13
JOB    analyze_ID00004    on_success /bin/date

9.7.3. Configuring pegasus-monitord for notifications

Whenever pegasus-monitord enters a workflow (or sub-workflow) directory, it will read the notifications file generated by Pegasus. Pegasus-monitord will match events in the running workflow against the notifications specified in the notifications file and will initiate the script specified in a notification when that notification matches an event in the workflow. It is important to note that there will be a delay between a certain event happening in the workflow, and pegasus-monitord processing the log file and executing the corresponding notification script.

The following command line options (and properties) can change how pegasus-monitord handles notifications:

  • --no-notifications (pegasus.monitord.notifications=False): Will disable notifications completely.

  • --notifications-max=nn (pegasus.monitord.notifications.max=nn): Will limit the number of concurrent notification scripts to nn. Once pegasus-monitord reaches this number, it will wait until one notification script finishes before starting a new one. Notifications happening during this time will be queued by the system. The default number of concurrent notification scripts for pegasus-monitord is 10.

  • --notifications-timeout=nn (pegasus.monitord.notifications.timeout=nn): This setting is used to change how long will pegasus-monitord wait for a notification script to finish. By default pegasus-monitord will wait for as long as it takes (possibly indefinitely) until a notification script ends. With this option, pegasus-monitord will wait for at most nn seconds before killing the notification script.

It is also important to understand that pegasus-monitord will not issue any notifications when it is executed in replay mode.

9.7.3.1. Environment set for the notification scripts

Whenever a notification in the notifications file matches an event in the running workflow, pegasus-monitord will run the corresponding script specified in the ACTION field of the notifications file. Pegasus-monitord will set the following environment variables for each notification script is starts:

  • PEGASUS_EVENT: The NOTIFICATION_CONDITION that caused the notification. In the case of the "all" condition, pegasus-monitord will substitute it for the actual event that caused the match (e.g. "start" or "at_end").

  • PEGASUS_EVENT_TIMESTAMP: Timestamp in EPOCH format for the event (better for automated processing).

  • PEGASUS_EVENT_TIMESTAMP_ISO: Same as above, but in ISO format (better for human readability).

  • PEGASUS_SUBMIT_DIR: The submit directory for the workflow (usually the value from "submit_dir" in the braindump.txt file)

  • PEGASUS_STDOUT: For workflow notifications, this will correspond to the dagman.out file for that workflow. For job and invocation notifications, this field will contain the output file (stdout) for that particular job instance.

  • PEGASUS_STDERR: For job and invocation notifications, this field will contain the error file (stderr) for the particular executable job instance. This field does not exist in case of workflow notifications.

  • PEGASUS_WFID: Contains the workflow id for this notification in the form of DAX_LABEL + DAX_INDEX (from the braindump.txt file).

  • PEGASUS_JOBID: For workflow notifications, this contains the worfkflow wf_uuid (from the braindump.txt file). For job and invocation notifications, this field contains the job identifier in the executable workflow ( DAG ) for the particular notification.

  • PEGASUS_INVID: Contains the index of the task in the clustered job for the notification.

  • PEGASUS_STATUS: For workflow notifications, this contains DAGMan's exit code. For job and invocation notifications, this field contains the exit code for the particular job/task. Please note that this field is not present for 'start' notification events.

9.7.4. Default Notification Scripts

Pegasus ships with two reference notification scripts. These can be used as starting point when creating your own notification scripts, or if the default one is all you need, you can use them directly in your workflows. The scripts are:

  • libexec/notification/email - sends email, including the output from pegasus-status (default) or pegasus-analyzer.

    $ ./libexec/notification/email --help
    Usage: email [options]
    
    Options:
      -h, --help            show this help message and exit
      -t TO_ADDRESS, --to=TO_ADDRESS
                            The To: email address. Defines the recipient for the
                            notification.
      -f FROM_ADDRESS, --from=FROM_ADDRESS
                            The From: email address. Defaults to the required To:
                            address.
      -r REPORT, --report=REPORT
                            Include workflow report. Valid values are: none
                            pegasus-analyzer pegasus-status (default)
    
  • libexec/notification/jabber - sends simple notifications to Jabber/GTalk. This can be useful for job failures.

    $ ./libexec/notification/jabber --help
    Usage: jabber [options]
    
    Options:
      -h, --help            show this help message and exit
      -i JABBER_ID, --jabberid=JABBER_ID
                            Your jabber id. Example: user@jabberhost.com
      -p PASSWORD, --password=PASSWORD
                            Your jabber password
      -s HOST, --host=HOST  Jabber host, if different from the host in your jabber
                            id. For Google talk, set this to talk.google.com
      -r RECIPIENT, --recipient=RECIPIENT
                            Jabber id of the recipient. Not necessary if you want
                            to send to your own jabber id
    

For example, if the DAX generator is written in Python and you want notifications on 'at_end' events (successful or failed):

# job level notifications - in this case for at_end events
job.invoke('at_end', pegasus_home + "/libexec/notifications/email --to me@somewhere.edu")

Please see the notifications example to see a full workflow using notifications.

9.8. API Reference

9.8.1. DAX XML Schema

The DAX format is described by the XML schema instance document dax-3.3.xsd. A local copy of the schema definition is provided in the etc directory. The documentation of the XML schema and its elements can be found in dax-3.3.html as well as locally in doc/schemas/dax-3.3/dax-3.3.html in your Pegasus distribution.

9.8.1.1. DAX XML Schema In Detail

The DAX file format has four major sections, with the second section divided into more sub-sections. The DAX format works on the abstract or logical level, letting you focus on the shape of the workflows, what to do and what to work upon.

  1. Workflow-level Notifications

    Very simple workflow-level notifications. These are defined in the Notification section.

  2. Catalogs

    The first section deals with included catalogs. While we do recommend to use external replica- and transformation catalogs, it is possible to include some replicas and transformations into the DAX file itself. Any DAX-included entry takes precedence over regular replica catalog (RC) and transformation catalog (TC) entries.

    The first section (and any of its sub-sections) is completely optional.

    1. The first sub-section deals with included replica descriptions.

    2. The second sub-section deals with included transformation descriptions.

    3. The third sub-section declares multi-item executables.

  3. Job List

    The jobs section defines the job- or task descriptions. For each task to conduct, a three-part logical name declares the task and aides identifying it in the transformation catalog or one of the executable section above. During planning, the logical name is translated into the physical executable location on the chosen target site. By declaring jobs abstractly, physical layout consideration of the target sites do not matter. The job's id uniquley identifies the job within this workflow.

    The arguments declare what command-line arguments to pass to the job. If you are passing filenames, you should refer to the logical filename using the file element in the argument list.

    Important for properly planning the task is the list of files consumed by the task, its input files, and the files produced by the task, its output files. Each file is described with a uses element inside the task.

    Elements exist to link a logical file to any of the stdio file descriptors. The profile element is Pegasus's way to abstract site-specific data.

    Jobs are nodes in the workflow graph. Other nodes include unplanned workflows (DAX), which are planned and then run when the node runs, and planned workflows (DAG), which are simply executed.

  4. Control-flow Dependencies

    The third section lists the dependencies between the tasks. The relationships are defined as child parent relationships, and thus impacts the order in which tasks are run. No cyclic dependencies are permitted.

    Dependencies are directed edges in the workflow graph.

9.8.1.1.1. XML Intro

If you have seen the DAX schema before, not a lot of new items in the root element. However, we did retire the (old) attributes ending in Count.

<?xml version="1.0" encoding="UTF-8"?>
<!-- generated: 2011-07-28T18:29:57Z -->
<adag xmlns="http://pegasus.isi.edu/schema/DAX" 
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
      xsi:schemaLocation="http://pegasus.isi.edu/schema/DAX http://pegasus.isi.edu/schema/dax-3.3.xsd" 
      version="3.3" 
      name="diamond" 
      index="0" 
      count="1">

The following attributes are supported for the root element adag.

Table 9.15. 

attribute optional? type meaning
version required VersionPattern Version number of DAX instance document. Must be 3.3.
name required string name of this DAX (or set of DAXes).
count optional positiveInteger size of list of DAXes with this name. Defaults to 1.
index optional nonNegativeInteger current index of DAX with same name. Defaults to 0.
fileCount removed nonNegativeInteger Old 2.1 attribute, removed, do not use.
jobCount removed positiveInteger Old 2.1 attribute, removed, do not use.
childCount removed nonNegativeInteger Old 2.1 attribute, removed, do not use.

The version attribute is restricted to the regular expression \d+(\.\d+(\.\d+)?)?.This expression represents the VersionPattern type that is used in other places, too. It is a more restrictive expression than before, but allows us to compute comparable version number using the following formula:

version1: a.b.c version2: d.e.f
n = a * 1,000,000 + b * 1,000 + c m = d * 1,000,000 + e * 1,000 + f
version1 > version2 if n > m
9.8.1.1.2. Workflow-level Notifications

(something to be said here.)

  <!-- part 1.1: invocations -->
  <invoke when="at_end">/bin/date -Ins &gt;&gt; my.log</invoke>

The above snippet will append the current time to a log file in the current directory. This is with regards to the monitord instance acting on the notification.

9.8.1.1.3. The Catalogs Section

The initial section features three sub-sections:

  1. a catalog of files used,

  2. a catalog of transformations used, and

  3. compound transformation declarations.

9.8.1.1.3.1. The Replica Catalog Section

The file section acts as in in-file replica catalog (RC). Any files declared in this section take precedence over files in external replica catalogs during planning.

  <!-- part 1.2: included replica catalog -->
  <file name="example.a" >
    <!-- profiles are optional -->
    <!-- The "stat" namespace is ONLY AN EXAMPLE -->
    <profile namespace="stat" key="size">/* integer to be defined */</profile>
    <profile namespace="stat" key="md5sum">/* 32 char hex string */</profile>
    <profile namespace="stat" key="mtime">/* ISO-8601 timestamp */</profile>

    <!-- metadata is currently NOT SUPPORTED -->
    <metadata key="timestamp" type="int">/* ISO-8601 *or* 20100417134523:int */</metadata>
    <metadata key="origin" type="string">ocean</metadata>
    
    <!-- PFN to by-pass replica catalog -->
    <!-- The "site attribute is optional -->
    <pfn url="file:///tmp/example.a" site="local">
      <profile namespace="stat" key="owner">voeckler</profile>
    </pfn>
    <pfn url="file:///storage/funky.a" site="local"/>    
  </file>

  <!-- a more typical example from the black diamond -->
  <file name="f.a">
    <pfn url="file:///Users/voeckler/f.a" site="local"/>
  </file>

The first file entry above is an example of a data file with two replicas. The file element requires a logical file name. Each logical filename may have additional information associated with it, enumerated by profile elements. Each file entry may have 0 or more metadata associated with it. Each piece of metadata has a key string and type attribute describing the element's value.

Warning

The metadata element is not support as of this writing! Details may change in the future.

The file element can provide 0 or more pfn locations, taking precedence over the replica catalog. A file element that does not name any pfn children-elements will still require look-ups in external replica catalogs. Each pfn element names a concrete location of a file. Multiple locations constitute replicas of the same file, and are assumed to be usable interchangably. The url attribute is mandatory, and typically would use a file schema URL. The site attribute is optional, and defaults to value local if missing. A pfn element may have profile children-elements, which refer to attributes of the physical file. The file-level profiles refer to attributes of the logical file.

Note

The stat profile namespace is ony an example, and details about stat are not yet implemented. The proper namespaces pegasus, condor, dagman, env, hints, globus and selector enjoy full support.

The second file entry above shows a usage example from the black-diamond example workflow that you are more likely to encouter or write.

The presence of an in-file replica catalog lets you declare a couple of interesting advanced features. The DAG and DAX file declarations are just files for all practical purposes. For deferred planning, the location of the site catalog (SC) can be captured in a file, too, that is passed to the job dealing with the deferred planning as logical filename.

  <file name="black.dax" >
    <!-- specify the location of the DAX file -->
    <pfn url="file:///Users/vahi/Pegasus/work/dax-3.0/blackdiamond_dax.xml" site="local"/>
  </file>

  <file name="black.dag" >
    <!-- specify the location of the DAG file -->
    <pfn url="file:///Users/vahi/Pegasus/work/dax-3.0/blackdiamond.dag" site="local"/>
  </file>
  
  <file name="sites.xml" >
    <!-- specify the location of a site catalog to use for deferred planning -->
    <pfn url="file:///Users/vahi/Pegasus/work/dax-3.0/conf/sites.xml" site="local"/>
  </file>
9.8.1.1.3.. The Transformation Catalog Section

The executable section acts as an in-file transformation catalog (TC). Any transformations declared in this section take precedence over the external transformation catalog during planning.

  <!-- part 1.3: included transformation catalog -->
  <executable namespace="example" name="mDiffFit" version="1.0" 
              arch="x86_64" os="linux" installed="true" >
    <!-- profiles are optional -->
    <!-- The "stat" namespace is ONLY AN EXAMPLE! -->
    <profile namespace="stat" key="size">5000</profile>
    <profile namespace="stat" key="md5sum">AB454DSSDA4646DS</profile>
    <profile namespace="stat" key="mtime">2010-11-22T10:05:55.470606000-0800</profile>

    <!-- metadata is currently NOT SUPPORTED! -->
    <metadata key="timestamp" type="int">/* see above */</metadata>
    <metadata key="origin" type="string">ocean</metadata>
 
    <!-- PFN to by-pass transformation catalog -->
    <!-- The "site" attribute is optional -->
    <pfn url="file:///tmp/mDiffFit"          site="local"/>     
    <pfn url="file:///tmp/storage/mDiffFit"  site="local"/>     
  </executable>

  <!-- to be used in compound transformation later -->
  <executable namespace="example" name="mDiff" version="1.0" 
              arch="x86_64" os="linux" installed="true" >
    <pfn url="file:///tmp/mDiff" site="local"/>        
  </executable>

  <!-- to be used in compound transformation later -->
  <executable namespace="example" name="mFitplane" version="1.0"
              arch="x86_64" os="linux" installed="true" >
    <pfn url="file:///tmp/mDiffFitplane"  site="local">
      <profile namespace="stat" key="md5sum">0a9c38b919c7809cb645fc09011588a6</profile>
    </pfn>
    <invoke when="at_end">/path/to/my_send_email some args</invoke>
  </executable>

  <!-- a more likely example from the black diamond -->
  <executable namespace="diamond" name="preprocess" version="2.0" 
              arch="x86_64"
              os="linux" 
              osversion="2.6.18">
    <pfn url="file:///opt/pegasus/default/bin/keg" site="local" />
  </executable>

Logical filenames pertaining to a single executables in the transformation catalog use the executable element. Any executable element features the optional namespace attribute, a mandatory name attribute, and an optional version attribute. The version attribute defaults to "1.0" when absent. An executable typically needs additional attributes to describe it properly, like the architecture, OS release and other flags typically seen with transformations, or found in the transformation catalog.

Table 9.16. 

attribute optional? type meaning
name required string logical transformation name
namespace optional string namespace of logical transformation, default to null value.
version optional VersionPattern version of logical transformation, defaults to "1.0".
installed optional boolean whether to stage the file (false), or not (true, default).
arch optional Architecture restricted set of tokens, see schema definition file.
os optional OSType restricted set of tokens, see schema definition file.
osversion optional VersionPattern kernel version as beginning of `uname -r`.
glibc optional VersionPattern version of libc.

The rationale for giving these flags in the executable element header is that PFNs are just identical replicas or instances of a given LFN. If you need a different 32/64 bit-ed-ness or OS release, the underlying PFN would be different, and thus the LFN for it should be different, too.

Note

We are still discussing some details and implications of this decision.

The initial examples come with the same caveats as for the included replica catalog.

Warning

The metadata element is not support as of this writing! Details may change in the future.

Similar to the replica catalog, each executable element may have 0 or more profile elements abstracting away site-specific details, zero or more metadata elements, and zero or more pfn elements. If there are no pfn elements, the transformation must still be searched for in the external transformation catalog. As before, the pfn element may have profile children-elements, referring to attributes of the physical filename itself.

Each executable element may also feature invoke elements. These enable notifications at the appropriate point when every job that uses this executable reaches the point of notification. Please refer to the notification section for details and caveats.

The last example above comes from the black diamond example workflow, and presents the kind and extend of attributes you are most likely to see and use in your own workflows.

9.8.1.1.3.3. The Compound Transformation Section

The compound transformation section declares a transformation that comprises multiple plain transformation. You can think of a compound transformation like a script interpreter and the script itself. In order to properly run the application, you must start both, the script interpreter and the script passed to it. The compound transformation helps Pegasus to properly deal with this case, especially when it needs to stage executables.

  <transformation namespace="example" version="1.0" name="mDiffFit" >
    <uses name="mDiffFit" />
    <uses name="mDiff" namespace="example" version="2.0" />
    <uses name="mFitPlane" />
    <uses name="mDiffFit.config" executable="false" />
  </transformation>

A transformation element declares a set of purely logical entities, executables and config (data) files, that are all required together for the same job. Being purely logical entities, the lookup happens only when the transformation element is referenced (or instantiated) by a job element later on.

The namespace and version attributes of the transformation element are optional, and provide the defaults for the inner uses elements. They are also essential for matching the transformation with a job.

The transformation is made up of 1 or more uses element. Each uses has a boolean attribute executable, true by default, or false to indicate a data file. The name is a mandatory attribute, refering to an LFN declared previously in the File Catalog (executable is false), Executable Catalog (executable is true), or to be looked up as necessary at instantiation time. The lookup catalog is determined by the executable attribute.

After uses elements, any number of invoke elements may occur to add a notification each whenever this transformation is instantiated.

The namespace and version attributes' default values inside uses elements are inherited from the transformation attributes of the same name. There is no such inheritance for uses elements with executable attribute of false.

9.8.1.1.4. Graph Nodes

The nodes in the DAX comprise regular job nodes, already instantiated sub-workflows as dag nodes, and still to be instantiated dax nodes. Each of the graph nodes can has a mandatory id attribute. The id attribute is currently a restriction of type NodeIdentifierPattern type, which is a restriction of the xs:NMTOKEN type to letters, digits, hyphen and underscore.

The level attribute is deprecated, as the planner will trust its own re-computation more than user input. Please do not use nor produce any level attribute.

The node-label attribute is optional. It applies to the use-case when every transformation has the same name, but its arguments determine what it really does. In the presence of a node-label value, a workflow grapher could use the label value to show graph nodes to the user. It may also come in handy while debugging.

Any job-like graph node has the following set of children elements, as defined in the AbstractJobType declaration in the schema definition:

  • 0 or 1 argument element to declare the command-line of the job's invocation.

  • 0 or more profile elements to abstract away site-specific or job-specific details.

  • 0 or 1 stdin element to link a logical file the the job's standard input.

  • 0 or 1 stdout element to link a logical file to the job's standard output.

  • 0 or 1 stderr element to link a logical file to the job's standard error.

  • 0 or more uses elements to declare consumed data files and produced data files.

  • 0 or more invoke elements to solicit notifications whence a job reaches a certain state in its life-cycle.

9.8.1.1.4.1. Job Nodes

A job element has a number of attributes. In addition to the id and node-label described in (Graph Nodes)above, the optional namespace, mandatory name and optional version identify the transformation, and provide the look-up handle: first in the DAX's transformation elements, then in the executable elements, and finally in an external transformation catalog.

  <!-- part 2: definition of all jobs (at least one) -->
  <job id="ID000001" namespace="example" name="mDiffFit" version="1.0" 
       node-label="preprocess" >
    <argument>-a top -T 6  -i <file name="f.a"/>  -o <file name="f.b1"/></argument>

    <!-- profiles are optional -->
    <profile namespace="execution" key="site">isi_viz</profile>
    <profile namespace="condor" key="getenv">true</profile>

    <uses name="f.a" link="input"  register="false" transfer="true" type="data" />
    <uses name="f.b" link="output" register="false" transfer="true" type="data" />
    
    <!-- 'WHEN' enumeration: never, start, on_error, on_success, on_end, all -->
    <!-- PEGASUS_* env-vars: event, status, submit dir, wf/job id, stdout, stderr -->
    <invoke when="start">/path/to arg arg</invoke>
    <invoke when="on_success"><![CDATA[/path/to arg arg]]></invoke>
    <invoke when="on_end"><![CDATA[/path/to arg arg]]></invoke>
  </job>

The argument element contains the complete command-line that is needed to invoke the executable. The only variable components are logical filenames, as included file elements.

The profile argument lets you encapsulate site-specific knowledge .

The stdin, stdout and stderr element permits you to connect a stdio file descriptor to a logical filename. Note that you will still have to declare these files in the uses section below.

The uses element enumerates all the files that the task consumes or produces. While it is not necessary nor required to have all files appear on the command-line, it is imperative that you declare even hidden files that your task requires in this section, so that the proper ancilliary staging- and clean-up tasks can be generated during planning.

The invoke element may be specified multiple times, as needed. It has a mandatory when attribute with the following value set:

Table 9.17. 

keyword job life-cycle state meaning
never never (default). Never notify of anything. This is useful to temporarily disable an existing notifications.
start submit create a notification when the job is submitted.
on_error end after a job finishes with failure (exitcode != 0).
on_success end after a job finishes with success (exitcode == 0).
at_end end after a job finishes, regardless of exitcode.
all always like start and at_end combined.

Warning

In clustered jobs, a notification can only be sent at the start or end of the clustered job, not for each member.

Each invoke is a simple local invocation of an executable or script with the specified arguments. The executable inside the invoke body will see the following environment variables:

Table 9.18. 

variable job life-cycle state meaning
PEGASUS_EVENT always The value of the when attribute
PEGASUS_STATUS end The exit status of the graph node. Only available for end notifications.
PEGASUS_SUBMIT_DIR always In which directory to find the job (or workflow).
PEGASUS_JOBID always The job (or workflow) identifier. This is potentially more than merely the value of the id attribute.
PEGASUS_STDOUT always The filename where stdout goes. Empty and possibly non-existent at submit time (though we still have the filename). The kickstart record for job nodes.
PEGASUS_STDERR always The filename where stderr goes. Empty and possibly non-existent at submit time (though we still have the filename).

Generators should use CDATA encapsulated values to the invoke element to minimize interference. Unfortunately, CDATA cannot be nested, so if the user invocation contains a CDATA section, we suggest that they use careful XML-entity escaped strings. The notifications section describes these in further detail.

9.8.1.1.4.2. DAG Nodes

A workflow that has already been concretized, either by an earlier run of Pegasus, or otherwise constructed for DAGMan execution, can be included into the current workflow using the dag element.

  <dag id="ID000003" name="black.dag" node-label="foo" >
    <profile namespace="dagman" key="DIR">/dag-dir/test</profile>
    <invoke> <!-- optional, should be possible --> </invoke>
    <uses file="sites.xml" link="input" register="false" transfer="true" type="data"/>     
  </dag>

The id and node-label attributes were described previously. The name attribute refers to a file from the File Catalog that provides the actual DAGMan DAG as data content. The dag element features optional profile elements. These would most likely pertain to the dagman and env profile namespaces. It should be possible to have the optional notify element in the same manner as for jobs.

A graph node that is a dag instead of a job would just use a different submit file generator to create a DAGMan invocation. There can be an argument element to modify the command-line passed to DAGMan.

9.8.1.1.4.3. DAX Nodes

A still to be planned workflow incurs an invocation of the Pegasus planner as part of the workflow. This still abstract sub-workflow uses the dax element.

  <dax id="ID000002" name="black.dax" node-label="bar" >
    <profile namespace="env" key="foo">bar</profile>
    <argument>-Xmx1024 -Xms512 -Dpegasus.dir.storage=storagedir  -Dpegasus.dir.exec=execdir -o local --dir ./datafind -vvvvv --force -s dax_site </argument>
    <invoke> <!-- optional, may not be possible here --> </invoke>
    <uses file="sites.xml" link="input" register="false" transfer="true" type="data" />
  </dax>

In addition to the id and node-label attributes, See Graph Nodes. The name attribute refers to a file from the File Catalog that provides the to be planned DAX as external file data content. The dax element features optional profile elements. These would most likely pertain to the pegasus, dagman and env profile namespaces. It may be possible to have the optional notify element in the same manner as for jobs.

A graph node that is a dax instead of a job would just use yet another submit file and pre-script generator to create a DAGMan invocation. The argument string pertains to the command line of the to-be-generated DAGMan invocation.

9.8.1.1.4.4. Inner ADAG Nodes

While completeness would argue to have a recursive nesting of adag elements, such recursive nestings are currently not supported, not even in the schema. If you need to nest workflows, please use the dax or dag element to achieve the same goal.

9.8.1.1.5. The Dependency Section

This section describes the dependencies between the jobs.

  <!-- part 3: list of control-flow dependencies -->
  <child ref="ID000002">
    <parent ref="ID000001" edge-label="edge1" />
  </child>
  <child ref="ID000003">
    <parent ref="ID000001" edge-label="edge2" />
  </child>
  <child ref="ID000004">
    <parent ref="ID000002" edge-label="edge3" />
    <parent ref="ID000003" edge-label="edge4" />
  </child>

Each child element contains one or more parent element. Either element refers to a job, dag or dax element id attribute using the ref attribute. In this version, we relaxed the xs:IDREF constraint in favor of a restriction on the xs:NMTOKEN type to permit a larger set of identifiers.

The parent element has an optional edge-label attribute.

Warning

The edge-label attribute is currently unused.

Its goal is to annotate edges when drawing workflow graphs.

9.8.1.1.6. Closing

As any XML element, the root element needs to be closed.

</adag>

9.8.1.2. DAX XML Schema Example

The following code example shows the XML instance document representing the diamond workflow.

<?xml version="1.0" encoding="UTF-8"?>
<adag xmlns="http://pegasus.isi.edu/schema/DAX"
 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
 xsi:schemaLocation="http://pegasus.isi.edu/schema/DAX http://pegasus.isi.edu/schema/dax-3.3.xsd"
 version="3.3" name="diamond" index="0" count="1">
  <!-- part 1.1: invocations -->
  <invoke when="on_error">/bin/mailx -s &apos;diamond failed&apos; use@some.domain</invoke>

  <!-- part 1.2: included replica catalog -->
  <file name="f.a">
    <pfn url="file:///lfs/voeckler/src/svn/pegasus/trunk/examples/grid-blackdiamond-perl/f.a" site="local" />
  </file>

  <!-- part 1.3: included transformation catalog -->
  <executable namespace="diamond" name="preprocess" version="2.0" arch="x86_64" os="linux" installed="false">
    <profile namespace="globus" key="maxtime">2</profile>
    <profile namespace="dagman" key="RETRY">3</profile>
    <pfn url="file:///opt/pegasus/latest/bin/keg" site="local" />
  </executable>
  <executable namespace="diamond" name="analyze" version="2.0" arch="x86_64" os="linux" installed="false">
    <profile namespace="globus" key="maxtime">2</profile>
    <profile namespace="dagman" key="RETRY">3</profile>
    <pfn url="file:///opt/pegasus/latest/bin/keg" site="local" />
  </executable>
  <executable namespace="diamond" name="findrange" version="2.0" arch="x86_64" os="linux" installed="false">
    <profile namespace="globus" key="maxtime">2</profile>
    <profile namespace="dagman" key="RETRY">3</profile>
    <pfn url="file:///opt/pegasus/latest/bin/keg" site="local" />
  </executable>

  <!-- part 2: definition of all jobs (at least one) -->
  <job namespace="diamond" name="preprocess" version="2.0" id="ID000001">
    <argument>-a preprocess -T60 -i <file name="f.a" /> -o <file name="f.b1" /> <file name="f.b2" /></argument>
    <uses name="f.b2" link="output" register="false" transfer="true" />
    <uses name="f.b1" link="output" register="false" transfer="true" />
    <uses name="f.a" link="input" />
  </job>
  <job namespace="diamond" name="findrange" version="2.0" id="ID000002">
    <argument>-a findrange -T60 -i <file name="f.b1" /> -o <file name="f.c1" /></argument>
    <uses name="f.b1" link="input" register="false" transfer="true" />
    <uses name="f.c1" link="output" register="false" transfer="true" />
  </job>
  <job namespace="diamond" name="findrange" version="2.0" id="ID000003">
    <argument>-a findrange -T60 -i <file name="f.b2" /> -o <file name="f.c2" /></argument>
    <uses name="f.b2" link="input" register="false" transfer="true" />
    <uses name="f.c2" link="output" register="false" transfer="true" />
  </job>
  <job namespace="diamond" name="analyze" version="2.0" id="ID000004">
    <argument>-a analyze -T60 -i <file name="f.c1" /> <file name="f.c2" /> -o <file name="f.d" /></argument>
    <uses name="f.c2" link="input" register="false" transfer="true" />
    <uses name="f.d" link="output" register="false" transfer="true" />
    <uses name="f.c1" link="input" register="false" transfer="true" />
  </job>

  <!-- part 3: list of control-flow dependencies -->
  <child ref="ID000002">
    <parent ref="ID000001" />
  </child>
  <child ref="ID000003">
    <parent ref="ID000001" />
  </child>
  <child ref="ID000004">
    <parent ref="ID000002" />
    <parent ref="ID000003" />
  </child>
</adag>

The above workflow defines the black diamond from the abstract workflow section of the Introduction chapter. It will require minimal configuration, because the catalog sections include all necessary declarations.

The file element defines the location of the required input file in terms of the local machine. Please note that

  • The file element declares the required input file "f.a" in terms of the local machine. Please note that if you plan the workflow for a remote site, the has to be some way for the file to be staged from the local site to the remote site. While Pegasus will augment the workflow with such ancillary jobs, the site catalog as well as local and remote site have to be set up properlyl. For a locally run workflow you don't need to do anything.

  • The executable elements declare the same executable keg that is to be run for each the logical transformation in terms of the remote site futuregrid. To declare it for a local site, you would have to adjust the site attribute's value to local. This section also shows that the same executable may come in different guises as transformation.

  • The job elements define the workflow's logical constituents, the way to invoke the keg command, where to put filenames on the commandline, and what files are consumed or produced. In addition to the direction of files, further attributes determine whether to register the file with a replica catalog and whether to transfer it to the output site in case of a product. We are only interested in the final data product "f.d" in this workflow, and not any intermediary files. Typically, you would also want to register the data products in the replica catalog, especially in larger scenarios.

  • The child elements define the control flow between the jobs.

9.8.2. DAX Generator API

The DAX generating APIs support Java, Perl and Python. This section will show in each language the necessary code, using Pegasus-provided libraries, to generate the diamond DAX example above. There may be minor differences in details, e.g. to show-case certain features, but effectively all generate the same basic diamond.

9.8.2.1. The Java DAX Generator API

The Java DAX API provided with the Pegasus distribution allows easy creation of complex and huge workflows. This API is used by several applications to generate their abstract DAX. SCEC, which is Southern California Earthquake Center, uses this API in their CyberShake workflow generator to generate huge DAX containing 10&rsquor;s of thousands of tasks with 100&rsquor;s of thousands of input and output files. The Java API is well documented using Javadoc for ADAGs .

The steps involved in creating a DAX using the API are

  1. Create a new ADAG object

  2. Add any Workflow notification elements

  3. Create File objects as necessary. You can augment the files with physical information, if you want to include them into your DAX. Otherwise, the physical information is determined from the replica catalog.

  4. (Optional) Create Executable objects, if you want to include your transformation catalog into your DAX. Otherwise, the translation of a job/task into executable location happens with the transformation catalog.

  5. Create a new Job object.

  6. Add arguments, files, profiles, notifications and other information to the Job object

  7. Add the job object to the ADAG object

  8. Repeat step 4-6 as necessary.

  9. Add all dependencies to the ADAG object.

  10. Call the writeToFile() method on the ADAG object to render the XML DAX file.

An example Java code that generates the diamond dax show above is listed below. This same code can be found in the Pegasus distribution in the examples/grid-blackdiamond-java directory as BlackDiamonDAX.java:

/**
 *  Copyright 2007-2008 University Of Southern California
 *
 *  Licensed under the Apache License, Version 2.0 (the "License");
 *  you may not use this file except in compliance with the License.
 *  You may obtain a copy of the License at
 *
 *  http://www.apache.org/licenses/LICENSE-2.0
 *
 *  Unless required by applicable law or agreed to in writing,
 *  software distributed under the License is distributed on an "AS IS" BASIS,
 *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 *  See the License for the specific language governing permissions and
 *  limitations under the License.
 */

import edu.isi.pegasus.planner.dax.*;

public class BlackDiamondDAX {

    /**
     * Create an example DIAMOND DAX
     * @param args
     */
    public static void main(String[] args) {
        if (args.length != 3) {
            System.out.println("Usage: java ADAG <site_handle> <pegasus_location> <filename.dax>");
            System.exit(1);
        }

        try {
            Diamond(args[0], args[1]).writeToFile(args[2]);
        }
        catch (Exception e) {
            e.printStackTrace();
        }

    }

    private static ADAG Diamond(String site_handle, String pegasus_location) throws Exception {

        java.io.File cwdFile = new java.io.File (".");
        String cwd = cwdFile.getCanonicalPath(); 

        ADAG dax = new ADAG("blackdiamond");
        dax.addNotification(When.start,"/pegasus/libexec/notification/email -t notify@example.com");
        dax.addNotification(When.at_end,"/pegasus/libexec/notification/email -t notify@example.com");
        File fa = new File("f.a");
        fa.addPhysicalFile("file://" + cwd + "/f.a", "local");
        dax.addFile(fa);

        File fb1 = new File("f.b1");
        File fb2 = new File("f.b2");
        File fc1 = new File("f.c1");
        File fc2 = new File("f.c2");
        File fd = new File("f.d");
        fd.setRegister(true);

        Executable preprocess = new Executable("pegasus", "preprocess", "4.0");
        preprocess.setArchitecture(Executable.ARCH.X86).setOS(Executable.OS.LINUX);
        preprocess.setInstalled(true);
        preprocess.addPhysicalFile("file://" + pegasus_location + "/bin/keg", site_handle);

        Executable findrange = new Executable("pegasus", "findrange", "4.0");
        findrange.setArchitecture(Executable.ARCH.X86).setOS(Executable.OS.LINUX);
        findrange.setInstalled(true);
        findrange.addPhysicalFile("file://" + pegasus_location + "/bin/keg", site_handle);

        Executable analyze = new Executable("pegasus", "analyze", "4.0");
        analyze.setArchitecture(Executable.ARCH.X86).setOS(Executable.OS.LINUX);
        analyze.setInstalled(true);
        analyze.addPhysicalFile("file://" + pegasus_location + "/bin/keg", site_handle);

        dax.addExecutable(preprocess).addExecutable(findrange).addExecutable(analyze);

        // Add a preprocess job
        Job j1 = new Job("j1", "pegasus", "preprocess", "4.0");
        j1.addArgument("-a preprocess -T 60 -i ").addArgument(fa);
        j1.addArgument("-o ").addArgument(fb1);
        j1.addArgument(" ").addArgument(fb2);
        j1.uses(fa, File.LINK.INPUT);
        j1.uses(fb1, File.LINK.OUTPUT);
        j1.uses(fb2, File.LINK.OUTPUT);
        j1.addNotification(When.start,"/pegasus/libexec/notification/email -t notify@example.com");
        j1.addNotification(When.at_end,"/pegasus/libexec/notification/email -t notify@example.com");
        dax.addJob(j1);

        // Add left Findrange job
        Job j2 = new Job("j2", "pegasus", "findrange", "4.0");
        j2.addArgument("-a findrange -T 60 -i ").addArgument(fb1);
        j2.addArgument("-o ").addArgument(fc1);
        j2.uses(fb1, File.LINK.INPUT);
        j2.uses(fc1, File.LINK.OUTPUT);
        j2.addNotification(When.start,"/pegasus/libexec/notification/email -t notify@example.com");
        j2.addNotification(When.at_end,"/pegasus/libexec/notification/email -t notify@example.com");
        dax.addJob(j2);

        // Add right Findrange job
        Job j3 = new Job("j3", "pegasus", "findrange", "4.0");
        j3.addArgument("-a findrange -T 60 -i ").addArgument(fb2);
        j3.addArgument("-o ").addArgument(fc2);
        j3.uses(fb2, File.LINK.INPUT);
        j3.uses(fc2, File.LINK.OUTPUT);
        j3.addNotification(When.start,"/pegasus/libexec/notification/email -t notify@example.com");
        j3.addNotification(When.at_end,"/pegasus/libexec/notification/email -t notify@example.com");
        dax.addJob(j3);

        // Add analyze job
        Job j4 = new Job("j4", "pegasus", "analyze", "4.0");
        j4.addArgument("-a analyze -T 60 -i ").addArgument(fc1);
        j4.addArgument(" ").addArgument(fc2);
        j4.addArgument("-o ").addArgument(fd);
        j4.uses(fc1, File.LINK.INPUT);
        j4.uses(fc2, File.LINK.INPUT);
        j4.uses(fd, File.LINK.OUTPUT);
        j4.addNotification(When.start,"/pegasus/libexec/notification/email -t notify@example.com");
        j4.addNotification(When.at_end,"/pegasus/libexec/notification/email -t notify@example.com");
        dax.addJob(j4);

        dax.addDependency("j1", "j2");
        dax.addDependency("j1", "j3");
        dax.addDependency("j2", "j4");
        dax.addDependency("j3", "j4");
        return dax;
    }
}

Of course, you will have to set up some catalogs and properties to run this example. The details are catpured in the examples directory examples/grid-blackdiamond-java.

9.8.2.2. The Python DAX Generator API

Refer to the auto-generated python documentation explaining this API.

#!/usr/bin/env python

from Pegasus.DAX3 import *
import sys
import os

if len(sys.argv) != 2:
        print "Usage: %s PEGASUS_HOME" % (sys.argv[0])
        sys.exit(1)

# Create a abstract dag
diamond = ADAG("diamond")

# Add input file to the DAX-level replica catalog
a = File("f.a")
a.addPFN(PFN("file://" + os.getcwd() + "/f.a", "local"))
diamond.addFile(a)
        
# Add executables to the DAX-level replica catalog
# In this case the binary is keg, which is shipped with Pegasus, so we use
# the remote PEGASUS_HOME to build the path.
e_preprocess = Executable(namespace="diamond", name="preprocess", version="4.0", os="linux", arch="x86_64")
e_preprocess.addPFN(PFN("file://" + sys.argv[1] + "/bin/keg", "TestCluster"))
diamond.addExecutable(e_preprocess)
        
e_findrange = Executable(namespace="diamond", name="findrange", version="4.0", os="linux", arch="x86_64")
e_findrange.addPFN(PFN("file://" + sys.argv[1] + "/bin/keg", "TestCluster"))
diamond.addExecutable(e_findrange)
        
e_analyze = Executable(namespace="diamond", name="analyze", version="4.0", os="linux", arch="x86_64")
e_analyze.addPFN(PFN("file://" + sys.argv[1] + "/bin/keg", "TestCluster"))
diamond.addExecutable(e_analyze)

# Add a preprocess job
preprocess = Job(namespace="diamond", name="preprocess", version="4.0")
b1 = File("f.b1")
b2 = File("f.b2")
preprocess.addArguments("-a preprocess","-T60","-i",a,"-o",b1,b2)
preprocess.uses(a, link=Link.INPUT)
preprocess.uses(b1, link=Link.OUTPUT)
preprocess.uses(b2, link=Link.OUTPUT)
diamond.addJob(preprocess)

# Add left Findrange job
frl = Job(namespace="diamond", name="findrange", version="4.0")
c1 = File("f.c1")
frl.addArguments("-a findrange","-T60","-i",b1,"-o",c1)
frl.uses(b1, link=Link.INPUT)
frl.uses(c1, link=Link.OUTPUT)
diamond.addJob(frl)

# Add right Findrange job
frr = Job(namespace="diamond", name="findrange", version="4.0")
c2 = File("f.c2")
frr.addArguments("-a findrange","-T60","-i",b2,"-o",c2)
frr.uses(b2, link=Link.INPUT)
frr.uses(c2, link=Link.OUTPUT)
diamond.addJob(frr)

# Add Analyze job
analyze = Job(namespace="diamond", name="analyze", version="4.0")
d = File("f.d")
analyze.addArguments("-a analyze","-T60","-i",c1,c2,"-o",d)
analyze.uses(c1, link=Link.INPUT)
analyze.uses(c2, link=Link.INPUT)
analyze.uses(d, link=Link.OUTPUT, register=True)
diamond.addJob(analyze)

# Add control-flow dependencies
diamond.depends(parent=preprocess, child=frl)
diamond.depends(parent=preprocess, child=frr)
diamond.depends(parent=frl, child=analyze)
diamond.depends(parent=frr, child=analyze)

# Add notification for analyze job
analyze.invoke(When.ON_ERROR, '/home/user/bin/email -s "Analyze job failed" user@example.com')

# Add notification for workflow
diamond.invoke(When.AT_END, '/home/user/bin/email -s "Workflow finished" user@example.com')
diamond.invoke(When.ON_SUCCESS, '/home/user/bin/publish_workflow_result')

# Write the DAX to stdout
diamond.writeXML(sys.stdout)

9.8.2.3. The Perl DAX Generator

The Perl API example below can be found in file blackdiamond.pl in directory examples/grid-blackdiamond-perl. It requires that you set the environment variable PEGASUS_HOME to the installation directory of Pegasus, and include into PERL5LIB the path to the directory lib/perl of the Pegasus installation. The actual code is longer, and will not require these settings, only the example below does. The Perl API is documented using perldoc. For each of the modules you can invoke perldoc, if your PERL5LIB variable is set.

The steps to generate a DAX from Perl are similar to the Java steps. However, since most methods to the classes are deeply within the Perl class modules, the convenience module Perl::DAX::Factory makes most constructors accessible without you needing to type your fingers raw:

  1. Create a new ADAG object.

  2. Create Job objects as necessary.

  3. As example, the required input file "f.a" is declared as File object and linked to the ADAG object.

  4. The first job arguments and files are filled into the job, and the job is added to the ADAG object.

  5. Repeat step 4 for the remaining jobs.

  6. Add dependencies for all jobs. You have the option of assigning label text to edges, though these are not used (yet).

  7. To generate the DAX file, invoke the toXML() method on the ADAG object. The first argument is an opened file handle or IO::Handle descriptor scalar to write to, the second the default indentation for the root element, and the third the XML namespace to use for elements and attributes. The latter is typically unused unless you want to include your output into another XML document.

#!/usr/bin/env perl
#
use 5.006;
use strict;
use IO::Handle;
use Cwd;
use File::Spec;
use File::Basename;
use Sys::Hostname;
use POSIX ();

BEGIN { $ENV{'PEGASUS_HOME'} ||= `pegasus-config --nocrlf --home` }
use lib File::Spec->catdir( $ENV{'PEGASUS_HOME'}, 'lib', 'perl' );

use Pegasus::DAX::Factory qw(:all);
use constant NS => 'diamond';

my $adag = newADAG( name => NS );
my $job1 = newJob( namespace => NS, name => 'preprocess', version => '2.0' );
my $job2 = newJob( namespace => NS, name => 'findrange', version => '2.0' );
my $job3 = newJob( namespace => NS, name => 'findrange', version => '2.0' );
my $job4 = newJob( namespace => NS, name => 'analyze', version => '2.0' );

# create "f.a" locally
my $fn = "f.a";
open( F, ">$fn" ) || die "FATAL: Unable to open $fn: $!\n";
my @now = gmtime();
printf F "%04u-%02u-%02u %02u:%02u:%02uZ\n",
        $now[5]+1900, $now[4]+1, @now[3,2,1,0];
close F;

my $file = newFile( name => 'f.a' );
$file->addPFN( newPFN( url => 'file://' . Cwd::abs_path($fn),
                       site => 'local' ) );
$adag->addFile($file);

# follow this path, if the PEGASUS_HOME was determined
if ( exists $ENV{'PEGASUS_HOME'} ) {
    my $keg = File::Spec->catfile( $ENV{'PEGASUS_HOME'}, 'bin', 'keg' );
    my @os = POSIX::uname();
    # $os[2] =~ s/^(\d+(\.\d+(\.\d+)?)?).*/$1/;  ## create a proper osversion
    $os[4] =~ s/i.86/x86/;

    # add Executable instances to DAX-included TC. This will only work,
    # if we know how to access the keg executable. HOWEVER, for a grid
    # workflow, these entries are not used, and you need to
    # [1] install the work tools remotely
    # [2] create a TC with the proper entries
    if ( -x $keg ) {
        for my $j ( $job1, $job2, $job4 ) {
            my $app = newExecutable( namespace => $j->namespace,
                                     name => $j->name,
                                     version => $j->version,
                                     installed => 'false',
                                     arch => $os[4],
                                     os => lc($^O) );
            $app->addProfile( 'globus', 'maxtime', '2' );
            $app->addProfile( 'dagman', 'RETRY', '3' );
            $app->addPFN( newPFN( url => "file://$keg", site => 'local' ) );
            $adag->addExecutable($app);
        }
    }
}

my %hash = ( link => LINK_OUT, register => 'false', transfer => 'true' );
my $fna = newFilename( name => $file->name, link => LINK_IN );
my $fnb1 = newFilename( name => 'f.b1', %hash );
my $fnb2 = newFilename( name => 'f.b2', %hash );
$job1->addArgument( '-a', $job1->name, '-T60', '-i', $fna,
                    '-o', $fnb1, $fnb2 );
$adag->addJob($job1);

my $fnc1 = newFilename( name => 'f.c1', %hash );
$fnb1->link( LINK_IN );
$job2->addArgument( '-a', $job2->name, '-T60', '-i', $fnb1,
                    '-o', $fnc1 );
$adag->addJob($job2);

my $fnc2 = newFilename( name => 'f.c2', %hash );
$fnb2->link( LINK_IN );
$job3->addArgument( '-a', $job3->name, '-T60', '-i', $fnb2,
                    '-o', $fnc2 );
$adag->addJob($job3);
# a convenience function -- you can specify multiple dependents
$adag->addDependency( $job1, $job2, $job3 );

my $fnd = newFilename( name => 'f.d', %hash );
$fnc1->link( LINK_IN );
$fnc2->link( LINK_IN );
$job4->separator('');                # just to show the difference wrt default
$job4->addArgument( '-a ', $job4->name, ' -T60 -i ', $fnc1, ' ', $fnc2,
                    ' -o ', $fnd );
$adag->addJob($job4);
# this is a convenience function adding parents to a child.
# it is clearer than overloading addDependency
$adag->addInverse( $job4, $job2, $job3 );

# workflow level notification in case of failure
# refer to Pegasus::DAX::Invoke for details
my $user = $ENV{USER} || $ENV{LOGNAME} || scalar getpwuid($>);
$adag->invoke( INVOKE_ON_ERROR,
               "/bin/mailx -s 'blackdiamond failed' $user" );

my $xmlns = shift;
$adag->toXML( \*STDOUT, '', $xmlns );

9.8.3. DAX Generator without a Pegasus DAX API

If you are using some other scripting or programming environment, you can directly write out the DAX format using the provided schema using any language. For instance, LIGO, the Laser Interferometer Gravitational Wave Observatory, generate their DAX files as XML using their own Python code, not using our provided API.

If you write your own XML, you must ensure that the generated XML is well formed and valid with respect to the DAX schema. You can use the pegasus-dax-validator to verify the validity of your generated file. Typically, you generate a smallish test file to, validate that your generator creates valid XML using the validator, and then ramp it up to produce the full workflow(s) you want to run. At this point the pegasus-dax-validator is a very simple program that will only take exactly one argument, the name of the file to check.The following snippet checks a black-diamond file that uses an improper osversion attribute in its executable element:

$ pegasus-dax-validator blackdiamond.dax
ERROR: cvc-pattern-valid: Value '2.6.18-194.26.1.el5' is not facet-valid
 with respect to pattern '[0-9]+(\.[0-9]+(\.[0-9]+)?)?' for type 'VersionPattern'.
ERROR: cvc-attribute.3: The value '2.6.18-194.26.1.el5' of attribute 'osversion'
 on element 'executable' is not valid with respect to its type, 'VersionPattern'.

0 warnings, 2 errors, and 0 fatal errors detected.

We are working on improving this program, e.g. provide output with regards to the line number where the issue occurred. However, it will return with a non-zero exit code whenever errors were detected.

9.9. Command Line Tools

This chapter contains reference material for all the command-line tools distributed with Pegasus.

9.9.1. pegasus-version

pegasus-version is a simple command-line tool that reports the version number of the Pegasus distribution being used.

In its most basic invocation, it will show the current version of the Pegasus software you have installed:

$ pegasus-version
3.1.0cvs

If you want to know more details about the installed version, i.e. which system it was compiled for and when, use the long or full mode:

$ pegasus-version -f
3.1.0cvs-x86_64_cent_5.6-20110706191019Z

The reported version may sometimes not be the version you would expect, if the Pegasus jar file got updated but not the remainder of the installation environment. To check this case, you use match mode:

$ pegasus-version -m
Compiled into PEGASUS: 20110706191019Z x86_64_cent_5.6
Installation provides: 20110706191019Z x86_64_cent_5.6
OK: Internal version matches installation.
Complete version info: 3.1.0cvs-x86_64_cent_5.6-20110706191019Z

The match mode implies long mode, and will thus show the full version as part of its output.

In quiet mode, which can only be applied to match mode, no output is written unless there is an error. You would use quiet mode to check the exit code of pegasus-version to determine a problem while being in a scripted environment.

$ pegasus-version -mq
$ echo $?
0

The manual page for pegasus-version will show more details, and long options availble to the user.

9.9.2. pegasus-plan

pegasus-plan generates an executable workflow from an abstract workflow description (DAX).

9.9.2.1. SYNOPSIS

pegasus-plan -h|--help

pegasus-plan -V|--version

pegasus-plan [-Dprop [..]] -d <dax file> [-b prefix] [--conf <path to properties file>] [-c f1[,f2[..]]] [-C <clustering technique>] [--dir <base directory for o/p files>] [-f] [--force-replan] [ --inherited-rc-files] [-j job-prefix] [-n] [-o <out- put site>] [-r[directoryname]] [--relative-dir <relative directory to base directory>] [--relative-submit-dir <relative sub- mit directory to the base directory>] [-s site1[,site2[..]]] [-v] [-q] [-V] [-h]

9.9.2.2. DESCRIPTION

The pegasus-plan command takes in as input the DAX and generates an executable workflow usually in form of condor submit files, which can be submitted to an execution site for execution.

As part of generating the executable workflow, the planner needs to discover

  • data

    The Pegasus Workflow Planner ensures that all the data required for the execution of the executable workflow is transferred to the execution site by adding transfer nodes at appropriate points in the DAG. This is done by looking up an appropriate Replica Catalog to determine the locations of the input files for the various jobs. At present the default replica mechanism used is RLS .

    The Pegasus Workflow Planner also tries to reduce the workflow, unless specified otherwise. This is done by deleting the jobs whose output files have been found in some location in the Replica Catalog . At present no cost metrics are used. However preference is given to a location corresponding to the execution site.

    The planner can also add nodes to transfer all the materialized files to an output site. The location on the output site is determined by looking up the site catalog file, the path to which is picked up from the pegasus.catalog.site.file property value.

  • executables

    The planner looks up a Transformation Catalog to discover locations of the executables referred to in the executable workflow. Users can specify INSTALLED or STAGEABLE executables in the catalog. Stageable executables can be used by Pegasus to stage executables to resources where they are not pre-installed.

  • resources

    The layout of the sites , where Pegasus can schedule jobs of a workflow are described in the Site Catalog. The planner looks up the site catalog to determine for a site what directories a job can be executed in, what servers to use for staging in and out data and what jobmanagers ( if applicable) can be used for submitting jobs.

The data and executable locations can now be specified in DAX'es conforming to DAX schema version 3.2 or higher.

9.9.2.3. ARGUMENTS

Any option will be displayed with its long options synonym(s).

  • -Dprop

    The -D options allows an experienced user to override certain properties which influence the program execution, among them the default location of the user's properties file and the PEGASUS home location. One may set several CLI properties by giving this option multiple times. The -D option(s) must be the first option on the command line. A CLI property take precedence over the properties file property of the same key.

  • -d filename

    --dax filename

    The DAX is the XML input file that describes an abstract workflow.

    This is a mandatory option, which has to be used.

  • -b prefix

    --basename prefix

    The basename prefix to be used while constructing per workflow files like the dagman file (.dag file) and other work- flow specific files that are created by Condor. Usually this prefix, is taken from the name attribute specified in the root element of the dax files.

  • -c list of cache files

    --cache list of cache files

    A comma separated list of paths to replica cache files that override the results from the replica catalog for a particular lfn.

    Each entry in the cache file describes a LFN , the corresponding PFN and the associated attributes. The pool attribute should be specified for each entry.

    LFN_1 PFN_1 pool=[site handle 1]
    LFN_2 PFN_2 pool=[site handle 2]
    ...
    LFN_N PFN_N [site handle N]

    To treat the cache files as supplemental replica catalogs set the property pegasus.catalog.replica.cache.asrc to true. This results in the mapping in the cache files to be merged with the mappings in the replica catalog. Thus, for a particular lfn both the entries in the cache file and replica catalog are available for replica selection.

  • -C comma separated list of clustering styles

    --cluster comma separated list of clustering styles

    This mode of operation results in clustering of n compute jobs into a larger jobs to reduce remote scheduling overhead. You can specify a list of clustering techniques to recursively apply them to the workflow. For example, this allows you to cluster some jobs in the workflow using horizontal clustering and then use label based clustering on the intermediate workflow to do vertical clustering.

    The clustered jobs can be run at the remote site, either sequentially or by using mpi. This can be specified by setting the property pegasus.job.aggregator. The property can be overridden by associating the PEGASUS profile key collapser either with the transformation in the transformation catalog or the execution site in the site catalog. The value specified (to the property or the profile), is the logical name of the transformation that is to be used for clustering jobs. Note that clustering will only happen if the corresponding transformations are catalogued in the transformation catalog.

    PEGASUS ships with a clustering executable seqexec that can be found in $PEGASUS_HOME/bin directory. It runs the jobs in the clustered job sequentially on the same node at the remote site.

    In addition, a mpi wrapper mpiexec is distributed as source with the PEGASUS. It can be found in $PEGASUS_HOME/src/tools/cluster directory. The wrapper is run on every mpi node, with the first one being the master and the rest of the ones as workers. The number of instances of mpiexec that are invoked is equal to the value of the globus rsl key nodecount. The master distributes the smaller constituent jobs to the workers. For e.g. If there were 10 jobs in the clustered job and nodecount was 5, then one node acts as master, and the 10 jobs are distributed amongst the 4 slaves on demand. The master hands off a job to the slave node as and when it gets free. So initially all the 4 nodes are given a single job each, and then as and when they get done are handed more jobs till all the 10 jobs have been executed.

    By default, seqexec is used for clustering jobs unless overridden in the properties or by the pegasus profile key collapser.

    The following type of clustering styles are currently supported

    1. horizontal

      is the style of clustering in which jobs on the same level are aggregated into larger jobs. A level of the workflow is defined as the greatest distance of a node, from the root of the workflow. Clustering occurs only on jobs of the same type i.e they refer to the same logical transformation in the transformation catalog.

      The granularity of clustering can be specified by associating either the PEGASUS profile key clusters.size or the PEGASUS profile key clusters.num with the transformation. The clusters.size key indicates how many jobs need to be clustered into the larger clustered job. The clusters.num key indicates how many clustered jobs are to be created for a particular level at a particular execution site. If both keys are specified for a particular transformation, then the clusters.num key value is used to determine the clustering granularity.

    2. label

      is the style of clustering in which you can label the jobs in your workflow. The jobs with the same level are put in the same clustered job. This allows you to aggregate jobs across levels, or in a manner that is best suited to your application.

      To label the workflow, you need to associate PEGASUS profiles with the jobs in the DAX. The profile key to use for labelling the workflow can be set by the property pegasus.clusterer.label.key . It defaults to label, meaning if you have a PEGASUS profile key label with jobs, the jobs with the same value for the pegasus profile key label will go into the same clustered job.

  • --conf path to properties file

    The path to properties file that contains the properties planner needs to use while planning the workflow.

  • --dir dir name

    The base directory where you want the output of the Pegasus Workflow Planner usually condor submit files, to be generated. Pegasus creates a directory structure in this base directory on the basis of username, VO Group and the label of the workflow in the DAX.

    By default the base directory is the directory from which one runs the pegasus-plan command.

  • -f

    --force

    This bypasses the reduction phase in which the abstract DAG is reduced, on the basis of the locations of the output files returned by the replica catalog. This is analogous to a make style generation of the executable workflow.

  • --force-replan

    By default, for hierarchal workflows if a dax job fails, then on job retry the rescue dag of the associated workflow is submitted. This option causes Pegasus to replan the dax job in case of failure instead.

  • -g

    --group

    The VO Group to which the user belongs to.

  • -h

    --help displays the options to pegasus-plan command.

  • --inherited-rc-files comma separated list of replica catalog files

    A comma separated list of paths to replica files. Locations mentioned in these have a lower priority than the locations in the DAX file. This option is usually used internally for hierarichal workflows, where the file locations mentioned in the parent ( encompassing) workflow DAX, passed to the sub workflows ( corresponding) to the dax jobs.

  • -j

    --j

    The job prefix to be applied for constructing the filenames for the job submit files.

  • -n

    --no-cleanup

    This results in the generation of the separate cleanup workflow that removes the directories created during the execution of the executable workflow. The cleanup workflow is to be submitted after the executable workflow has finished. If this option is not specified, then Pegasus adds cleanup nodes to the executable workflow itself that cleanup files on the remote sites when they are no longer required.

  • -o output site

    --output output site

    The output site where all the materialized data is transferred to.

    By default the materialized data remains in the working directory on the execution site where it was created. Only those output files are transferred to an output site for which transfer attribute is set to true in the DAX.

  • -q

    --quiet

    decreases the logging level

  • --relative-dir dir name

    The directory relative to the base directory where the executable workflow it to be generated and executed. This over- rides the default directory structure that Pegasus creates based on username, VO Group and the DAX label.

  • --relative-submit-dir dir name

    The directory relative to the base directory where the executable workflow it to be generated. This overrides the default directory structure that Pegasus creates based on username, VO Group and the DAX label. By specifying --relative-dir and --relative-submit-dir you can have different relative execution directory on the remote site and different relative sub- mit directory on the submit host.

  • -s list of execution sites

    --sites list of execution sites

    A comma separated list of execution sites on which the workflow is to be executed. Each of the sites should have an entry in the site catalog, that is being used. To run on the submit host, specify the execution site as local .

    In case this option is not specified, all the sites in the site catalog are picked up as candidates for running the work- flow.

  • -s

    --submit

    Submits the generated executable workflow using pegasus-run script in $PEGASUS_HOME/bin directory.

    By default, the Pegasus Workflow Planner only generates the Condor submit files and does not submit them.

  • -v

    --verbose

    increases the verbosity of messages about what is going on.

    By default, all FATAL, ERROR, CONSOLE and WARN messages are logged.

    The logging hierarchy is as follows

    • FATAL

    • ERROR

    • CONSOLE

    • WARN

    • INFO

    • CONFIG

    • DEBUG

    • TRACE

    For example, to see the INFO, CONFIG and DEBUG messages additionally, set -vvv.

  • -V

    --version

    Displays the current version number of the Pegasus Workflow Management System.

9.9.2.4. RETURN VALUE

If the Pegasus Workflow Planner is able to generate an executable workflow successfully, the exitcode will be 0. All runtime errors result in an exitcode of 1. This is usually in the case when you have mis-configured your catalogs etc. In the case of an error occurring while loading a specific module implementation at run time, the exitcode will be 2. This is usually due to factory methods failing while loading a module. In case of any other error occurring during the running of the command, the exit- code will be 1. In most cases, the error message logged should give a clear indication as to where things went wrong.

9.9.2.5. PEGASUS PROPERTIES

This is not an exhaustive list of properties used. For the complete description and list of properties refer to $PEGASUS_HOME/doc/advanced-properties.pdf or the properties chapter.

  • pegasus.catalog.replica

    Specifies the type of replica catalog to be used. If not specified, then RLS is used as a Replica Catalog Backend.

  • pegasus.catalog.replica.url

    Contact string to access the replica catalog. In case of RLS it is the RLI url. I

  • pegasus.dir.exec

    A suffix to the workdir in the site catalog to determine the current working directory. If relative, the value will be appended to the working directory from the site.config file. If absolute it constitutes the working directory.

  • pegasus.catalog.transformation

    Specifies the type of transformation catalog to be used. One can use either a file based or a database based transforma- tion catalog. At present the default is Text .

  • pegasus.catalog.transformation.file

    The location of file to use as transformation catalog.

  • pegasus.catalog.site

    Specifies the type of site catalog to be used. At present the default is XML3 .

  • pegasus.catalog.site.file

    The location of file to use as a site catalog. If not specified, then default value of $PEGASUS_HOME/etc/sites.xml is used in case of the xml based site catalog and $PEGASUS_HOME/etc/sites.txt in case of the text based site catalog.

  • pegasus.code.generator

    The code generator to use. By default, Condor submit files are generated for the executable workflow. Setting to Shell results in Pegasus generating a shell script that can be executed on the submit host.

9.9.2.6. FILES

  • $PEGASUS_HOME/etc/dax-3.2.xsd

    It is the suggested location of the latest DAX schema to produce DAX output.

  • $PEGASUS_HOME/etc/tc.data.text

    is the suggested location for the file corresponding to the Transformation Catalog.

  • $PEGASUS_HOME/etc/sc-3.0.xsd

    is the suggested location of the latest Site Catalog schema that is used to create the XML3 version of the site catalog

  • $PEGASUS_HOME/etc/sites.xml3 | $PEGASUS_HOME/etc/sites.xml

    is the suggested location for the file containing the site information.

  • $PEGASUS_HOME/lib/pegasus.jar

    contains all compiled Java bytecode to run the Pegasus Workflow Planner.

9.9.3. pegasus-run

pegasus-run executes a workflow that has been planned using pegasus-plan.

9.9.3.1. SYNTAX

pegasus-run [options] [rundir]

9.9.3.2. DESCRIPTION

The pegasus-run command executes a workflow that has been planned using pegasus-plan. By default pegasus-run can be invoked either in the planned directory with no options and arguments or just the full path to the run directory. pegasus-run also can be used to resubmit a failed workflow by running the same command again.

9.9.3.3. ARGUMENTS

By default pegasus-run does not require any options or arguments if invoked from within the planned workflow directory. If running the command outside the workflow directory then a full path to the workflow directory needs to be specified.

pegasus-run takes the following options

  • -Dpropkey=propvalue

    The -D options allows an advanced user to override certain properties which influence pegasus-run. One may set several CLI properties by giving this option multiple times. The -D option(s) must be the first option on the command line. CLI properties take precedence over the file-based properties of the same key.

  • -c pegasus_properties_file

    --conf pegasus_properties_file

    Provide a property file to override the default pegasus properties file from the planning directory. Ordinary users do not need to use this option unless the specifically want to override several properties

  • -d

    --debug level

    Set the debug level for the client. Default is 0.

  • -v

    --verbose

    Raises debug level. Each invocation increase the level by 1.

  • --grid

    Enable grid checks to see if your submit machine is GRID enabled.

  • rundir

    Is the full qualified path to the base directory containing the planned workflow dag and submit files. This is optional if pegasus-run command is invoked from within the run directory.

9.9.3.4. RETURN VALUE

If the workflow is submitted for execution pegasus-run returns with an exit code of 0. However, in case of error, a non-zero exit code indicates problems. An error message clearly marks the cause.

9.9.3.5. FILES AND DIRECTORIES

The following files are created, opened or written to.

  • braindump

    This file is located in the rundir. pegasus-run uses this file to find out paths to several other files, properties configurations etc

  • pegasus.?????????.properties

    This file is located in the rundir. pegasus-run uses this properties file by default to configure its internal settings.

  • workflowname.dag

    pegasus-run uses the workflowname.dag or workflowname.sh file and submits it either to condor for execution or runs it locally in a shell environment

9.9.3.6. PROPERTIES

pegasus-run reads its properties from several locations. By default the properties are read from the file RUNDIR/pegasus.??????????.properties. If the --conf option is provided then the properties file provided in the conf option is used. If both the default properties file in the rundir as well as --conf file is not found or provided then the properties file located at $HOME/.pegasusrc will be used. Additionally properties can be provided individually using the -D<key>=<value> option on the command line before all other options. These properties will override properties provided using either --conf or RUNDIR/pegasus.???????.properties or the $HOME/.pegasusrc

The merge logic is CONF PROPERTIES || DEFAULT RUNDIR PROPERTIES || PEGASUSRC overriden by Command line properties

9.9.3.7. ENVIRONMENT VARIABLES

The following environment variables are used by pegasus-run

  • PATH

    The path variable is used to locate binaries for condor-submit-dag, condor-dagman, condor-submit,pegasus-submit-dag, pegasus-dagman and pegasus-monitord

9.9.4. pegasus-remove

pegasus-remove removes a workflow that has been planned and submitted using pegasus-plan and pegasus-run

9.9.4.1. SYNTAX

pegasus-remove [options] [rundir]

9.9.4.2. DESCRIPTION

The pegasus-remove command removes a submitted/running workflow that has been planned and submitted using pegsus-plan and pegasus-run. The command can be invoked either in the planned directory with no options and arguments or just the full path to the run directory.

9.9.4.3. ARGUMENTS

By default pegasus-remove does not require any options or arguments if invoked from within the planned workflow directory. If running the command outside the workflow directory then a full path to the workflow directory needs to be specified or the dagid of the workflow to be removed.

pegasus-remove takes the following options

  • -d

    --dagid dagid

    The workflow dagid to remove.

  • -v

    --verbose

    Raises debug level. Each invocation increase the level by 1.

  • rundir

    Is the full qualified path to the base directory containing the planned workflow dag and submit files. This is optional if pegasus-remove command is invoked from within the run directory.

9.9.4.4. RETURN VALUE

If the workflow is removed successfully pegasus-remove returns with an exit code of 0. However, in case of error, a non-zero exit code indicates problems. An error message clearly marks the cause.

9.9.4.5. ENVIRONMENT VARIABLES

The following environment variables are used by pegasus-remove

  • PATH

    The path variable is used to locate binaries for condor-rm

9.9.5. pegasus-status

pegasus-status reports on the status of a workflow.

9.9.5.1. SYNTAX

pegasus-status -h | --help

pegasus-status -V | --version

pegasus-status [ -w | --watch s ] [ -L | --[no]legend ] [ -c | --[no]color ] [ -U | --[no]utf8 ] [ -Q | --[no]queue ] [ -v | --verbose ] [ -d | --debug ] [ -u | --user name ] [ -i | --[no]idle ] [ --[no]held ] [ --[no]heavy ] [ -j | --jobtype jt ] [ -s | --site sid ] [ -l | --long ] [ -S | --[no]success ] [rundir]

pegasus-status shows the current state of the Condor Q and a workflow, depending on settings. If no valid run directory could be determined, including the current directory, pegasus-status will show all jobs of the current user and no workflows. If a run directory was specified, or the current directory is a valid run directory, status about the workflow will also be shown.

Many option will modify the behavior of this program, not withstanding a proper UTF-8 capable terminal, watch mode, the presence of jobs in the queue, progress in the workflow directory, etc.

9.9.5.2. ARGUMENTS

-h, --help

Prints a concise help and exits.

-V, --version

Prints the version information and exits.

-w sec, --watch sec

This option enables the watch mode. In watch mode, the program repeated polls the status sources and shows them in an updating window. The optional argument sec to this option determines how often these sources are polled.

We strongly recommend to set this interval not too low, as frequent polling will degrade the scheduler performance and increase the host load. In watch mode, the terminal size is the limiting factor, and parts of the output may be truncated to fit it onto the given terminal.

Watch mode is disabled by default. The sec argument defaults to 60 seconds.

-L, --legend, --nolegend

This option shows a legend explaining the columns in the output, or turns off legends.

By default, legends are turned off to save terminal real estate.

-c, --color, --nocolor

This option turns on (or off) ANSI color escape sequences in the output. The single letter option can only switch on colors.

By default, colors are turned off, as they will not display well on a terminal with black background.

-U, --utf8, --noutf8

This option turns on (or off) the output of Unicode box drawing characters as UTF-8 encoded sequences. The single option can only turn on box drawing characters.

The defaults for this setting depend on the LANG environment variable. If the variable contains a value ending in something indicating UTF-8 capabilities, the option is turned on by default. It is off otherwise.

-Q, --queue, --noqueue

This option turns on (or off) the output from parsing Condor Q.

By default, Condor Q will be parsed for jobs of the current user. If a workflow run directory is specified, it will furthermore be limited to jobs only belonging to the workflow.

-v, --verbose

This option increases the expert level, showing more information about the Condor Q state. Being an incremental option, two incrases are supported.

Additionally, the signals SIGUSR1 and SIGUSR2 will increase and decrease the expert level respectively during run-time.

By default, the simplest queue view is enabled.

-d, --debug

This is an internal debugging tool and should not be used outside the development team. As incremental option, it will show Pegasus-specific ClassAd tuples for each job, more in the second level.

By default, debug mode is off.

-u name, --user name

This option permits to query the queue for a different user than the current one. This may be of interest, if you are debugging the workflow of another user.

By default, the current user is assumed.

-i, --idle, --noidle

With this option, jobs in Condor state idle are omitted from the queue output.

By default, idle jobs are shown.

--held, --noheld

This option enables or disabled showing of the reason a job entered Condor's held state. The reason will somewhat destroy the screen layout.

By default, the reason is shown.

--heavy, --noheavy

If the terminal is UTF-8 capable, and output is to a terminal, this option decides whether to use heavyweight or lightweight line drawing characters.

By default, heavy lines connect the jobs to workflows.

-j jt, --jobtype jt

This option filters the Condor jobs shown only to the Pegasus jobtypes given as argument or arguments to this option. It is a multi-option, and may be specified multiple times, and may use comma-separated lists. Use this option with an argument help to see all valid and recognized jobtypes.

By default, all Pegasus jobtypes are shown.

-s site, --site site

This option limits the Condor jobs shown to only those pertaining to the (remote) site site This is an multi-option, and may be specified multiple times, and may use comma-separated lists.

By default, all sites are shown.

-l, --long

This option will show one line per sub-DAG, including one line for the workflow. If there is only a single DAG pertaining to the rundir, only total will be shown.

By default, only DAG totals (sums) are shown.

-S, --success, --nosuccess

This option modifies the previous --long option. It will omit (or show) fully successful sub-DAGs from the output.

By default, all DAGs are shown.

rundir

This option show statistics about the given DAG that runs in rundir. To gather proper statistics, pegasus-status needs to traverse the directory and all sub-directories. This can become an expensive operation on shared filesystems.

By default, the rundir is assumed to be the current directory. If the current directory is not a valid rundir, no DAG statistics will be shown.

9.9.5.3. RETURN VALUE

pegasus-status will typically return success in regular mode, and the termination signal in watch mode. Abnormal behavior will result in a non-zero exit code.

9.9.5.4. EXAMPLE

pegasus-status

This invocation will parse the Condor Q for the current user and show all her jobs. Additionally, if the current directory is a valid Pegasus workflow directory, totals about the DAG in that directory are displayed.

pegasus-status -l rundir

As above, but providing a specific Pegasus workflow directory in argument rundir and requesting to itemize sub-DAGs.

pegasus-status -j help

This option will show all permissible job types and exit.

pegasus-status -vvw 300 -Ll

This invocation will parse the queue, print it in high-expert mode, show legends, itemize DAG statistics of the current working directory, and redraw the terminal every five minutes with updated statistics.

9.9.5.5. RESTRICTIONS

Currently only supports a single (optional) run directory. If you want to watch multiple run directories, I suggest to open multiple terminals and watch them separately. If that is not an option, or deemed too expensive, you can ask to extend the program.

9.9.6. pegasus-monitord

pegasus-monitord tracks a workflow's progress in real time and mines information.

9.9.6.1. SYNOPSIS

pegasus-monitord [--help | -help] [--verbose | -v] [--adjust | -a i] [--foreground | -N] [--no-daemon | -n] [--job | -j jobstate.log file] [--log | -l logfile] [--conf properties file] [--no-recursive] [--no-database | --no-events] [--replay | -r] [--no-notifications] [--notifications-max max_notifications] [--notifications-timeout timeout] [--sim | -s millisleep] [--db-stats] [--socket] [--output-dir | -o dir] [--dest | -d PATH or URL] [--encoding | -e bp | bson] DAGMan output file

9.9.6.2. DESCRIPTION

This program follows a workflow, parsing the output of DAGMAN's dagman.out file. In addition to generating the jobstate.log file, pegasus-monitord can also be used mine information from the workflow dag file and jobs' submit and output files, and either populate a database or write a NetLogger events file with that information. pegasus-monitord can also perform notifications when tracking a workflow's progress in real-time.

9.9.6.3. ARGUMENTS

  • -h

    --help

    Prints a usage summary with all the available command-line options.

  • -v

    --verbose

    Sets the log level for .pegasus-monitord. If omitted, the default level will be set to WARNING. When this option is given, the log level is changed to "INFO. If this option is repeated, the log level will be changed to DEBUG. The log level in pegasus-monitord can also be adjusted interactively, by sending the USR1 and USR2 signals to the process, respectively for incrementing and decrementing the log level.

  • -a i

    --adjust i

    For adjusting time zone differences by i seconds, default is 0.

  • -N

    --foreground

    Do not daemonize pegasus-monitord, go through the motions as if (Condor).

  • -n

    --no-daemon

    Do not daemonize pegasus-monitord, keep it in the foreground (for debugging).

  • -j <jobstate.log>

    --job <jobstate.log>

    Alternative location for the jobstate.log file. The default is to write a jobstate.log in the workflow directory. An absolute file name should only be used if the workflow does not have any sub-workflows, as each sub-workflow will generate its own jobstate.log file. If an alternative, non-absolute, filename is given with this option, pegasus-monitord will create one file in each workflow (and sub-workflow) directory with the filename provided by the user with this option. If an absolute filename is provided and sub-workflows are found, a warning message will be printed and pegasus-monitord will not track any sub-workflows.

  • -l <logfile>

    --log-file <logfile>

    Specifies an alternative logfile to use instead of the monitord.log file in the main workflow directory. Differently from the jobstate.log file above, pegasus-monitord only generates one logfile per execution (and not one per workflow and sub-workflow it tracks).

  • --conf <properties file>

    properties file is an alternative file containing properties in the key=value format, and allows users to override values read from the braindump.txt file. This option has precedence over the properties file specified in the braindump.txt file. Please note that these properties will apply not only to the main workflow, but also to all sub-workflows found.

  • --no-recursive

    This options disables pegasus-monitord to automatically follow any sub-workflows that are found.

  • --no-database

    --nodatabase

    --no-events

    Turns off generating events (when this option is given, pegasus-monitord will only generate the jobstate.log file). The default is to automatically log information to a SQLite database (see the --dest option below for more details). This option overrides any parameter given by the --dest option.

  • -r

    --replay

    This option is used to replay the output of an already finished workflow. It should only be used after the workflow is finished (not necessarily successfully). If a jobstate.log file is found, it will be rotated. However, when using a database, all previous references to that workflow (and all its sub-workflows) will be erased from it. When outputing to a bp file, the file will be deleted. When running in replay mode, pegasus-monitord will always run with the --no-daemon option, and any errors will be output directly to the terminal. Also, pegasus-monitord will not process any notifications while in replay mode.

  • --no-notifications

    This options disables notifications completely, making pegasus-monitord ignore all the .notify files for all workflows it tracks.

  • --notifications-max <max notifications>

    This option sets the maximum number of concurrent notifications that pegasus-monitord will start. When the max notifications limit is reached, pegasus-monitord will queue notifications and wait for a pending notification script to finish before starting a new one. If max notifications is set to 0, notifications will be disabled.

  • --notifications-timeout <timeout>

    Normally, pegasus-monitord will start a notification script and wait indefinitely for it to finish. This option allows users to set up a maximum timeout that pegasus-monitord will wait for a notification script to finish before terminating it. If notification scripts do not finish in a reasonable amount of time, it can cause other notification scripts to be queued due to the maximum number of concurrent scripts allowed by pegasus-monitord. Additionally, until all notification scripts finish, pegasus-monitord will not terminate.

  • -s <millisleep>

    --sim <millisleep>

    This option simulates delays between reads, by sleeping millisleep milliseconds. This option is mainly used by developers.

  • --db-stats

    This option causes the database module to collect and print database statistics at the end of the execution. It has no effect if the --no-database option is given.

  • --socket

    This option causes pegasus-monitord to start a socket interface that can be used for advanced debugging. The port number for connecting to pegasus-monitord can be found in the monitord.sock file in the workflow directory (the file is deleted when pegasus-monitord finishes). If not already started, the socket interface is also created when pegasus-monitord receives a USR1 signal.

  • -o <dir>

    --output-dir <dir>

    When this option is given, .pegasus-monitord will create all its output files in the directory specified by dir. This option is useful for allowing a user to debug a workflow in a directory the user does not have write permissions. In this case, all files generated by pegasus-monitord will have the workflow wf_uuid as a prefix so that files from multiple sub-workflows can be placed in the same directory. This option is mainly used by pegasus-analyzer. It is important to note that the location for the output BP file or database is not changed by this option and should be set via the --dest option.

  • -d URL[<scheme>]<params>

    --dest URL[<scheme>]<params>

    This option allows users to specify the destination for the log events generated by pegasus-monitord. If this option is omitted, pegasus-monitord will create a SQLite database in the workflow's run directory with the same name as the workflow, but with a .stampede.db prefix. For an empty scheme, params are a file path with "-" meaning standard output. For a x-tcp scheme, params are TCP_host[:port=14380]. For a database scheme, params are a SQLAlchemy engine URL with a database connection string that can be used to specify different database engines. Please see the examples section below for more information on how to use this option. Note that when using a database engine other than sqlite, the necessary Python database drivers will need to be installed.

  • -e <bp | bson>

    --encoding <bp | bson>

    This option specifies how to encode log events. The two available possibilities are bp and bson. If this option is not specified, events will be generated in the bp format.

  • DAGMan output file

    The DAGMan output file is the only requires command-line argument in pegasus-monitord and must have the .dag.dagman.out extension.

9.9.6.4. RETURN VALUE

If the plan could be constructed, pegasus-monitord returns with an exit code of 0. However, in case of error, a non-zero exit code indicates problems. In that case, the logfile should contain additional information about the error condition.

9.9.6.5. EXAMPLES

Usually, pegasus-monitord is invoked automatically by pegasus-run and tracks the workflow progress in real-time, producing the jobstate.log file and a corresponding SQLite database. When a workflow fails, and is re-submitted with a rescue DAG, pegasus-monitord will automatically pick up from where it left previously and continue the jobstate.log file and the database.

If users need to create the jobstate.log file after a workflow is already finished, the --replay | -r option should be used when running pegasus-monitord manually. For example:

pegasus_monitord -r diamond-0.dag.dagman.out

will launch pegasus-monitord in replay mode. In this case, if a jobstate.log file already exists, it will be rotated and a new file will be created. If a diamond-0.stampede.db SQLite database already exists, pegasus-monitord will purge all references to the workflow id specified in the braindump.txt file, including all sub-workflows associated with that workflow id.

pegasus_monitord -r --no-database diamond-0.dag.dagman.out

will do the same thing, but without generating any log events.

pegasus_monitord -r --dest `pwd`/diamond-0.bp diamond-0.dag.dagman.out

will create the file diamond-0.bp in the current directory, containing NetLogger events with all the workflow data. This is in addition to the jobstate.log file.

For using a database, users should provide a database connection string in the format of:

dialect://username:password@host:port/database

Where dialect is the name of the underlying driver (mysql, sqlite, oracle, postgres) and database is the name of the database running on the server at the host computer.

If users want to use a different SQLite database, pegasus-monitord requires them to specify the absolute path of the alternate file. For example:

pegasus_monitord -r --dest sqlite:////home/user/diamond_database.db diamond-0.dag.dagman.out

Here are docs with details for all of the supported drivers: http://www.sqlalchemy.org/docs/05/reference/dialects/index.html

Additional per-database options that work into the connection strings are outlined there.

It is important to note that one will need to have the appropriate db interface library installed. Which is to say, SQLAlchemy is a wrapper around the mysql interface library (for instance), it does not provide a MySQL driver itself. The Pegasus distribution includes both SQLAlchemy and the SQLite Python driver.

As a final note, it is important to mention that unlike when using SQLite databases, using SQLAlchemy with other database servers, e.g. MySQL or Postgres, the target database needs to exist. So, if a user wanted to connect to:

mysql://pegasus-user:supersecret@localhost:localport/diamond

it would need to first connect to the server at localhost and issue the appropriate create database command before running pegasus-monitord as SQLAlchemy will take care of creating the tables and indexes if they do not already exist.

9.9.7. pegasus-analyzer

pegasus-analyzer is used to debug failed workflows.

9.9.7.1. SYNOPSIS

pegasus-analyzer [--help | -h] [--quiet | -q] [--strict | -s] [--monitord | -m | -t] [--debug level] [--output-dir | -o output_dir] [--file | -f dag_filename] [--dir | -d| -i input_dir] [--print | -p print_options] [--debug-job job] [--debug-dir debug_dir] [--type workflow_type]

9.9.7.2. DESCRIPTION

Pegasus-analyzer is a command-line utility for parsing the jobstate.log file and reporting succesful and failed jobs. It quickly goes through several log files, isolates jobs that did not complete sucessfully, and prints their stdout and stderr so that users can get detailed information about their workflow runs.

9.9.7.3. ARGUMENTS

Any option will be displayed with its long options synonym(s).

  • -h

    --help

    Prints a usage summary with all the available command-line options.

  • -q

    --quiet

    Only print the the output and error filenames instead of their contents.

  • -s

    --strict

    Get jobs' output and error filenames from the job's submit file.

  • -m

    -t

    --monitord

    Invoke pegasus-monitord before analyzing the jobstate.log file. Although pegasus-analyzer can be executed during the workflow execution as well as after the workflow has already completed execution, pegasus-monitord is always invoked with the --replay option. Since multiple instances of pegasus-monitord should not be executed simultanesouly in the same workflow directory, the user should ensure that no other instances of pegasus-monitord are running. If the run_directory is writable, pegasus-analyzer will create a jobstate.log file there, rotating an older log, if it is found. If the run_directory is not writable (e.g. when the user debugging the workflow is not the same user that ran the workflow), pegasus-analyzer will exit and ask the user to provide the --output-dir option, in order to provide an alternative location for pegasus-monitord log files.

  • --debug-level

    Sets the log level for pegasus-analyzer . Possible values, in the more verbose to least verbose order, are:

    • INFO

    • DEBUG

    • WARNING

    • ERROR

    • CRITICAL

    If omitted, the default level will be set to WARNING.

  • -o <output directory>

    --output-dir <output directory>

    This option provides an alternative location for all monitoring log files for a particular workflow. It is mainly used when an user does not have write privileges to a workflow directory and needs to generate the log files needed by pegasus-analyzer. If this option is used in conjunction with the --monitord option, it will invoke pegasus-monitord using output_dir to store all output files. Because workflows can have sub-workflows, pegasus-monitord will create its files prepending the workflow wf_uuid to each filename. This way, multiple workflow files can be stored in the same directory. pegasus-analyzer has built-in logic to find the specific jobstate.log file by looking at the workflow braindump.txt file first and figuring out the corresponding wf_uuid. If output_dir does not exist, it will be created.

  • -f <dag filename>

    --file <dag filename>

    In this option, dag filename specifies the path to the DAG file to use. pegasus-analyzer will get the directory information from the dag filename. This option overrides the --dir option below.

  • -d <input dir>

    -i <input dir>

    --dir <input dir>

    Makes pegasus-analyzer look for the jobstate.log file in the input dir directory. If this option is omitted, pegasus-analyzer will look in the current directory.

  • -p <print options>

    --print <print options>

    Tells pegasus-analyzer what extra information it should print for failed jobs. print options is a comma-delimited list of options, that include pre, invocation, and/or all, which activates all printing options. With the pre option, pegasus-analyzer will print the pre-script information for failed jobs. For the invocation option, pegasus-analyzer will print the invocation command, so users can manually run the failed job.

  • --debug-job <job>

    When given this option, pegasus-analyzer turns on its debug_mode, which can be used to debug a particular job. In this mode, pegasus-analyzer will create a shell script in the debug dir (see below, for specifying it) and copy all necessary files to this local directory and then execute the job locally.

  • --debug-dir <debug dir>

    When in debug mode, pegasus-analyzer will create a temporary debug directory. Users can give this option in order to specify a particular debug dir directory to be used instead.

  • --type <workflow type>

    In this options, users specify what workflow type they want to debug. At this moment, the only workflow type available is condor and it is the default value if this option is not specified.

9.9.7.4. EXAMPLES

The simplest way to use pegasus-analyzer is to go to the run directory and invoke the analyzer:

pegasus-analyzer .

which will cause pegasus-analyzer to print information about the workflow in the current directory.

pegasus-analyzer output contains a summary, followed by detailed information about each job that either failed, or is in an unknown state. Here is the summary section of the output:

**************************Summary***************************

 Total jobs         :     75 (100.00%)
 # jobs succeeded   :     41 (54.67%)
 # jobs failed      :      0 (0.00%)
 # jobs unsubmitted :     33 (44.00%)
 # jobs unknown     :      1 (1.33%)

jobs succeeded are jobs that have completed succesfully. jobs failed are jobs that have finished, but that did not complete successfully. jobs unsubmitted are jobs that are listed in the dag file, but no information about them was found in the jobstate.log file. Finally, jobs unknown are jobs that have started, but have not reached completion.

After the summary section, pegasus-analyzer will display information about each job in the job failed and job unknown categories.

******************Failed jobs' details**********************

=======================findrange_j3=========================

  last state: POST_SCRIPT_FAILURE
        site: local
 submit file: /home/user/diamond\-submit/findrange_j3.sub
 output file: /home/user/diamond\-submit/findrange_j3.out.000
  error file: /home/user/diamond\-submit/findrange_j3.err.000

--------------------Task #1 - Summary-----------------------

 site        : local
 hostname    : server-machine.domain.com
 executable  : (null)
 arguments   : -a findrange -T 60 -i f.b2 -o f.c2
 error       : 2
 working dir : 

In the example above, the findrange_j3 job has failed, and the analyzer displays information about the job, showing that the job finished with a POST_SCRIPT_FAILURE, and lists the submit, output and error files for this job. Whenever pegasus-analyzer detects that the output file contains a kickstart record, it will display the breakdown containing each task in the job (in this case we only have one task). Because pegasus-analyzer was not invoked with the --quiet flag, it will also display the contents of the output and error files (or the stdout and stderr sections of the kickstart record), which in this case are both empty.

In the case of SUBDAG and subdax jobs, pegasus-analyzer will indicate it, and show the command needed for the user to debug that sub-workflow. For example:

=================subdax_black_ID000009=====================

  last state: JOB_FAILURE
        site: local
 submit file: /home/user/run1/subdax_black_ID000009.sub
 output file: /home/user/run1/subdax_black_ID000009.out
  error file: /home/user/run1/subdax_black_ID000009.err
  This job contains sub workflows!
  Please run the command below for more information:
  pegasus-analyzer -d /home/user/run1/blackdiamond_ID000009.000

-----------------subdax_black_ID000009.out-----------------

Executing condor dagman ...

-----------------subdax_black_ID000009.err-----------------

tells the user the subdax_black_ID000009 sub-workflow failed, and that it can be debugged by using the indicated pegasus-analyzer command.

9.9.8. pegasus-statistics

pegasus-statistics reports statistics about a workflow.

9.9.8.1. SYNOPSIS

pegasus-statistics <submit directory> [-h | --help] [-o | --output <output directory>] [-c | --conf <property file path>] [-p | --statistics-level level_str] [-t | --time-filter filter_str] [-i | --ignore-db-inconsistency] [-v | --verbose] [-q | --quiet]

9.9.8.2. DESCRIPTION

pegasus-statistics generates statistics about the workflow run like total jobs/tasks/sub workflows ran , how many succeeded/failed etc. It generates job instance statistics like run time, condor queue delay etc. It generates invocation statistics information grouped by transformation name. It also generates job instance and invocation statistics information grouped by time and host.

9.9.8.3. ARGUMENTS

Any option will be displayed with its long options synonym(s).

  • -h

    --help

    Prints a usage summary with all the available command-line options.

  • -o <output directory >

    --output <output directory >

    Writes the output to the given directory.

  • -c <property file path >

    --conf <property file path >

    The properties file to use. This option overrides all other property files.

  • -s level_str

    --statistics-level level_str

    Specifies the statistics information to generate. Valid levels are: all,summary,wf_stats,jb_stats,tf_stats,ti_stats; Default is summary. The output generated by pegasus-statistics is based on the statistics_level set.

    • all

      generates all the statistics information.

    • summary

      generates the workflow statistics summary .In case of hierarchical workflow the summary is across all sub workflows.

    • wf_stats

      generates the workflow statistics information of each individual workflow. In case of hierarchical workflow the workflow statistics is created for each sub workflows.

    • jb_stats

      generates the job statistics information of each individual workflow. In case of hierarchical workflow the job statistics is created for each sub workflows.

    • tf_stats

      generates the invocation statistics information of each individual workflow grouped by transformation name .In case of hierarchical workflow the transformation statistics is created for each sub workflows.

    • ti_stats

      generates the job instance and invocation statistics like total count and runtime grouped by time and host.

  • -t filter_str

    --time-filter filter_str

    Specifies the time filter to group the time statistics. Valid levels are: month,week,day,hour; Default is day.

  • -i

    --ignore-db-inconsistency

    Turns off the the check for database consistency.

  • -v

    --verbose

    Increases the log level. If omitted, the default level will be set to WARNING. When this option is given, the log level is changed to INFO. If this option is repeated, the log level will be changed to DEBUG.

  • -q

    --quiet

    Decreases the log level. If omitted, the default level will be set to WARNING. When this option is given, the log level is changed to ERROR.

9.9.8.4. EXAMPLE

pegasus-statistics   /scratch/grid-setup/run0001

Runs pegasus-statistics and prints the workflow summary statistics on the command line output.

pegasus-statistics  -o /scratch/statistics -s all /scratch/grid-setup/run0001

Runs pegasus-statistics and prints the workflow summary statistics on the command line output and generates all statistics information files to the given directory.

9.9.9. pegasus-plots

pegasus-plots generates charts and graphs that illustrate the statistics and execution of a workflow.

9.9.9.1. SYNOPSIS

pegasus-statistics <submit directory> [-h | --help] [-o | --output <output directory>] [-c | --conf <property file path>] [-m | --max-graph-nodes max_value] [-p | --plotting-level level_str] [-i | --ignore-db-inconsistency] [-v | --verbose] [-q | --quiet]

9.9.9.2. DESCRIPTION

pegasus-plots generates graphs and charts to visualize workflow run. It generates workflow execution Gantt chart, job over time chart, time chart, breakdown chart, dax and dag graph. It uses executable 'dot' to generate graphs. pegasus-plots looks for the executable in your path and generates graphs based on it's availability .

9.9.9.3. ARGUMENTS

Any option will be displayed with its long options synonym(s).

  • -h

    --help

    Prints a usage summary with all the available command-line options.

  • -o <output directory >

    --output <output directory >

    Writes the output to the given directory.

  • -c <property file path >

    --conf <property file path >

    The properties file to use. This option overrides all other property files.

  • -m max_value

    --max-graph-nodes max_value

    Maximum limit on the number of tasks/jobs in the dax/dag upto which the graph should be generated;The default value is 100

  • -p level_str

    --plotting-level level_str

    Specifies the charts and graphs to generate. Valid levels are: all,all_charts, all_graphs,dax_graph,dag_graph,gantt_chart,host_chart, time_chart,breakdown_chart;Default is all_charts. The output generated by pegasus-plots is based on the plotting_level set.

    • all

      generates all charts and graphs.

    • all_charts

      generates all charts.

    • all_graphs

      generates all graphs.

    • dax_graph

      generates dax graph.

    • dag_graph

      generates dag graph.

    • gantt_chart

      generates the workflow execution Gantt chart.

    • host_chart

      generates the host over time chart.

    • time_chart

      generates the time chart which shows the job instance/ invocation count and runtime over time.

    • breakdown_chart

      generates the breakdown chart which shows the invocation count and runtime grouped by transformation name.

  • -i

    --ignore-db-inconsistency

    Turns off the the check for database consistency.

  • -v

    --verbose

    Increases the log level. If omitted, the default level will be set to WARNING. When this option is given, the log level is changed to INFO. If this option is repeated, the log level will be changed to DEBUG.

  • -q

    --quiet

    Decreases the log level. If omitted, the default level will be set to WARNING. When this option is given, the log level is changed to ERROR.

9.9.9.4. EXAMPLE

pegasus-plots  -o /scratch/plots  /scratch/grid-setup/run0001

Runs pegasus-plots and generates all the charts and graphs to the given directory.

9.9.10. pegasus-transfer

pegasus-transfer is a wrapper for several file transfer clients. The tool is used whenever Pegasus plans a transfer of data.

9.9.10.1. SYNOPSIS

pegasus-transfer [-h | --help] [-l | --loglevel <level>] [-f | --file=<input file>] [--max-attempts=<attempts>]

9.9.10.2. DESCRIPTION

pegasus-transfer takes a list of url pairs, either on stdin or with an input file, determines the correct tool to use for the transfer and executes the transfer. Some of the protocols pegasus-transfer can handle are GridFTP, SRM, Amazon S3, HTTP, and local cp/symlinking. Failed transfers are retried.

9.9.10.3. ARGUMENTS

Any option will be displayed with its long options synonym(s).

  • -h

    --help

    Prints a usage summary with all the available command-line options.

  • -l <level>

    --loglevel <level>

    The debugging output level. Valid values are debug,info.warning,error. Default value is info.

  • -f <input file>

    --file <input file>

    File with input pairs. If not given, stdin will be used.

  • --max-attempts <attempts>

    Maximum number of attempts for retrying failed transfers.

9.9.10.4. EXAMPLE

pegasus-transfer
file:///etc/hosts
file:///tmp/foo
CTRL+D

9.9.11. pegasus-sc-client

pegasus-sc-client is used to generate and modify site catalogs.

9.9.12. pegasus-rc-client

pegasus-rc-client - shell client for replica implementations

9.9.12.1. SYNOPSIS

  • pegasus-rc-client [-Dprop [...]] [-c fn] [-p k=v] [[-f fn]|[-i|-d fn]|[cmd [args]]

  • pegasus-rc-client [-c fn] -V

9.9.12.2. DESCRIPTION

The shell interface to replica catalog implementations is a prototype. It determines from various property setting which class implements the replica manager interface, and loads that driver at run-time. Some commands depend on the implementation.

9.9.12.3. ARGUMENTS

Any option will be displayed with its long options synonym(s).

  • -h, --help

    print this help text

  • -V, --version

    print some version identification string and exit

  • -Dprop

    The -D options allows an experienced user to override certain properties which influence the program execution, among them the default location of the user's properties file and the PEGASUS home location. One may set several CLI properties by giving this option multiple times. The -D option(s) must be the first option on the command line. A CLI property take precedence over the properties file property of the same key.

  • -f, --file fn

    uses non-interactive mode, reading from file fn. The special filename hyphen reads from pipes

  • -c, --conf fn

    path to the property file

  • -v, --verbose

    increases the verbosity level

  • -p, --pref k=v

    enters the specified mapping into preferences (multi-use). remember quoting, e.g. -p 'format=%l %p %a'

  • -i, --insert fn

    the path to the file containing the mappings to be inserted. Each line in the file denotes one mapping of format <LFN> <PFN> [k=v [..]]

  • -d, --delete fn

    the path to the file containing the mappings to be deleted. Each line in the file denotes one mapping of format <LFN> <PFN> [k=v [..]].

  • -l, --lookup fn

    the path to the file containing the LFN's to be looked up. Each line in the file denotes one LFN

  • cmd [args]

    If not in file-driven mode, a single command can be specified with its arguments.

9.9.12.4. RETURN VALUE

Regular and planned program terminations will result in an exit code of 0. Abnormal termination will result in a non-zero exit code.

9.9.12.5. FILES

  • $PEGASUS_HOME/etc/properties

    contains the basic properties with all configurable options.

  • $HOME/.pegasusrc

    contains the basic properties with all configurable options.

  • pegasus.jar

    contains all compiled Java bytecode to run the replica manager.

9.9.12.6. ENVIRONMENT VARIABLES

  • $PEGASUS_HOME

    is the suggested base directory of your the execution environment.

  • $JAVA_HOME

    should be set and point to a valid location to start the intended Java virtual machine as $JAVA_HOME/bin/java.

  • $CLASSPATH

    should be set to contain all necessary files for the execution environment. Please make sure that your CLASSPATH includes pointer to the replica implementation required jar files.

9.9.12.7. PROPERTIES

The complete branch of properties pegasus.catalog.replica including itself are interpreted by the prototype. While the pegasus.catalog.replica property itself steers the backend to connect to, any meaning of branched keys is dependent on the backend. The same key may have different meanings for different backends.

  • pegasus.catalog.replica

    determines the name of the implementing class to load at run-time. If the class resides in org.griphyn.common.catalog.replica no prefix is required. Otherwise, the fully qualified class name must be specified.

  • pegasus.catalog.replica.url

    is used by the RLS|LRC implementations. It determines the RLI / LRC url to use.

  • pegasus.catalog.replica.file

    is used by the SimpleFile implementation. It specifies the path to the file to use as the backend for the catalog.

  • pegasus.catalog.replica.db.driver

    is used by a simple rDBMs implementation. The string is the fully-qualified class name of the JDBC driver used by the rDBMS implementer.

  • pegasus.catalog.replica.db.url

    is the jdbc url to use to connect to the database.

  • pegasus.catalog.replica.db.user

    is used by a simple rDBMS implementation. It constitutes the database user account that contains the RC_LFN and RC_ATTR tables.

  • pegasus.catalog.replica.db.password

    is used by a simple rDBMS implementation. It constitutes the database user account that contains the RC_LFN and RC_ATTR tables.

  • pegasus.catalog.replica.chunk.size

    is used by the pegasus-rc-client for the bulk insert and delete operations. The value determines the number of lines that are read in at a time, and worked upon at together.

9.9.12.8. COMMANDS

The commandline tool provides a simplified shell-wrappable interface to manage a replica catalog backend. The commands can either be specified in a file in bulk mode, in a pipe, or as additional arguments to the invocation.

Note that you must escape special characters from the shell.

  • help

    displays a small resume of the commands.

  • exit, quit

    should only be used in interactive mode to exit the interactive mode.

  • clear

    drops all contents from the backend. Use with special care!

  • insert <lfn> <pfn> [k=v [..]]

    inserts a given lfn and pfn, and an optional site string into the backend. If the site is not specified, a null value is inserted for the site.

  • delete <lfn> <pfn> [k=v [..]]

    removes a triple of lfn, pfn and, optionally, site from the replica backend. If the site was not specified, all matches of the lfn pfn pairs will be removed, regardless of the site.

  • lookup <lfn> [<lfn> [..]]

    retrieves one or more mappings for a given lfn from the replica backend.

  • remove <lfn> [<lfn> [..]]

    removes all mappings for each lfn from the replica backend.

  • list [lfn <pat>] [pfn <pat>] [<name> <pat>]

    obtains all matches from the replica backend. If no arguments were specified, all contents of the replica backend are matched. You must use the word lfn, pfn or <name> before specifying a pattern. The pattern is meaningful only to the implementation. Thus, a SQL implementation may chose to permit SQL wild-card characters. A memory-resident service may chose to interpret the pattern as regular expression.

  • set [var [value]]

    sets an internal variable that controls the behavior of the front-end. With no arguments, all possible behaviors are displayed. With one argument, just the matching behavior is listed. With two arguments, the matching behavior is set to the value.

9.9.12.9. DATABASE SCHEMA

The tables are set up as part of the PEGASUS database setup. The files concerned with the database have a suffix -rc.sql.

9.9.13. pegasus-tc-client

A full featured generic client to handle adds, delete and queries to the Transformation Catalog (TC).

9.9.13.1. SYNOPSIS

pegasus-tc-client [-Dprop [...]] OPERATION TRIGGERS [OPTIONS] [-h] [-v] [-V]

9.9.13.2. DESCRIPTION

The tc-client command is a generic client that performs the three basic operation of adding, deleting and querying of any Transformation Catalog impemented to the TC API. The client implements all the operations supported by the TC Api. It is upto the TC implementation whether they support all operations or modes.

The following 3 operations are supported by the tc-client. One of these operations have to be specified to run the client.

  1. ADD

    This operation allows the client to add or update entries in the Transformation Catalog. Entries can be added one by one on the command line or in bulk by using the BULK Trigger and pro‐ viding a file with the necessary entries. Also Profiles can be added to either the logical transformation or the physical transformation.

  2. DELETE

    This operation allows the client to delete entries from the Transformation Catalog. Entries can be deleted based on logical transformation, by resource, by transformation type as well as the transformation system information. Also Profiles associated with the logical or physical transformation can be deleted.

  3. QUERY

    This opeartion allows the client to query for entries from the Transformation Catalog. Queries can be made for printing all the contents of the Catalog or for specific entries, for all the logical transformations or resources etc. See the TRIGGERS and VALID COMBINATIONS section for more details.

9.9.13.3. OPERATIONS

To select one of the 3 operations.

  1. -a , --add

    Perform addition operations on the TC.

  2. -d , --delete

    Perform delete operations on the TC.

  3. -q , --query

    Perform query operations on the TC.

9.9.13.4. TRIGGERS

Triggers modify an OPERATIONS behaviour. E.g. if you want to perform a bulk operation you would use a BULK Trigger or if you want to perform an operation on a Logical Transformation then you would use the LFN Trigger.

The following 7 Triggers are available. See the VALID COMBINATIONS section for the correct grouping and usage.

  • -B

    Triggers a bulk operation.

  • -L

    Triggers an operation on a logical transformation.

  • -P

    Triggers an operation on a physical transformation.

  • -R

    Triggers an operation on a resource.

  • -E

    Triggers an operation on a Profile.

  • -T

    Triggers an operation on a Type.

  • -S

    Triggers an operation on a System information.

9.9.13.5. OPTIONS

The following options are applicable for all the operations.

  • -l, --lfn logicalTR

    The logical transformation to be added. The format is NAMESPACE::NAME:VERSION. The name is always required, namespace and version are optional.

  • -p, --pfn physical TR

    The physical transfromation to be added. For INSTALLED executables its a local file path, for all others its a url.

  • -t , --type type

    The type of physical transformation. Valid values are : INSTALLED, STATIC_BINARY, DYNAMIC_BINARY, SCRIPT, SOURCE, PACMAN_PACKAGE.

  • -r , --resource resourceID

    The resourceID where the transformation is located.

  • -e , --profile profiles

    The profiles for the transformation. Mulitple profiles of same namespace can be added simultaneously by seperating them with a comma ",". Each profile section is written as NAMESPACE::KEY=VALUE,KEY2=VALUE2 e.g. ENV::JAVA_HOME=/usr/bin/java2,PEGASUS_HOME=/usr/local/pegasus. To add muliple namespaces you need to repeat the -e option for each namespace.

    e.g. -e ENV::JAVA_HOME=/usr/bin/java -e GLOBUS::JobType=MPI,COUNT=10

  • -s , --system systeminfo

    The architecture, os, osversion and glibc if any for the executable. Each system info is written in the form ARCH::OS:OSVER:GLIBC

9.9.13.6. OTHER OPTIONS

  • -Dprop

    The -D options allows an experienced user to override certain properties which influence the program execution, among them the default location of the user's properties file and the PEGASUS home location. One may set several CLI properties by giving this option multiple times. The -D option(s) must be the first option on the command line. A CLI property take precedence over the properties file property of the same key.

  • --oldformat, -o

    Generates the output in the old single line format

  • --conf, -c

    path to property file

  • --verbose, -v

    increases the verbosity level

  • --version, -V

    Displays the version number of the Griphyn Virtual Data System software

  • --help, -h

    Generates this help

9.9.13.7. VALID COMBINATIONS

The following are valid combinations of OPERATIONS, TRIGGERS, OPTIONS for the tc-client

  • ADD

    • ADD TC ENTRY

      -a -l lfn -p pfn -t type -r resource -s system [-e profiles..]

      Adds a single entry into the transformation catalog.

    • ADD PFN PROFILE

      -a -P -E -p pfn -t type -r resource -e profiles ....

      Adds profiles to a specified physical transformation on a given resource and of a given type.

    • ADD LFN PROFILE

      -a -L -E -l lfn -e profiles ....

      Adds profiles to a specified logical transformation.

    • Add Bulk Entries

      -a -B -f file

      Adds entries in bulk mode by supplying a file containg the entries.

      The format of the file cotnains 6 columns. E.g.

      #RESOURCE LFN PFN TYPE SYSINFO PROFILES # isi NS::NAME:VER /bin/date INSTALLED ARCH::OS:OSVERS:GLIBC NS::KEY=VALUE,KEY=VALUE;NS2::KEY=VALUE,KEY=VALUE

  • DELETE

    • Delete all TC

      -d -BPRELST

      Deletes the entire contents of the TC. WARNING : USE WITH CAUTION.

    • Delete by LFN

      -d -L -l lfn [-r resource] [-t type]

      Deletes entries from the TC for a particular logical transformation and additionaly a resource and or type.

    • Delete by PFN

      -d -P -l lfn -p pfn [-r resource] [-t type]

      Deletes entries from the TC for a given logical and physical transformation and additionaly on a particular resource and or of a particular type.

    • Delete by Type

      -d -T -t type [-r resource]

      Deletes entries from TC of a specific type and/or on a specific resource.

    • Delete by Resource

      -d -R -r resource

      Deletes the entries from the TC on a particular resource.

    • Delete by SysInfo

      -d -S -s sysinfo

      Deletes the entries from the TC for a particular system information type.

    • Delete Pfn Profile

      -d -P -E -p pfn -r resource -t type [-e profiles ..]

      Deletes all or specific profiles associated with a physical transformation.

    • Delete Lfn Profile

      -d -L -E -l lfn -e profiles ....

      Deletes all or specific profiles associated with a logical transformation.

  • QUERY

    • Query Bulk

      -q -B Queries for all the contents of the TC.

      It produces a file format TC which can be added to another TC using the bulk option.

    • Query LFN

      -q -L [-r resource] [-t type]

      Queries the TC for logical transformation and/or on a particular resource and/or of a particular type.

    • Query PFN

      -q -P -l lfn [-r resource] [-t type]

      Queries the TC for physical transformations for a give logical transformation and/or on a particular resource and/or of a particular type.

    • Query Resource

      -q -R -l lfn [-t type]

      Queries the TC for resources that are registered and/or resources registered for a specific type of transformation.

    • Query Lfn Profile

      -q -L -E -l lfn

      Queries for profiles associated with a particular logical transformation

    • Query Pfn Profile

      -q -P -E -p pfn -r resource -t type

      Queries for profiles associated with a particular physical transformation

9.9.13.8. PROPERTIES

This are the properties you will need to set to use either the File or Text TC. For more details please check the $PEGASUS_HOME/etc/sample.properties file.

  • pegasus.catalog.transformation

    Identifies what impelemntation of TC will be used. If relative name is used then the path org.griphyn.cPlanner.tc is prefixed to the name and used as the class name to load. The default value is Text. Other supported mode is File

  • pegasus.catalog.transformation.file

    The file path where the text based TC is located. By default the path $PEGASUS_HOME/var/tc.data is used.

9.9.13.9. FILES

  • $PEGASUS_HOME/var/tc.data

    is the suggested location for the file corresponding to the Transformation Catalog

  • $PEGASUS_HOME/etc/properties

    is the location to specify properties to change what Tranformation Catalog Implementation to use and the implementation related PROPERTIES.

  • pegasus.jar

    contains all compiled Java bytecode to run the PEGASUS Planner.

9.9.13.10. ENVIRONMENT VARIABLES

  • $PEGASUS_HOME

    Path to the PEGASUS installation directory.

  • $JAVA_HOME

    Path to the JAVA 1.4.x installation directory.

  • $CLASSPATH

    The classpath should be set to contain all necessary PEGASUS files for the execution environment. To automatically add the CLASSPATH to you environment, in the $PEGASUS_HOME directory run the script source setup-user-env.csh or source setup-user-env.sh.

9.9.14. pegasus-s3

pegasus-s3 is a client for the Amazon S3 object storage service and any other storage services that conform to the Amazon S3 API, such as Eucalyptus Walrus.

9.9.14.1. URL Format

All URLs for objects stored in S3 should be specified in the following format:

s3[s]://USER@SITE[/BUCKET[/KEY]]

The protocol part can be s3:// or s3s://. If s3s:// is used, then pegasus-s3 will force the connection to use SSL and override the setting in the configuration file. If s3:// is used, then whether the connection uses SSL or not is determined by the value of the 'endpoint' variable in the configuration for the site.

The USER@SITE part is required, but the BUCKET and KEY parts may be optional depending on the context.

The USER@SITE portion is referred to as the 'identity', and the SITE portion is referred to as the site. Both the identity and the site are looked up in the configuration file (see pegasus-s3 Configuration) to determine the parameters to use when establishing a connection to the service. The site portion is used to find the host and port, whether to use SSL, and other things. The identity portion is used to determine which authentication tokens to use. This format is designed to enable users to easily use multiple services with multiple authentication tokens. Note that neither the USER nor the SITE portion of the URL have any meaning outside of pegasus-s3. They do not refer to real usernames or hostnames, but are rather handles used to look up configuration values in the configuration file.

The BUCKET portion of the URL is the part between the 3rd and 4th slashes. Buckets are part of a global namespace that is shared with other users of the storage service. As such, they should be unique.

The KEY portion of the URL is anything after the 4th slash. Keys can include slashes, but S3-like storage services do not have the concept of a directory like regular file systems. Instead, keys are treated like opaque identifiers for individual objects. So, for example, the keys 'a/b' and 'a/c' have a common prefix, but cannot be said to be in the same 'directory'.

Some example URLs are:

s3://ewa@amazon
s3://juve@skynet/gideon.isi.edu
s3://juve@magellan/pegasus-images/centos-5.5-x86_64-20101101.part.1
s3s://ewa@amazon/pegasus-images/data.tar.gz

9.9.14.2. Subcommands

pegasus-s3 has several subcommands for different storage service operations.

9.9.14.2.1. help

pegasus-s3 help

The help subcommand lists all available subcommands.

9.9.14.2.2. ls

pegasus-s3 ls [options] URL...

The ls subcommand lists the contents of a URL. If the URL does not contain a bucket, then all the buckets owned by the user are listed. If the URL contains a bucket, but no key, then all the keys in the bucket are listed. If the URL contains a bucket and a key, then all keys in the bucket that begin with the specified key are listed.

9.9.14.2.3. mkdir

pegasus-s3 mkdir [options] URL...

The mkdir subcommand creates one or more buckets.

9.9.14.2.4. rmdir

pegasus-s3 rmdir [options] URL...

The rmdir subcommand deletes one or more buckets from the storage service. In order to delete a bucket, the bucket must be empty.

9.9.14.2.5. rm

pegasus-s3 rm [options] URL...

The rm subcommand deletes one or more keys from the storage service.

9.9.14.2.6. put

pegasus-s3 put [options] FILE URL

The put subcommand stores the file specified by FILE in the storage service under the bucket and key specified by URL. If the URL contains a bucket, but not a key, then the file name is used as the key.

If a transient failure occurs, then the upload will be retried several times before pegasus-s3 gives up and fails.

The put subcommand can do both chunked and parallel uploads if the service supports multipart uploads (see multipart_uploads in the configuration). Currently only Amazon S3 supports multipart uploads.

This subcommand will check the size of the file to make sure it can be stored before attempting to store it.

Chunked uploads are useful to reduce the probability of an upload failing. If an upload is chunked, then pegasus-s3 issues separate PUT requests for each chunk of the file. Specifying smaller chunks (using --chunksize) will reduce the chances of an upload failing due to a transient error. Chunksizes can range from 5 MB to 1GB (chunk sizes smaller than 5 MB produced incomplete uploads on Amazon S3). The maximum number of chunks for any single file is 10,000, so if a large file is being uploaded with a small chunksize, then the chunksize will be increased to fit within the 10,000 chunk limit. By default, the file will be split into 10 MB chunks if the storage service supports multipart uploads. Chunked uploads can be disabled by specifying a chunksize of 0. If the upload is chunked, then each chunk is retried independently under transient failures. If any chunk fails permanently, then the upload is aborted.

Parallel uploads can increase performance for services that support multipart uploads. In a parallel upload the file is split into N chunks and each chunk is uploaded concurrently by one of M threads in first-come, first-served fashion. If the chunksize is set to 0, then parallel uploads are disabled. If M > N, then the actual number of threads used will be reduced to N. The number of threads can be specified using the --parallel argument. If --parallel is 0 or 1, then only a single thread is used. The default value is 0. There is no maximum number of threads, but it is likely that the link will be saturated by ~4 threads. Very high-bandwidth, long-delay links may get better results with up to ~8 threads.

Note

Under certain circumstances, when a multipart upload fails it could leave behind data on the server. When a failure occurs the put subcommand will attempt to abort the upload. If the upload cannot be aborted, then a partial upload may remain on the server. To check for partial uploads run the lsup subcommand. If you see an upload that failed in the output of lsup, then run the rmup subcommand to remove it.

9.9.14.2.7. get

pegasus-s3 get [options] URL [FILE]

The get subcommand retrives an object from the storage service identified by URL and stores it in the file specified by FILE. If FILE is not specified, then the key is used as the file name (Note: if the key has slashes, then the file name will be a relative subdirectory, but pegasus-s3 will not create the subdirectory if it does not exist).

If a transient failure occurs, then the download will be retried several times before pegasus-s3 gives up and fails.

The get subcommand can do both chunked and parallel downloads if the service supports ranged downloads (see ranged_downloads in the configuration). Currently only Amazon S3 has good support for ranged downloads. Eucalyptus Walrus supports ranged downloads, but the current release, 1.6, is inconsistent with the Amazon interface and has a bug that causes ranged downloads to hang in some cases. It is recommended that ranged downloads not be used with Eucalyptus until these issues are resolved.

Chunked downloads can be used to reduce the probability of a download failing. When a download is chunked, pegasus-s3 issues separate GET requests for each chunk of the file. Specifying smaller chunks (uisng --chunksize) will reduce the chances that a download will fail to do a transient error. Chunk sizes can range from 1 MB to 1 GB. By default, a download will be split into 10 MB chunks if the site supports ranged downloads. Chunked downloads can be disabled by specifying a chunksize of 0. If a download is chunked, then each chunk is retried independently under transient failures. If any chunk fails permanently, then the download is aborted.

Parallel downloads can increase performance for services that support ranged downloads. In a parallel download, the file to be retrieved is split into N chunks and each chunk is downloaded concurrently by one of M threads in a first-come, first-served fashion. If the chunksize is 0, then parallel downloads are disabled. If M > N, then the actual number of threads used will be reduced to N. The number of threads can be specified using the --parallel argument. If --parallel is 0 or 1, then only a single thread is used. The default value is 0. There is no maximum number of threads, but it is likely that the link will be saturated by ~4 threads. Very high-bandwidth, long-delay links may get better results with up to ~8 threads.

9.9.14.2.8. lsup

pegasus-s3 lsup [options] URL

The lsup subcommand lists active uploads. The URL specified should point to a bucket. This command is only valid if the site supports multipart uploads. The output of this command is a list of keys and upload IDs.

This subcommand is used with rmup to help recover from failures of multipart uploads.

9.9.14.2.9. rmup

pegasus-s3 rmup [options] URL UPLOAD

The rmup subcommand cancels and active upload. The URL specified should point to a bucket, and UPLOAD is the long, complicated upload ID shown by the lsup subcommand.

This subcommand is used with lsup to recover from failures of multipart uploads.

9.9.14.3. pegasus-s3 Configuration

Each user should specify a configuration file that pegasus-s3 will use to look up connection parameters and authentication tokens.

9.9.14.3.1. Configuration file search path

This client will look in the following locations, in order, to locate the user's configuration file:

  1. The -C/--conf argument
  2. The S3CFG environment variable
  3. ~/.s3cfg

If it does not find the configuration file in one of these locations it will fail with an error.

9.9.14.3.2. Configuration file format

The configuration file is in INI format and contains two types of entries.

The first type of entry is a site entry, which specifies the configuration for a storage service. This entry specifies the service endpoint that pegasus-s3 should connect to for the site, and some optional features that the site may support. Here is an example of a site entry for Amazon S3:

[amazon]
endpoint = http://s3.amazonaws.com/

The other type of entry is an identity entry, which specifies the authentication information for a user at a particular site. Here is an example of an identity entry:

[pegasus@amazon]
access_key = 90c4143642cb097c88fe2ec66ce4ad4e
secret_key = a0e3840e5baee6abb08be68e81674dca

It is important to note that user names and site names used are only logical--they do not correspond to actual hostnames or usernames, but are simply used as a convenient way to refer to the services and identities used by the client.

The configuration file should be saved with limited permissions. Only the owner of the file should be able to read from it and write to it (i.e. it should have permissions of 0600 or 0400). If the file has more liberal permissions, then pegasus-s3 will fail with an error message. The purpose of this is to prevent the authentication tokens stored in the configuration file from being accessed by other users.

9.9.14.3.3. Configuration variables

Table 9.19. 

Variable Scope Description
endpoint site The URL of the web service endpoint. If the URL begins with 'https', then SSL will be used.
max_object_size site The maximum size of an object in GB (default: 5GB)
multipart_uploads site Does the service support multipart uploads (True/False, default: False)
ranged_downloads site Does the service support ranged downloads? (True/False, default: False)
access_key identity The access key for the identity
secret_key identity The secret key for the identity

9.9.14.3.4. Example configuration

This is an example configuration that specifies a single site (amazon) and a single identity (pegasus@amazon). For this site the maximum object size is 5TB, and the site supports both multipart uploads and ranged downloads, so both uploads and downloads can be done in parallel.

[amazon]
endpoint = https://s3.amazonaws.com/
max_object_size = 5120
multipart_uploads = True
ranged_downloads = True

[pegasus@amazon]
access_key = 90c4143642cb097c88fe2ec66ce4ad4e
secret_key = a0e3840e5baee6abb08be68e81674dca

[magellan]
# NERSC Magellan is a Eucalyptus site. It doesn't support multipart uploads,
# or ranged downloads (the defaults), and the maximum object size is 5GB
# (also the default)
endpoint = https://128.55.69.235:8773/services/Walrus

[juve@magellan]
access_key = quwefahsdpfwlkewqjsdoijldsdf
secret_key = asdfa9wejalsdjfljasldjfasdfa

[voeckler@magellan]
# Each site can have multiple associated identities
access_key = asdkfaweasdfbaeiwhkjfbaqwhei
secret_key = asdhfuinakwjelfuhalsdflahsdl

9.9.15. pegasus-exitcode

pegasus-exitcode is a utility that examines the STDOUT of a job to determine if the job failed, and renames the STDOUT and STDERR files of a job to preserve them in case the job is retried.

Pegasus uses pegasus-exitcode as the DAGMan postscript for all jobs submitted via Globus GRAM. This tool exists as a workaround to a known problem with Globus where the exitcodes of GRAM jobs are not returned. This is a problem because Pegasus uses the exitcode of a job to determine if the job failed or not.

In order to get around the exitcode problem, Pegasus wraps all GRAM jobs with Kickstart, which records the exitcode of the job in an XML invocation record, which it writes to the job's STDOUT. The STDOUT is transferred from the execution host back to the submit host when the job terminates. After the job terminates, DAGMan runs the job's postscript, which Pegasus sets to be pegasus-exitcode. pegasus-exitcode looks at the invocation record generated by kickstart to see if the job succeeded or failed. If the invocation record indicates a failure, then pegasus-exitcode returns a non-zero result, which indicates to DAGMan that the job has failed. If the invocation record indicates that the job succeeded, then pegasus-exitcode returns 0, which tells DAGMan that the job succeeeded.

pegasus-exitcode performs several checks to determine whether a job failed or not. These checks include:

  1. Is STDOUT empty? If it is empty, then the job failed.

  2. Are there any <status> tags with a non-zero value? If there are, then the job failed. Note that, if this is a clustered job, there could be multiple <status> tags, one for each task. If any of them are non-zero, then the job failed.

  3. Is there at least one <status> tag with a zero value? There must be at least one successful invocation or the job has failed.

In addition, pegasus-exitcode allows the caller to specify the exitcode returned by Condor using the --return argument. This can be passed to pegasus-exitcode in a DAGMan post script by using the $RETURN variable. If this value is non-zero, then pegasus-exitcode returns a non-zero result before performing any other checks. For GRAM jobs, the value of $RETURN will always be 0 regardless of whether the job failed or not.

Also, pegasus-exitcode allows the caller to specify the number of successful tasks it should see using the --tasks argument. If pegasus-exitcode does not see N successful tasks, where N is set by --tasks, then it will return a non-zero result. The default value is 1. This can be used to detect failures in clustered jobs where, for any number of reasons, invocation records do not get generated for all the tasks in the clustered job.

In addition to checking the success/failure of a job, pegasus-exitcode also renames the STDOUT and STDERR files of the job so that if the job is retried, the STDOUT and STDERR of the previous run are not lost. It does this by appending a sequence number to the end of the files. For example, if the STDOUT file is called "job.out", then the first time the job is run pegasus-exitcode will rename the file "job.out.000". If the job is run again, then pegasus-exitcode sees that "job.out.000" already exists and renames the file "job.out.001". It will continue to rename the file by incrementing the sequence number every time the job is executed.

9.9.16. Kickstart

Kickstart is a job wrapper that collects data about a job's execution environment, performance, and output.

9.9.16.1. SYNTAX

kickstart [-n tr] [-N dv] [-H] [-R site] [-W | -w dir] [-L lbl -T iso] [-s [l=]p | @fn] [-S [l=]p | @fn] [-i fn] [-o fn] [-e fn] [-X] [-l fn sz] (-I fn | app [appflags] )

kickstart -V

The kickstart executable is a light-weight program which connects the stdin, stdout and stderr filehandles for grid jobs on the remote site.

Sitting in between the remote scheduler and the executable, it is possible for kickstart to gather additional information about the executable run-time behavior and resource usage, including the exit status of jobs. This information is important for the Pegasus invocation tracking as well as to Condor DAGMan's awareness of Globus job failures.

Kickstart allows the optional execution of jobs before and after the main application job that run in chained execution with the main application job. See section SUBJOBS for details about this feature.

All jobs with relative path specifications to the application are part of search relative to the current working directory (yes, this is unsafe), and by prepending each component from the PATH environment variable. The first match is used. Jobs that use absolute pathnames, starting in a slash, are exempt. Using an absolute path to your executable is the safe and recommended option.

Kickstart rewrites the commandline of any job (pre, post and main) with variable substitutions from Unix environment variables. See section VARIABLE REWRITING below for details on this feature.

Kickstart provides a temporary named pipe (fifo) for applications that are gridstart aware. Any data an application writes to the FIFO will be propagated back to the submit host, thus enabling progress meters and other application dependent monitoring. See section FEEDBACK CHANNEL below for details on this feature.

9.9.16.2. ARGUMENTS

-n tr

In order to associate the minimal performance information of the job with the invocation records, the jobs needs to carry which transformation was responsible for producing it. The format is the notation for fully-qualified definition names, like namespace::name:version, with only the name portion being mandatory.

There is no default. If no value is given, "null" will be reported.

-N dv

the job may carry which instantiation of a transformation was responsible for producing it. The format is the notation for fully-qualified definition names, like namespace::name:version, with only the name portion being mandatory.

There is no default. If no value is given, "null" will be reported.

-H

This option avoids kickstart writing the XML preamble (entity), if you need to combine multiple kickstart records into one document.

Additionally, if specified, the environment and the resource usage segments will not be written, assuming that a in a concatinated record version, the initial run will have captured those settings.

-R site

In order to provide the greater picture, kickstart can reflect the site handle (resource identifier) into its output.

There is no default. If no value is given, the attribute will not be generated.

-L lbl, -T iso

These optional arguments denote the workflow label (from DAX) and the workflow's last modification time (from DAX). The label lbl can be any sensible string of up to 32 characters, but should use C identifier characters. The timestamp iso must be an ISO 8601 compliant time-stamp.

-S l=p

If stat information on any file is required before any jobs were started, logical to physical file mappings to stat can be passed using the -S option. The LFN and PFN are concatenated by an equals (=) sign. The LFN is optional: If no equals sign is found, the argument is taken as sole PFN specification without LFN.

This option may be specified multiple times. To reduce and overcome commandline length limits, if the argument is prefixed with an at (@) sign, the argument is taken to be a textual file of LFN to PFN mappings. The optionality mentioned above applies. Each line inside the file argument is the name of a file to stat. Comments (#) and empty lines are permitted.

Each PFN will incur a statcall record (element) with attribute id set to value initial. The optional lfn attribute is set to the LFN stat'ed. The filename is part of the statinfo record inside.

There is no default.

-s fn

If stat information on any file is required after all jobs have finished, logical to physical file mappings to stat can be passed using the -s option. The LFN and PFN are concatenated by an equals (=) sign. The LFN is optional: If no equals sign is found, the argument is taken as sole PFN specification without LFN.

This option may be specified multiple times. To reduce and overcome commandline length limits, if the argument is prefixed with an at (@) sign, the argument is taken to be a textual file of LFN to PFN mappings. The optionality mentioned above applies. Each line inside the file argument is the name of a file to stat. Comments (#) and empty lines are permitted.

Each PFN will incur a statcall record (element) with attribute id set to value final. The optional lfn attribute is set to the LFN stat'ed. The filename is part of the statinfo record inside.

There is no default.

-i fn

This option allows kickstart to re-connect the stdin of the application that it starts. Use a single hyphen to share stdin with the one provided to kickstart.

The default is to connect stdin to /dev/null.

-o fn

This option allows kickstart to re-connect the stdout of the application that it starts. The mode is used whenever an application produces meaningful results on its stdout that need to be tracked by Pegasus. The realstdout of Globus jobs is staged via GASS (GT2) or RFT (GT4), or whichever other means your grid middleware uses. The real stdout is used to propagate the invocation record back to the submit site. Use the single hyphen to share the application's stdout with the one that is provided to kickstart. In that case, the output from kickstart will interleave with application output. For this reason, such a mode is not recommended.

In order to provide an uncaptured stdout as part of the results, it is the default to connect the stdout of the application to a temporary file. The content of this temporary file will be transferred as payload data in the kickstart results. The content size is subject to payload limits, see the -B option. If the content grows large, only an initial portion will become part of the payload. If the temporary file grows too large, it may flood the worker node's temporary space. The temporary file will be deleted after kickstart finishes.

If the filename is prefixed with an exclaimation point, the file will be opened in append mode instead of overwrite mode. Note that you may need to escape the exclaimation point from the shell.

The default is to connect stdout to a temporary file.

-e fn

This option allows kickstart to re-connect the stderr of the application that it starts. This option is used whenever an application produces meaningful results on stderr that needs tracking by Pegasus. The real stderr of Globus jobs is staged via GASS (GT2) or RFT (GT4). It is used to propagate abnormal behaviour from both, kickstart and the application that it starts, though its main use is to propagate application dependent data and heartbeats. Use a single hyphen to share stderr with the stderr that is provided to kickstart. This is the backward compatible behavior.

In order to provide an uncaptured stderr as part of the results, by default the stderr of the application will be connected to a temporary file. Its content is transferred as payload data in the kickstart results. If too large, only the an initial portion will become part of the payload. If the temporary file grows too large, it may flood the worker node's temporary space. The temporary file will be deleted after kickstart finishes.

If the filename is prefixed with an exclaimation point, the file will be opened in append mode instead of overwrite mode. Note that you may need to escape the exclaimation point from the shell.

The default is to connect stderr to a temporary file.

-l logfn

allows to append the performance data to the specified file. Thus, multiple XML documents may end up in the same file, including their XML preamble. stdout is normally used to stream back the results. Usually, this is a GASS-staged stream. Use a single hyphen to generate the output on the stdout that was provided to kickstart, the default behavior.

Default is to append the invocation record onto the provided stdout.

-w dir

permits the explicit setting of a new working directory once kickstart is started. This is useful in a remote scheduling environment, when the chosen working directory is not visible on the job submitting host. If the directory does not exist, kickstart will fail. This option is mutually exclusive with the -W dir option.

Default is to use the working directory that the application was started in. This is usually set up by a remote scheduling environment.

-W dir

permits the explicit creation and setting of a new working directory once kickstart is started. This is useful in a remote scheduling environment, when the chosen working directory is not visible on the job submitting host. If the directory does not exist, kickstart will attempt to create it, and then change into it. Both, creation and directory change may still fail. This option is mutually exclusive with the -w dir option.

Default is to use the working directory that the application was started in. This is usually set up by a remote scheduling environment.

-X

make an application executable, no matter what. It is a work-around code for a weakness of globus-url-copy which does not copy the permissions of the source to the destination. Thus, if an executable is staged-in using GridFTP, it will have the wrong permissions. Specifying the -X flag will attempt to change the mode to include the necessary x (and r) bits to make the application executable.

Default is not to change the mode of the application. Note that this feature can be misused by hackers, as it is attempted to call chmod on whatever path is specified.

-B sz

varies the size of the debug output data section. If the file descriptors stdout and stderr remain untracked, kickstart tracks that output in temporary files. The first few pages from this output is copied into a data section in the output. In order to resize the length of the output within reasonable boundaries, this option permits a changes. Data beyond the size will not be copied, i.e. is truncated.

Warning: This is not a cheap way to obtain the stdio file handle data. Please use tracked files for that. Due to output buffer pre-allocation, using arbitrary large arguments may result in failures of kickstart itself to allocate the necessary memory.

The default maximum size of the data section is 262144 byte.

-I fn

In this mode, the application name and any arguments to the application are specified inside of file fn. The file contains one argument per line. Escapeing from Globus, Condor and shell meta characters is not required. This mode permits to use the maximum possible commandline length of the underlying operationg system, e.g. 128k for Linux. Using the -I mode stops any further commandline processing of kickstart command lines.

Default is to use the app flags mode, where the application is specified explicitely on the command-line.

app

The path to the application has to be completely specified. The application is a mandatory option.

appflags

Application may or may not have additional flags.

9.9.16.3. RETURN VALUE

Kickstart will return the return value of the main job. In addition, the error code 127 signals that the call to exec failed, and 126 that reconnecting the stdio failed. A job failing with the same exit codes is indistinguishable from kickstart failures.

9.9.16.4. SUBJOBS

Subjobs are a new feature and may have a few wrinkles left.

In order to allow specific setups and assertion checks for compute nodes, kickstart allows the optional execution of a prejob. This prejob is anything that the remote compute node is capable of executing. For modern Unix systems, this includes #! scripts interpreter invocations, as long as the x bits on the executed file are set. The main job is run if and only if the prejob returned regularly with an exit code of zero.

With similar restrictions, the optional execution of a postjob is chained to the success of the main job. The postjob will be run, if the main job terminated normally with an exit code of zero.

In addition, a user may specify a setup and a cleanup job. The setup job sets up the remote execution environment. The cleanup job may tear down and clean-up after any job ran. Failure to run the setup job has no impact on subsequent jobs. The cleanup is a job that will even be attempted to run for all failed jobs. No job information is passed. If you need to invoke multiple setup or clean-up jobs, bundle them into a script, and invoke the clean-up script. Failure of the clean-up job is not meant to affect the progress of the remote workflow (DAGMan). This may change in the future.

The setup-, pre-, and post- and cleanup-job run on the same compute node as the main job to execute. However, since they run in separate processes as children of kickstart, they are unable to influence each others nor the main jobs environment settings.

All jobs and their arguments are subject to variable substitutions as explained in the next section.

To specify the prejob, insert the the application invocation and any optional commandline argument into the environment variable GRIDSTART_PREJOB. If you are invoking from a shell, you might want to use single quotes to protect against the shell. If you are invoking from Globus, you can append the RSL string feature. From Condor, you can use Condor's notion of environment settings. From Pegasus, use the profile command to set generic scripts that will work on multiple sites, or the transformation catalog to set environment variables in a pool-specific fashion. Please remember that the execution of the main job is chained to the success of the prejob.

To set up the postjob, use the environment variable GRIDSTART_POSTJOB to point to an application with potential arguments to execute. The same restrictions as for the prejob apply. Please note that the execution of the post job is chained to the main job.

To provide the independent setup job, use the environment variable GRIDSTART_SETUP. The exit code of the setup job has no influence on the remaining chain of jobs. To provide an independent cleanup job, use the environment variable GRIDSTART_CLEANUP to point to an application with possible arguments to execute. The same restrictions as for prejob and postjob apply. The cleanup is run regardless of the exit status of any other jobs.

9.9.16.5. VARIABLE REWRITING

Variable substitution is a new feature and may have a few wrinkles left.

The variable substitution employs simple rules from the Bourne shell syntax. Simple quoting rules for backslashed characters, double quotes and single quotes are obeyed. Thus, in order to pass a dollar sign to as argument to your job, it must be escaped with a backslash from the variable rewriting.

For pre- and postjobs, double quotes allow the preservation of whitespace and the insertion of special characters like \a (alarm), \b (backspace), \n (newline), \r (carriage return), \t (horizontal tab), and \v (vertical tab). Octal modes are not allowed. Variables are still substituted in double quotes. Single quotes inside double quotes have no special meaning.

Inside single quotes, no variables are expanded. The backslash only escapes a single quote or backslash.

Backticks are not supported.

Variables are only substituted once. You cannot have variables in variables. If you need this feature, please request it.

Outside quotes, arguments from the pre- and postjob are split on linear whitespace. The backslash makes the next character verbatim.

Variables that are rewritten must start with a dollar sign either outside quotes or inside double quotes. The dollar may be followed by a valid identifier. A valid identifier starts with a letter or the underscore. A valid identifier may contain further letters, digits or underscores. The identifier is case sensitive.

The alternative use is to enclose the identifier inside curly braces. In this case, almost any character is allowed for the identifier, including whitespace. This is the only curly brace expansion. No other Bourne magic involving curly braces is supported.

One of the advantages of variable substitution is, for example, the ability to specify the application as $HOME/bin/app1 in the transformation catalog, and thus to gridstart. As long as your home directory on any compute node has a bin directory that contains the application, the transformation catalog does not need to care about the true location of the application path on each pool. Even better, an administrator may decide to move your home directory to a different place. As long as the compute node is set up correctly, you don't have to adjust any Pegasus data.

Mind that variable substitution is an expert feature, as some degree of tricky quoting is required to protect substitutable variables and quotes from Globus, Condor and Pegasus in that order. Note that Condor uses the dollar sign for its own variables.

The variable substitution assumptions for the main job differ slightly from the prejob and postjob for technical reasions. The pre- and postjob commandlines are passed as one string. However, the main jobs commandline is already split into pieces by the time it reaches kickstart. Thus, any whitespace on the main job's commandline must be preserved, and further argument splitting avoided.

It is highly recommended to experiment on the Unix commandline with the echo and env applications to obtain a feeling for the different quoting mechanisms needed to achieve variable substitution.

9.9.16.6. FEEDBACK CHANNEL

A long-running application may consider to stream back heart beats and other application-specific monitoring and progress data. For this reason, kickstart provides a feedback channel. At start-up, a transient named pipe, also known as FIFO, is created. While waiting for started jobs to finish, kickstart will attempt to read from the FIFO. By default, any information read will be encapsulated in XML tags, and written to stderr . Please note that in a Pegasus, Globus, Condor-G environment, stderr will be GASS streamed or staged to the submit host. At the submit host, an application specific monitor may unpack the data chunks and could for instance visually display them, or aggregate them with other data. Please note that kickstart only provides a feedback channel. The content and interpretation is up to, and specific for the application.

In order to make an application gridstart aware, it needs to be able to write to a FIFO. The filename can be picked up from the environment variable GRIDSTART_CHANNEL which is provided to all jobs. Please note that the application must be prepared to handle the PIPE signal when writing to a FIFO, and must be able to cope with failing write operations.

9.9.16.7. EXAMPLE

You can run the kickstart executable locallly to verify that it is functioning well. In the initial phase, the format of the performance data may be slightly adjusted.

$ env GRIDSTART_PREJOB='/bin/usleep 250000' \\
  GRIDSTART_POSTJOB='/bin/date -u' \\
  kickstart -l xx \\$PEGASUS_HOME/bin/keg -T1 -o-
$ cat xx
<?xml version="1.0" encoding="ISO-8859-1"?>
  ...
  </statcall>
</invocation>

Please take note a few things in the above example:

The output from the postjob is appended to the output of the main job on stdout. The output could potentially be separated into different data sections through different temporary files. If you truly need the separation, request that feature.

The log file is reported with a size of zero, because the log file did indeed barely exist at the time the data structure was (re-) initialized. With regular GASS output, it will report the status of the socket file descriptor, though.

The file descriptors reported for the temporary files are from the perspective of kickstart. Since the temporary files have the close-on-exec flag set, kickstart's filedescriptors are invisible to the job processes. Still, the stdio of the job processes are connected to the temporary files.

Even this output already appears large. The output may already be too large to guarantee that the append operation on networked pipes (GASS, NFS) are atomically written.

The current format of the performance data is as follows:

9.9.16.8. OUTPUT FORMAT

Refer to http://pegasus.isi.edu/documentation/ for an up-to-date description of elements and their attributes and for invocation schemas with a higher version number.

9.9.16.9. RESTRICTIONS

There is no version for the Condor standard universe. It is simply not possible within the constraints of Condor.

Due to its very nature, kickstart will also prove difficult to port outside the Unix environment.

Any of the pre-, main-, cleanup and postjob are unable to influence one anothers visible environment.

Do not use a Pegasus transformation with just the name null and no namespace nor version.

First Condor, and then Unix, place a limit on the length of the commandline. The additional space required for the gridstart invocation may silently overflow the maximum space, and cause applications to fail. If you suspect to work with many arguments, try an argument-file based approach.

A job failing with exit code 126 or 127 is indistinguishable from kickstart failing with the same exit codes. Sometimes, careful examination of the returned data can help.

If the logfile is collected into a shared file, due to the size of the data, simultaneous appends on a shared filesystem from different machines may still mangle data. Currently, file locking is not even attempted, although all data is written atomically from the perspective of kickstart.

The upper limit of characters of commandline characters is currently not checked by kickstart. Thus, some variable substitutions could potentially result in a commandline that is larger than permissable.

If the output or error file is opened in append mode, but the application decides to truncate its output file, as in aboves example by opening /dev/fd/1 inside keg, the resulting file will still be truncated. This is correct behavior, but sometimes not obvious.

9.9.16.10. FILES

$PEGASUS_HOME/etc/iv-2.1.xsd

is the suggested location of the latest XML schema describing the data on the submit host.

9.9.16.11. ENVIRONMENT VARIABLES

GRIDSTART_TMP

is the hightest priority to look for a temporary directory, if specified. This rather special variable was introduced to overcome some peculiarities with the FNAL cluster.

TMP

is the next hightest priority to look for a temporary directory, if specified.

TEMP

is the next priority for an environment variable denoting a temporary files directory.

TMPDIR

is next in the checklist. If none of these are found, either the stdio definition P_tmpdir is taken, or the fixed string/tmp .

GRIDSTART_SETUP

contains a string that starts a job to be executed unconditionally before any other jobs, see above for a detailled description.

GRIDSTART_PREJOB

contains a string that starts a job to be executed before the main job, see above for a detailled description.

GRIDSTART_POSTJOB

contains a string that starts a job to be executed conditionally after the main job, see above for a detailled description.

GRIDSTART_CLEANUP

contains a string that starts a job to be executed unconditionally after any of the previous jobs, see above for a detailled description.

GRIDSTART_CHANNEL

is the name of a FIFO for an application-specific feedback-channel, see above for a detailled description.