int pbs_rescreserve(int connect, char **resourcelist, int arraysize, resource_t *resource_id) int pbs_rescrelease(int connect, resource_t resource_id)
Issue a request to the batch server to reserve specified resources. connect is the connection returned by pbs_connect(). resourcelist is an array of one or more strings specifying the resources to be queried. arraysize is the is the number of strings in resourcelist. resource_id 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 nodes=specification where specification is what a user specifies in the -l option arguement list for nodes, see qsub (1B).
The pbs_rescrelease() call releases or frees resources reserved with the resource handle of resource_id returned from a prior pbs_rescreserve() call. connect is the connection returned by pbs_connect().
Both functions require that the issuing user have operator or administrator privilege.
qsub(1B), pbs_connect(3B), pbs_disconnect(3B), pbs_rescquery(3B) and pbs_resources(7B)
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.
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.
a parameter is incorrect, such as a null for the pointer to the resource_id.
a parameter is missing, such as a null resoruce list.