Platform LSF Administrator's Primer Version 6.2

Managing Software Licenses and Other Shared Resources
Platform LSF Administrator’s Primer
50
The value of the second load index (2)
and so on.
Writing the ELIM
program
The ELIM must be an executable program, named elim, located in the
LSF_SERVERDIR directory.
When
lim is started or restarted, it invokes elim on the same host and takes the
standard output of the external load indices sent by
elim. In general, you can define any
quantifiable resource as an external load index, write an ELIM to report its value, and
use it as an LSF resource.
Example elim
The following sample elim uses license1 and license2 and assumes the FLEXlm
license server controls them:
#!/bin/sh
NUMLIC=2 # number of dynamic shared resources
while true
do
TMPLICS='/usr/share/lsf/lsf_62/6.2/sparc-sol2/etc/lic -c
/usr/share/lsf/lsf_62/conf/license.dat –f license1, license2'
LICS='echo $TMPLICS | sed -e s/-/_/g'
echo $NUMLIC $LICS # $NUMLIC is number of dynamic shared
resource
sleep 30 # Resource
done
The sed command changes the minus sign (-) to underscore (_) in the license feature
names because LSF uses the minus sign for calculation, and it is not allowed in resource
names.
lic utility
The lic utility is available from support@platform.com. You can also use the
FLEXlm command
lmstat to make your own ELIM.
Using dynamic shared resources
To enable the new shared resources in your cluster, restart LSF with the commands:
lsadmin reconfig
badmin reconfig
If no errors are found, use lsload -l to verify the value of your dynamic shared
resources:
HOST_NAME status r15s r1m r15m ut pg io ls it tmp swp mem license1 license2
hosta ok 0.1 0.3 0.4 8% 0.2 50 73 0 62M 700M 425M 3 0
hostb ok 0.1 0.1 0.4 4% 5.7 3 3 0 79M 204M 64M 3 0
Submitting jobs
using shared
resources
To submit a batch job using one license1 resource, use a command like:
% bsub -R 'rusage[license1=1:duration=1]' myjob
In the resource requirement (rusage) string, duration=1 means that license1 is
reserved for 1 minute to give LSF time to check it out from FLEXlm.
You can also specify the resource requirement string at queue level, in the RES_REQ
parameter for the queue. In
LSB_CONFDIR/cluster_name/configdir/lsb.queues, specify: