[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Commit-gnuradio] r7711 - gnuradio/branches/developers/eb/gcell-multi-q/
From: |
eb |
Subject: |
[Commit-gnuradio] r7711 - gnuradio/branches/developers/eb/gcell-multi-q/src/apps |
Date: |
Fri, 15 Feb 2008 17:16:19 -0700 (MST) |
Author: eb
Date: 2008-02-15 17:16:19 -0700 (Fri, 15 Feb 2008)
New Revision: 7711
Modified:
gnuradio/branches/developers/eb/gcell-multi-q/src/apps/gen_script.py
gnuradio/branches/developers/eb/gcell-multi-q/src/apps/split_and_avg_results.py
Log:
update scripts from gcell
Modified: gnuradio/branches/developers/eb/gcell-multi-q/src/apps/gen_script.py
===================================================================
--- gnuradio/branches/developers/eb/gcell-multi-q/src/apps/gen_script.py
2008-02-15 23:39:25 UTC (rev 7710)
+++ gnuradio/branches/developers/eb/gcell-multi-q/src/apps/gen_script.py
2008-02-16 00:16:19 UTC (rev 7711)
@@ -7,31 +7,67 @@
from optparse import OptionParser
+def get_svn_rev():
+ try:
+ f = os.popen("svn info", "r")
+ lines = f.readlines()
+ f.close()
+ except:
+ return "unk"
+
+ svn_rev = "unk"
+ for l in lines:
+ if l.startswith('Revision:'):
+ t = l.rstrip()
+ svn_rev = t.split()[-1]
+ return svn_rev
+
+def is_ps3():
+ try:
+ f = open("/proc/cpuinfo")
+ s = f.read()
+ except:
+ return False
+
+ return s.find('PS3') != -1
+
+
def main():
+
def make_fname(suffix):
return basename + '.' + suffix
+ max_spes_default = 16
+ if is_ps3():
+ max_spes_default = 6
+
parser = OptionParser()
- parser.add_option("-m", "--max-spes", type="int", default=6,
- help="set maximum number of SPEs to use
[default=%default]")
+ parser.add_option("-m", "--max-spes", type="int", default=max_spes_default,
+ metavar="NSPES",
+ help="maximum number of SPEs to use [default=%default]")
+ parser.add_option("", "--min-spes", type="int", default=1,
+ metavar="NSPES",
+ help="minimum number of SPEs to use [default=%default]")
parser.add_option("-p", "--oprofile", action="store_true", default=False,
help="emit oprofile commands")
parser.add_option("-t", "--tag", default=None,
- help="specify identifying tag used in generated
filenames")
- parser.add_option("-q", "--nqueues", type="int", default=None,
- help="number of queues to use")
+ help="additional goodie in generated filenames")
(options, args) = parser.parse_args()
if len(args) != 0:
parser.print_help()
sys.exit(1)
+ svn_rev = get_svn_rev()
+
os.environ['TZ'] = 'PST8PDT' # always pacific
time.tzset()
- basename = 'R' + time.strftime('%m%d-%H%M')
+
+ tag = ''
if options.tag:
- basename = basename + '-' + options.tag
+ tag = '-' + options.tag
+
+ basename = 'R-%s%s-%s' % (svn_rev, tag, time.strftime('%Y%m%d-%H%M'))
-
base_njobs = int(500e3)
njobs = {
1 : base_njobs,
@@ -46,8 +82,11 @@
}
+ f_results = make_fname('results')
+ f_opreport = make_fname('opreport')
+ f_avg = make_fname('avg')
+ f_png = make_fname('png')
-
f = sys.stdout
f.write("#!/bin/bash\n")
@@ -58,24 +97,21 @@
f.write("(\n")
- for udelay in (10, 50, 100, 200, 300, 500):
- for nspes in range(1, options.max_spes+1):
- if options.nqueues is None:
- qcmd = ""
- else:
- qcmd = " -q %d" % (options.nqueues,)
- cmd = "./benchmark_nop -n %d -u %d -N %d%s\n" % (nspes, udelay,
njobs[udelay], qcmd)
+ for udelay in (10, 50, 100, 200, 300):
+ for nspes in range(options.min_spes, options.max_spes+1):
+ cmd = "./benchmark_nop -n %d -u %d -N %d\n" % (nspes, udelay,
njobs[udelay])
f.write(cmd)
f.write(cmd)
- f.write(") | tee %s\n" % (make_fname('results'),))
+ f.write(") | tee %s\n" % (f_results,))
if options.oprofile:
f.write("opcontrol --dump\n")
f.write("opcontrol --stop\n")
- f.write("opreport -l | head -100 > %s\n" % (make_fname('opreport'),))
+ f.write("opreport -l | head -100 > %s\n" % (f_opreport,))
- f.write("./split_and_avg_results.py %s > %s\n" % (make_fname('results'),
make_fname('summary'),))
+ f.write("./split_and_avg_results.py %s > %s\n" % (f_results, f_avg))
+ f.write("./plot_speedup.py %s -o %s\n" % (f_avg, f_png))
if __name__ == '__main__':
Modified:
gnuradio/branches/developers/eb/gcell-multi-q/src/apps/split_and_avg_results.py
===================================================================
---
gnuradio/branches/developers/eb/gcell-multi-q/src/apps/split_and_avg_results.py
2008-02-15 23:39:25 UTC (rev 7710)
+++
gnuradio/branches/developers/eb/gcell-multi-q/src/apps/split_and_avg_results.py
2008-02-16 00:16:19 UTC (rev 7711)
@@ -29,9 +29,7 @@
import sys
from optparse import OptionParser
from pprint import pprint
-from gnuradio import eng_notation as en
-
class data(object):
def __init__(self, nspes, work_per_job, elapsed_time, njobs):
self.nspes = nspes
@@ -42,10 +40,10 @@
def __repr__(self):
return "<data nspes=%d work_per_job=%s elapsed_time=%s njobs=%s
speedup=%s>" % (
- self.nspes, en.num_to_str(self.work_per_job),
- en.num_to_str(self.elapsed_time),
- en.num_to_str(self.njobs),
- en.num_to_str(self.speedup))
+ self.nspes, (self.work_per_job),
+ (self.elapsed_time),
+ (self.njobs),
+ (self.speedup))
def cmp_data(x, y):
t = x.nspes - y.nspes
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Commit-gnuradio] r7711 - gnuradio/branches/developers/eb/gcell-multi-q/src/apps,
eb <=