This tip describes how to define site-specific external resources on hosts in the cluster for scheduling purposes. 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.
Note: You must be an LSF administrator to perform these steps.
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 all host-based resources in the RESOURCES column. Boolean resources use the resource name directly, while numeric and string resources use <resource_name>=<resource_value> format. Here is an 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
$ 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
Users can now use those resources in job resource requirement. Here are a few examples.
The following job asks for 4 slots and runs on a fatnode host:
bsub –n 4 –R “select[fatnode] span[hosts=1]” myjob
The following job must run within same switch and asks for 8 slots:
bsub –n 8 –R “same[switch]” myjob