Skip to content
Snippets Groups Projects
Commit cd6d1c71 authored by Prakalp Srivastava's avatar Prakalp Srivastava
Browse files

(1) Removed a bug from parboil driver, where contentList of Directory objects...

(1) Removed a bug from parboil driver, where contentList of Directory objects was being shared among all objects. Added routine to options.py to run all valid visc benchmarks
parent 5ad45173
No related branches found
No related tags found
No related merge requests found
...@@ -130,6 +130,7 @@ def compile_options(progname, cmd, args): ...@@ -130,6 +130,7 @@ def compile_options(progname, cmd, args):
def run(): def run():
(opts, pos) = parser.parse_args(args) (opts, pos) = parser.parse_args(args)
globals.verbose = opts.verbose globals.verbose = opts.verbose
print (progname,cmd, args)
if not len(pos) in [2, 3]: if not len(pos) in [2, 3]:
print "Expecting two or three parameters after 'compile'" print "Expecting two or three parameters after 'compile'"
...@@ -205,6 +206,73 @@ def debug_options(progname, cmd, args): ...@@ -205,6 +206,73 @@ def debug_options(progname, cmd, args):
return OptionGetter(parser.print_help, run) return OptionGetter(parser.print_help, run)
def time_options(progname, cmd, args):
usage_string = progname + " time_options BENCHMARK VERSION INPUT"
parser = OptionParser(usage = usage_string)
#parser.add_option('-C', "--no-check",
# action="store_false", dest="check", default=True,
# help="Skip the output check for this benchmark")
#parser.add_option('-v', "--verbose",
# action="store_true", dest="verbose", default=False,
# help="Produce verbose status messages")
def run():
configs = [ ('sgemm', { 'VERSION' : ["visc", "opencl_base"],
'TEST' : ["small"]#, "medium", "large"]
}
),
('spmv', { 'VERSION' : ["visc", "opencl_nvidia"],
'TEST' : ["small"]#, "medium"]
}
),
('lbm', { 'VERSION' : ["visc", "opencl_nvidia"],
'TEST' : ["short", "long"]
}
),
('stencil', { 'VERSION' : ["visc", "opencl_base"],
'TEST' : ["small", "default"]
}
)
]
for (app, app_config) in configs:
print "Printing Application Data"
print app
print app_config['VERSION']
print app_config['TEST']
arguments = [app]
print arguments
for ver in app_config['VERSION']:
arguments.append(ver)
action = clean_options(progname, 'clean', arguments).run()
if action:
action()
else:
print "Could not clean: " + app
action = compile_options(progname, 'compile', arguments).run()
if action:
action()
else:
print "Could not compile: " + app
for test in app_config['TEST']:
arguments.append(test)
action = run_options(progname, 'run', arguments).run()
if action:
action()
else:
print "Could not run: " + app
arguments.remove(test)
arguments.remove(ver)
#if not len(pos) in [1, 2]:
# print "Expecting one or two parameters after time"
# return None
#else:
return None
return OptionGetter(parser.print_help, run)
# Dictionary from option name to function from command-line parameters # Dictionary from option name to function from command-line parameters
# to pair of help thunk and option processor thunk # to pair of help thunk and option processor thunk
parse_mode_options = { parse_mode_options = {
...@@ -216,7 +284,8 @@ parse_mode_options = { ...@@ -216,7 +284,8 @@ parse_mode_options = {
'clean' : clean_options, 'clean' : clean_options,
'compile' : compile_options, 'compile' : compile_options,
'run' : run_options, 'run' : run_options,
'debug' : debug_options 'debug' : debug_options,
'time' : time_options
} }
def parse_options(args): def parse_options(args):
......
...@@ -139,7 +139,10 @@ class Directory(FileBase): ...@@ -139,7 +139,10 @@ class Directory(FileBase):
self._realContents = None self._realContents = None
self._interesting = scan_func self._interesting = scan_func
self._mustExist = must_exist self._mustExist = must_exist
self._contentsList = contents_list if len(contents_list) == 0:
self._contentsList = []
else:
self._contentsList = contents_list
self._path = dpath self._path = dpath
self._name = path.split(dpath)[1] self._name = path.split(dpath)[1]
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment