From 1b9664e851d55ab982b4eef1a2536f96f8a3ec32 Mon Sep 17 00:00:00 2001 From: Francis Russell Date: Tue, 4 Mar 2014 22:11:44 +0000 Subject: [PATCH] Add skeleton slides. --- .gitignore | 18 ++++++ Makefile | 81 +++++++++++++++++++++++++++ images-gnuplot/archer-onetep-imkl.dat | 58 +++++++++++++++++++ images-gnuplot/archer-onetep.gpi | 24 ++++++++ presentation.tex | 75 +++++++++++++++++++++++++ 5 files changed, 256 insertions(+) create mode 100644 .gitignore create mode 100644 Makefile create mode 100644 images-gnuplot/archer-onetep-imkl.dat create mode 100644 images-gnuplot/archer-onetep.gpi create mode 100644 presentation.tex diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..032d982 --- /dev/null +++ b/.gitignore @@ -0,0 +1,18 @@ +#Vim swap +.*.swp + +#Generated +/pygments.sty +/*.aux +/*.log +/*.nav +/*.out +/*.pdf +/*.snm +/*.toc +/code/*.tex +/images-dot/*.tex +/images-svg/*.pdf +/images-gnuplot/*.pdf +/images-gnuplot/*.tex +/images-gnuplot/build_stamp diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..65ca5cd --- /dev/null +++ b/Makefile @@ -0,0 +1,81 @@ +IMAGE_FILES=$(wildcard images/*) + +SVG_FOLDER=images-svg +SVG_SOURCES=$(wildcard $(SVG_FOLDER)/*.svg) +SVG_OUTPUTS=${patsubst %.svg,%.pdf,$(SVG_SOURCES)} + +CODE_FOLDER=code +CODE_F90_TEX_FILES=${patsubst %.F90,%.tex,$(wildcard $(CODE_FOLDER)/*.F90)} +CODE_UFL_TEX_FILES=${patsubst %.ufl,%.tex,$(wildcard $(CODE_FOLDER)/*.ufl)} +CODE_RAW_FILES=$(wildcard $(CODE_FOLDER)/*.ofl $(CODE_FOLDER)/*.txt) +CODE_TEX_FILES=$(CODE_F90_TEX_FILES) $(CODE_UFL_TEX_FILES) + +DOT_FOLDER=images-dot +DOT_TEX_FILES=${patsubst %.dot,%.tex,$(wildcard $(DOT_FOLDER)/*.dot)} + +GNUPLOT_FOLDER=images-gnuplot/ +GNUPLOT_FOLDER_GENERATOR_FILES=$(wildcard $(GNUPLOT_FOLDER)/*.gpi) $(wildcard $(GNUPLOT_FOLDER)/*.dat) +GNUPLOT_FOLDER_BUILD_STAMP=$(GNUPLOT_FOLDER)/build_stamp + +PDFLATEX_OUTPUT_LOG=pdflatex_output.log + +REWRITE_GNUPLOT_EPSLATEX=\ +for epsfile in *.eps; do epstopdf $${epsfile} && rm $${epsfile}; done &&\ +ESCAPED_BUILD_DIR=$$(echo $(1) | sed -r 's/(\/)/\\\1/g') &&\ +for texfile in *.tex; do sed -i -r "s/includegraphics\{([^\/]*)\}/includegraphics\{$${ESCAPED_BUILD_DIR}\/\1\}/g" $${texfile}; done + +all: presentation.pdf + +display: presentation.pdf + xpdf presentation.pdf + +display-4up: presentation-4up.pdf + xpdf presentation-4up.pdf + +4up: presentation-4up.pdf + +presentation-4up.pdf: presentation.pdf + pdfnup --nup 2x2 --a4paper --scale 0.95 --frame true presentation.pdf -o presentation-4up.pdf + +presentation.pdf: $(IMAGE_FILES) $(SVG_OUTPUTS) $(CODE_TEX_FILES) $(CODE_RAW_FILES) $(DOT_TEX_FILES) $(GNUPLOT_FOLDER_BUILD_STAMP) $(wildcard *.tex *.sty) pygments.sty + pdflatex -draftmode presentation &&\ + while(pdflatex presentation | tee $(PDFLATEX_OUTPUT_LOG) && grep "Rerun to get cross-references right" $(PDFLATEX_OUTPUT_LOG)); do true; done &&\ + rm -f $(PDFLATEX_OUTPUT_LOG) + +clean: + rm -f *.aux *.log *.out *.pdf *.bbl *.blg *.toc *.lot *.lof *.nav *.snm \ + $(SVG_FOLDER)/*.pdf \ + $(BASIS_FUNCTIONS_FOLDER)/*.pdf \ + $(BASIS_FUNCTIONS_BUILD_STAMP) \ + $(CODE_TEX_FILES) \ + $(DOT_FOLDER)/*.tex \ + $(GNUPLOT_FOLDER_BUILD_STAMP) \ + $(GNUPLOT_FOLDER)/*.pdf \ + $(GNUPLOT_FOLDER)/*.tex \ + pygments.sty + +upload: presentation.pdf + rsync -C --progress presentation.pdf shell3.doc.ic.ac.uk:~/public_html/psl/presentation_201403.pdf + +%.pdf: %.svg + inkscape -D -A $@ $< + +pygments.sty: + pygmentize -S friendly -f latex > $@ + +%.tex: %.F90 + pygmentize -f latex -l fortran -o $@ $< + +%.tex: %.ufl + pygmentize -f latex -l python -o $@ $< + +%.tex: %.dot + dot2tex --codeonly --usepdflatex -f tikz $< -o $@ + +$(GNUPLOT_FOLDER_BUILD_STAMP): $(GNUPLOT_FOLDER_GENERATOR_FILES) + cd $(GNUPLOT_FOLDER) &&\ + for gpifile in *.gpi; do gnuplot $${gpifile}; done &&\ + ${call REWRITE_GNUPLOT_EPSLATEX, $(GNUPLOT_FOLDER)} + touch $@ + +.PHONY: all display clean upload 4up display-4up diff --git a/images-gnuplot/archer-onetep-imkl.dat b/images-gnuplot/archer-onetep-imkl.dat new file mode 100644 index 0000000..9bccc39 --- /dev/null +++ b/images-gnuplot/archer-onetep-imkl.dat @@ -0,0 +1,58 @@ +#Time spent in total execution (seconds) +#test onetep onetep-ps fft-box size reduction speedup +amyloid 390.600 369.759 75x75x75 5.33% 5.63% +nanotube 1388.241 1253.429 99x99x99 9.71% 10.75% +cellulose 634.396 568.765 99x99x99 10.34% 11.53% +lysozyme 961.422 883.121 99x99x99 8.14% 8.86% +tbl600 322.700 276.946 91x91x91 14.17% 16.52% +tbl800 440.577 372.350 99x99x99 15.48% 18.32% +tbl1000 782.798 636.447 117x117x117 18.69% 22.99% +tbl1200 862.727 696.463 117x117x125 19.27% 23.87% + + +#Time spent in NGWF CG optimisation (seconds) +#test onetep onetep-ps fft-box size reduction speedup +amyloid 334.73 310.31 75x75x75 7.29% 7.86% +nanotube 614.40 503.48 99x99x99 18.05% 22.03% +cellulose 582.71 507.59 99x99x99 12.89% 14.79% +lysozyme 691.16 623.83 99x99x99 9.74% 10.79% +tbl600 309.96 257.24 91x91x91 17.00% 20.49% +tbl800 423.56 346.38 99x99x99 18.22% 22.28% +tbl1000 754.86 593.92 117x117x117 21.32% 27.09% +tbl1200 831.44 649.57 117x117x125 21.87% 27.99% + + +#Time spent in Fourier interpolation routines (seconds) +#test onetep onetep-ps fft-box size reduction speedup +amyloid 59.50 53.54 75x75x75 10.01% 11.13% +nanotube 408.86 278.67 99x99x99 31.84% 46.71% +cellulose 181.72 134.10 99x99x99 26.20% 35.51% +lysozyme 220.62 166.96 99x99x99 24.32% 32.13% +tbl600 159.95 114.90 91x91x91 28.16% 39.20% +tbl800 222.94 154.05 99x99x99 30.90% 44.71% +tbl1000 417.13 267.48 117x117x117 35.87% 55.94% +tbl1200 450.00 278.24 117x117x125 38.16% 61.73% + + +#Time spent in FFT-box interpolation (seconds) +#test onetep onetep-ps fft-box size reduction speedup +amyloid 16.50 13.89 75x75x75 15.81% 18.79% +nanotube 96.39 67.02 99x99x99 30.46% 43.82% +cellulose 49.80 34.49 99x99x99 30.74% 44.38% +lysozyme 57.71 40.61 99x99x99 29.63% 42.10% +tbl600 40.82 29.67 91x91x91 27.31% 37.58% +tbl800 56.03 39.29 99x99x99 29.87% 42.60% +tbl1000 101.07 66.27 117x117x117 34.43% 52.51% +tbl1200 109.46 70.07 117x117x125 35.98% 56.21% + + +#Time spent in FFT-box interpolation-product (seconds) +#test onetep onetep-ps fft-box size reduction speedup +amyloid 43.00 39.65 75x75x75 7.79% 8.44% +nanotube 312.46 211.65 99x99x99 32.26% 47.63% +cellulose 131.92 99.61 99x99x99 24.49% 32.43% +lysozyme 162.90 126.35 99x99x99 22.43% 28.92% +tbl600 119.13 85.23 91x91x91 28.45% 39.77% +tbl800 166.90 114.75 99x99x99 31.24% 45.44% +tbl1000 316.05 201.20 117x117x117 36.33% 57.08% +tbl1200 340.53 208.16 117x117x125 38.87% 63.59% diff --git a/images-gnuplot/archer-onetep.gpi b/images-gnuplot/archer-onetep.gpi new file mode 100644 index 0000000..dca7106 --- /dev/null +++ b/images-gnuplot/archer-onetep.gpi @@ -0,0 +1,24 @@ +set terminal epslatex color 10 size 5,4 + +set xlabel "Problem" +set ylabel "Speedup" +set style data histogram +set style fill solid border -1 +set nokey +set grid layerdefault linetype -1 linecolor rgb "gray" linewidth 0.2 +set yrange [0:*] +set xtics border in scale 0,0 nomirror rotate by -45 offset character 0, 0, 0 autojustify + +problem_label(name, fftbox_size) = sprintf("%s", name, fftbox_size) + +set key top left box +set yrange [0:2] +set output "archer-onetep-fourier-imkl.eps" +plot "archer-onetep-imkl.dat" using ($2/$3) index 3 ti '\tt{fourier\_interpolate}', \ + "archer-onetep-imkl.dat" using ($2/$3) index 4 ti '\tt{fourier\_interpolate\_product}', \ + "archer-onetep-imkl.dat" using ($2/$3):xtic(problem_label(strcol(1),strcol(4))) index 2 ti "aggregate" + +set nokey +set yrange [0:*] +set output "archer-onetep-overall-imkl.eps" +plot "archer-onetep-imkl.dat" using ($2/$3):xticlabels(1) index 0 diff --git a/presentation.tex b/presentation.tex new file mode 100644 index 0000000..3129bc8 --- /dev/null +++ b/presentation.tex @@ -0,0 +1,75 @@ +% vim:tw=80 + +\documentclass{beamer} +\usetheme{Madrid} +\usepackage{graphicx} +\usepackage{verbatim} +\usepackage{fancyvrb} +\usepackage{tikz} +\usepackage{ucs} +\usepackage{alltt} +\usepackage[utf8x]{inputenc} +\usepackage{tabularx} + +\input{pygments.sty} + +\title[Accelerating ONETEP]{Exploring Performance Optimisation Opportunities in ONETEP} +\subtitle{PSL Outcome Presentation} + +\author[F. P. Russell]{Francis P. Russell \\ Joint work with Chris-Kriton Skylaris \& Karl A. Wilkinson} +\date{06/03/2014} +\institute[ICL \& Soton]{Imperial College London \& Southampton University} + +\begin{document} + +\frame{\titlepage} + +\frame{ + +\frametitle{Research Timeline} + +\begin{itemize} + +\item Original aim was to investigate domain specific languages (DSLs) for quantum +chemistry, specifically in context of the linear-scaling code ONETEP. + +\item We concluded that the domain of variability in +the input to a domain-specific language for ONETEP was quite small. + +\item The domain of variability in the code we could generate was the most +interesting target - primarily from the perspective of increasing performance. + +\item We decided to look at the potential for optimisation in ONETEP's more +computationally intensive routines to determine if the optimisations we'd +like to generate even existed. + +\end{itemize} + +} + +\frame{ + +\frametitle{Speedups in ONETEP Fourier Routines} + +\center +\resizebox{0.8\textwidth}{!}{ +\input{images-gnuplot/archer-onetep-fourier-imkl} +} + +} + +\frame{ + +\frametitle{Overall Impact on ONETEP Performance} + +\center +\resizebox{0.8\textwidth}{!}{ +\input{images-gnuplot/archer-onetep-overall-imkl} +} + +} + + +\end{document} + + -- 2.47.3