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

updated parsing scripts

parent 768ada51
...@@ -5,7 +5,7 @@ do ...@@ -5,7 +5,7 @@ do
#echo "processing $f... " #echo "processing $f... "
S=`grep " node = " $f | awk '{print $5}'` 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 if [[ -z "$TOTAL" ]]; then
continue continue
fi fi
......
...@@ -5,7 +5,7 @@ do ...@@ -5,7 +5,7 @@ do
#echo "processing $f... " #echo "processing $f... "
S=`grep " node = " $f | awk '{print $5}'` 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 if [[ -z "$TOTAL" ]]; then
continue continue
fi fi
......
#! /usr/bin/env python
import numpy as np import numpy as np
import matplotlib.pyplot as plt import matplotlib.pyplot as plt
import os import os
print("PLOTING ...")
group_colors = [['red', 'firebrick', 'indianred', 'tomato', 'maroon', 'salmon'], group_colors = [['red', 'firebrick', 'indianred', 'tomato', 'maroon', 'salmon'],
['green', 'darkgreen', 'springgreen', 'darkseagreen', 'lawngreen', 'yellowgreen'], ['green', 'darkgreen', 'springgreen', 'darkseagreen', 'lawngreen', 'yellowgreen'],
['blue', 'darkblue', 'cornflowerblue', 'dodgerblue', 'midnightblue', 'lightskyblue'], ['blue', 'darkblue', 'cornflowerblue', 'dodgerblue', 'midnightblue', 'lightskyblue'],
...@@ -13,25 +15,59 @@ elpa1_subtimes = ["tridiag", "solve", "trans_ev"] ...@@ -13,25 +15,59 @@ elpa1_subtimes = ["tridiag", "solve", "trans_ev"]
elpa2_subtimes = ["bandred", "tridiag", "solve", "trans_ev_to_band", "trans_ev_to_full"] elpa2_subtimes = ["bandred", "tridiag", "solve", "trans_ev_to_band", "trans_ev_to_full"]
cores_per_node = 20 cores_per_node = 20
base_path = "results" base_paths = ["results", "results2"]
num_type = "real" num_type = "real"
prec = "double" 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):
path = "/".join([base_path,num_type,prec,str(mat_size),str(mat_size*proc_evec//100),method,"tab.txt"])
data = np.genfromtxt(path, names=True) def line(what, mat_size, proc_evec, method, label, color, style):
nodes = data['nodes'] data_line_res = []
cores = cores_per_node * nodes nodes_res = []
plt.plot(cores,data[what], style, label=label, color=color, linewidth=2) 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']
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(): 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, 100, "pdsyevr", "MKL 2017, " + scalapack_name(num_type, prec, True) + ", 100% EVs", "blue", "x-")
line("total", mat_size, 50, "pdsyevr", "MKL 2017, pdsyevr, 50% EVs", "green", "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, pdsyevr, 10% EVs", "red", "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, 100, "elpa1", "ELPA 1, 100% EVs", "blue", "*--")
line("total", mat_size, 50, "elpa1", "ELPA 1, 50% EVs", "green", "*--") 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)] ...@@ -73,16 +109,21 @@ ticks = [20* 2**i for i in range(0,12)]
ax.xaxis.set_ticks(ticks) ax.xaxis.set_ticks(ticks)
ax.xaxis.set_ticklabels(ticks) ax.xaxis.set_ticklabels(ticks)
# yticks_major = [1,10,100,1000] if(mat_size < 10000):
# ax.yaxis.set_ticks(yticks_major) y_min = 0.1
# ax.yaxis.set_ticklabels(yticks_major) 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] # yticks_minor = [2, 5, 20, 50, 200, 500]
# ax.yaxis.set_ticks(yticks_minor, minor=True) # ax.yaxis.set_ticks(yticks_minor, minor=True)
# ax.yaxis.set_ticklabels(yticks_minor, minor=True) # ax.yaxis.set_ticklabels(yticks_minor, minor=True)
#plt.ylim([0.5, 30]) plt.ylim([y_min, y_max])
#plt.ylim([0.1, 100]) plt.xlim([20, 41000])
#plt.ylim([0.03, 20])
#plt.xlim([20, 41000])
plt.savefig('plot.pdf') plt.savefig('plot.pdf')
#if show: #if show:
plt.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