rms_allocateResource(3)
rid ID of the resource to deallocate.
DESCRIPTION
rms_allocateResource() allocates CPUs from a named partition. If partition is
NULL, the default partition is used, otherwise the named partition must exist. You can
optionally specify the base node and the number of nodes (as with the allocate and
prun commands). Alternatively, this can be left to the scheduler by passing the value
RMS_UNASSIGNED. If the requested CPUs are not available, the request will block unless
the immediate flag has been entered, in which case it will fail.
If the caller belongs to the rms group then rms_allocateResource() can be used to
allocate CPUs on behalf of another user identified by uid. In this case, the CPUs will be
available to this user only. If project is not null, the request is subject to the usage
restrictions of, and is accounted to, the specified project, which must exist. If project is
null, the user’s default project applies.
To run a program on the specified resource, the environment variable RMS_RESOURCEID
must be set to the value partition.rid (where partition is the name of the partition
and rid is the resource id returned by rms_allocateResource) before executing
prun.
rms_deallocateResource() deallocates a resource that is no longer in use.
RETURN VALUES
Upon successful completion, rms_allocateResource() returns the ID of the resource
allocated. This value should be passed to subsequent calls. A negative integer is
returned on error. The supported error codes are as follows:
-1 Request cannot be met.
-2 Request cannot be met now and immediate was not set to zero.
rms_deallocateResource() returns 0 on success and -1 on error.
SEE ALSO
rms_suspendResource(3), rms_defaultPartition(3)
RMS Application Interface D-3