mache.parallel.system.ParallelSystem
- class mache.parallel.system.ParallelSystem(config: ConfigParser)[source]
Base class for parallel system resource management.
- Variables:
parallel_configs (Dict[str, str]) – A dictionary containing combined config options for the parallel section and the parallel.{compiler} section, if any.
cores (int) – The total number of CPU cores available on the system.
cores_per_node (int) – The number of CPU cores available per node.
gpus (int) – The total number of GPUs available on the system.
gpus_per_node (int) – The number of GPUs available per node.
memory (int) – The total memory available on the system in MB, or
Noneif the machine’s config does not describe it.memory_per_node (int) – The memory available per node in MB, or
Noneif the machine’s config does not describe it. This is the memory a job may actually use, which is smaller than the hardware capacity of a node.nodes (int) – The total number of nodes available on the system.
node_names (list of str or None) – The hostnames of those nodes, or
Nonewhere the system does not name them. Read on first use rather than at construction.usable_core_ids (tuple of int) – One CPU id per physical core the job may use on a node, in order,
cores_per_nodeof them. Read on first use rather than at construction.mpi_allowed (bool) – Whether MPI execution is allowed on the system.
- __init__(config: ConfigParser)[source]
Set available resources for the parallel system based on the config.
- Parameters:
config (ConfigParser) – The configuration parser containing the parallel system options.
Methods
__init__(config)Set available resources for the parallel system based on the config.
get_config(key[, default])Get a config value from the parallel configs.
get_config_int(-> int -> int)Get an integer config value from the parallel configs.
get_parallel_command(args, ntasks[, ...])Get the parallel execution command for the current system.
get_scheduler_target(config, target_type, nodes)Choose queue/partition/qos metadata target for a node count.
resolve_submission(config, nodes, target_type)Resolve a scheduler target and effective node count.
Attributes
Whether this machine will hold a launch to a memory cap.
The hostnames of the nodes this system holds, in the order the batch system lists them, or
Nonewhere it does not name them.The placement mechanism available on this machine.
One CPU id per physical core the job may use on a node, in order.