Skip to content

make_table.py

Luc Berger edited this page Feb 15, 2019 · 1 revision

import os

fi = open(“omp64.out”, “r”)
idata = fi.readlines()
fi.close()

count = 0
table = dict()
while count < len(idata):
if(“Problem parameters” in idata[count]):
numVecs = idata[count].split()6.split(“=”)1
matSize = idata[count].split()3.split(“=”)1
if not (matSize in table):
table[matSize] = dict()
table[matSize][numVecs] = idata[count + 3].split()16
if not(numVecs in table[matSize]):
table[matSize][numVecs] = idata[count + 3].split()16
count += 5

matSizes = [‘27000,’, ‘64000,’, ‘128000,’, ‘216000,’, ‘512000,’, ‘1000000,’]
numVectors = [‘1’, ‘2’, ‘3’, ‘4’, ‘8’, ‘16’]

output = “| Matrix size |”
for vec in numVectors:
output += " " + vec + " vectors |"
output += “\n”
for vec in numVectors:
output += “|-”
output += “|-|\n”
for size in matSizes:
output += "| " + size[0:-1]
for vec in numVectors:
output += " | " + table[size][vec]
output += " |\n"

print(output)

Clone this wiki locally