The following tags are used inside the Request, Job, and ForEach Tags.
The <Command> tag is used to specify the command that will be run on the farm node. It takes its value from the body of this tag. The command may be multiple lines long, or a single line. Note that since this is an XML file, if you want to use XML special characters (in particular < and &), you need to either write them the XML way (< and &) or you can embed your entire command in a CDATA tag. (<![CDATA[ your command ]]>)
<Command>ls</Command>
<Command><![CDATA[ ls >& file myscript.sh < file ]]></Command>
The <CPU> tag is used to specify the number of CPU cores your job needs. If the tag is not specified, your job will be assigned one cpu core.
The <DiskSpace> tag is used to specify the amount of memory your job needs. It takes its values from the required attributes space and unit. No subtags are allowed.
<Memory space="700" unit="MB" />
The <DiskSpace> tag is used to specify the amount of diskspace your job needs. It takes its values from the required attributes space and unit. No subtags are allowed.
<DiskSpace space="15" unit="GB" />
The <OS> tag is used to specify which type of machine the jobs should execute on, centos77 (for example). No subtags are allowed.
<OS name="centos77" />
The <Email> tag is used to specify the email address status is sent to. It takes its values from the required attribute email and the optional attributes request and job. The email attribute specifies the email address. The request attribute takes a Boolean value (true or false) and determines whether or not to send an email when the entire request has finished. The job attribute also take a Boolean value and determines whether or not to send an email after each job completes. No subtags are allowed.
If you want email sent to multiple email address, use multiple <Email> tags.
<Email name="mschatz@jlab.org request="true" job="false"/> <Email name="user@jlab.org" request="false" job="true" />
The <Input> tag is used to specify where the input files for your program should come from. It has two mandatory attributes, src and dest. The src is specified as a URI. The src attribute can take either a file: type of resource or an mss: type resource. If your input file is coming from disk, you should specify the src as a file: followed by an absolute path name. If you file is coming from the Jasmine tape silo, you should specify your src as mss: followed by the absolute path to the stub file. The dest should just be a file name.
<Input src="file:/home/user/file.txt dest=file.txt" /> <Input src="mss:/mss/home/user/tape.file dest=tape.file" />
The <List> tag is used to specify a list of values for use in a ForEach tag. There is a required attribute, name, which defines the name of the list. The values of the list are placed in the body of the tag and should be white space separated.
<List name="words">word1 word2 word3 word4</List> <List name="fileList"> file1 file2 file3 file4 </List>
The <Name> tag is used to specify the name that this job will have. If it is specified at the Request level, this name is used by all of the following jobs. If it is specified at the Job level, the given name will override any name specified at the submission level. It has one required attribute, name, which is the name this job should have. This name should not contain spaces.
<Name name="testSubmission"/><Name name="echoJob"/>
The <Output> tag is used to specify where the output files from your program should go to. It has two mandatory attributes, src and dest. The dest is specified as a URI. The src attribute should always be the name of the output file that is being saved. The dest attribute can take either a file: type of resource or an mss: type resource. If your output file is being copied to disk, you should specify the dest as a file: followed by an absolute path name. If you file is going to the Jasmine tape silo, you should specify your dest as mss: followed by the absolute path to the stub file.
<Output src="outfile.dat" dest="file:/home/user/file.out" /> <Output src="outfile.dat" dest="mss:/mss/home/user/tape.out" />
The <Project> tag is used to specify the name of the project this job is part of. This tag can only be specified at the Request level. A submission must have exactly one project entry. It has one required attribute, name, which is the name of the project. This name should not contain spaces.
<Project name="projectName" />
The <Track> tag specifies which queue the job should go in. This tag has a single required attribute, name, which can contain the values priority, production, low_priority, or idle.
<Track name="production"/><Track name="low_priority"/>
The <Stderr> tag is used to specify a file location for stderr. It has one required attribute, dest which is a URI specifying where the file should go. If you dont specify use the <Stderr> tag, stderr will go to output where it will be sent via email, if you have the job attribute of email set to true.
<Stderr dest="file:/work/experiment/log.stderr"/>
The <Stdout> tag is used to specify a file location for stdout. It has one required attribute, dest which is a URI specifying where the file should go. If you dont specify use the <Stdout> tag, stdout will go to output where it will be sent via email, if you have the job attribute of email set to true.
<Stdout dest="file:/work/experiment/log.stdout"/>
The <TimeLimit> tag is used to limit the amount of time your job can run. The value is specified as a single number in the required attribute time. This tag takes an optional attribute of unit which specifies the unit the number is for. This can take values of seconds, minutes, hours, or days. If not specified, it is assumed to be minutes. Note that the farm currently only resolves to the nearest minute, so if you specify it in seconds it will be truncated to the number of minutes.
<TimeLimit time="10"/> <!-- 10 minutes --><TimeLimit time ="7" unit="days"/> <!-- 7 days -->
The <Variable> tag is used to specify variables which can then be referred to later in the script. The Variable tag has two required parameters, name and value. To refer to the variable later, you use the value ${name} where name is the name you gave to the variable at specification time. Note that the ForEach tag implicitely creates a variable inside the ForEach with the name of the list that the ForEach is iterating over.
<Variable name="dir" value="file:/home/users"/> <Input src="${dir}/file1.in" dest="file:file.in"/> <Output src="file:file.out" dest="${dir}/file1.out"/><Variable name="prefix" value="mss:/mss/group/project/run/"/> <List name="files">file1 file2 file3 file4 file5</List> <ForEach list="files"> <Input src="${prefix}/${files}.in" dest="in.in"/> <Output src="out.out" dest="${prefix}/${files}.out"/> <Job> <Command>cp in.in out.out</Command> </Job> </ForEach>