Building Rocoto Workflow Suites#

This application provides the user with a YAML-based configuration interface for building Rocoto workflow suites. This section provides a simple example for configuring a HELLO_WORLD type Rocoto workflow suite.

Configuring the Suite#

The following is an example configuration for a Rocoto workflow suite.

schema: !ENV ${ENGINES_ROOT}/parm/rocoto/schema/workflow.schema.yaml

schemas:
  cycledefs: !ENV ${ENGINES_ROOT}/parm/rocoto/schema/cycledefs.schema.yaml
  platform: !ENV ${ENGINES_ROOT}/parm/rocoto/schema/platform.schema.yaml

platform:
  scheduler: slurm
  realtime: true

cycledefs:
  breakfast: "* 6 * * * *"
  lunch: "* 12 * * * *"
  dinner: "* 18 * * * *"

tasks:
  - !ENV ${ENGINES_ROOT}/parm/rocoto/tasks/eggs.yaml
  - !ENV ${ENGINES_ROOT}/parm/rocoto/tasks/ham.yaml
  - !ENV ${ENGINES_ROOT}/parm/rocoto/tasks/spam.yaml

The configuration variables are described in the following table.

Variable

Description

environment

The global environment variables available to the entire Rocoto workflow suite.

platform

The attributes describing the respective host/platform upon which the respective Rocoto workflow suite will be launched; a complete list of available attributes cnan be foune here

schema

Contains the schema of attributes available for the respective Rocoto workflow configuration.

schemas

The schemas for each Rocoto workflow component; the user is strongly discouraged to modify the respective schema files.

tasks

YAML-formatted files containin the attributes for each respective Rocoto workflow task.

Building the Suite#

The Rocoto workflow suite configured above may be constructed as follows.

user@host:$ cd /path/to/ufs_engines/scripts
user@host:$ ./rocoto_workflow.py --help

Usage: rocoto_workflow.py [-h] expt_name output yaml

Rocoto workflow builder application interface.

Positional Arguments:
  expt_name   The experiment name for the Rocoto workflow.
  output      The directory-tree path to where the Rocoto workflow suite is to be written.
  yaml        The YAML-formatted file containing the Rocoto workflow attributes.

Optional Arguments:
  -h, --help  show this help message and exit

user@host:$ ./rocoto_workflow.py experiment_name /path/to/output/directory /path/to/yaml/suite/attributes

Successful execution will result in the Rocoto XML-formatted suite file written to the path specified by /path/to/output/directory in the example above.

Dependencies#

The dependencies for each task are contained in XML-formatted files. The format for the dependencies can be found beneath The <dependency> tag section here. The HELLO_WORLD configurations found beneath /path/to/ufs_engines/parm/rocoto/depends provide examples. Note that the XML tags <dependency> and </dependency> should not be included in the respective files.

Tasks#

The respective Rocoto workflow suite task attributes are contained in YAML-formatted files. A complete list of the available attributes can be found beneath The <task> tag section here. The HELLO_WORLD configurations can be found beneath /path/to/ufs_engines/parm/rocoto/tasks as examples.