pbs_rescreserve (3) - Linux Manuals

pbs_rescreserve: reserve/free batch resources

NAME

pbs_rescreserve, pbs_rescrelease - reserve/free batch resources

SYNOPSIS

#include <pbs_error.h>
#include <pbs_ifl.h>

int pbs_rescreserve(int connect, char **resourcelist, int arraysize,
resource_t *resource_id)

int pbs_rescrelease(int connect, resource_t resource_id)

DESCRIPTION

pbs_rescreserver
Issue a request to the batch server to reserve specified resources. is the connection returned by pbs_connect(). is an array of one or more strings specifying the resources to be queried. is the is the number of strings in resourcelist. is a pointer to a resource handle. The pointer cannot be null. If the present value of the resource handle is RESOURCE_T_NULL , this request is for a new reservation and if successful, a resource handle will be returned in resource_id.
If the value of resource_id as supplied by the caller is not RESOURCE_T_NULL , this is a existing (partial) reservation. Resources currently reserved for this handle will be released and the full reservation will be attempted again. If the caller wishes to release the resources allocated to a partial reservation, the caller should pass the resource handle to pbs_rescrelease().
At the present time the only resources which may be specified are "nodes". It should be specified as where specification is what a user specifies in the -l option arguement list for nodes, see qsub (1B).
pbs_rescrelease
The pbs_rescrelease() call releases or frees resources reserved with the resource handle of returned from a prior pbs_rescreserve() call. is the connection returned by pbs_connect().

Both functions require that the issuing user have operator or administrator privilege.

DIAGNOSTICS

pbs_rescreserve() and pbs_rescrelease() return zero on success. Otherwise, a non zero error is returned. The error number is also set in pbs_errno.
PBSE_RMPART
is a special case indicating that some but not all of the requested resources could be reserved; a partial reservation was made. The reservation request should either be rerequested with the returned handle or the partial resources released.
PBSE_RMBADPARAM
a parameter is incorrect, such as a null for the pointer to the resource_id.
PBSE_RMNOPARAM
a parameter is missing, such as a null resoruce list.

SEE ALSO

qsub(1B), pbs_connect(3B), pbs_disconnect(3B), pbs_rescquery(3B) and pbs_resources(7B)