-
Notifications
You must be signed in to change notification settings - Fork 1
Templates
Templates are text file that describe a set of widgets and how to lay them out in order to create input masks for application specific job creation.
commandline = mb ${file}
application = MrBayes
force_mpi = true
= Create a MrBayes job =
-
[file]
type = SingleInputFile
title = MrBayes NEXUS file
size = 2000x70
filter = BasenameFilter
help = you need to specify a MrBayes NEXUS file
-
[cpus]
type = Cpus
title = CPUs
size = 100x70
defaultValue = 1
[walltime]
type = Walltime
title = Walltime
defaultAmount = 1
defaultUnit = hours
#useHistory = false
size = 200x70
-
[jobname]
type = Jobname
defaultValue = MrBayes_job
title = Jobname
size = 2000x70
A template always starts with the commandline key:
commandline = <command to execute>
The commandline can take variables (in the form ${widgetname}) in order to get values from the widgets that are defined below.
Following the first line, you can set fixed properties of a job, i.e. number of cpus if you know it'll be a single job for example.
Here are the most common properties one might want to set:
Property name | Description | allowed values
---------------------------------------------------------------------------------------------------------
application | the application name as it is listed in MDS | String
applicationVersion | the application version | String
force_mpi | whether the job is always submitted as mpi job | true/false
force_single | whether the job is always submitted as a single job | true/false
hostCount | static value of required host number for the job | Integer
memory | static value of required memory for the job | Integer (bytes)
waltimeInSeconds | static value of wall time for the job | Integer (seconds)
Now input panels can be specified. All input panels have to be placed into tabs. There can be 1 or more tabs in a template (at least one tab has to be declared.)
To declare a tab, put the tab name into equal characters like this:
= tab name =
Minus (-) can be used anywhere in the template to move the next widget to be specified into a new row.
You can specify a filter for every widget in order to transform the value of the widget. For example, if you have got a SingleInputFile widget, it's value would be the full path/url to the file you are selecting. Now, if you need to use the name of the file on the commandline, you only want the file name, since it'll be staged into the job directory, which will be the current working directory for the job. In order to achieve that, you add the BasenameFilter to the widget, ala:
filter = BasenameFilter
You can also chain together several filters if you need. You could, for example, do the following:
filter = BasenameFilter
filter = SimpleStringFilter[prefix=--file :prefixWhenEmpty=false]
The 2nd filter takes the result of the first one, and prefixes it with --file , but only if the value is not empty. That can be used, for example, to add optional parameters to the commandline.
Here's a list of all currently available widgets. You can also select the "widget" template in the Grisu template client to see examples of all those widgets "live".
This only makes sense for a generic template where you don't know which application package is used by the submitted job. It'll parse the current commandline of the job, extract the executable and either display all available Appliations grid-wide (if it can't find a suitable application package) or display all application package that provide the executable.
Supported properties:
Property name | Description | Allowed values
--------------------------------------------------------------------------------------------------------------
title | The title of the widget | String
size | Size of the widget | <width>x<height>, e.g. 2000x70
Displays a list of available versions for the currently selected application package in combination with the selected VO.
Supported properties:
Property name | Description | Allowed values
--------------------------------------------------------------------------------------------------------------
title | The title of the widget | String
size | Size of the widget | <width>x<height>, e.g. 2000x70
Property name | Description | Allowed values
--------------------------------------------------------------------------------------------------------------
title | The title of the widget | String
size | Size of the widget | <width>x<height>, e.g. 2000x70
| |