hdeeprm.resource module

Core class and functionality for defining the Resource Hierarchy in the Decision System.

class hdeeprm.resource.Core(processor: dict, bs_id: int)[source]

Bases: object

Core representing a compute resource in the Platform.

Cores process Jobs inside the Platform. They are uniquely identifiable in Batsim and provide a computing capability for a given power consumption.

processor

Parent Processor data structure. Fields:

node (dict) - Parent Node data structure. Fields:
cluster (dict) - Parent Cluster data structure. Fields:
platform (dict) - Root Platform data structure. Fields:
total_nodes (int) - Total Nodes in the Platform.
total_processors (int) - Total Processors in the Platform.
total_cores (int) - Total Cores in the Platform.
job_limits (dict) - Resource request limits for any Job. Fields:
max_time (int) - Maximum requested time in seconds.
max_core (int) - Maximum requested Cores.
max_mem (int) - Maximum requested Memory in MB.
max_mem_bw (int) - Maximum requested Memory BW in GB/s.
reference_machine (dict) - Reference host for measures. Fields:
clock_rate (float) - Machine clock speed.
dpflop_vector_width (int) - Width of vector operations in 32B blocks.
reference_speed (float) - Speed for tranforming time into operations.
clusters (list(dict)) - Reference to all Clusters in the Platform.
local_nodes (list(dict)) - Reference to local Nodes to the Cluster.
max_mem (int) - Maximum memory capacity of the Node in MB.
current_mem (int) - Current memory capacity of the Node in MB.
local_processors (list(dict)) - Reference to local Procs to the Node.
max_mem_bw (float) - Maximum memory BW capacity of the Processor in GB/s.
current_mem_bw (float) - Current memory BW capacity of the Processor in GB/s.
gflops_per_core (float) - Maximum GFLOPs per Core in the Processor.
power_per_core (float) - Maximum Watts per Core in the Processor.
local_cores (list(Core)) - Reference to local Cores to the Processor.
Type:dict
bs_id

Unique identification. Also used in Batsim.

Type:int
state

Defines the current state of the Core. Data fields:

pstate (int) - P-state for the Core.
current_gflops (float) - Current computing capability in GFLOPs.
current_power (float) - Current power consumption in Watts.
served_job (batim.batsim.Job) - Job being served by the Core.
Type:dict
get_remaining_per() → float[source]

Provides the remaining percentage of the Job being served.

Calculated by dividing the remaining operations by the total requested on arrival.

set_state(new_pstate: int, now: float, new_served_job: batsim.batsim.Job = None) → None[source]

Sets the state of the Core.

It modifies the availability, computing speed and power consumption. It also establishes a new served Job in case the Core is now active.

Parameters:
  • new_pstate (int) – New P-state for the Core.
  • now (float) – Current simulation time in seconds.
  • new_served_job (batsim.batsim.Job) – Reference to the Job now being served by the Core. Defaults to None.
update_completion(now: float) → None[source]

Updates the Job operations left.

Calculates the amount of operations that have been processed using the time span from last update.

Parameters:now (float) – Current simulation time in seconds.