Deleted Added
sdiff udiff text old ( 11851:824055fe6b30 ) new ( 12564:2778478ca882 )
full compact
1# Copyright (c) 2005-2007 The Regents of The University of Michigan
2# All rights reserved.
3#
4# Redistribution and use in source and binary forms, with or without
5# modification, are permitted provided that the following conditions are
6# met: redistributions of source code must retain the above copyright
7# notice, this list of conditions and the following disclaimer;
8# redistributions in binary form must reproduce the above copyright

--- 15 unchanged lines hidden (view full) ---

24# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
25# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26#
27# Authors: Ron Dreslinski
28
29# Splash2 Run Script
30#
31
32import os
33import optparse
34import sys
35
36import m5
37from m5.objects import *
38
39# --------------------

--- 22 unchanged lines hidden (view full) ---

62 help="Root directory of Splash2",
63 default="/dist/splash2/codes")
64parser.add_option("-b", "--benchmark",
65 help="Splash 2 benchmark to run")
66
67(options, args) = parser.parse_args()
68
69if args:
70 print "Error: script doesn't take any positional arguments"
71 sys.exit(1)
72
73if not options.numcpus:
74 print "Specify the number of cpus with -n"
75 sys.exit(1)
76
77# --------------------
78# Define Splash2 Benchmarks
79# ====================
80class Cholesky(Process):
81 cwd = options.rootdir + '/kernels/cholesky'
82 executable = options.rootdir + '/kernels/cholesky/CHOLESKY'

--- 165 unchanged lines hidden (view full) ---

248 root.workload = Ocean_noncontig()
249elif options.benchmark == 'Raytrace':
250 root.workload = Raytrace()
251elif options.benchmark == 'WaterNSquared':
252 root.workload = Water_nsquared()
253elif options.benchmark == 'WaterSpatial':
254 root.workload = Water_spatial()
255else:
256 print >> sys.stderr, """The --benchmark environment variable was set to something improper.
257Use Cholesky, FFT, LUContig, LUNoncontig, Radix, Barnes, FMM, OceanContig,
258OceanNoncontig, Raytrace, WaterNSquared, or WaterSpatial"""
259 sys.exit(1)
260
261# --------------------
262# Assign the workload to the cpus
263# ====================
264
265for cpu in cpus:
266 cpu.workload = root.workload

--- 9 unchanged lines hidden (view full) ---

276m5.instantiate()
277
278# simulate until program terminates
279if options.maxtick:
280 exit_event = m5.simulate(options.maxtick)
281else:
282 exit_event = m5.simulate(m5.MaxTick)
283
284print 'Exiting @ tick', m5.curTick(), 'because', exit_event.getCause()
285