Commit 37da2a2f authored by Pavel Kus's avatar Pavel Kus

updated parsing scripts

parent 768ada51
......@@ -5,7 +5,7 @@ do
#echo "processing $f... "
S=`grep " node = " $f | awk '{print $5}'`
TOTAL=`grep "|_ ELPA_2STAGE_" $f | awk '{print $3}'`
TOTAL=`grep "e%eigenvectors()" $f | awk '{print $3}'`
if [[ -z "$TOTAL" ]]; then
continue
fi
......
......@@ -5,7 +5,7 @@ do
#echo "processing $f... "
S=`grep " node = " $f | awk '{print $5}'`
TOTAL=`grep "Time (SYSTEM_CLOCK)" $f | awk '{print $7}'`
TOTAL=`grep "e%eigenvectors()" $f | awk '{print $3}'`
if [[ -z "$TOTAL" ]]; then
continue
fi
......
#! /usr/bin/env python
import numpy as np
import matplotlib.pyplot as plt
import os
print("PLOTING ...")
group_colors = [['red', 'firebrick', 'indianred', 'tomato', 'maroon', 'salmon'],
['green', 'darkgreen', 'springgreen', 'darkseagreen', 'lawngreen', 'yellowgreen'],
['blue', 'darkblue', 'cornflowerblue', 'dodgerblue', 'midnightblue', 'lightskyblue'],
......@@ -13,25 +15,59 @@ elpa1_subtimes = ["tridiag", "solve", "trans_ev"]
elpa2_subtimes = ["bandred", "tridiag", "solve", "trans_ev_to_band", "trans_ev_to_full"]
cores_per_node = 20
base_path = "results"
base_paths = ["results", "results2"]
num_type = "real"
prec = "double"
mat_size = 20000
mat_size = 5000
def scalapack_name(num, pr, all_ev):
if(num_type == "real"):
if(pr == "single"):
name = "pssyev"
else:
name = "pdsyev"
else:
if(pr == "single"):
name = "pcheev"
else:
name = "pzheev"
if(all_ev):
name += "d"
else:
name += "r"
return name
def line(what, mat_size, proc_evec, method, label, color, style):
data_line_res = []
nodes_res = []
for base_path in base_paths:
path = "/".join([base_path,num_type,prec,str(mat_size),str(mat_size*proc_evec//100),method,"tab.txt"])
#print(path)
if not os.path.isfile(path):
continue
data = np.genfromtxt(path, names=True)
nodes = data['nodes']
cores = cores_per_node * nodes
plt.plot(cores,data[what], style, label=label, color=color, linewidth=2)
data_line = data[what]
#print("data_line", data_line, "data_line_res", data_line_res)
if(nodes_res == []):
assert(data_line_res == [])
nodes_res = nodes
data_line_res = data_line
else:
assert(all(nodes == nodes_res))
data_line_res = np.minimum(data_line_res, data_line)
cores = cores_per_node * nodes_res
#print(cores, data_line_res)
plt.plot(cores,data_line_res, style, label=label, color=color, linewidth=2)
def plot1():
line("total", mat_size, 100, "pdsyevd", "MKL 2017, pdsyevd", "black", "x-")
line("total", mat_size, 100, "pdsyevd", "MKL 2017, " + scalapack_name(num_type, prec, True), "black", "x-")
line("total", mat_size, 100, "pdsyevr", "MKL 2017, pdsyevr, 100% EVs", "blue", "x-")
line("total", mat_size, 50, "pdsyevr", "MKL 2017, pdsyevr, 50% EVs", "green", "x-")
line("total", mat_size, 10, "pdsyevr", "MKL 2017, pdsyevr, 10% EVs", "red", "x-")
line("total", mat_size, 100, "pdsyevr", "MKL 2017, " + scalapack_name(num_type, prec, True) + ", 100% EVs", "blue", "x-")
line("total", mat_size, 50, "pdsyevr", "MKL 2017, " + scalapack_name(num_type, prec, True) + ", 50% EVs", "green", "x-")
line("total", mat_size, 10, "pdsyevr", "MKL 2017, " + scalapack_name(num_type, prec, True) + ", 10% EVs", "red", "x-")
line("total", mat_size, 100, "elpa1", "ELPA 1, 100% EVs", "blue", "*--")
line("total", mat_size, 50, "elpa1", "ELPA 1, 50% EVs", "green", "*--")
......@@ -73,16 +109,21 @@ ticks = [20* 2**i for i in range(0,12)]
ax.xaxis.set_ticks(ticks)
ax.xaxis.set_ticklabels(ticks)
# yticks_major = [1,10,100,1000]
# ax.yaxis.set_ticks(yticks_major)
# ax.yaxis.set_ticklabels(yticks_major)
if(mat_size < 10000):
y_min = 0.1
y_max = 50
else:
y_min = 5
y_max = 500
yticks_major = [1,10,100,1000, y_min, y_max]
ax.yaxis.set_ticks(yticks_major)
ax.yaxis.set_ticklabels(yticks_major)
# yticks_minor = [2, 5, 20, 50, 200, 500]
# ax.yaxis.set_ticks(yticks_minor, minor=True)
# ax.yaxis.set_ticklabels(yticks_minor, minor=True)
#plt.ylim([0.5, 30])
#plt.ylim([0.1, 100])
#plt.ylim([0.03, 20])
#plt.xlim([20, 41000])
plt.ylim([y_min, y_max])
plt.xlim([20, 41000])
plt.savefig('plot.pdf')
#if show:
plt.show()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment