This article describes how to define site-specific external resources on hosts in the
cluster for scheduling purposes.
Before you begin
You must be an LSF
administrator.
About this task
LSF supports three types of external resources: boolean, string and numeric. Use the following
steps to define and use external host-based resources in LSF.
Procedure
- Define external resources in lsf.shared.
You must specify at least a name and a brief description in the
RESOURCENAME and DESCRIPTION columns. The following
example has three resources of different types. All are static resources. For dynamic resources, you
must use INTERVAL to define how frequently the resource is updated.
Begin Resource
RESOURCENAME TYPE INTERVAL INCREASING DESCRIPTION
bigmem Boolean () () (Hosts with very big memory)
switch String () () (network switch)
appA Numeric () N (Application Licenses)
End Resource
- Define resources in the RESOURCES column of the
Host section of
lsf.cluster.cluster_name.
Define all host-based resources in the RESOURCES column. Boolean
resources use the resource name directly, while numeric and string resources use the
<resource_name>=<resource_value>
format.
For example,
Begin Host
HOSTNAME model type server r1m mem swp RESOURCES
fatnode ! ! 1 3.5 () () (bigmem appA=4)
s1node1 ! ! 1 3.5 () () (switch=s1)
s1node2 ! ! 1 3.5 () () (switch=s1)
s1node3 ! ! 1 3.5 () () (switch=s1)
s1node4 ! ! 1 3.5 () () (switch=s1)
s2node1 ! ! 1 3.5 () () (switch=s2)
s2node2 ! ! 1 3.5 () () (switch=s2)
...
s4node1 ! ! 1 3.5 () () (switch=s4)
s4node2 ! ! 1 3.5 () () (switch=s4)
s4node3 ! ! 1 3.5 () () (switch=s4)
s4node4 ! ! 1 3.5 () () (switch=s4)
End Host
- Run lsadmin reconfig and badmin mbdrestart to
reconfigure LIM and mbatchd to make the new resource definition take effect. Use
lshosts to verify the result.
$ lshosts fatnode
HOST_NAME type model cpuf ncpus maxmem maxswp server RESOURCES
fatnode X86_64 Intel_EM 60.0 16 128G 32G Yes (bigmem)
$ lshosts -s
RESOURCE VALUE LOCATION
switch s1 s1node1
switch s1 s1node2
switch s1 s1node3
switch s1 s1node4
...
switch s4 s4node4
appA 4 fatnode
Example
Your users can now use those resources in job resource requirements. For example: