[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Commit-gnuradio] r7672 - gnuradio/branches/developers/eb/gcell/src/apps
From: |
eb |
Subject: |
[Commit-gnuradio] r7672 - gnuradio/branches/developers/eb/gcell/src/apps |
Date: |
Wed, 13 Feb 2008 20:48:20 -0700 (MST) |
Author: eb
Date: 2008-02-13 20:48:20 -0700 (Wed, 13 Feb 2008)
New Revision: 7672
Modified:
gnuradio/branches/developers/eb/gcell/src/apps/benchmark_nop.cc
gnuradio/branches/developers/eb/gcell/src/apps/gen_script.py
gnuradio/branches/developers/eb/gcell/src/apps/split_and_avg_results.py
Log:
Can now specify the number of jobs on the command line.
Modified: gnuradio/branches/developers/eb/gcell/src/apps/benchmark_nop.cc
===================================================================
--- gnuradio/branches/developers/eb/gcell/src/apps/benchmark_nop.cc
2008-02-14 03:22:48 UTC (rev 7671)
+++ gnuradio/branches/developers/eb/gcell/src/apps/benchmark_nop.cc
2008-02-14 03:48:20 UTC (rev 7672)
@@ -37,10 +37,9 @@
}
static void
-run_test(unsigned int nspes, unsigned int usecs)
+run_test(unsigned int nspes, unsigned int usecs, int njobs)
{
static const int NJDS = 32;
- static const int njobs = static_cast<int>(500e3);
int nsubmitted = 0;
int ncompleted = 0;
gc_job_desc *all_jds[NJDS];
@@ -111,8 +110,9 @@
// stop timing
mb_time t_stop = mb_time::time();
double delta = (t_stop - t_start).double_time();
- printf("nspes: %2d udelay: %4d elapsed_time: %7.3f njobs: %g\n",
- mgr->nspes(), usecs, delta, (double) njobs);
+ printf("nspes: %2d udelay: %4d elapsed_time: %7.3f njobs: %g speedup:
%6.3f\n",
+ mgr->nspes(), usecs, delta, (double) njobs,
+ njobs * usecs * 1e-6 / delta);
delete mgr;
}
@@ -122,9 +122,10 @@
{
unsigned int nspes = 0;
unsigned int usecs = 0;
+ int njobs = 500000;
int ch;
- while ((ch = getopt(argc, argv, "n:u:")) != EOF){
+ while ((ch = getopt(argc, argv, "n:u:N:")) != EOF){
switch(ch){
case 'n':
nspes = strtol(optarg, 0, 0);
@@ -134,13 +135,17 @@
usecs = strtol(optarg, 0, 0);
break;
+ case 'N':
+ njobs = strtol(optarg, 0, 0);
+ break;
+
case '?':
default:
- fprintf(stderr, "usage: benchmark_nop [-n <nspes>] [-u <udelay>]\n");
+ fprintf(stderr, "usage: benchmark_nop [-n <nspes>] [-u <udelay>] [-N
<njobs>]\n");
return 1;
}
}
- run_test(nspes, usecs);
+ run_test(nspes, usecs, njobs);
return 0;
}
Modified: gnuradio/branches/developers/eb/gcell/src/apps/gen_script.py
===================================================================
--- gnuradio/branches/developers/eb/gcell/src/apps/gen_script.py
2008-02-14 03:22:48 UTC (rev 7671)
+++ gnuradio/branches/developers/eb/gcell/src/apps/gen_script.py
2008-02-14 03:48:20 UTC (rev 7672)
@@ -13,12 +13,25 @@
parser.print_help()
sys.exit(1)
+ base_njobs = int(500e3)
+ njobs = {
+ 1 : base_njobs,
+ 10 : base_njobs,
+ 50 : base_njobs,
+ 100 : base_njobs,
+ 200 : int(base_njobs/2),
+ 250 : int(base_njobs/2.5),
+ 300 : int(base_njobs/3),
+ 400 : int(base_njobs/4),
+ 500 : int(base_njobs/5)
+ }
+
f = sys.stdout
- for udelay in (1, 10, 50, 100, 200, 300, 500):
+ for udelay in (10, 50, 100, 200, 300, 500):
for nspes in range(1, options.max_spes+1):
- # f.write("./benchmark_nop -n %d -u %d\n" % (nspes, udelay))
- f.write("./benchmark_nop -n %d -u %d\n" % (nspes, udelay))
- f.write("./benchmark_nop -n %d -u %d\n" % (nspes, udelay))
+ cmd = "./benchmark_nop -n %d -u %d -N %d\n" % (nspes, udelay,
njobs[udelay])
+ f.write(cmd)
+ f.write(cmd)
if __name__ == '__main__':
main()
Modified:
gnuradio/branches/developers/eb/gcell/src/apps/split_and_avg_results.py
===================================================================
--- gnuradio/branches/developers/eb/gcell/src/apps/split_and_avg_results.py
2008-02-14 03:22:48 UTC (rev 7671)
+++ gnuradio/branches/developers/eb/gcell/src/apps/split_and_avg_results.py
2008-02-14 03:48:20 UTC (rev 7672)
@@ -1,6 +1,6 @@
#!/usr/bin/env python
#
-# Copyright 2007 Free Software Foundation, Inc.
+# Copyright 2007,2008 Free Software Foundation, Inc.
#
# This file is part of GNU Radio
#
@@ -22,8 +22,8 @@
"""
input file looks like this:
-nspes: 1 udelay: 1 elapsed_time: 26.117 njobs: 1e+06 us/job: 26.117
-nspes: 2 udelay: 1 elapsed_time: 23.585 njobs: 1e+06 us/job: 23.585
+nspes: 1 udelay: 10 elapsed_time: 6.842 njobs: 500000 speedup: 0.731
+nspes: 2 udelay: 10 elapsed_time: 4.093 njobs: 500000 speedup: 1.221
"""
import sys
@@ -38,13 +38,14 @@
self.work_per_job = work_per_job # seconds
self.elapsed_time = elapsed_time # seconds
self.njobs = njobs
- self.elapsed_per_job = self.elapsed_time/self.njobs
+ self.speedup = work_per_job * njobs / elapsed_time
def __repr__(self):
- return "<data nspes=%d work_per_job=%s elapsed_time=%s njobs=%s>" % (
+ 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.njobs),
+ en.num_to_str(self.speedup))
def cmp_data(x, y):
t = x.nspes - y.nspes
@@ -96,7 +97,7 @@
#pprint(r)
for t in r:
- print t.nspes, t.work_per_job, t.elapsed_time, t.njobs
+ print t.nspes, t.work_per_job, t.elapsed_time, t.njobs, t.speedup
if __name__ == '__main__':
main()
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Commit-gnuradio] r7672 - gnuradio/branches/developers/eb/gcell/src/apps,
eb <=