copied code over and completed fig7 shared mem test

This commit is contained in:
RustyRaptor committed 2021-09-30 11:55:27 -06:00
1 parent 4bfbe6f874
commit 7aaa53565c
24 files changed
+6090

No files matched your search

+39
View File
@@ -0,0 +1,39 @@
"""
This simple program is to quickly parse out the outputs so we can get the average
times of the runs. outs.txt must contain the raw console outputs
"""
from statistics import mean
par = []
ser = []
avgp = []
avgs = []
threads = 0
vals = 0
with open('./outs.txt') as reader:
lines = reader.readlines()
for line in lines:
if vals == 5:
avgp.append(mean(par))
avgs.append(mean(ser))
par=[]
ser=[]
vals = 0
threads += 1
word = line.split(' ')
if 'parallel:' in word:
par.append(int(word[2]))
if 'serial:' in word:
ser.append(int(word[4]))
vals += 1
print("ser: ", avgs, "par: ", avgp, threads)