wiki:TorqueUsage/Functions/Pbs_rescquery

Version 6 (modified by bas, 18 years ago) (diff)

--

PBS_RESCQUERY

Issue a request to the batch server to query the availability of resources;

result, available, allocated, reserved, down = pbs_rescquery(c, resources, size)

In

c::

Connection id

resources::

Resources is a list of one or more strings specifying the resources to be queried. At the present time the only resources which may be specified is "nodes". It may be specified as:

  1. 'nodes'
  2. 'nodes='
  3. 'nodes=specification'

size::

Is the is the number of strings in resources, eg: len(resources)

Out

For a more complex node resourcs, such as "nodes=2" or "nodes=type1:type2", only the value returned in available has meaning. For a more complex node resources, such as "nodes=2" or "nodes=type1:type2", only the value returned in available has meaning. If the number in available is positive, it is the number of nodes requried to satisified the specification and that some set of nodes are available which will satisify it, see pbs_avail(). If the number in available is zero, some number of nodes requried to satisified the specification are currently unavailable, the request might be satisifed at a later time. If the number in available is negative, no combination of known nodes can satisified the specification.

result::

if non-zero then an error has occured

available::

How many nodes are available

allocated::

How many nodes are allocated

reserved::

How many nodes are reserved

down::

How many nodes are down

Example