Limit the number of processors allocated

Use the PROCLIMIT parameter in lsb.queues or lsb.applications to limit the number of processors that can be allocated to a parallel job.

Syntax

PROCLIMIT = [minimum_limit [default_limit]] maximum_limit

All limits must be positive numbers greater than or equal to 1 that satisfy the following relationship:

1 <= minimum <= default <= maximum

You can specify up to three limits in the PROCLIMIT parameter:

If you specify ...

Then ...

One limit

It is the maximum processor limit. The minimum and default limits are set to 1.

Two limits

The first is the minimum processor limit, and the second is the maximum. The default is set equal to the minimum.

The minimum must be less than or equal to the maximum.

Three limits

The first is the minimum processor limit, the second is the default processor limit, and the third is the maximum.

The minimum must be less than the default and the maximum.


How PROCLIMIT affects submission of parallel jobs

The -n option of bsub specifies the number of processors to be used by a parallel job, subject to the processor limits of the queue or application profile.

Jobs that specify fewer processors than the minimum PROCLIMIT or more processors than the maximum PROCLIMIT are rejected.

If a default value for PROCLIMIT is specified, jobs submitted without specifying -n use the default number of processors. If the queue or application profile has only minimum and maximum values for PROCLIMIT, the number of processors is equal to the minimum value. If only a maximum value for PROCLIMIT is specified, or no PROCLIMIT is specified, the number of processors is equal to 1.

Incorrect processor limits are ignored, and a warning message is displayed when LSF is reconfigured or restarted. A warning message is also logged to the mbatchd log file when LSF is started.

Change PROCLIMIT

If you change the PROCLIMIT parameter, the new processor limit does not affect running jobs. Pending jobs with no processor requirements use the new default PROCLIMIT value. If the pending job does not satisfy the new processor limits, it remains in PEND state, and the pending reason changes to the following:
Job no longer satisfies PROCLIMIT configuration

If PROCLIMIT specification is incorrect (for example, too many parameters), a reconfiguration error message is issued. Reconfiguration proceeds and the incorrect PROCLIMIT is ignored.

MultiCluster

Jobs forwarded to a remote cluster are subject to the processor limits of the remote queues. Any processor limits specified on the local cluster are not applied to the remote job.

Resizable jobs

Resizable job allocation requests obey the PROCLIMIT definition in both application profiles and queues. When the maximum job slot request is greater than the maximum slot definition in PROCLIMIT, LSF chooses the minimum value of both. For example, if a job asks for -n 1,4, but PROCLIMIT is defined as 2 2 3, the maximum slot request for the job is 3 rather than 4.

Automatic queue selection

When you submit a parallel job without specifying a queue name, LSF automatically selects the most suitable queue from the queues listed in the DEFAULT_QUEUE parameter in lsb.params or the LSB_DEFAULTQUEUE environment variable. Automatic queue selection takes into account any maximum and minimum PROCLIMIT values for the queues available for automatic selection.

If you specify ‑n min_proc,max_proc, but do not specify a queue, the first queue that satisfies the processor requirements of the job is used. If no queue satisfies the processor requirements, the job is rejected.

For example, queues with the following PROCLIMIT values are defined in lsb.queues:
  • queueA with PROCLIMIT=1 1 1

  • queueB with PROCLIMIT=2 2 2

  • queueC with PROCLIMIT=4 4 4

  • queueD with PROCLIMIT=8 8 8

  • queueE with PROCLIMIT=16 16 16

In lsb.params: DEFAULT_QUEUE=queueA queueB queueC queueD queueE

For the following jobs:

bsub -n 8 myjob

LSF automatically selects queueD to run myjob.

bsub -n 5 myjob

Job myjob fails because no default queue has the correct number of processors.

Maximum processor limit

PROCLIMIT is specified in the default queue in lsb.queues as:
PROCLIMIT = 3
The maximum number of processors that can be allocated for this queue is 3.

Example

Description

bsub -n 2 myjob

The job myjob runs on 2 processors.

bsub -n 4 myjob

The job myjob is rejected from the queue because it requires more than the maximum number of processors configured for the queue (3).

bsub -n 2,3 myjob

The job myjob runs on 2 or 3 processors.

bsub -n 2,5 myjob

The job myjob runs on 2 or 3 processors, depending on how many slots are currently available on the host.

bsub myjob

No default or minimum is configured, so the job myjob runs on 1 processor.


Minimum and maximum processor limits

PROCLIMIT is specified in lsb.queues as:
PROCLIMIT = 3 8

The minimum number of processors that can be allocated for this queue is 3 and the maximum number of processors that can be allocated for this queue is 8.


Example

Description

bsub -n 5 myjob

The job myjob runs on 5 processors.

bsub -n 2 myjob

The job myjob is rejected from the queue because the number of processors requested is less than the minimum number of processors configured for the queue (3).

bsub -n 4,5 myjob

The job myjob runs on 4 or 5 processors.

bsub -n 2,6 myjob

The job myjob runs on 3 to 6 processors.

bsub -n 4,9 myjob

The job myjob runs on 4 to 8 processors.

bsub myjob

The default number of processors is equal to the minimum number (3). The job myjob runs on 3 processors.


Minimum, default, and maximum processor limits

PROCLIMIT is specified in lsb.queues as:
PROCLIMIT = 4 6 9
  • Minimum number of processors that can be allocated for this queue is 4

  • Default number of processors for the queue is 6

  • Maximum number of processors that can be allocated for this queue is 9


Example

Description

bsub myjob

Because a default number of processors is configured, the job myjob runs on 6 processors.