-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathrunPLZ
executable file
·56 lines (48 loc) · 1.71 KB
/
runPLZ
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
#!/usr/bin/python
#
# run all tests
#
import os
import sys
import signal
import time
import subprocess
os.system("make clean;unset CILK;export CILKP=1;make plz77_1;")
#os.system("make clean;export CILK=1;make plz77_1;")
def signal_handler(signal,frame):
print "bye\n"
sys.exit(0)
signal.signal(signal.SIGINT,signal_handler)
def shellGetOutput(str) :
process = subprocess.Popen(str,shell=True,stdout=subprocess.PIPE,
stderr=subprocess.PIPE)
output, err = process.communicate()
if (len(err) > 0):
raise NameError(str+"\n"+output+err)
return output
#testfiles = []
testfiles = ["10Midentical","10Mrandom","10Msqrtn","chr22.dna","etext99","howto.txt","jdk13c","rctail96","rfc","sprot34.dat","thesaurus.doc","w3c2","wikisamp.xml","wikisamp9.xml","pitches","proteins.200MB","sources"]
#testfiles = ["wikisamp9.xml"]
#testfiles = ["proteins","english"]
#testfiles = ["pitches","proteins.200MB","sources"]
processors = [1,2,4]+range(8,80+1,8)
#processors= [64]
#processors = [1] + range(32,80+1,8)
for testfile in testfiles :
for p in processors :
ss = "./plz77_1 -i testData/"+testfile+" -p "+`p`+" -f 0 "#+" -cilk_set_worker_count "+`p`
print `p` + " -f 0 " + testfile
print shellGetOutput(ss)
sys.stdout.flush()
for testfile in testfiles:
for p in processors :
ss = "./plz77_1 -i testData/"+testfile+" -p "+`p`+" -f 1 "#+" -cilk_set_worker_count "+`p`
print `p` + " -f 1 " + testfile
print shellGetOutput(ss)
sys.stdout.flush()
for testfile in testfiles:
for p in processors :
ss = "./plz77_1 -i testData/"+testfile+" -p "+`p`+" -f 2 "#+" -cilk_set_worker_count "+`p`
print `p` + " -f 2 " + testfile
print shellGetOutput(ss)
sys.stdout.flush()