Platform LSF Administration Guide Version 6.2

Chapter 15
Specifying Resource Requirements
Administering Platform LSF
271
A queue with the same resource requirements could specify:
RES_REQ = rusage[mem=20, license=1:duration=2]
The following job requests 20 MB of memory and 50 MB of swap space for 1 hour,
and 1 license to be reserved for 2 minutes:
% bsub -R "rusage[mem=20:swp=50:duration=1h, license=1:duration=2]" myjob
The following job requests 50 MB of swap space, linearly decreasing the amount
reserved over a duration of 2 hours, and requests 1 license to be reserved for 2
minutes:
% bsub -R "rusage[swp=20:duration=2h:decay=1, license=1:duration=2]" myjob
The following job requests two resources with same duration but different decay:
% bsub -R "rusage[mem=20:duration=30:decay=1, lic=1:duration=30] myjob
Specifying alternate usage strings
If you use more than one version of an application, you can specify the version you
prefer to use together with a legacy version you can use if the preferred version is not
available. Use the
OR (||) expression to separate the different usage strings that define
your alternate resources.
Job-level resource requirement specifications that use the
|| operator take precedence
over any queue-level resource requirement specifications.
Examples
The following examples assume that you are running an application version 1.5 as a
resource called
app_lic_v15 and the same application version 2.0.1 as a resource
called
app_lic_v201. The license key for version 2.0.1 is backward compatible with
version 1.5, but the license key for version 1.5 will not work with 2.0.1
If you can only run your job using version 2.0.1 of the application, submit the job
without specifying an alternate resource. To submit a job that will only use
app_lic_v201:
%
bsub -R "rusage[app_lic_v201=1]" myjob
If you can run your job using either version of the application, try to reserve version
2.0.1 of the application. If it is not available, you can use version 1.5. To submit a
job that will try
app_lic_v201 before trying app_lic_v15:
%
bsub -R "rusage[app_lic_v201=1||app_lic_v15=1]" myjob
If different versions of an application require different system resources, you can
specify other resources in your
rusage strings. To submit a job that will use 20 MB
of memory for
app_lic_v201 or 20 MB of memory and 50 MB of swap space
for
app_lic_v15:
%
bsub -R "rusage[mem=20:app_lic_v201=1||mem=20:swp=50:app_lic_v15=1]" myjob
Non-batch environments
Resource reservation is only available for batch jobs. If you run jobs using only LSF
Base, such as through
lsrun, LIM uses resource usage to determine the placement of
jobs. Resource usage requests are used to temporarily increase the load so that a host is
not overloaded. When LIM makes a placement advice, external load indices are not
considered in the resource usage string. In this case, the syntax of the resource usage
string is
res[=value]:res[=value]: ... :res[=value]