brsvadd

adds an advance reservation

Synopsis

brsvadd [-o] [-d "description"] [-N reservation_name]
  {-s | -n job_slots {-u user_name | -g group_name}}
  {-m "host_name | host_group ..." [-R "res_req"] |
  [-m "host_name | host_group ..."] -R "res_req"}
  {-b begin_time -e end_time | -t time_window}
brsvadd {-h | -V}

Description

CAUTION:

By default, this command can only be used by LSF administrators or root.

Reserves job slots in advance for a specified period of time for a user or user group, or for system maintenance purposes. Use -b and -e for one-time reservations, and -t for recurring reservations.

To allow users to create their own advance reservations without administrator intervention, configure advance reservation policies in the ResourceReservation section of lsb.resources.

Only administrators, root, or the users listed in the ResourceReservation section can add reservations for themselves or any other user or user group.

Options

-o

Creates an open advance reservation. A job with an open advance reservation only has the advance reservation property during the reservation window, after which the job becomes a normal job, not subject to termination when the reservation window closes.

This prevents jobs from being killed if the reservation window is too small. Instead, the job is suspended and normal scheduling policies apply after the reservation window.

-s

Creates a reservation for system use. LSF does not dispatch jobs to the specified hosts while the reservation is active.

When specifying a system reservation with -s, you do not need to specify the number of job slots to reserve with the -n option.

-b begin_time
Begin time for a one-time reservation. The begin time is in the form
[[[year:]month:]day:]hour:minute
with the following ranges:
  • year: any year after 1900 (YYYY)

  • month: 1-12 (MM)

  • day of the month: 1-31 (dd)

  • hour: 0-23 (hh)

  • minute: 0-59 (mm)

You must specify at least hour:minute. Year, month, and day are optional. Three fields are assumed to be day:hour:minute, four fields are assumed to be month:day:hour:minute, and five fields are year:month:day:hour:minute.

If you do not specify a day, LSF assumes the current day. If you do not specify a month, LSF assumes the current month. If you specify a year, you must specify a month.

The time value for -b must use the same syntax as the time value for -e. It must be earlier than the time value for -e, and cannot be earlier than the current time.

-d "description"

Specifies a description for the reservation to be created. The description must be provided as a double quoted text string. The maximum length is 512 characters.

-e end_time
End time for a one-time reservation. The end time is in the form
[[[year:]month:]day:]hour:minute
with the following ranges:
  • year: any year after 1900 (YYYY)

  • month: 1-12 (MM)

  • day of the month: 1-31 (dd)

  • hour: 0-23 (hh)

  • minute: 0-59 (mm)

You must specify at least hour:minute. Year, month, and day are optional. Three fields are assumed to be day:hour:minute, four fields are assumed to be month:day:hour:minute, and five fields are year:month:day:hour:minute.

If you do not specify a day, LSF assumes the current day. If you do not specify a month, LSF assumes the current month. If you specify a year, you must specify a month.

The time value for -e must use the same syntax as the time value for -b. It must be later than the time value for -b.

-g group_name

Creates a reservation for a user group.

The -g group_name option does not support the @cluster notation for advance reservations on remote clusters.

-m "host_name | host_group ..."

Lists hosts for which job slots specified with -n are reserved. At job submission, LSF considers the hosts in the specified order.

If you also specify a resource requirement string with the -R option, -m is optional.

The hosts can be local to the cluster or hosts leased from remote clusters.

-N reservation_name

Specifies a user-defined advance reservation name unique in an LSF cluster. The name is a string of letters, numeric characters, underscores, and dashes beginning with a letter. The maximum length of the name is 40 characters.

If no user-defined advance reservation name is specified, LSF creates the reservation with a system assigned name with the form
user_name#sequence
For example:
brsvadd -n 3 -M "hostA hostB" -u user2 -b 16:0 -e 17:0 -d "Production AR test"
Reservation user2#0 (Production AR test) is created
brsvadd -n 2 -N Production_AR -M hostA -u user2 -b 16:0 -e 17:0 -d "Production AR test"
Reservation Production_AR (Production AR test) is created

If a job already exists that references a reservation with the specified name, an error message is returned: The specified reservation name is referenced by a job.

-n job_slots

Number of job slots to reserve. job_slots must be less than or equal to the actual number of job slots for the hosts selected by -m or -R for the reservation.

If you also specify the reservation for system use with the -s option, -n is optional.

-R "res_req"

Selects hosts for the reservation according to the specified resource requirements. Only hosts that satisfy the resource requirement expression are reserved. -R accepts any valid resource requirement string, but only the select string takes effect.

If you also specify a host list with the -m option, -R is optional.

For more information about specifying resource requirement strings, see Administering Platform LSF.

The size of the resource requirement string is limited to 512 bytes.

-t time_window

Time window for a recurring reservation.

To specify a time window, specify two time values separated by a hyphen (-), with no space in between:
time_window = begin_time-end_time
Times are specified in the format:
[day:]hour[:minute]
where all fields are numbers with the following ranges:
  • day of the week: 0-6 (0 is Sunday)

  • hour: 0-23

  • minute: 0-59

Specify a time window one of the following ways:
  • hour-hour

  • hour:minute-hour:minute

  • day:hour:minute-day:hour:minute

The default value for minute is 0 (on the hour); the default value for day is every day of the week.

You must specify at least the hour. Day of the week and minute are optional. Both the start time and end time values must use the same syntax. If you do not specify a minute, LSF assumes the first minute of the hour (:00). If you do not specify a day, LSF assumes every day of the week. If you do specify the day, you must also specify the minute.

LSF administrators can prevent running jobs from being killed when the reservation expires by changing the termination time of the job using the reservation (bmod -t) before the reservation window closes.

When the job starts running, the run limit of the reservation is set to the minimum of the job run limit (if specified), the queue run limit (if specified), or the duration of the time window.

-u user_name

Creates a reservation for an individual user.

The -u user_name option does not support the @cluster notation for advance reservations on remote clusters.

-h

Prints command usage and exits.

-V

Prints LSF release version and exits.

Examples

The following command creates a one-time advance reservation for 1024 job slots on host hostA for user user1 between 6:00 a.m. and 8:00 a.m. today:
brsvadd -n 1024 -m hostA -u user1 -b 6:0 -e 8:0
Reservation "user1#0" is created

The hosts specified by -m can be local to the cluster or hosts leased from remote clusters.

The following command creates an advance reservation for 1024 job slots on two hosts hostA and hostB for user group groupA every Wednesday from 12:00 midnight to 3:00 a.m.:
brsvadd -n 1024 -m "hostA hostB" -g groupA -t "3:0:0-3:3:0"
Reservation "groupA#0" is created
The following command creates an open advance reservation for 1024 job slots on host hostA for user user1 between 6:00 a.m. and 8:00 a.m. today.
brsvadd -o -n 1024 -m hostA -u user1 -b 6:0 -e 8:0
Reservation "user1#0" is created

See also

brsvdel, brsvmod, brsvs, lsb.resources