qcg.pilotjob.allocation module
- class qcg.pilotjob.allocation.CRAllocation(crtype, count)
Bases:
objectAllocation of consumable resources
- count
amount of allocated CR
- Type
int
- class qcg.pilotjob.allocation.CRBindAllocation(crtype, instances)
Bases:
objectAllocation of bindable consumable resources
- instances
instances of allocated CR
- Type
list()
- property count
number of instances of allocated CR
- Type
int
- class qcg.pilotjob.allocation.NodeAllocation(node, cores, crs)
Bases:
objectResource allocation on a single node, contains information about a node, along with the allocated cores and consumable resources.
- _cores
allocated cores
- Type
list(str)
- _crs
allocated crs
- Type
- release()
Release resources allocated in this node allocation.
- property cores
allocated cores on a node.
- Type
list(str)
- property ncores
number of allocated cores on a node.
- Type
int
- property crs
allocated crs on a node.
- Type
dict((CRType, CRAllocation|CRBindAllocation))
- class qcg.pilotjob.allocation.Allocation
Bases:
objectResource allocation splited (possible) among many nodes.
- _nodes
list of a single node allocation
- Type
- _cores
total number of cores on all nodes
- Type
int
Initialize allocation.
- add_node(node_allocation)
Add a node allocation.
- Parameters
node_allocation (NodeAllocation) – description of an allocation on a single node
- release()
Release allocated resources. Release resources allocated on all nodes in allocation.
- Raises
InvalidResourceSpec – when number of cores to release on a node is greater than number of used cores.
- property cores
Return total number of cores of an allocation
- Returns
number of cores
- Return type
int
- property nodes
Return a list of node allocations
- Returns
list of node allocations
- Return type
list(NodeAllocation)
- description()
Return a single line description of allocation
- Returns
a single line description of allocation
- Return type
str