attribute = value;
If a string itself contains double quotes, they must be escaped with a backslash (e.g.: Arguments = "\"hello\" 10").
For special characters, such as &, the shell on the WN will itself expect the escaped form: \&, and therefore both the slash and the ampersand will have to be escaped inside the JDL file, resulting in: \\\&.
In general, special characters such as &, |, >, < are only allowed if specified inside a quoted string or preceded by triple \. The character ' (single quote) cannot be specified in the JDL.
| Attribute | Mandatory? | Meaning | Example |
|---|---|---|---|
| Executable | yes | Specify executable | Executable = "test.sh"; |
| Arguments | no | Supply arguments to the executable | Arguments = "hello 10"; |
| StdOutput | yes | Specify standard output | StdOutput = "std.out"; |
| StdError | yes | Specify standard error | StdError = "std.err"; Can be the same as StdOutput |
| StdInput | no | Specify standard input | StdInput = "std.in"; |
| InputSandbox | no | Transfer input files from UI to Worker Node | InputSandbox = {"test.sh","std.in"}; |
| OutputSandbox | no | Transfer output files from Worker Node to UI | OutputSandbox = {"std.out","std.err"}; |
| Environment | no | Extend the environment | Environment = {"CMS_PATH=$HOME/cms","CMS_DB=$CMS_PATH/cmdb"}; |
| Requirements | no | Imposing Constraints on the CE | Requirements = other.GlueCEInfoLRMSType == "PBS"; |
| Rank | no | Apply a weight to select CE | Rank = other.GlueCEStateFreeCPUs; |
| PerusalFileEnable | no | Enable job perusal | PerusalFileEnable = true; |
| PerusalTimeInterval | no | Specify in seconds frequency that specified files are copied to WMS machine, | PerusalTimeInterval = 30; |
Additional Notes of Selected Attributes
To force a job to only run on a particular CE:-
Requirements = other.GlueCEName == "minosL";where the other. prefix is used to indicate that the GlueCEName attribute refers to the CE characteristics and not to those of the job. If other. is not specified, then the default self. is assumed, indicating that the attribute refers to the job characteristics description.
Requirements can be ANDed together:-
Requirements = other.GlueCEName == "minosL" && other.GlueCEInfoTotalCPUs > 1;which ANDs in the requirement that there are at least 2 CPUs on the machine.
By default the system always ANDs in other requirement:-
Requirements = other.GlueCEStateStatus == "Production" ;A requirement can be negated:-
Requirements = (!other.GlueCEInfoTotalCPUs < 10);
One essential requirement for production work is that the machine has the appropriate software installed. The attribute we need to test in this case is GlueHostApplicationSoftwareRunTimeEnvironment but there is a complication (apart from the length of the name!): it is a list and all we require is that our software is on the list. This is done with
Requirements = Member("VO-minos-minossoft-R1.21-build_1",other.GlueCEInfoTotalCPUs);
The Member function is satisfied if the first argument(a scalar value) is a
member of its second argument (a list).
Another function RegExp can be used to see if a supplied matches as as regular expression, for example
Requirements = RegExp("cern.ch", other.GlueCEUniqueId);
i.e. GlueCEUniqueId contains "cern.ch".
The previous requirements affected always two entities: the job and the CE. In order to specify requirements involving three entities (i.e., the job, the CE and a SE), the RB uses a special match-making mechanism, called gangmatching. This is supported by some JDL functions: anyMatch, whichMatch, allMatch. For example to ensure that the job runs on a CE with,, at least 200 MB of free disk space on a close SE, the following JDL expression can be used:-
Requirements = anyMatch(other.storage.CloseSEs,target.GlueSAStateAvailableSpace > 204800);
The user can define the rank with the Rank attribute as a function of the CE attributes. The default definition takes into account the number of CPUs in the CPU that are free:
Rank = other.GlueCEStateFreeCPUs;But other definitions are possible. The next one is a more complex expression:
Rank = ( other.GlueCEStateWaitingJobs == 0 ? other.GlueCEStateFreeCPUs : -other.GlueCEStateWaitingJobs);In this case, the number of waiting jobs in a CE is used if this number is not null. The minus sign is used so that the rank decreases as the number of waiting jobs gets higher. If there are not waiting jobs, then the number of free CPUs is used.
This section has been plundered from @ gLite 3 User Guide / 6.2 Job Description Language