machine_list#
A module used to provide abstract machine objects for queue system interfaces.
This module provides two objects that help with interfacing Python scripts with job scheduler environments:
Machine#
This is used to represent a single machine allocated by the queue system and query details about it.
MachineList#
This is used to load and query a queue system machine file. Instances
of this object hold a collection of Machine
objects that are initialized
when the machine file is loaded.
Classes:
|
Provides an interface for a single machine allocated by a queue system. |
|
Provides an interface to list of machines allocated by a queue system. |
- class ansys.fluent.core.scheduler.machine_list.Machine(hostName, numberOfCores, queueName=None, coreList=None)#
Bases:
object
Provides an interface for a single machine allocated by a queue system.
Methods:
__init__
(hostName, numberOfCores[, ...])Constructs a machine from the information provided.
Attributes:
Returns a list of core IDs allocated on the machine.
Returns the hostname listed in the machine file.
Returns the number of cores allocated on the machine.
Returns the name of the queue the machine is allocated in.
- __init__(hostName, numberOfCores, queueName=None, coreList=None)#
Constructs a machine from the information provided.
- property core_list#
Returns a list of core IDs allocated on the machine.
- property host_name#
Returns the hostname listed in the machine file.
- property number_of_cores#
Returns the number of cores allocated on the machine.
- property queue_name#
Returns the name of the queue the machine is allocated in.
- class ansys.fluent.core.scheduler.machine_list.MachineList(machinesIn=[])#
Bases:
object
Provides an interface to list of machines allocated by a queue system.
Methods:
__init__
([machinesIn])Constructs and initializes an empty machine file object.
add
(m)Add to machine list.
Moves the local host machine to the front of the machine list, creating it if it does not exist.
remove
(m)Remove from machine list.
Removes all machines with 0 cores.
reset
()Resets the machine file data to the initial values.
Sorts the machines by core count, reordering the existing data.
Sorts the machines by core count, reordering the existing data.
Attributes:
Returns the entire list of machines.
Returns the maximum number of cores.
Returns the minimum number of cores.
Returns the total number of machines.
Returns the total number of cores.
- __init__(machinesIn=[])#
Constructs and initializes an empty machine file object.
- add(m)#
Add to machine list.
- property machines#
Returns the entire list of machines.
- property max_cores#
Returns the maximum number of cores.
- property min_cores#
Returns the minimum number of cores.
- move_local_host_to_front()#
Moves the local host machine to the front of the machine list, creating it if it does not exist.
- property num_machines#
Returns the total number of machines.
- property number_of_cores#
Returns the total number of cores.
- remove(m)#
Remove from machine list.
- remove_empty_machines()#
Removes all machines with 0 cores.
- reset()#
Resets the machine file data to the initial values.
- sort_by_core_count()#
Sorts the machines by core count, reordering the existing data.
- sort_by_core_count_ascending()#
Sorts the machines by core count, reordering the existing data.