Platform LSF Administration Guide Version 6.2

Chapter 15
Specifying Resource Requirements
Administering Platform LSF
265
Selection String
The selection string specifies the characteristics a host must have to match the resource
requirement. It is a logical expression built from a set of resource names. The selection
string is evaluated for each host; if the result is non-zero, then that host is selected.
Syntax
The selection string can combine resource names with logical and arithmetic operators.
Non-zero arithmetic values are treated as logical TRUE, and zero (0) as logical FALSE.
Boolean resources (for example,
server to denote LSF server hosts) have a value of
one (1) if they are defined for a host, and zero (0) if they are not defined for the host.
The resource names
swap, idle, login, and cpu are accepted as aliases for swp, it,
ls, and r1m respectively.
For
ut, specify the percentage CPU utilization as an integer between 0-100.
For the string resources
type and model, the special value any selects any value and
local selects the same value as that of the local host. For example, type==local
selects hosts of the same type as the host submitting the job. If a job can run on any type
of host, include
type==any in the resource requirements.
If no
type is specified, the default depends on the command. For bsub, lsplace,
lsrun, and lsgrun the default is type==local unless a string or Boolean resource
is specified, in which case it is
type==any. For lshosts, .lsload, lsmon and
lslogin the default is type==any.
Selecting shared string resources
You must use single quote characters (') around string-type shared resources. For
example, use
lsload -s to see the shared resources defined for the cluster:
$ lsload -s
RESOURCE VALUE LOCATION
os_version 4.2 pc36
os_version 4.0 pc34
os_version 4.1 devlinux4
cpu_type ia pc36
cpu_type ia pc34
cpu_type unknown devlinux4
Use a select string in lsload -R to specify the shared resources you want to view,
enclosing the shared resource values in single quotes. For example:
$ lsload -R "select[os_version=='4.2' || cpu_type=='unknown']"
HOST_NAME status r15s r1m r15m ut pg ls it tmp swp mem
pc36 ok 0.0 0.2 0.1 1% 3.4 3 0 895M 517M 123M
devlinux4 ok 0.0 0.1 0.0 0% 2.8 4 0 6348M 504M 205M