diff --git a/CMakeLists.txt b/CMakeLists.txt
index eb90712..4455032 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -106,3 +106,5 @@ install(TARGETS
OTFCPT_omp
OTFCPT_static
)
+
+install (PROGRAMS script/CPT-plot.py DESTINATION bin)
\ No newline at end of file
diff --git a/Makefile b/Makefile
deleted file mode 100644
index 66a51ed..0000000
--- a/Makefile
+++ /dev/null
@@ -1,82 +0,0 @@
-#CXXFLAGS=-gdwarf-4 -fopenmp -O3 -std=c++17 -stdlib=libc++ -DUSE_MPI -fPIC
-CXXFLAGS=-gdwarf-4 -fopenmp -O3 -std=c++17 -DUSE_MPI -fPIC -I$(PWD)
-LDFLAGS=
-#-flto -rdynamic -Wl,--export-dynamic -Wl,--no-as-needed
-#MPI=mpich
-MPI?=openmpi
-CXX=time mpicxx.$(MPI)
-WRAP?=external/wrap/wrap.py
-MPICXX?=time mpicxx.$(MPI)
-MPICC?=mpicc.$(MPI)
-MPIRUN?=mpirun.$(MPI)
-
-ifeq ($(MPI), mpich)
-CXXFLAGS+= -DHAVE_COUNT -DHAVE_SESSION -DHAVE_PCOLL
-endif
-
-.PHONY: all lib test
-all: test lib test-static
-lib: libOTFCPT.$(MPI).so
-test: test.$(MPI) test-wc-tag.$(MPI) test-wc-source.$(MPI) test-grp.$(MPI)
-test-static: test-statictool.$(MPI) test-wc-tag-statictool.$(MPI) test-wc-source-statictool.$(MPI) test-grp-statictool.$(MPI)
-
-.PRECIOUS: %.$(MPI).cpp
-
-TOOL-OBJS = tracking.$(MPI).o completion-wrappers.$(MPI).o gen-nb-wrappers.$(MPI).$(MPI).o gen-wrappers.$(MPI).$(MPI).o man-wrappers.$(MPI).o critical-core.$(MPI).o mpi-critical.$(MPI).o ompt-critical.$(MPI).o
-
-%.$(MPI).cpp: %.w
- $(WRAP) -s -n -c $(MPICC) $< -o $@
- sed -i -e '/ = PMPI_[^(]*_init_\?c\?(/{n;s/postRequest/postRequestInit/}' -e 's/^_EXTERN_C_ //' $@
- if (which clang-format > /dev/null 2>&1); then clang-format -i $@; fi
-
-#gen-nb-wrappers.$(MPI).$(MPI).o: completion-wrappers.cpp
-
-%.$(MPI).o : %.cpp tracking.h handle-data.h timing.h criticalPath.h mpi-critical.h Makefile
- $(MPICXX) -c $(CXXFLAGS) $(CPPFLAGS) $< -o $@
-
-%.$(MPI).$(MPI).o : %.$(MPI).cpp tracking.h handle-data.h timing.h criticalPath.h mpi-critical.h Makefile
- $(MPICXX) -c $(CXXFLAGS) $(CPPFLAGS) $< -o $@
-
-libOTFCPT.$(MPI).so : $(TOOL-OBJS)
- $(MPICXX) -shared -fPIC $^ $(CXXFLAGS) $(LDFLAGS) $(CPPFLAGS) -o $@
-
-test.$(MPI) : tests/test.$(MPI).o
- $(MPICXX) $^ $(CXXFLAGS) $(LDFLAGS) $(CPPFLAGS) -o $@
-
-test-statictool.$(MPI) : tests/test.$(MPI).o $(TOOL-OBJS)
- $(MPICXX) $^ $(CXXFLAGS) $(LDFLAGS) $(CPPFLAGS) -o $@
-
-test-wc-tag.$(MPI) : tests/test-wc-tag.$(MPI).o
- $(MPICXX) $^ $(CXXFLAGS) $(LDFLAGS) $(CPPFLAGS) -o $@
-
-test-wc-tag-statictool.$(MPI) : tests/test-wc-tag.$(MPI).o $(TOOL-OBJS)
- $(MPICXX) $^ $(CXXFLAGS) $(LDFLAGS) $(CPPFLAGS) -o $@
-
-test-wc-source.$(MPI) : tests/test-wc-source.$(MPI).o
- $(MPICXX) $^ $(CXXFLAGS) $(LDFLAGS) $(CPPFLAGS) -o $@
-
-test-wc-source-statictool.$(MPI) : tests/test-wc-source.$(MPI).o $(TOOL-OBJS)
- $(MPICXX) $^ $(CXXFLAGS) $(LDFLAGS) $(CPPFLAGS) -o $@
-
-test-grp.$(MPI) : tests/test-group.$(MPI).o
- $(MPICXX) $(CXXFLAGS) $(LDFLAGS) $(CPPFLAGS) $^ -o $@
-
-test-grp-statictool.$(MPI) : tests/test-group.$(MPI).o $(TOOL-OBJS)
- $(MPICXX) $(CXXFLAGS) $(LDFLAGS) $(CPPFLAGS) $^ -o $@
-
-run-test: test lib
- $(MPIRUN) -np 2 env OMP_NUM_THREADS=1 LD_PRELOAD=./libOTFCPT.$(MPI).so OMP_TOOL_LIBRARIES=./libOTFCPT.$(MPI).so ./test.$(MPI)
- $(MPIRUN) -np 2 env OMP_NUM_THREADS=2 LD_PRELOAD=./libOTFCPT.$(MPI).so OMP_TOOL_LIBRARIES=./libOTFCPT.$(MPI).so ./test.$(MPI)
- $(MPIRUN) -np 2 env OMP_NUM_THREADS=1 LD_PRELOAD=./libOTFCPT.$(MPI).so OMP_TOOL_LIBRARIES=./libOTFCPT.$(MPI).so ./test-wc-source.$(MPI)
- $(MPIRUN) -np 2 env OMP_NUM_THREADS=1 LD_PRELOAD=./libOTFCPT.$(MPI).so OMP_TOOL_LIBRARIES=./libOTFCPT.$(MPI).so ./test-wc-tag.$(MPI)
-
-run-test-static: test-static
- $(MPIRUN) -np 2 env OMP_NUM_THREADS=1 ./test-statictool.$(MPI)
- $(MPIRUN) -np 2 env OMP_NUM_THREADS=2 ./test-statictool.$(MPI)
- $(MPIRUN) -np 2 env OMP_NUM_THREADS=1 ./test-wc-source-statictool.$(MPI)
- $(MPIRUN) -np 2 env OMP_NUM_THREADS=1 ./test-wc-tag-statictool.$(MPI)
-
-clean:
- rm -f *.o *~ tests/*.o
-mrproper: clean
- rm -f *.mpich *.openmpi *.intelmpi *.so
diff --git a/README.md b/README.md
index 3bc88b7..17fe2bc 100644
--- a/README.md
+++ b/README.md
@@ -43,17 +43,6 @@ CC=mpicc.openmpi CXX=mpicxx.openmpi cmake ../
make -j8
```
-## Build using the Makefile
-The Makefile accepts several configuration variables to be overwritten:
-- MPI defaults to `openmpi`. This will be used as infix in most generated files
-- MPICC defaults to `mpicc.$(MPI)`. In combination with the MPI variable this allows easy switching of MPI on Ubuntu
-- MPICXX defaults to `mpicxx.$(MPI)`. In combination with the MPI variable this allows easy switching of MPI on Ubuntu
-- MPIRUN defaults to `mpirun.$(MPI)`. In combination with the MPI variable this allows easy switching of MPI on Ubuntu
-
-### Run targets in the Makefile
-- `run-test` - runs 4 tests loading the shared library tool implementation
-- `run-test-static` - runs 4 tests that have the tool implementation statically built into the test
-
## Using the tool with an application
Depending on the system and how libomp.so is built, LD_PRELOAD and OMP_TOOL_LIBRARIES might both be necessary. Assuming a cmake build as described above, an application with OTF-CPT is executed like:
```
@@ -79,11 +68,11 @@ In both cases the runtime option `stopped=1` should be used, see below.
### Runtime options
The behavior of OTF-CPT can be changed with different runtime options. All
runtime options are exported as a space separated string assigned to
-`OTFCPT_OPTIONS`.
+`OTFCPT_OPTIONS`. For a full list of runtime options refer to the `help` option.
E.g.:
```
-export OTFCPT_OPTIONS="verbose=1 start_stopped=1"
+export OTFCPT_OPTIONS="verbose=1 start_stopped=1 help=1"
```
@@ -146,6 +135,27 @@ encountered.
+## Plotting results of a scaling experiment
+
+The script `CPT-plot.py` expects all OTF-CPT output files for a scaling experiment in a single directory.
+The script expects the relative or absolute path of this directory as an argument. The directory name
+will be used as experiment name when generating the output.
+The individual output files should follow the naming convention `-x.`.
+Prefix and suffix can be chosen freely, the script will only open and parse files with names containing
+`-x.`.
+
+In the following example we have five output files, execute the script which renders four graphic files
+with color coded metric table and scaling plots:
+```
+$ ls script/data
+data-128x12.txt data-16x12.txt data-32x12.txt data-64x12.txt data-8x12.txt
+$ python3 script/CPT-plot.py script/data
+$ ls data_*
+data_graph.pdf data_graph.png data_metrics.pdf data_metrics.png
+```
+
+
+
## Files
### MPI Function Wrappers
- completion-wrappers.cpp - Request completion calls
diff --git a/script/CPT-plot.py b/script/CPT-plot.py
new file mode 100644
index 0000000..aa9e305
--- /dev/null
+++ b/script/CPT-plot.py
@@ -0,0 +1,360 @@
+import matplotlib.pyplot as plt
+import matplotlib.backends.backend_pdf as plt_backend
+
+import pandas as pd
+import numpy as np
+import matplotlib.pyplot as plt
+from matplotlib.patches import Rectangle
+import matplotlib as mpl
+from matplotlib import cm
+from matplotlib.colors import ListedColormap, LinearSegmentedColormap
+
+
+from PIL import Image
+import urllib
+import os, sys
+import re
+
+if (len(sys.argv) != 2):
+ print("Usage: %s " % sys.argv[0])
+ exit()
+
+# Name of experiment directory. Will also be used as prefix for output
+edir=sys.argv[1]
+ename=edir.split("/")[-1]
+
+# show preview
+preview=False
+
+scales = sorted([(int(m.group(1)), int(m.group(2)), f) for f in os.listdir(edir) if (m := re.search(r'-(\d+)x(\d+)\.', f))], key=lambda k: (k[0]*k[1], k[0]))
+
+data={}
+runtimes={}
+multiscale = False
+corescales = len(set([p*t for p,t,f in scales]))
+
+if corescales != len(scales) and corescales != 1:
+ multiscale = True
+
+# Colormap
+top = cm.get_cmap('RdYlGn', 40)
+bottom = cm.get_cmap('RdYlGn', 80)
+newcolors = np.vstack((
+ bottom([i**2*.5 for i in np.linspace(0, 1, 800)]),
+ top(np.linspace(.5, .8, 200))
+ ))
+newcmp = ListedColormap(newcolors, name='pop')
+
+for proc,threads,file in scales:
+ scale = (proc, threads)
+ try:
+ with open(edir+"/"+file) as data_file:
+ data[scale]={}
+ for line in data_file:
+ if line.startswith("=> Total runtime (in s):"):
+ runtimes[scale]=float(line.split(":")[1])
+ if line.startswith("----------------POP"):
+ break
+ for line in data_file:
+ if line.startswith("----------------"):
+ break
+ name, value = line.split(":")
+ data[scale][name.strip()] = float(value)
+ except FileNotFoundError:
+ print("File not found: %s/%s"%(edir, file) )
+
+def draw_table(mode):
+ with plt_backend.PdfPages(mode + "_metrics.pdf") as pdf:
+ rows = [
+ "Parallel Efficiency",
+ " Load Balance",
+ " Communication Efficiency",
+ " Serialisation Efficiency",
+ " Transfer Efficiency",
+ " MPI Parallel Efficiency",
+ " MPI Load Balance",
+ " MPI Communication Efficiency",
+ " MPI Serialisation Efficiency",
+ " MPI Transfer Efficiency",
+ " OMP Parallel Efficiency",
+ " OMP Load Balance",
+ " OMP Communication Efficiency",
+ " OMP Serialisation Efficiency",
+ " OMP Transfer Efficiency",
+ ]
+ nrows = len(rows)+1
+ ncols = len(scales)+1
+
+ fwidth = 4.2
+
+ fig, (ax, cbax) = plt.subplots(1,2,width_ratios=[ncols+fwidth,.25],figsize=((ncols+fwidth+1)*.7,6*.8), dpi=200)
+
+ ax.set_xlim(0, ncols+fwidth-1)
+ ax.set_ylim(0, nrows)
+ ax.set_axis_off()
+
+ summer = mpl.colormaps["summer"]
+ autumn = mpl.colormaps["autumn"]
+
+ cutpoint=.20
+
+ for y, n in enumerate(data[tuple(scales[0][:2])].keys()):
+ for x, (p, t, f) in enumerate(scales):
+ scale = (p,t)
+ ax.add_patch(
+ Rectangle(xy=(fwidth+x,nrows - y - 2), width=1,
+ height=1, facecolor=newcmp(data[scale][n]), zorder=0)
+ )
+ ax.annotate(
+ xy=(fwidth+.5+x,nrows - y - 1-.5),
+ text=round(100 * data[scale][n], 1),
+ ha='center',
+ va='center',
+ color = "white" if data[scale][n]<.5 else "black"
+ )
+
+ ax.annotate(
+ xy=(fwidth - .1,nrows -.5),
+ text="#ranks x #threads",
+ weight='bold',
+ ha='right',
+ va='center'
+ )
+
+ for y, n in enumerate(rows):
+ ax.annotate(
+ xy=(.1,nrows - y - 1-.5),
+ text=n,
+ weight='bold',
+ ha='left',
+ va='center'
+ )
+ for x, (p,t,f) in enumerate(scales):
+ scale = (p,t)
+ ax.annotate(
+ xy=(fwidth+.5+x,nrows-.5),
+ text=str(p)+"x"+str(t),
+ weight='bold',
+ ha='center',
+ va='center'
+ )
+
+ ax.plot([ax.get_xlim()[0], ax.get_xlim()[1]], [nrows, nrows], lw=3, color='black', marker='', zorder=4)
+ ax.plot([ax.get_xlim()[0], ax.get_xlim()[1]], [nrows-1, nrows-1], lw=1.5, color='black', marker='', zorder=4)
+ ax.plot([ax.get_xlim()[0], ax.get_xlim()[1]], [0, 0], lw=3, color='black', marker='', zorder=4)
+ for x in range(1, nrows-1):
+ lstyle=":"
+ ax.plot([ax.get_xlim()[0], ax.get_xlim()[1]], [x, x], lw=1.15, color='gray', ls=lstyle, zorder=3 , marker='')
+
+ ax.plot([0,0], [ax.get_ylim()[0], ax.get_ylim()[1]], lw=3, color='black', marker='', zorder=4)
+ ax.plot([fwidth,fwidth], [ax.get_ylim()[0], ax.get_ylim()[1]], lw=1.5, color='black', marker='', zorder=4)
+ ax.plot([ncols+fwidth-1,ncols+fwidth-1], [ax.get_ylim()[0], ax.get_ylim()[1]], lw=3, color='black', marker='', zorder=4)
+ for y in range(1, ncols-1):
+ lstyle = ":"
+ c = 'gray'
+ if multiscale and scales[y-1][0] * scales[y-1][1] != scales[y][0] * scales[y][1]:
+ lstyle = "solid"
+ c = 'black'
+ ax.plot([y+fwidth, y+fwidth], [ax.get_ylim()[0], ax.get_ylim()[1]], lw=1.15, color=c, ls=lstyle, zorder=3 , marker='')
+
+ cb = plt.colorbar(cm.ScalarMappable(cmap=newcmp), cax=cbax)
+
+ fig.tight_layout()
+ pdf.savefig()
+ plt.savefig(
+ mode + '_metrics.png',
+ dpi=200,
+ transparent=False
+ )
+ if preview:
+ plt.show()
+ plt.close()
+
+def getAbsMetrics(series):
+ absMetrics={}
+ absMetrics["$TE_{omp}$"] = 1.
+ absMetrics["$TE_{mpi}$"] = absMetrics["$TE_{omp}$"]*series['OMP Transfer Efficiency']
+ absMetrics["$SerE_{omp}$"] = absMetrics["$TE_{mpi}$"] * series['MPI Transfer Efficiency']
+ absMetrics["$SerE_{mpi}$"] = absMetrics["$SerE_{omp}$"] * series['OMP Serialisation Efficiency']
+ absMetrics["$LB_{omp}$"] = absMetrics["$SerE_{mpi}$"] * series['MPI Serialisation Efficiency']
+ absMetrics["$LB_{mpi}$"] = absMetrics["$LB_{omp}$"] * series['OMP Load Balance']
+ absMetrics["$PE$"] = absMetrics["$LB_{mpi}$"] * series['MPI Load Balance']
+ return absMetrics
+
+def getRelMetrics(series):
+ absMetrics = getAbsMetrics(series)
+ relMetrics = {}
+ relMetrics["$PE$"] = absMetrics["$PE$"]
+ relMetrics["$LB_{mpi}$"] = absMetrics["$LB_{mpi}$"] - absMetrics["$PE$"]
+ relMetrics["$LB_{omp}$"] = absMetrics["$LB_{omp}$"] - absMetrics["$LB_{mpi}$"]
+ relMetrics["$SerE_{mpi}$"] = absMetrics["$SerE_{mpi}$"] - absMetrics["$LB_{omp}$"]
+ relMetrics["$SerE_{omp}$"] = absMetrics["$SerE_{omp}$"] - absMetrics["$SerE_{mpi}$"]
+ relMetrics["$TE_{mpi}$"] = absMetrics["$TE_{mpi}$"] - absMetrics["$SerE_{omp}$"]
+ relMetrics["$TE_{omp}$"] = absMetrics["$TE_{omp}$"] - absMetrics["$TE_{mpi}$"]
+ return relMetrics
+
+def getAbsOmpMetrics(series):
+ absOmpMetrics={}
+ absOmpMetrics["$TE_{omp}$"] = 1.
+ absOmpMetrics["$SerE_{omp}$"] = absOmpMetrics["$TE_{omp}$"] * series['OMP Transfer Efficiency']
+ absOmpMetrics["$LB_{omp}$"] = absOmpMetrics["$SerE_{omp}$"] * series['OMP Serialisation Efficiency']
+ absOmpMetrics["$PE_{omp}$"] = absOmpMetrics["$LB_{omp}$"] * series['OMP Load Balance']
+ return absOmpMetrics
+
+def getRelOmpMetrics(series):
+ absOmpMetrics = getAbsOmpMetrics(series)
+ relOmpMetrics = {}
+ relOmpMetrics["$PE_{omp}$"] = absOmpMetrics["$PE_{omp}$"]
+ relOmpMetrics["$LB_{omp}$"] = absOmpMetrics["$LB_{omp}$"] - absOmpMetrics["$PE_{omp}$"]
+ relOmpMetrics["$SerE_{omp}$"] = absOmpMetrics["$SerE_{omp}$"] - absOmpMetrics["$LB_{omp}$"]
+ relOmpMetrics["$TE_{omp}$"] = absOmpMetrics["$TE_{omp}$"] - absOmpMetrics["$SerE_{omp}$"]
+ return relOmpMetrics
+
+def getAbsMpiMetrics(series):
+ absMpiMetrics={}
+ absMpiMetrics["$TE_{mpi}$"] = 1.
+ absMpiMetrics["$SerE_{mpi}$"] = absMpiMetrics["$TE_{mpi}$"] * series['MPI Transfer Efficiency']
+ absMpiMetrics["$LB_{mpi}$"] = absMpiMetrics["$SerE_{mpi}$"] * series['MPI Serialisation Efficiency']
+ absMpiMetrics["$PE_{mpi}$"] = absMpiMetrics["$LB_{mpi}$"] * series['MPI Load Balance']
+ return absMpiMetrics
+
+def getRelMpiMetrics(series):
+ absMpiMetrics = getAbsMpiMetrics(series)
+ relMpiMetrics = {}
+ relMpiMetrics["$PE_{mpi}$"] = absMpiMetrics["$PE_{mpi}$"]
+ relMpiMetrics["$LB_{mpi}$"] = absMpiMetrics["$LB_{mpi}$"] - absMpiMetrics["$PE_{mpi}$"]
+ relMpiMetrics["$SerE_{mpi}$"] = absMpiMetrics["$SerE_{mpi}$"] - absMpiMetrics["$LB_{mpi}$"]
+ relMpiMetrics["$TE_{mpi}$"] = absMpiMetrics["$TE_{mpi}$"] - absMpiMetrics["$SerE_{mpi}$"]
+ return relMpiMetrics
+
+def plot_data(mode):
+ with plt_backend.PdfPages(mode + "_graph.pdf") as pdf:
+ fig = plt.figure(figsize=(12, 6), dpi=200)
+ ax1 = plt.subplot2grid(shape=(6, 3), loc=(1, 0), colspan=2, rowspan=5, fig=fig)
+ ax2 = plt.subplot2grid(shape=(6, 3), loc=(0, 2), rowspan=2, fig=fig)
+ ax3 = plt.subplot2grid(shape=(6, 3), loc=(2, 2), rowspan=2, fig=fig)
+ ax4 = plt.subplot2grid(shape=(6, 3), loc=(4, 2), rowspan=2, fig=fig)
+ axl = plt.subplot2grid(shape=(6, 3), loc=(0, 0), colspan=2, fig=fig, frameon=False)
+ axes = [ax1, ax2, ax3, ax4, axl]
+
+
+ blues = plt.get_cmap("Blues")
+ oranges = plt.get_cmap("Oranges")
+ greens = plt.get_cmap("Greens")
+ reds = plt.get_cmap("Purples")
+ DARK=.8
+ LIGHT=.5
+
+ rotation = 30
+ lsize = "small"
+ ssize = "xx-small"
+ if len(scales) < 8:
+ rotation = 0
+ lsize = "medium"
+ ssize = "small"
+ if len(scales) < 6:
+ rotation = 0
+ lsize = "medium"
+ ssize = "small"
+
+ pdata={}
+ COLORS = [reds(DARK), reds(LIGHT), greens(DARK), greens(LIGHT), oranges(DARK), oranges(LIGHT), blues(DARK)]
+ COLORS.reverse()
+
+ xticks = [str(p)+"x"+str(t) for p,t,f in scales]
+ for p,t,f in scales:
+ scale = p,t
+ relMetrics = getRelMetrics(data[scale])
+ labs = list(relMetrics.keys())
+ for k,v in relMetrics.items():
+ pdata[k]=pdata.get(k,[])+[v]
+ y = list(pdata.values())
+ ax1.stackplot(xticks, y, labels=labs, colors=COLORS)
+ ax1.set_ylim([0,1])
+ ax1.set_title("Hybrid breakdown")
+ ax1.set_ylabel("Efficiency")
+ ax1.set_xlabel("#ranks x #threads")
+ handles, labels = ax1.get_legend_handles_labels()
+ handles.reverse()
+ labels.reverse()
+ ax1.set_xticks(ax1.get_xticks())
+ ax1.set_xticklabels(xticks, rotation=rotation, fontsize=lsize)
+
+ axl.set_xticks([])
+ axl.set_yticks([])
+
+
+ pdata={}
+ COLORS = [reds(DARK), greens(DARK), oranges(DARK), blues(DARK)]
+ COLORS.reverse()
+
+ for p,t,f in scales:
+ scale = p,t
+ relOmpMetrics = getRelOmpMetrics(data[scale])
+ labs = list(relOmpMetrics.keys())
+ for k,v in relOmpMetrics.items():
+ pdata[k]=pdata.get(k,[])+[v]
+ y = list(pdata.values())
+ ax2.stackplot(xticks, y, labels=labs, colors=COLORS)
+ ax2.set_ylim([0,1])
+ ax2.set_title("OpenMP breakdown")
+ ax2.set_ylabel("Efficiency")
+ ax2.set_xlabel("#ranks x #threads")
+ ax2.set_xticks(ax2.get_xticks())
+ ax2.set_xticklabels(xticks, rotation=rotation, fontsize=ssize)
+
+ pdata={}
+ COLORS = [reds(LIGHT), greens(LIGHT), oranges(LIGHT), blues(DARK)]
+ COLORS.reverse()
+
+ for p,t,f in scales:
+ scale = p,t
+ relMpiMetrics = getRelMpiMetrics(data[scale])
+ labs = list(relMpiMetrics.keys())
+
+ for k,v in relMpiMetrics.items():
+ pdata[k]=pdata.get(k,[])+[v]
+ y = list(pdata.values())
+ ax3.stackplot(xticks, y, labels=labs, colors=COLORS)
+ ax3.set_ylim([0,1])
+ ax3.set_title("MPI breakdown")
+ ax3.set_ylabel("Efficiency")
+ ax3.set_xlabel("Number of MPI ranks")
+ ax3.set_xticks(ax3.get_xticks())
+ ax3.set_xticklabels(xticks, rotation=rotation, fontsize=ssize)
+ ax4.plot(xticks, list(runtimes.values()))
+ ax4.set_ylabel("runtime in $s$")
+ ax4.set_xlabel("Number of MPI ranks")
+ ax4.set_ylim(bottom=0)
+ ax4.set_xticks(ax4.get_xticks())
+ ax4.set_xticklabels(xticks, rotation=rotation, fontsize=ssize)
+
+ if multiscale:
+ for y in range(len(scales)-1):
+ lstyle = ":"
+ c = 'gray'
+ if scales[y][0] * scales[y][1] != scales[y+1][0] * scales[y+1][1]:
+ ax1.plot([y+.5, y+.5], [ax1.get_ylim()[0], ax1.get_ylim()[1]], lw=1.5, color="red", ls="solid", zorder=3 , marker='')
+ ax2.plot([y+.5, y+.5], [ax2.get_ylim()[0], ax2.get_ylim()[1]], lw=1, color="red", ls="solid", zorder=3 , marker='')
+ ax3.plot([y+.5, y+.5], [ax3.get_ylim()[0], ax3.get_ylim()[1]], lw=1, color="red", ls="solid", zorder=3 , marker='')
+ ax4.plot([y+.5, y+.5], [ax4.get_ylim()[0], ax4.get_ylim()[1]], lw=1, color="red", ls="solid", zorder=3 , marker='')
+
+ axl.legend(handles, labels, loc='center', ncol=4)
+ fig.tight_layout()
+ pdf.savefig()
+ plt.savefig(
+ mode + '_graph.png',
+ dpi=200,
+ transparent=False
+ )
+ if preview:
+ plt.show()
+ plt.close()
+
+
+
+plot_data(ename)
+draw_table(ename)
+
+
+
diff --git a/script/data/data-1024x12.txt b/script/data/data-1024x12.txt
new file mode 100644
index 0000000..24bbb43
--- /dev/null
+++ b/script/data/data-1024x12.txt
@@ -0,0 +1,47 @@
+
+[pop] sere:0.437647:te:0.411974:comme:0.180299:lb:0.882610:pe:0.159134:crittime:7.168600:totaltime:17.400619:avgcomputation:2.769027:maxcomputation:3.137317
+
+
+--------MPI stats:--------
+MPI_*coll: 3135488
+MPI_I*coll: 3135488
+
+
+--------CritPath Analysis Tool results:--------
+=> Number of processes: 1024
+=> Number of threads: 12288
+=> Average Computation (in s): 2.769027
+=> Maximum Computation (in s): 3.137317
+=> Max crit. computation (in s): 7.168600
+=> Average crit. proc-local computation (in s): 2.950965
+=> Maximum crit. proc-local computation (in s): 3.326311
+=> Average crit. proc-local Outside OpenMP (in s): 17.384592
+=> Maximum crit. proc-local Outside OpenMP (in s): 17.390926
+=> Average proc-local rumtime (in s): 2.966992
+=> Maximum proc-local runtime (in s): 3.348900
+=> Average PL-max Computation (in s): 2.834065
+=> Maximum PL-max Computation (in s): 3.137317
+=> Average Outside OpenMP (in s): 3.971876
+=> Maximum Outside OpenMP (in s): 17.346883
+=> Max crit. Outside OpenMP (in s): 17.392548
+=> Max crit. Outside OpenMP w/o offset (in s): 17.392114
+=> Total runtime (in s): 17.400619
+
+
+----------------POP metrics----------------
+Parallel Efficiency: 0.159134
+ Load Balance: 0.882610
+ Communication Efficiency: 0.180299
+ Serialisation Efficiency: 0.437647
+ Transfer Efficiency: 0.411974
+ MPI Parallel Efficiency: 0.172767
+ MPI Load Balance: 0.903340
+ MPI Communication Efficiency: 0.191254
+ MPI Serialisation Efficiency: 0.464011
+ MPI Transfer Efficiency: 0.412175
+ OMP Parallel Efficiency: 0.921087
+ OMP Load Balance: 0.977051
+ OMP Communication Efficiency: 0.942721
+ OMP Serialisation Efficiency: 0.943182
+ OMP Transfer Efficiency: 0.999511
+-------------------------------------------
diff --git a/script/data/data-128x12.txt b/script/data/data-128x12.txt
new file mode 100644
index 0000000..679cb3b
--- /dev/null
+++ b/script/data/data-128x12.txt
@@ -0,0 +1,47 @@
+
+[pop] sere:0.759633:te:0.937797:comme:0.712382:lb:0.958793:pe:0.683027:crittime:18.433987:totaltime:19.656685:avgcomputation:13.426047:maxcomputation:14.003071
+
+
+--------MPI stats:--------
+MPI_*coll: 392192
+MPI_I*coll: 392192
+
+
+--------CritPath Analysis Tool results:--------
+=> Number of processes: 128
+=> Number of threads: 1536
+=> Average Computation (in s): 13.426047
+=> Maximum Computation (in s): 14.003071
+=> Max crit. computation (in s): 18.433987
+=> Average crit. proc-local computation (in s): 13.796796
+=> Maximum crit. proc-local computation (in s): 14.137975
+=> Average crit. proc-local Outside OpenMP (in s): 19.636053
+=> Maximum crit. proc-local Outside OpenMP (in s): 19.645305
+=> Average proc-local rumtime (in s): 13.817428
+=> Maximum proc-local runtime (in s): 14.155259
+=> Average PL-max Computation (in s): 13.570501
+=> Maximum PL-max Computation (in s): 14.003071
+=> Average Outside OpenMP (in s): 13.912703
+=> Maximum Outside OpenMP (in s): 19.549986
+=> Max crit. Outside OpenMP (in s): 19.647514
+=> Max crit. Outside OpenMP w/o offset (in s): 19.647572
+=> Total runtime (in s): 19.656685
+
+
+----------------POP metrics----------------
+Parallel Efficiency: 0.683027
+ Load Balance: 0.958793
+ Communication Efficiency: 0.712382
+ Serialisation Efficiency: 0.759633
+ Transfer Efficiency: 0.937797
+ MPI Parallel Efficiency: 0.697350
+ MPI Load Balance: 0.969109
+ MPI Communication Efficiency: 0.719579
+ MPI Serialisation Efficiency: 0.766952
+ MPI Transfer Efficiency: 0.938232
+ OMP Parallel Efficiency: 0.979461
+ OMP Load Balance: 0.989355
+ OMP Communication Efficiency: 0.989999
+ OMP Serialisation Efficiency: 0.990458
+ OMP Transfer Efficiency: 0.999536
+-------------------------------------------
diff --git a/script/data/data-256x12.txt b/script/data/data-256x12.txt
new file mode 100644
index 0000000..c6bcebf
--- /dev/null
+++ b/script/data/data-256x12.txt
@@ -0,0 +1,47 @@
+
+[pop] sere:0.655374:te:0.847913:comme:0.555700:lb:0.945850:pe:0.525609:crittime:11.941295:totaltime:14.083169:avgcomputation:7.402236:maxcomputation:7.826016
+
+
+--------MPI stats:--------
+MPI_*coll: 784128
+MPI_I*coll: 784128
+
+
+--------CritPath Analysis Tool results:--------
+=> Number of processes: 256
+=> Number of threads: 3072
+=> Average Computation (in s): 7.402236
+=> Maximum Computation (in s): 7.826016
+=> Max crit. computation (in s): 11.941295
+=> Average crit. proc-local computation (in s): 7.644413
+=> Maximum crit. proc-local computation (in s): 7.890091
+=> Average crit. proc-local Outside OpenMP (in s): 14.061539
+=> Maximum crit. proc-local Outside OpenMP (in s): 14.072286
+=> Average proc-local rumtime (in s): 7.666043
+=> Maximum proc-local runtime (in s): 7.909523
+=> Average PL-max Computation (in s): 7.456449
+=> Maximum PL-max Computation (in s): 7.826016
+=> Average Outside OpenMP (in s): 7.937051
+=> Maximum Outside OpenMP (in s): 14.020019
+=> Max crit. Outside OpenMP (in s): 14.070623
+=> Max crit. Outside OpenMP w/o offset (in s): 14.070588
+=> Total runtime (in s): 14.083169
+
+
+----------------POP metrics----------------
+Parallel Efficiency: 0.525609
+ Load Balance: 0.945850
+ Communication Efficiency: 0.555700
+ Serialisation Efficiency: 0.655374
+ Transfer Efficiency: 0.847913
+ MPI Parallel Efficiency: 0.534270
+ MPI Load Balance: 0.952777
+ MPI Communication Efficiency: 0.560751
+ MPI Serialisation Efficiency: 0.660740
+ MPI Transfer Efficiency: 0.848671
+ OMP Parallel Efficiency: 0.983788
+ OMP Load Balance: 0.992729
+ OMP Communication Efficiency: 0.990993
+ OMP Serialisation Efficiency: 0.991879
+ OMP Transfer Efficiency: 0.999107
+-------------------------------------------
diff --git a/script/data/data-512x12.txt b/script/data/data-512x12.txt
new file mode 100644
index 0000000..22001a3
--- /dev/null
+++ b/script/data/data-512x12.txt
@@ -0,0 +1,47 @@
+
+[pop] sere:0.540941:te:0.617275:comme:0.333909:lb:0.919365:pe:0.306984:crittime:8.514002:totaltime:13.792879:avgcomputation:4.234199:maxcomputation:4.605570
+
+
+--------MPI stats:--------
+MPI_*coll: 1568256
+MPI_I*coll: 1568256
+
+
+--------CritPath Analysis Tool results:--------
+=> Number of processes: 512
+=> Number of threads: 6144
+=> Average Computation (in s): 4.234199
+=> Maximum Computation (in s): 4.605570
+=> Max crit. computation (in s): 8.514002
+=> Average crit. proc-local computation (in s): 4.445230
+=> Maximum crit. proc-local computation (in s): 4.807521
+=> Average crit. proc-local Outside OpenMP (in s): 13.777598
+=> Maximum crit. proc-local Outside OpenMP (in s): 13.782787
+=> Average proc-local rumtime (in s): 4.460512
+=> Maximum proc-local runtime (in s): 4.821873
+=> Average PL-max Computation (in s): 4.281752
+=> Maximum PL-max Computation (in s): 4.605570
+=> Average Outside OpenMP (in s): 5.011949
+=> Maximum Outside OpenMP (in s): 13.737815
+=> Max crit. Outside OpenMP (in s): 13.784703
+=> Max crit. Outside OpenMP w/o offset (in s): 13.784705
+=> Total runtime (in s): 13.792879
+
+
+----------------POP metrics----------------
+Parallel Efficiency: 0.306984
+ Load Balance: 0.919365
+ Communication Efficiency: 0.333909
+ Serialisation Efficiency: 0.540941
+ Transfer Efficiency: 0.617275
+ MPI Parallel Efficiency: 0.324236
+ MPI Load Balance: 0.929690
+ MPI Communication Efficiency: 0.348758
+ MPI Serialisation Efficiency: 0.564661
+ MPI Transfer Efficiency: 0.617641
+ OMP Parallel Efficiency: 0.946792
+ OMP Load Balance: 0.988894
+ OMP Communication Efficiency: 0.957425
+ OMP Serialisation Efficiency: 0.957993
+ OMP Transfer Efficiency: 0.999407
+-------------------------------------------
diff --git a/script/data/data-64x12.txt b/script/data/data-64x12.txt
new file mode 100644
index 0000000..8b20098
--- /dev/null
+++ b/script/data/data-64x12.txt
@@ -0,0 +1,47 @@
+
+[pop] sere:0.846409:te:0.984468:comme:0.833263:lb:0.976485:pe:0.813669:crittime:39.388323:totaltime:40.009749:avgcomputation:32.554688:maxcomputation:33.338641
+
+
+--------MPI stats:--------
+MPI_*coll: 196224
+MPI_I*coll: 196224
+
+
+--------CritPath Analysis Tool results:--------
+=> Number of processes: 64
+=> Number of threads: 768
+=> Average Computation (in s): 32.554688
+=> Maximum Computation (in s): 33.338641
+=> Max crit. computation (in s): 39.388323
+=> Average crit. proc-local computation (in s): 33.468994
+=> Maximum crit. proc-local computation (in s): 33.826436
+=> Average crit. proc-local Outside OpenMP (in s): 39.985539
+=> Maximum crit. proc-local Outside OpenMP (in s): 39.996139
+=> Average proc-local rumtime (in s): 33.493204
+=> Maximum proc-local runtime (in s): 33.859813
+=> Average PL-max Computation (in s): 32.915701
+=> Maximum PL-max Computation (in s): 33.338641
+=> Average Outside OpenMP (in s): 33.097781
+=> Maximum Outside OpenMP (in s): 39.715652
+=> Max crit. Outside OpenMP (in s): 40.000520
+=> Max crit. Outside OpenMP w/o offset (in s): 40.000456
+=> Total runtime (in s): 40.009749
+
+
+----------------POP metrics----------------
+Parallel Efficiency: 0.813669
+ Load Balance: 0.976485
+ Communication Efficiency: 0.833263
+ Serialisation Efficiency: 0.846409
+ Transfer Efficiency: 0.984468
+ MPI Parallel Efficiency: 0.834923
+ MPI Load Balance: 0.987314
+ MPI Communication Efficiency: 0.845651
+ MPI Serialisation Efficiency: 0.858794
+ MPI Transfer Efficiency: 0.984697
+ OMP Parallel Efficiency: 0.974543
+ OMP Load Balance: 0.989032
+ OMP Communication Efficiency: 0.985351
+ OMP Serialisation Efficiency: 0.985579
+ OMP Transfer Efficiency: 0.999768
+-------------------------------------------