summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLisa Hsu <Lisa.Hsu@amd.com>2011-03-19 21:12:59 -0700
committerLisa Hsu <Lisa.Hsu@amd.com>2011-03-19 21:12:59 -0700
commit5103c6fe88651ac4318a0d5b5d3a5e58f9f2fa04 (patch)
treeb2c734cd073d8e913ebb12bd15f708556d7f96c0
parent83664630ee42b70c8d612a05df4001aac773efc7 (diff)
downloadgem5-5103c6fe88651ac4318a0d5b5d3a5e58f9f2fa04.tar.xz
se.py: Modify script to make multiprogramming much easier.
Now, instead of --bench benchname, you can do --bench bench1-bench2-bench3 and it will set up a simulation that instantiates those three workloads. Only caveat is that now, for sanity checking, your -n X must match the number of benches in the list.
-rw-r--r--configs/example/se.py28
1 files changed, 19 insertions, 9 deletions
diff --git a/configs/example/se.py b/configs/example/se.py
index 7cf11603e..8076e1602 100644
--- a/configs/example/se.py
+++ b/configs/example/se.py
@@ -76,20 +76,30 @@ if args:
print "Error: script doesn't take any positional arguments"
sys.exit(1)
+multiprocesses = []
+apps = []
+
if options.bench:
- try:
- if buildEnv['TARGET_ISA'] != 'alpha':
- print >>sys.stderr, "Simpoints code only works for Alpha ISA at this time"
- sys.exit(1)
- exec("workload = %s('alpha', 'tru64', 'ref')" % options.bench)
- process = workload.makeLiveProcess()
- except:
- print >>sys.stderr, "Unable to find workload for %s" % options.bench
+ apps = options.bench.split("-")
+ if len(apps) != options.num_cpus:
+ print "number of benchmarks not equal to set num_cpus!"
sys.exit(1)
+
+ for app in apps:
+ try:
+ if buildEnv['TARGET_ISA'] != 'alpha':
+ print >>sys.stderr, "Simpoints code only works for Alpha ISA at this time"
+ sys.exit(1)
+ exec("workload = %s('alpha', 'tru64', 'ref')" % app)
+ multiprocesses.append(workload.makeLiveProcess())
+ except:
+ print >>sys.stderr, "Unable to find workload for %s" % app
+ sys.exit(1)
else:
process = LiveProcess()
process.executable = options.cmd
process.cmd = [options.cmd] + options.options.split()
+ multiprocesses.append(process)
if options.input != "":
@@ -151,7 +161,7 @@ system.physmem.port = system.membus.port
CacheConfig.config_cache(options, system)
for i in xrange(np):
- system.cpu[i].workload = process
+ system.cpu[i].workload = multiprocesses[i]
if options.fastmem:
system.cpu[0].physmem_port = system.physmem.port