From f21e72b2d22679154500e64bde37b83b3e587488 Mon Sep 17 00:00:00 2001 From: Glenn Elliott Date: Wed, 29 Jan 2014 15:54:41 -0500 Subject: Generate only schedulable task sets. --- gen/edf_generators.py | 30 +++++++++++------------------- 1 file changed, 11 insertions(+), 19 deletions(-) diff --git a/gen/edf_generators.py b/gen/edf_generators.py index bee0119..5b7cd48 100644 --- a/gen/edf_generators.py +++ b/gen/edf_generators.py @@ -3,12 +3,12 @@ import random import ecrts14.partition as partition import schedcat.sched.split_heuristic as split import ecrts14.ecrts14 as ecrts14 +import ecrts14.tests as tests from ecrts14.ecrts14 import create_pgm_task_set from ecrts14.ecrts14 import get_overheads from config.config import FILES,PARAMS from schedcat.overheads.model import Overheads, CacheDelay, ConsumerOverheads, ProducerOverheads -from ecrts14.tests import get_partitions from schedcat.generator.tasksets import NAMED_UTILIZATIONS from schedcat.mapping.binpack import DidNotFit @@ -20,13 +20,13 @@ TP_PART_TASK = TP_TBASE.format("-p $t.cpu") TP_CLST_TASK = TP_TBASE.format("-p $t.cluster -z $t.cluster_sz") PARTITION_METHOD = { - 'no_cache' : partition.partition_no_cache, - 'parallel' : partition.partition_parallel, - 'cache_aware' : partition.partition_cache_aware, - 'cache_aware_parallel' : partition.partition_cache_aware_parallel, - 'cache_aware_edges' : partition.partition_cache_aware_edges, - 'cache_aware_bfs' : partition.partition_cache_aware_bfs, - 'cache_aware_dfs' : partition.partition_cache_aware_dfs, + 'no_cache' : tests.test_partition_no_cache, + 'parallel' : tests.test_partition_parallel, + 'cache_aware' : tests.test_partition_cache_aware, + 'cache_aware_parallel' : tests.test_partition_cache_aware_parallel, + 'cache_aware_edges' : tests.test_partition_cache_aware_edges, + 'cache_aware_bfs' : tests.test_partition_cache_aware_bfs, + 'cache_aware_dfs' : tests.test_partition_cache_aware_dfs, } class EdfGenerator(gen.Generator): @@ -264,15 +264,7 @@ class CflSplitPgmGenerator(EdfPgmGenerator): for t in ts: overheads.consumer.place_production(t) - try: - ts = PARTITION_METHOD[exp_params['partitions']](ts, graphs, subts, cluster_sz, dp.nr_clusters, dp.system, dp.heur_aggressiveness, overheads) - except DidNotFit: - return False, ts + # the test will compute job splits if it is in the desgin point. + is_sched, ts = PARTITION_METHOD[exp_params['partitions']](ts, graphs, subts, dp, overheads) - # compute split factor - working_ts = ts - partitions = get_partitions(working_ts, dp.nr_clusters, cluster_sz) - do_splits = dp.job_splitting - is_srt_sched = split.compute_splits_nolock(overheads, False, working_ts, partitions, bypass_split = not do_splits) - - return True, working_ts + return is_sched, ts -- cgit v1.2.2