Removed old unused experiment scripts

This commit is contained in:
Charlie Curtsinger 2015-07-02 13:54:31 -04:00
parent d0c3ceb2ec
commit 18fab08db2
3 changed files with 0 additions and 197 deletions

View File

@ -1,95 +0,0 @@
#!/usr/bin/env python
import os
import sys
import runner
sys.path.append('/home/charlie/Projects/causal/tools/coz-process')
import coz_profile
RUNS = 4
OUTPUT_DIR = '/home/charlie/Projects/causal/tools/experiment/overhead_results'
def to_seconds(ns):
return float(ns/1000) / 1000000
exists = os.path.isfile('overhead.csv')
results = open('overhead.csv', 'a')
if not exists:
print >> results, 'benchmark,configuration,runtime'
benchmarks = runner.BENCHMARKS
if len(sys.argv) > 1:
benchmarks = {}
for bmk in sys.argv[1:]:
benchmarks[bmk] = runner.BENCHMARKS[bmk]
for (benchmark, input_size) in benchmarks.items():
print >> sys.stderr, 'Benchmark:', benchmark
runner.build(benchmark, 'gcc')
output_file = OUTPUT_DIR + '/' + benchmark + '.log'
# Run once to ensure inputs are unpacked
# Not required, now that everything is ready
#runner.run(benchmark=benchmark, config='gcc', coz=False, runs=1, size=input_size)
print >> sys.stderr, 'Starting clean runs'
times = runner.run(benchmark=benchmark,
config='gcc',
size=input_size,
runs=RUNS,
coz=False,
keep_inputs=True)
for t in times:
print >> results, ','.join([benchmark, 'clean', str(t)])
results.flush()
# Remove the output file
if os.path.isfile(output_file):
os.remove(output_file)
print >> sys.stderr, 'Starting zero delay runs'
times = runner.run(benchmark=benchmark,
config='gcc',
runs=RUNS,
size=input_size,
output_file=output_file,
sample_only=True,
keep_inputs=True)
# Open the profile
p = coz_profile.profile()
p.process_file(output_file)
for (full_time, main_time) in zip(times, p.run_times):
main_time = to_seconds(main_time)
print >> results, ','.join([benchmark, 'startup_time', str(full_time - main_time)])
print >> results, ','.join([benchmark, 'sampling_time', str(main_time)])
results.flush()
# Remove the output file
if os.path.isfile(output_file):
os.remove(output_file)
print >> sys.stderr, 'Starting full profile runs'
times = runner.run(benchmark=benchmark,
config='gcc',
runs=RUNS,
size=input_size,
output_file=output_file,
keep_inputs=True)
# Open the profile
p = coz_profile.profile()
p.process_file(output_file)
for (full_time, main_time) in zip(times, p.run_times):
main_time = to_seconds(main_time)
print >> results, ','.join([benchmark, 'startup_time', str(full_time - main_time)])
print >> results, ','.join([benchmark, 'delay_time', str(main_time)])
results.flush()

View File

@ -1,82 +0,0 @@
#!/usr/bin/env python
import os
import sys
import time
BENCHMARKS = {
'vips': 'native',
'blackscholes': 'native',
'canneal': 'native',
'ferret': 'native',
'facesim': 'simlarge',
'streamcluster': 'test',
'raytrace': 'simlarge',
'swaptions': 'native',
'bodytrack': 'native',
'fluidanimate': 'native',
'dedup': 'native',
'freqmine': 'simlarge',
'x264': 'native'
}
COZ = '/home/charlie/Projects/causal/release/bin/causal'
PARSEC_DIR = '/home/charlie/Projects/benchmarks/parsec-2.1'
PARSECMGMT = PARSEC_DIR + '/bin/parsecmgmt'
def build(benchmark, config, rebuild=False):
# Clean and build the benchmark
if rebuild:
os.system(PARSECMGMT + ' -a uninstall -c ' + config + ' -p ' + benchmark + ' > /dev/null')
os.system(PARSECMGMT + ' -a build -c ' + config + ' -p ' + benchmark + ' > /dev/null')
def run(benchmark, config, output_file=None, coz=True, runs=3, threads=64, size='native', fixed_line=None, fixed_speedup=None, end_to_end=False, keep_inputs=False, show_output=False, sample_only=False):
if coz:
runner = [COZ, '--include ' + PARSEC_DIR, '--output ' + output_file]
if fixed_line != None:
runner.append('--fixed-line ' + fixed_line)
if fixed_speedup != None:
runner.append('--fixed-speedup ' + str(fixed_speedup))
if end_to_end:
runner.append('--end-to-end')
if sample_only:
runner.append('--sample-only')
runner.append(' --- ')
else:
runner = ['time']
command_parts = [
PARSECMGMT,
'-a run',
'-c ' + config,
'-p ' + benchmark,
'-i ' + size,
'-n ' + str(threads),
'-s \"' + ' '.join(runner) + '\"'
]
if keep_inputs:
command_parts.append('-k')
# Run the benchmark with causal, no speedups
command = ' '.join(command_parts)
if not show_output:
command += ' > /dev/null'
runtimes = []
for i in range(0, runs):
start_time = time.time()
os.system(command)
elapsed = time.time() - start_time
print >> sys.stderr, elapsed
runtimes.append(elapsed)
return runtimes

View File

@ -1,20 +0,0 @@
#!/usr/bin/env python
import os
import runner
OUTPUT_DIR = '/home/charlie/Projects/causal/tools/experiment/validation_results'
for (benchmark, input_size) in runner.BENCHMARKS.items():
runner.build(benchmark, 'gcc')
output_file = OUTPUT_DIR + '/' + benchmark + '.log'
# Remove the old output file
if os.path.isfile(output_file):
os.remove(output_file)
# Generate line counts
print 'Running', benchmark
runtime = runner.run(benchmark=benchmark, config='gcc', output_file=output_file, runs=3, fixed_speedup=0, end_to_end=True, size=input_size)
os.system('coz-process ' + output_file)