How can a workflow be influenced from the command line without
changing the workflow specification files?
Objectives
Use tags to influence configuration values.
Run different workflows with the same configuration.
Now that we transferred our initial workflow to a JUBE configuration,
we would like to extend this to work with other versions of GROMACS as
well.
Fortunately, all names in the URL and archive follow the same
convension, and we have already separated the values involved into the
proper parameters. So now, we can modify our GROMACS workflow to use a
different version of the software.
When we run our workflow again, it will download and build the 2024.1
version of the GROMACS software.
SH
$ jube run gromacs.xml
You can demonstrate the workflow run and showcase that the new
archive was downloaded, and the software eventually installed in a
different directory.
Now, we might not want to modify our configuration every time
directly if we want to compare runs of two different versions, or
comment in or our specific lines in our parametersets.
Uniqueness of parameters
Parameters in JUBE have to be globally unique. That means now two
different parametersets are allowed to define a parameter of the same
name.
However, if several parameter definitions for the same name exist,
the last definition will determine the parameter’s value during the
workflow run.
The following specification will result in the parameter
var being assigned the value two.
JUBE allows the attribute tag for any part of the
configuration. Tagged parts of the configuration are either retained in
or removed from the workflow specification during a run, depending on
tags for that run specified on the command line.
In the presence of tags,
Any entity without a tag attribute will be retained in
the workflow.
Any entity with a tag attribute and the value of the
attribute defined, will be retained in the workflow.
Any entity with a tag attribute and the value of the
attribute not defined, will be removed in the workflow.
Tag attributes are also allowed to be comma-separated lists of tag
names. A specification of ! (exclamation mark) in front of
a tag name will invert rules 2 and 3 above (not
specification).
The not (!) specification has higher precedence
than the normal tag specification. Consider the following parameter
definitions:
Using the tag functionality, we can add a second
definintion of the build_gromacs parameter with a
rebuild tag to the workflow specification to force JUBE to
rebuild of GROMACS just by adding the rebuild tag on the
command line when running a workflow.