bresize

Decreases or increases tasks that are allocated to a running resizable job, or cancels pending job resize allocation requests.

Synopsis

bresize subcommand
bresize [-h | -V]

Subcommand List

release [-c] [-rnc resize_notification_cmd | -rncn] released_host_specification job_ID
request [-c] [-rnc resize_notification_cmd | -rncn] [min_task,] tasks job_ID
cancel job_ID

Description

Use the bresize release command to explicitly release tasks from a running job. When you release tasks from an allocation, a minimum of one task on the first execution host must be retained. Only hosts (and not host groups or compute units) can be released by using the bresize release command. When you release tasks from compound resource requirements, you can release only tasks that are represented by the last term of the compound resource requirement. To release tasks in earlier terms, run bresize release repeatedly to release tasks in subsequent last terms.

Use the bresize request command to trigger a manual request for additional allocated tasks. LSF pends the request if the queue cannot meet the minimum tasks request or if the request is over the TASKLIMIT value for the queue or application profile. Changing the TASKLIMIT value does not affect any requests that are already accepted. For compound resource requirements, the request only applies to the last term. For alternative resource requirements, the request only applies to the term that was used for the initial task allocation. For autoresizable jobs, if there is pending demand, you must first cancel the previous pending demand by running the brequest request -c or bresize cancel commands. After triggering this manual request, the job is no longer autoresizable unless you requeue or rerun the job.

Use bresize cancel to cancel a pending allocation request for the specified job ID. The active pending allocation request is generated by LSF automatically for autoresizable jobs. If the job does not have an active pending request, the command fails with an error message.

By default, only cluster administrators, queue administrators, root, and the job owner are allowed to run bresize to change job allocations.

User group administrators are allowed to run bresize to change the allocation of jobs within their user groups.

Options

-c
Optional. Cancel the active pending resource request when you release tasks from existing allocation (for the release subcommand) or before accepting new grow requests (for the request subcommand). By default, the command releases tasks only for jobs without pending requests.
-rnc resize_notification_cmd
Optional. Specify the name of an executable file to be started on the first execution host when the job allocation was modified. This setting applies only to this request, which overrides any notification command that is specified in the bsub command or an application profile. The resize notification command runs under the user account of the job owner.
-rncn
Cancels the resize notification command at both job-level and application-level. This setting applies only to this request.
released_host_specification
Required with the release subcommand. Defines the list of hosts to be released. The following syntax is the EBNF definition of the released host specification:
<released_host_spec> ::= all | all <exclude_host_list_spec>
 | <host_list_spec><host_list_spec> ::= <host_spec>
 | <host_list_spec><host_spec><exclude_host_list_spec>
 ::= <exclude_host_spec> | <exclude_host_list_spec> <exclude_host_spec> <exclude_host_spec>
 ::= ~<host_spec> <host_spec>
 ::= [<positive_integer>*]<host_name>
all
Specifies all the tasks currently being used by the job. If the all option is used alone, it means release every task except one task from the first execution node. The all option can also be used with a list of hosts to exclude with the tilde (not) operator (~).
host_spec
Release the number of tasks that are specified by positive_integer on the host that is specified by host_name. If the number of tasks is not specified, all tasks on the specified host are released.
~
Specifies hosts to exclude when you release tasks. Tasks on the specified hosts are not released. The tilde (not) operator (~) must be used together with all keyword.
min_task
Optional. The minimum number of tasks to be added to the job. LSF pends the manual job resize request if the queue cannot meet the minimum tasks request.
task
Required for the request subcommand. The maximum number of tasks to be added to the job.
job_ID
Required. The job ID of the job to be resized. For job arrays, this also includes the array index.
-h
Prints command usage to stderr and exits.
-V
Prints release version to stderr and exits.

Examples

The following examples all resize a job with ID 100.

For a job that uses 8 tasks across 4 nodes (2 on hostA, 2 on hostB, 2 on hostC, and 2 on hostD, the following command releases all tasks except the tasks on hostA. After the tasks are released, the job allocation becomes just 2 on hostA:
bresize release "all ~hostA" 100
The following command releases all tasks except one task from hostA. After the tasks are released, the job allocation becomes 1 on hostA:
bresize release all 100 or bresize release "all ~1*hostA" 100
The following command releases 1 task from each of four hosts. After the tasks are released, the job allocation becomes 1 on hostA, 1 on hostB, 1 on hostC, and 1 on hostD:
bresize release "1*hostA 1*hostB 1*hostC 1*hostD"  100
The following command requests a total of 10 tasks to be added to the job. The request pends if LSF cannot add all 10 requested tasks to the job:
bresize request 10 100
The following command requests a minimum of 4 and a total of 10 tasks to be added to the job. The request pends if LSF cannot add at least 4 tasks to the job.
bresize request 4,10 100

See also

bsub, lsb.applications