diff --git a/utils/scaling_scripts/parse_elpa2 b/utils/scaling_scripts/parse_elpa2 index 4a221dad44081da787c8241aa730896bc1bb2016..8b09748d8edebfa679bfa2f9133a5fd86e62d26a 100755 --- a/utils/scaling_scripts/parse_elpa2 +++ b/utils/scaling_scripts/parse_elpa2 @@ -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 diff --git a/utils/scaling_scripts/parse_mkl b/utils/scaling_scripts/parse_mkl index 511d7b375f447d14cd413453083eee68a67edee8..d42aaea8cc7bfc775abb24e954c60ba46695da63 100755 --- a/utils/scaling_scripts/parse_mkl +++ b/utils/scaling_scripts/parse_mkl @@ -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 diff --git a/utils/scaling_scripts/plot.py b/utils/scaling_scripts/plot.py old mode 100644 new mode 100755 index b8c6c4d8ae322d9f495929e21024f168363000f9..714023620d475e25cbec26150beea5a29956be5d --- a/utils/scaling_scripts/plot.py +++ b/utils/scaling_scripts/plot.py @@ -1,7 +1,9 @@ +#! /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): - 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) - nodes = data['nodes'] - cores = cores_per_node * nodes - plt.plot(cores,data[what], style, label=label, color=color, linewidth=2) +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'] + 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()