Skip to content
Snippets Groups Projects
Commit af873b2c authored by Maël Madon's avatar Maël Madon
Browse files

dev: scheduler fcfs made dynamic, added related tests

parent 0378c79a
No related branches found
No related tags found
1 merge request!5New dynamic schedulers: fcfs and easy-bf
Pipeline #4604 passed
......@@ -73,6 +73,8 @@ void FCFS::make_decisions(double date,
{
_decision->add_execute_job(pending_job->id,
machines, date);
if (broker_enabled)
broker->update_status_if_dyn_job(pending_job->id, RUNNING);
// Update data structures
_available_machines -= machines;
......@@ -100,6 +102,8 @@ void FCFS::make_decisions(double date,
{
// Invalid!
_decision->add_reject_job(new_job_id, date);
if (broker_enabled)
broker->update_status_if_dyn_job(new_job_id, KILLED);
continue;
}
......@@ -119,6 +123,8 @@ void FCFS::make_decisions(double date,
IntervalSet machines = _available_machines.left(
new_job->nb_requested_resources);
_decision->add_execute_job(new_job_id, machines, date);
if (broker_enabled)
broker->update_status_if_dyn_job(new_job->id, RUNNING);
// Update data structures
_available_machines -= machines;
......
from helper import *
def test_broker_mono(platform_monoC, workload_static, sched_mono):
"""Test the broker mode with monocore platform files and schedulers"""
def test_broker_mono(platform_monoC, workload_static):
Scheduler = namedtuple('Scheduler', ['name', 'short_name'])
sched_mono = Scheduler("fcfs", "fcfs")
# def test_broker_mono(platform_monoC, workload_static, sched_mono):
# """Test the broker mode with monocore platform files and schedulers"""
test_name = f'broker-{sched_mono.short_name}-{platform_monoC.name}-{workload_static.name}'
output_dir, robin_filename, _ = init_instance(test_name)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment