diff --git a/run.py b/run.py index ebc725b..d3fb560 100755 --- a/run.py +++ b/run.py @@ -33,10 +33,11 @@ def main(): remain = args.experiments while remain > 0: if args.utilization is not None: - subprocess.call(['./tasksetgen.py', '--microseconds', '--uniform', '5', - '--utilization {}:{}'.format(args.utilization - 0.25, args.utilization + 0.25), - str(remain), 'experiments/ese2016_{}'.format(cnt), - 'experiment_data']) + utilization = '--utilization {} {}'.format(args.utilization - 0.25, args.utilization + 0.25) + subprocess.call(['./tasksetgen.py', '--microseconds', '--utilization', str(args.utilization - 0.25), + str(args.utilization + 0.25), '--uniform', '5', + str(remain), 'experiments/ese2016_{}'.format(cnt), + 'experiment_data']) else: subprocess.call(['./tasksetgen.py', '--microseconds', '--uniform', '5', str(remain), 'experiments/ese2016_{}'.format(cnt), diff --git a/tasksetgen.py b/tasksetgen.py index ac3af51..c89f6e9 100755 --- a/tasksetgen.py +++ b/tasksetgen.py @@ -129,7 +129,7 @@ def main(): parser.add_argument('experiment_target', type=str, help='Output directory for experiments.', nargs='?', default='.') - parser.add_argument('--utility', type=str, help='The utility for which tasksets should be generated. Is a range such as 2.5:3.5', nargs=1) + parser.add_argument('--utilization', type=float, help='The utility for which tasksets should be generated. Is a range such as 2.5 3.5', nargs=2) parser.add_argument('--baseclock', type=str, default='system_clock', nargs='?', @@ -179,12 +179,7 @@ def main(): utility = None try: - utility_val = args.utility.split(':') - if len(utility_val > 3): - print('Invalid utility specified.', file=sys.sterr) - sys.exit(1) - - utility = [float(util) for util in utility_val] + utility = args.utilization except AttributeError: pass