qcg.pilotjob.allocation module¶
-
class
qcg.pilotjob.allocation.
CRAllocation
(crtype, count)¶ Bases:
object
Allocation of consumable resources
-
count
¶ amount of allocated CR
Type: int
-
-
class
qcg.pilotjob.allocation.
CRBindAllocation
(crtype, instances)¶ Bases:
object
Allocation of bindable consumable resources
-
instances
¶ instances of allocated CR
Type: list()
-
count
¶ number of instances of allocated CR
Type: int
-
-
class
qcg.pilotjob.allocation.
NodeAllocation
(node, cores, crs)¶ Bases:
object
Resource allocation on a single node, contains information about a node, along with the allocated cores and consumable resources.
-
_cores
¶ allocated cores
Type: list(str)
-
release
()¶ Release resources allocated in this node allocation.
-
cores
¶ allocated cores on a node.
Type: list(str)
-
ncores
¶ number of allocated cores on a node.
Type: int
-
-
class
qcg.pilotjob.allocation.
Allocation
¶ Bases:
object
Resource allocation splited (possible) among many nodes.
-
_nodes
¶ list of a single node allocation
Type: NodeAllocation[]
-
_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.
-
cores
¶ Return total number of cores of an allocation
Returns: number of cores Return type: int
-
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
-