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

test: added a small platform for monocore scheduler tests

parent a962d7c5
Branches
No related tags found
1 merge request!5New dynamic schedulers: fcfs and easy-bf
<?xml version='1.0'?>
<!DOCTYPE platform SYSTEM "http://simgrid.gforge.inria.fr/simgrid/simgrid.dtd">
<platform version="4.1">
<config id="General">
<!-- <prop id="network/coordinates" value="yes"></prop> -->
<!-- Reduce the size of the stack-size. On huge machine, if the stack is
too big (8Mb by default), Simgrid fails to initiate.
See http://lists.gforge.inria.fr/pipermail/simgrid-user/2015-June/003745.html-->
<prop id="contexts/stack-size" value="16"></prop>
<prop id="contexts/guard-size" value="0"></prop>
</config>
<zone id="toy_g5k" routing="Full">
<host id="master_host" speed="100Mf">
<prop id="wattage_per_state" value="100:100:200" />
<prop id="wattage_off" value="10" />
</host>
<!-- The state 1 of the machines is a sleep state.
When switching from a computing state to the state 1, passing by the
virtual pstate 2 is mandatory to simulate the time and energy consumed by
the switch off.
When switching from the state 1 to a computing state, passing by the
virtual pstate 3 is mandatory to simulate the time and energy consumed by
the switch on.
The speed indicated is the computing speed per core.
The watt_per_state indicated is the power conso of the whole host. -->
<host id="taurus_0" pstate="0" speed="11.77Gf, 1e-9Mf, 0.166666666666667f, 0.006666666666667f">
<prop id="wattage_per_state" value="100:100:217, 9.75:9.75:9.75, 100:100:100, 125:125:125" />
<prop id="wattage_off" value="10" />
<prop id="sleep_pstates" value="1:2:3" />
</host>
<host id="taurus_1" pstate="0" speed="11.77Gf, 1e-9Mf, 0.166666666666667f, 0.006666666666667f">
<prop id="wattage_per_state" value="100:100:217, 9.75:9.75:9.75, 100:100:100, 125:125:125" />
<prop id="wattage_off" value="10" />
<prop id="sleep_pstates" value="1:2:3" />
</host>
</zone>
</platform>
#!/usr/bin/env python3
import itertools
import json
import glob
import unittest
from helper import *
......@@ -43,4 +39,4 @@ def test_easy_bf(platform_monoC, workload_static):
instance.to_file(robin_filename)
ret = run_robin(robin_filename)
assert ret.returncode == 0
\ No newline at end of file
assert ret.returncode == 0
from helper import *
def test_multicore_filler(platform_multiC, workload_static):
test_name = f'multicore_filler-{platform_multiC.name}-{workload_static.name}'
"""Tests the scheduler mutlicore_filler with different platform and workload files"""
sched = "multicore_filler"
test_name = f'{sched}-{platform_multiC.name}-{workload_static.name}'
output_dir, robin_filename, _ = init_instance(test_name)
batcmd = gen_batsim_cmd(platform_multiC.filename, workload_static.filename, output_dir, "--energy")
instance = RobinInstance(output_dir=output_dir,
batcmd=batcmd,
schedcmd=f"batmen -v multicore_filler",
schedcmd=f"batmen -v {sched}",
simulation_timeout=30, ready_timeout=5,
success_timeout=10, failure_timeout=0
)
......@@ -19,14 +23,18 @@ def test_multicore_filler(platform_multiC, workload_static):
if has_expected_output(test_name):
assert assert_expected_output(test_name)
def test_bin_packing(platform_multiC, workload_static):
test_name = f'bin_packing-{platform_multiC.name}-{workload_static.name}'
"""Tests the scheduler bin_packing with different platform and workload files"""
sched = "bin_packing"
test_name = f'{sched}-{platform_multiC.name}-{workload_static.name}'
output_dir, robin_filename, _ = init_instance(test_name)
batcmd = gen_batsim_cmd(platform_multiC.filename, workload_static.filename, output_dir, "--energy --enable-compute-sharing")
instance = RobinInstance(output_dir=output_dir,
batcmd=batcmd,
schedcmd=f"batmen -v bin_packing --queue_order=desc_size",
schedcmd=f"batmen -v {sched} --queue_order=desc_size",
simulation_timeout=30, ready_timeout=5,
success_timeout=10, failure_timeout=0
)
......@@ -38,14 +46,18 @@ def test_bin_packing(platform_multiC, workload_static):
if has_expected_output(test_name):
assert assert_expected_output(test_name)
def test_bin_packing_energy(platform_multiC, workload_static):
test_name = f'bin_packing_energy-{platform_multiC.name}-{workload_static.name}'
"""Tests the scheduler bin_packing_energy with different platform and workload files"""
sched = "bin_packing_energy"
test_name = f'{sched}-{platform_multiC.name}-{workload_static.name}'
output_dir, robin_filename, _ = init_instance(test_name)
batcmd = gen_batsim_cmd(platform_multiC.filename, workload_static.filename, output_dir, "--energy --enable-compute-sharing")
instance = RobinInstance(output_dir=output_dir,
batcmd=batcmd,
schedcmd=f"batmen -v bin_packing_energy --queue_order=desc_size",
schedcmd=f"batmen -v {sched} --queue_order=desc_size",
simulation_timeout=30, ready_timeout=5,
success_timeout=10, failure_timeout=0
)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment