LSF Version 7.3 - Administering Platform LSF

Administering Platform LSF 265
Managing Software Licenses with LSF
Use the duration keyword in the queue resource requirement specification to
release the shared resource after the specified number of minutes expires. This
prevents multiple jobs started in a short interval from over-using the available
licenses. By limiting the duration of the reservation and using the actual license
usage as reported by the ELIM, underutilization is also avoided and licenses used
outside of LSF can be accounted for.
When interactive jobs compete for licenses
In situations where an interactive job outside the control of LSF competes with
batch jobs for a software license, it is possible that a batch job, having reserved the
software license, may fail to start as its license is intercepted by an interactive job.
To handle this situation, configure job requeue by using the
REQUEUE_EXIT_VALUES parameter in a queue definition in
lsb.queues. If a
job exits with one of the values in the REQUEUE_EXIT_VALUES, LSF will requeue
the job.
Example Jobs submitted to the following queue will use Verilog licenses:
Begin Queue
QUEUE_NAME = q_verilog
RES_REQ=rusage[verilog=1:duration=1]
# application exits with value 99 if it fails to get license
REQUEUE_EXIT_VALUES = 99
JOB_STARTER = lic_starter
End Queue
All jobs in the queue are started by the job starter lic_starter, which checks if the
application failed to get a license and exits with an exit code of 99. This causes the
job to be requeued and LSF will attempt to reschedule it at a later time.
lic_starter job
starter script
The lic_starter job starter can be coded as follows:
#!/bin/sh
# lic_starter: If application fails with no license, exit 99,
# otherwise, exit 0. The application displays
# "no license" when it fails without license available.
$* 2>&1 | grep "no license"
if [ $? != "0" ]
then
exit 0 # string not found, application got the license
else
exit 99
fi
For more information
See Automatic Job Requeue on page 469 for more information about
configuring job requeue
See Chapter 37, “Job Starters” for more information about LSF job starters