Knowledge Center Contents Previous Next |
lsb_addreservation()
Makes an advance reservation.
DESCRIPTION
Use lsb_addreservation() to send a reservation request to mbatchd. If mbatchd grants the reservation, it issues the reservation ID. If mbatchd rejects the request, it issues NULL as the reservation ID.
SYNOPSIS
#include <lsf/lsbatch.h> int lsb_addreservation (struct addRsvRequest *request char *rsvId) struct addRsvRequest { int options; char *name; struct { int minNumProcs; int maxNumProcs; } procRange; int numAskedHosts; char **askedHosts; char *resReq; char *timeWindow; rsvExecCmd_t *execCmd; char *desc; char *rsvName; };PARAMETERS
*request
The reservation request
*rsvId
Reservation ID returned from mbatchd. If the reservation fails, this is NULL. The memory for rsvid is allocated by the caller.
addRsvRequest structure
options
Reservation options.
name
LSF user group name for the reservation. See the -g option of brsvadd.
minNumProcs
Minimum number of processors the required to run the job. See the -g option of brsvadd.
maxNumProcessors
Maximum number of processors the required to run the job.
numAskedHosts
The number of invoker specified hosts for the reservation. If numAskedHosts is 0, all qualified hosts will be considered.
askedHosts
The array of names of invoker specified hosts hosts for the reservation. The number of hosts is given by numAskedHosts. See the -m option of brsvadd.
resReq
The resource requirements of the reservation. See the -R option of brsvadd.
timeWindow
Active time window for a recurring reservation. See the -t option of brsvadd.
rsvExecCmd_t *execCmd;
Info for the -exec option.
desc
description for the reservation to be created. The description must be provided as a double quoted text string. The maximum length is 512 characters. Equivalent to the value of brsvadd -d.
rsvName
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 39 characters. Equivalent to the value of brsvadd -N.
RETURN VALUES
integer:0
The reservation was successful.
integer:-1
The reservation failed.
ERRORS
On failure, lsberrno is set to indicate the error.
SEE ALSO
Related APIs
lsb_removereservation() - Removes a reservation
lsb_modreservation() - Modifies a reservation
lsb_reservationinfo() - Retrieves reservation information
Equivalent line command
brsvadd
Files:
none
Platform Computing Inc.
www.platform.com |
Knowledge Center Contents Previous Next |