hdeeprm.entrypoints.BaseWorkloadManager module

A basic Workload Manager for heterogeneous Platforms.

class hdeeprm.entrypoints.BaseWorkloadManager.BaseWorkloadManager(options: dict)[source]

Bases: batsim.batsim.BatsimScheduler

Entrypoint for classic and non-Reinforcement Learning experimentation.

It provides a Job Scheduler for Job selection and a Resource Manager for resource selection and state management. It handles fundamental events coming from Batsim such as Job submissions and Job completions, while it also orchestrates the Job to Core mapping and sends updates about Core states to the simulation.

job_scheduler

It manages the Job Queue and selects pending Jobs.

Type:JobScheduler
resource_manager

Selects Cores from the Core Pool and maintains their states, including shared resource conflicts.

Type:ResourceManager
scheduled_step

Statistics about number of scheduled Jobs per decision step.

Type:dict
change_resource_states() → None[source]

Sends resource state changes to Batsim.

This alters the Cores P-states in the simulation, thus affecting computational capability and power consumption.

onAddResources(to_add)[source]

Not used.

onAnswerAirTemperatureAll(air_temperature_all)[source]

Not used.

onAnswerProcessorTemperatureAll(proc_temperature_all)[source]

Not used.

onJobCompletion(job: batsim.batsim.Job) → None[source]

Handler triggered when a job has been completed.

When a JOB_COMPLETED event is received, the Job’s allocated Cores are freed, thus the Resource Manager updates their state as well as the one of Cores in the same Processor and/or Node scope.

Parameters:job (batsim.batsim.Job) – The completed Job.
onJobMessage(timestamp, job, message)[source]

Not used.

onJobSubmission(job: batsim.batsim.Job) → None[source]

Handler triggered when a job has been submitted.

Triggered when receiving a JOB_SUBMITTED event. Arriving Jobs are enhanced with HDeepRM parameters specified in the profile field. These are requested operations, requested time, memory and memory bandwidth. The requested time is estimated by the user, and differs from the one Batsim will use for processing the Job. The Job is sent to the Job Scheduler for waiting in the Job Queue.

Parameters:job (batsim.batsim.Job) – The arriving Job.
onJobsKilled(jobs)[source]

Not used.

onMachinePStateChanged(nodeid, pstate)[source]

Not used.

onNoMoreEvents() → None[source]

Handler triggered when there are no more events for the time step.

If there are no more events, it means all Jobs have arrived and completed, and thus they have been handled. The Workload Manager proceeds to schedule the Jobs and send Batsim the resource state changes.

onRemoveResources(to_remove)[source]

Not used.

onReportEnergyConsumed(consumed_energy)[source]

Not used.

onRequestedCall()[source]

Not used.

onSimulationEnds() → None[source]

Handler triggered when the simulation has ended.

It records the over-utilizations during the simulation.

schedule_jobs() → None[source]

Maps pending Jobs into available resources.

Looks for the first selected Job from the Job Queue given the Job selection policy, and allocates Cores given the Job requirements and the Core selection policy. Jobs are scheduled until no more pending Jobs or no more resources available for the next selected.