Skip to content

Instantly share code, notes, and snippets.

@danielsuo
Last active December 23, 2016 17:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save danielsuo/6263a860728fd1eb7616fc5e86d35f54 to your computer and use it in GitHub Desktop.
Save danielsuo/6263a860728fd1eb7616fc5e86d35f54 to your computer and use it in GitHub Desktop.
Collecting CPU utilization on the PARSEC benchmark (parsec.cs.princeton.edu)
#!/usr/bin/python
import sys, subprocess
apps = [
'blackscholes',
'bodytrack',
'canneal',
'dedup',
'facesim',
'ferret',
'fluidanimate',
'freqmine',
'raytrace',
'streamcluster',
'swaptions',
'vips',
'x264']
inputs = [
'test',
'simdev',
'simsmall',
'simmedium',
'simlarge',
'native'
]
threads = [1, 2, 4, 8, 16, 32, 64, 128, 256]
for app in apps:
for thread in threads:
for input in inputs:
cmd = '../bin/parsecmgmt -a run -i %s -p %s -n %d' % (input, app, thread)
file = open('./out/%s-%s-%d.out' % (app, input, thread), 'w')
print cmd
p = subprocess.call([cmd], shell=True, stdout=file, stderr=file)
file.close()
print 'Done!'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment