Skip to content

Commit 59c0a23

Browse files
committed
Add 05-parallelism-practice slides
1 parent 323bea7 commit 59c0a23

File tree

2 files changed

+244
-0
lines changed

2 files changed

+244
-0
lines changed
Lines changed: 236 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,236 @@
1+
\documentclass{beamer}
2+
3+
% Theme choice
4+
\usetheme{Madrid}
5+
6+
% Optional packages
7+
\usepackage{graphicx} % For including images
8+
\usepackage{amsmath} % For math symbols and formulas
9+
\usepackage{hyperref} % For hyperlinks
10+
\usepackage{listings}
11+
\usepackage{xcolor}
12+
\usepackage[T1]{fontenc}
13+
14+
\lstdefinestyle{CStyle}{
15+
language=C, % Set the language to C
16+
basicstyle=\ttfamily\footnotesize\linespread{0.9}\tiny, % Set font style and size
17+
keywordstyle=\color{blue}, % Color of keywords
18+
commentstyle=\color{gray}, % Color of comments
19+
stringstyle=\color{red}, % Color of strings
20+
showstringspaces=false, % Do not mark spaces in strings
21+
breaklines=true, % Enable line breaks at appropriate places
22+
breakatwhitespace=false, % Break lines at any character, not just whitespace
23+
numbers=left, % Show line numbers on the left
24+
numberstyle=\tiny\color{gray}, % Style for line numbers
25+
tabsize=4, % Set tab width
26+
keepspaces=true, % Keep indentation spaces
27+
frame=single, % Add a border around the code
28+
aboveskip=0pt, % Reduce space above the code block
29+
belowskip=0pt, % Reduce space below the code block
30+
xleftmargin=7.5pt, % Add left padding (approx. 2.8mm or 10px)
31+
xrightmargin=15pt, % Add left padding (approx. 2.8mm or 10px)
32+
}
33+
34+
% Title, author, date, and institute (optional)
35+
\title[Parallel Programming. Parallelism theory]{Parallel Programming course. Parallelism theory}
36+
\author{Obolenskiy Arseniy, Nesterov Alexander}
37+
\institute{Nizhny Novgorod State University}
38+
39+
\date{\today} % or \date{Month Day, Year}
40+
41+
% Redefine the footline to display both the short title and the university name
42+
\setbeamertemplate{footline}{
43+
\leavevmode%
44+
\hbox{%
45+
\begin{beamercolorbox}[wd=.45\paperwidth,ht=2.5ex,dp=1ex,leftskip=1em,center]{author in head/foot}%
46+
\usebeamerfont{author in head/foot}\insertshortinstitute % Displays the university name
47+
\end{beamercolorbox}%
48+
\begin{beamercolorbox}[wd=.45\paperwidth,ht=2.5ex,dp=1ex,leftskip=1em,center]{author in head/foot}%
49+
\usebeamerfont{author in head/foot}\insertshorttitle % Displays the short title
50+
\end{beamercolorbox}%
51+
\begin{beamercolorbox}[wd=.1\paperwidth,ht=2.5ex,dp=1ex,rightskip=1em,center]{author in head/foot}%
52+
\usebeamerfont{author in head/foot}\insertframenumber{} / \inserttotalframenumber
53+
\end{beamercolorbox}}%
54+
\vskip0pt%
55+
}
56+
57+
\begin{document}
58+
59+
\begin{frame}
60+
\titlepage
61+
\end{frame}
62+
63+
\begin{frame}{Contents}
64+
\tableofcontents
65+
\end{frame}
66+
67+
\begin{frame}{Full list of tasks}
68+
\tiny
69+
\begin{itemize}
70+
\item Producer-Consumer Problem
71+
\item Readers-Writers Problem
72+
\item Dining Philosophers Problem
73+
\item Sleeping Barber Problem
74+
\item Broadcast (one-to-all communication)
75+
\item Reduce (all-to-one communication)
76+
\item Allreduce (all-to-one communication and broadcast)
77+
\item Scatter (generalized one-to-all communication)
78+
\item Gather (generalized all-to-one communication)
79+
\item Topology: Line
80+
\item Topology: Ring
81+
\item Topology: Star
82+
\item Topology: Torus Grid
83+
\item Topology: Hypercube
84+
\item Horizontal Strip Scheme
85+
\item Vertical Strip Scheme
86+
\item Horizontal Strip Scheme (only matrix A partitioned)
87+
\item Horizontal Strip Scheme for A, Vertical Strip Scheme for B
88+
\item Gaussian Method - Horizontal Strip Scheme
89+
\item Gaussian Method - Vertical Strip Scheme
90+
\item Gauss-Jordan Method
91+
\item Iterative Methods (Jacobi)
92+
\item Iterative Methods (Gauss-Seidel)
93+
\item Simple Iteration Method
94+
\item Bubble Sort (Odd-Even Transposition Sort)
95+
\item Image Smoothing
96+
\item Contrast Enhancement
97+
\end{itemize}
98+
\end{frame}
99+
100+
101+
\section{Tasks}
102+
103+
\begin{frame}{Tasks}
104+
Tasks in the course are splitted into the following subgroups:
105+
\begin{itemize}
106+
\item Classical Tasks of Parallel Programming
107+
\item Data Transfer Methods
108+
\item Topologies
109+
\item Matrix Multiplication
110+
\item Systems of Linear Algebraic Equations
111+
\item Sort
112+
\item Computer Graphics
113+
\end{itemize}
114+
\end{frame}
115+
116+
\begin{frame}{Disclaimers}
117+
\begin{itemize}
118+
\item All matrices should be stored in linear arrays (not \texttt{std::vector<std::vector<int> >})
119+
\item Performance should be meauserd on big matrices/vectors
120+
\end{itemize}
121+
\end{frame}
122+
123+
\section{Classical Tasks of Parallel Programming}
124+
125+
\begin{frame}{Classical Tasks of Parallel Programming}
126+
\begin{itemize}
127+
\item Producer-Consumer Problem
128+
\item Readers-Writers Problem
129+
\item Dining Philosophers Problem
130+
\item Sleeping Barber Problem
131+
\end{itemize}
132+
Warning:
133+
There is different testing mechanism. Time is not measured for these tasks.
134+
Tasks are measured with big number of processes (16+, up to physical limit)
135+
\end{frame}
136+
137+
\section{Data Transfer Methods}
138+
139+
\begin{frame}{Data Transfer Methods}
140+
\begin{itemize}
141+
\item Broadcast (one-to-all communication)
142+
\item Reduce (all-to-one communication)
143+
\item Allreduce (all-to-one communication and broadcast)
144+
\item Scatter (generalized one-to-all communication)
145+
\item Gather (generalized all-to-one communication)
146+
\end{itemize}
147+
Reference: original MPI function
148+
Requirement: Put your task in the description.
149+
Tasks size should be big. Broadcast should send more that one element (vector).
150+
E.g. multiply matrix * vector
151+
Task 3 using 2
152+
\end{frame}
153+
154+
\section{Topologies}
155+
156+
\begin{frame}{Topologies}
157+
\begin{itemize}
158+
\item Topology: Line
159+
\item Topology: Ring
160+
\item Topology: Star
161+
\item Topology: Torus Grid
162+
\item Topology: Hypercube
163+
\end{itemize}
164+
Warning:
165+
There is different testing mechanism. Time is not measured for these tasks.
166+
Tasks are measured with big number of processes (16+, up to physical limit)
167+
168+
Data is transferred from process 0
169+
Star: 0-1-0-2-0-3-0...
170+
\end{frame}
171+
172+
\section{Matrix Multiplication}
173+
174+
\begin{frame}{Matrix Multiplication}
175+
\begin{itemize}
176+
\item Horizontal Strip Scheme
177+
\item Vertical Strip Scheme
178+
\item Horizontal Strip Scheme (only matrix A partitioned)
179+
\item Horizontal Strip Scheme for A, Vertical Strip Scheme for B
180+
\end{itemize}
181+
Expected perf gain:
182+
Validate shapes (if matmul is possible for these shapes)
183+
\end{frame}
184+
185+
\section{Systems of Linear Algebraic Equations}
186+
187+
\begin{frame}{Systems of Linear Algebraic Equations}
188+
\begin{itemize}
189+
\item Gaussian Method - Horizontal Strip Scheme
190+
\item Gaussian Method - Vertical Strip Scheme
191+
\item Gauss-Jordan Method
192+
\item Iterative Methods (Jacobi)
193+
\item Iterative Methods (Gauss-Seidel)
194+
\item Simple Iteration Method
195+
\end{itemize}
196+
Generate matrix that fits conditions
197+
Validate
198+
\begin{itemize}
199+
\item determinant, ... (u can use boost for validation step)
200+
\item 1 solution
201+
\item Last 3, check convergence conditions (!, otherwise inf loop)
202+
\end{itemize}
203+
Iterative methods: max ~10\%, you can parallelize only inside iteration
204+
\end{frame}
205+
206+
\section{Sort}
207+
208+
\begin{frame}{Sort}
209+
\begin{itemize}
210+
\item Bubble Sort (Odd-Even Transposition Sort)
211+
\end{itemize}
212+
Do not use std::sort for time comparison! Validation of functionality is OK
213+
\end{frame}
214+
215+
\section{Computer Graphics}
216+
217+
\begin{frame}{Computer Graphics}
218+
\begin{itemize}
219+
\item Image Smoothing
220+
\item Contrast Enhancement
221+
\end{itemize}
222+
RGB/BGR, color matrix
223+
use image data structure
224+
can verify unctionality using boost
225+
compare time with seq
226+
\end{frame}
227+
228+
\begin{frame}
229+
\centering
230+
\Huge{Thank You!}
231+
\end{frame}
232+
233+
\begin{frame}{References}
234+
\end{frame}
235+
236+
\end{document}
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
\beamer@sectionintoc {1}{Tasks}{4}{0}{1}
2+
\beamer@sectionintoc {2}{Classical Tasks of Parallel Programming}{6}{0}{2}
3+
\beamer@sectionintoc {3}{Data Transfer Methods}{7}{0}{3}
4+
\beamer@sectionintoc {4}{Topologies}{8}{0}{4}
5+
\beamer@sectionintoc {5}{Matrix Multiplication}{9}{0}{5}
6+
\beamer@sectionintoc {6}{Systems of Linear Algebraic Equations}{10}{0}{6}
7+
\beamer@sectionintoc {7}{Sort}{11}{0}{7}
8+
\beamer@sectionintoc {8}{Computer Graphics}{12}{0}{8}

0 commit comments

Comments
 (0)