Defining new tags

In addition to the pre-defined tags listed in Queue template tags, you can also define new tags in your template script, and you can specify their values in the GUI.

Tag definitions have the following format:

EXAMPLE_TAG: { key1=value1, key2=value2, ... }

key1 and key2 are tag attribute names. value1 and value2 are the corresponding values.

The tag is replaced with the value specified in the GUI, as shown in this example.

#PBS -option EXAMPLE_TAG

These are the supported attributes:

Table 2 General queue template tag attributes

Attribute

Purpose

Examples

type

text - General text input.
select - Select from two or more options.
check - Boolean.
file - File name.
number - Real number.
integer - Integer number.

type=text

label

The label for the user interface widget.

label="Account"

default

Default value for this tag

default="interactive"

Table 3 Queue template tag attributes when type=text

Attribute

Purpose

Examples

mask

Input masks
0 ASCII digit permitted but not required.
9 ASCII digit required. 0-9.
N ASCII alphanumeric character required. A-Z, a-z, 0-9.
n ASCII alphanumeric character permitted but not required.

mask="09:09:09"

Table 4 Queue template tag attributes when type=select

Attribute

Purpose

Examples

options

Options to use, separated by the pipe (|) character.

options="not_shared|shared"

checked

Value of a check tag if checked.

checked="enabled"

unchecked

Value of a check tag if unchecked.

unchecked="enabled"

min

Minimum value.

min="0"

max

Maximum value.

max="100"

step

Amount to step by when the up or down arrows are clicked.

step="1"

decimals

Number of decimal places.

decimals="2"

suffix

Display only suffix (not included in tag value).

suffix="s"

prefix

Display only prefix (not included in tag value).

prefix="$"

Table 5 Queue template tag attributes when type=file

Attribute

Purpose

Examples

mode

open-file an existing file.
save-file a new or existing file.
existing-directory an existing directory.
open-files one or more existing files, separated by spaces.

mode="open-file"

caption

Window caption for file chooser.

caption="Select File"

dir

Initial directory for file chooser.

dir="/work/output"

filter

Restrict the files displayed in the file selector to a certain file pattern.

filter="Text files (*.txt)"

Examples

# JOB_TYPE_TAG: {type=select,options=parallel| \
  serial,label="Job Type",default=parallel}

# WALL_CLOCK_LIMIT_TAG: {type=text,label="Wall Clock Limit", \
  default="00:30:00",mask="09:09:09"}

# NODE_USAGE_TAG: {type=select,options=not_shared| \
  shared,label="Node Usage",default=not_shared}

# ACCOUNT_TAG: {type=text,label="Account",global}

See the template files in <installation-directory>/templates for more examples.

Specifying tag values

To specify values for these tags, click the Edit Template Variables button on the Job Submission Options page (see Integration with queuing systems) or the Run window.

A window displays which is similar to this:

Queue parameters window

The values you specify are substituted for the corresponding tags in the template file when you run a job.