Skip to content

Commit 9e86799

Browse files
committed
Add collective operations images to 03-mpi-api
1 parent 2861642 commit 9e86799

File tree

6 files changed

+65
-26
lines changed

6 files changed

+65
-26
lines changed

03-mpi-api/03-mpi-api.tex

+62-26
Original file line numberDiff line numberDiff line change
@@ -177,54 +177,90 @@ \section{Collective operations}
177177

178178
\texttt{int MPI\_Bcast(void *buffer, int count, MPI\_Datatype datatype, int root, MPI\_Comm comm);}
179179

180-
Parameters:
181-
\begin{itemize}
182-
\item buffer: Starting address of buffer.
183-
\item count: Number of entries in buffer.
184-
\item datatype: Data type of buffer elements.
185-
\item root: Rank of broadcast root.
186-
\item comm: Communicator.
187-
\end{itemize}
180+
\begin{minipage}[t]{0.6\textwidth}
181+
Parameters:
182+
\begin{itemize}
183+
\item buffer: Starting address of buffer.
184+
\item count: Number of entries in buffer.
185+
\item datatype: Data type of buffer elements.
186+
\item root: Rank of broadcast root.
187+
\item comm: Communicator.
188+
\end{itemize}
189+
\end{minipage}
190+
\hfill
191+
\begin{minipage}[t]{0.35\textwidth}
192+
\begin{figure}[h]
193+
\includegraphics[]{images/broadcast.png}
194+
\end{figure}
195+
\end{minipage}
196+
{\footnotesize Source: \href{https://pdc-support.github.io/introduction-to-mpi/07-collective/index.html}{https://pdc-support.github.io/introduction-to-mpi/07-collective/index.html}}
188197
\end{frame}
189198

190199
\begin{frame}{Reduction}
191200
Perform a global reduction operation (e.g., sum, max) across all processes. Calculate the total sum of values distributed across processes.
192201

193202
Can be seen as the opposite operation to broadcast.
194203

195-
\texttt{int MPI_Reduce(const void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype, MPI_Op op, int root, MPI_Comm comm);}
204+
\texttt{int MPI\_Reduce(const void *sendbuf, void *recvbuf, int count, MPI\_Datatype datatype, MPI\_Op op, int root, MPI\_Comm comm);}
196205

197-
Supported operations:
198-
\begin{itemize}
199-
\item \texttt{MPI\_SUM}
200-
\item \texttt{MPI\_PROD}
201-
\item \texttt{MPI\_MAX}
202-
\item \texttt{MPI\_MIN}
203-
\end{itemize}
206+
\begin{minipage}[t]{0.2\textwidth}
207+
Supported operations:
208+
\begin{itemize}
209+
\item \texttt{MPI\_SUM}
210+
\item \texttt{MPI\_PROD}
211+
\item \texttt{MPI\_MAX}
212+
\item \texttt{MPI\_MIN}
213+
\end{itemize}
214+
\end{minipage}
215+
\hfill
216+
\begin{minipage}[t]{0.75\textwidth}
217+
\begin{figure}[h]
218+
\includegraphics[]{images/reduction.png}
219+
\end{figure}
220+
\end{minipage}
221+
{\footnotesize Source: \href{https://pdc-support.github.io/introduction-to-mpi/07-collective/index.html}{https://pdc-support.github.io/introduction-to-mpi/07-collective/index.html}}
204222
\end{frame}
205223

206224
\begin{frame}{\texttt{MPI\_Gather}}
207225
Collect data from all processes to a single root process.
208226

209227
\texttt{int MPI\_Gather(const void *sendbuf, int sendcount, MPI\_Datatype sendtype, void *recvbuf, int recvcount, MPI\_Datatype recvtype, int root, MPI\_Comm comm);}
210228

211-
Parameters:
212-
\begin{itemize}
213-
\item sendbuf: Starting address of send buffer.
214-
\item recvbuf: Starting address of receive buffer (significant only at root).
215-
\end{itemize}
229+
\begin{minipage}[t]{0.6\textwidth}
230+
Parameters:
231+
\begin{itemize}
232+
\item sendbuf: Starting address of send buffer.
233+
\item recvbuf: Starting address of receive buffer (significant only at root).
234+
\end{itemize}
235+
\end{minipage}
236+
\hfill
237+
\begin{minipage}[t]{0.35\textwidth}
238+
\begin{figure}[h]
239+
\includegraphics[]{images/gather.png}
240+
\end{figure}
241+
\end{minipage}
242+
{\footnotesize Source: \href{https://pdc-support.github.io/introduction-to-mpi/07-collective/index.html}{https://pdc-support.github.io/introduction-to-mpi/07-collective/index.html}}
216243
\end{frame}
217244

218245
\begin{frame}{\texttt{MPI\_Scatter}}
219246
Distribute distinct chunks of data from root to all processes.
220247

221248
\texttt{int MPI\_Scatter(const void *sendbuf, int sendcount, MPI\_Datatype sendtype, void *recvbuf, int recvcount, MPI\_Datatype recvtype, int root, MPI\_Comm comm);}
222249

223-
Parameters:
224-
\begin{itemize}
225-
\item \texttt{sendbuf}: Starting address of send buffer (significant only at root).
226-
\item \texttt{recvbuf}: Starting address of receive buffer.
227-
\end{itemize}
250+
\begin{minipage}[t]{0.6\textwidth}
251+
Parameters:
252+
\begin{itemize}
253+
\item \texttt{sendbuf}: Starting address of send buffer (significant only at root).
254+
\item \texttt{recvbuf}: Starting address of receive buffer.
255+
\end{itemize}
256+
\end{minipage}
257+
\hfill
258+
\begin{minipage}[t]{0.35\textwidth}
259+
\begin{figure}[h]
260+
\includegraphics[]{images/gather.png}
261+
\end{figure}
262+
\end{minipage}
263+
{\footnotesize Source: \href{https://pdc-support.github.io/introduction-to-mpi/07-collective/index.html}{https://pdc-support.github.io/introduction-to-mpi/07-collective/index.html}}
228264
\end{frame}
229265

230266
\begin{frame}{\texttt{MPI\_AllGather}}

03-mpi-api/03-mpi-api.toc

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
\beamer@sectionintoc {1}{Advanced Send/Receive API}{3}{0}{1}
2+
\beamer@sectionintoc {2}{Synchronization}{6}{0}{2}
3+
\beamer@sectionintoc {3}{Collective operations}{8}{0}{3}

03-mpi-api/images/broadcast.png

14.6 KB
Loading

03-mpi-api/images/gather.png

15.3 KB
Loading

03-mpi-api/images/reduction.png

17.4 KB
Loading

03-mpi-api/images/scatter.png

16.1 KB
Loading

0 commit comments

Comments
 (0)