Platform LSF Administration Guide Version 6.2
Selection String
Administering Platform LSF
266
Operators
These operators can be used in selection strings. The operators are listed in order of
decreasing precedence.
Examples
select[(swp > 50 && type == MIPS) || (swp > 35 && type ==
ALPHA)]
select[((2*r15s + 3*r1m + r15m) / 6 < 1.0) && !fs && (cpuf >
4.0)]
Specifying shared resources with the keyword “defined”
A shared resource may be used in the resource requirement string of any LSF command.
For example when submitting an LSF job which requires a certain amount of shared
scratch space, you might submit the job as follows:
%
bsub -R "avail_scratch > 200 && swap > 50" myjob
The above assumes that all hosts in the cluster have access to the shared scratch space.
The job will only be scheduled if the value of the
"avail_scratch" resource is more
than 200 MB and will go to a host with at least 50 MB of available swap space.
It is possible for a system to be configured so that only some hosts within the LSF
cluster have access to the scratch space. In order to exclude hosts which cannot access
a shared resource, the
defined(resource_name) function must be specified in
the resource requirement string.
For example:
%
bsub -R "defined(avail_scratch) && avail_scratch > 100 &&
swap > 100" myjob
would exclude any hosts which cannot access the scratch resource. The LSF
administrator configures which hosts do and do not have access to a particular shared
resource.
Syntax Meaning
-a
!a
Negative of a
Logical not: 1 if a==0, 0 otherwise
a * b
a / b
Multiply a and b
Divide a by b
a + b
a - b
Add a and b
Subtract b from a
a > b
a < b
a >= b
a <= b
1 if a is greater than b, 0 otherwise
1 if a is less than b, 0 otherwise
1 if a is greater than or equal to b, 0 otherwise
1 if a is less than or equal to b, 0 otherwise
a == b
a != b
1 if a is equal to b, 0 otherwise
1 if a is not equal to b, 0 otherwise
a && b Logical AND: 1 if both a and b are non-zero, 0 otherwise
a || b Logical OR: 1 if either a or b is non-zero, 0
otherwise