The XRSL plugin support the creation of jobs where the user can describe the job direct in XRSL. This plugin also supports variable substituion inside the XRSL code as well as in any additional input files. The plugin is divided in 3 tabs, XRSL, Input files and Parameters.
In this tab the job description can be entered in the XRSL language. The tab contains a toolbar with 3 buttons described in the following table.
Toolbar icon | Purpose |
---|---|
validates the entered XRSL. | |
edits the XRSL in an external editor. | |
imports the XRSL from an external file. |
arcjobtool creates directories for each job (task directory) defined in a parameter sweep. To specify local input files the task dir of a specific job has to specified which is not known when the XRSL is edited. To solve this a special directive, taskdir, can be used in the XRSL source code when the location of the jobs taskdir is needed. The following shows an example where the file, myscript, which will be retrieved from %(taskdir)s directory. The taskdir directive will be replaced with the correct directory before job submission.:
&(executable="/bin/sh")
(arguments="myscript")
(inputFiles=("myscript" "%(taskdir)s/myscript"))
(stdout="stdout.txt")
(stderr="stderr.txt")
(wallTime="5 minutes")
Input files will be transferred to the selected resource by arcjobtool and can consist of scripts, binary files and textfiles.
Files are added by clicking on the Add button. This brings up a file selection dialog. Select the input file to be included with the job definition. When the file has been selected it is copied into the job definition by arcjobtool. This approach enables the user to move the entire job definition without any dependencies on local files.
arcjobtool can also create new input files using the Create... button. Clicking on this button shows a dialog box asking for a filename. When the filename has been selected an system editor is shown and the file can be edited. arcjobtool will suspend its execution until the editor is closed.
An input file can be removed from the input file list by selecting it in the Input files listbox and clicking on Remove. This removes the input file from the job definition directory.
All input files in the job definition can be cleared by clicking on the Clear button. This will remove all input files except the run.sh from the job definition directory.
Existing input files in the job definition can be edited by selecting the file in the Input files listbox and clicking on the Edit... button. This will bring up a system editor enabling the user to edit the input file.
Note
Editing of binary files is not supported. Editing a binary file in the system editor will only show “garbage” in the editor window. Please be careful not saving the binary file when it has been opened in the editor.
The Parameters tab settings for the parameter sweep can be defined. arcjobtool can do parameter substitution of certain parameters in the script and input files. The following substitution parameters can be used:
Parameter | Description |
%(name)s | Parameter containing the job name |
%(id)d | id of the current task 1-sweepsize |
%(sweepSize)d | The size of the parameter sweep |
An example of a shell-script with substitution parameters are shown in the following example:
#!/bin/sh
echo "Jobname %(name)s"
echo "Task id %(id)d"
echo "Sweep size %(sweepSize)d"
arcjobtool will only do parameter substitution of files listed int the listbox Parameter substitution files.
Files which should be considered for substitution can be added by clicking on the Add... button. This will bring up a dialog showing the existing input files in the definition. Select the file to use for substitution in the list box and click OK
Files selected for parameter substitution can be removed by selecting the file in the Parameter substitution files listbox and clicking on the Remove button.
All files selected for parameter substitution can be cleared by clicking on the Clear button.
Existing input files in the job definition can be edited by selecting the file in the Input files listbox and clicking on the Edit... button. This will bring up a system editor enabling the user to edit the input file.
Note
Editing of binary files is not supported. Editing a binary file in the system editor will only show “garbage” in the editor window. Please be careful not saving the binary file when it has been opened in the editor.
The sweep size parameter controls how many jobs to submit in the parameter sweep. Changing this parameter will create a subdirectory in the job definition for each parameter. Each subdirectory is a single job that will be submitted to the grid. Changing the sweep size will automatically add and remove these directories. The sweep size is changed by changing the value in the Sweep size text box or using the spinner controls on the right side of the textbox.
Note
Currently arcjobtool has a limitation of 9999 jobs for a single parameter sweep.