Commit 7200dc66 authored by Jakub Klinkovský's avatar Jakub Klinkovský
Browse files

added figures for ndarray decomposition

parent d9bb6d27
Loading
Loading
Loading
Loading
+15 −1
Original line number Diff line number Diff line
@@ -64,7 +64,14 @@ In the following subsections, we describe the \emph{distributed} version of the
\subsection{Distributed multidimensional array}
In the \emph{distributed} configuration, a global multidimensional array is decomposed into several subarrays and each MPI rank typically stores the data associated to one subarray.
Since a multidimensional array stores structured data, we will consider only \emph{structured conforming} decompositions, where the array is split by hyperplanes perpendicular to one of the axes.
\Cref{fig:ndarray decomposition}\todo{draw the figure} shows a typical two-dimensional decomposition of a two-dimensional array into 9 subarrays.
\Cref{fig:ndarray decomposition} shows a typical two-dimensional decomposition of a two-dimensional array into 9 subarrays.

\begin{figure}[bt]
    \centering
    \includegraphics[scale=1.0]{./figures/ndarray_decomposition/2D_without_overlaps.pdf}
    \caption{Typical two-dimensional decomposition of a two-dimensional array into 9 subarrays assigned to ranks 0-8.}
    \label{fig:ndarray decomposition}
\end{figure}

In order to represent a distributed multidimensional array, each MPI rank needs to have the following variables:
\begin{itemize}
@@ -101,6 +108,13 @@ In the following subsection, we focus on data exchange in stencil computations,
\inline{Introduce the concept of overlaps}
\inline{Describe the synchronizer}

\begin{figure}[bt]
    \centering
    \includegraphics[scale=1.0]{./figures/ndarray_decomposition/2D_with_overlaps.pdf}
    \caption{Typical two-dimensional decomposition of a two-dimensional array into 9 subarrays with overlaps between neighbors.}
    \label{fig:ndarray decomposition overlaps}
\end{figure}

\section{Sparse matrices}
\label{sec:sparse matrices}
\inline{Supporting paper: "Segments: Data abstraction for parallel computations on sparse data"}
+91 −0
Original line number Diff line number Diff line
pen PEN = fontsize(10) + linewidth(1.5);
unitsize(1cm);

real x0 = 0;
real x1 = x0 + 3;
real x2 = x1 + 3;
real x3 = x2 + 3;

real y0 = 0;
real y1 = y0 + 2;
real y2 = y1 + 2;
real y3 = y2 + 2;

pair p00 = (x0, y0);
pair p10 = (x1, y0);
pair p20 = (x2, y0);
pair p30 = (x3, y0);

pair p01 = (x0, y1);
pair p11 = (x1, y1);
pair p21 = (x2, y1);
pair p31 = (x3, y1);

pair p02 = (x0, y2);
pair p12 = (x1, y2);
pair p22 = (x2, y2);
pair p32 = (x3, y2);

pair p03 = (x0, y3);
pair p13 = (x1, y3);
pair p23 = (x2, y3);
pair p33 = (x3, y3);

draw(p00--p10--p11--p01--cycle, PEN);
draw(p10--p20--p21--p11, PEN);
draw(p20--p30--p31--p21, PEN);
draw(p02--p12--p13--p03--cycle, PEN);
draw(p12--p22--p23--p13, PEN);
draw(p22--p32--p33--p23, PEN);
draw(p01--p02, PEN);
draw(p11--p12, PEN);
draw(p21--p22, PEN);
draw(p31--p32, PEN);

label("Rank 0", (p00 + p11) / 2);
label("Rank 1", (p10 + p21) / 2);
label("Rank 2", (p20 + p31) / 2);
label("Rank 3", (p01 + p12) / 2);
label("Rank 4", (p11 + p22) / 2);
label("Rank 5", (p21 + p32) / 2);
label("Rank 6", (p02 + p13) / 2);
label("Rank 7", (p12 + p23) / 2);
label("Rank 8", (p22 + p33) / 2);


pen PEN2 = fontsize(10) + linewidth(1.0) + dotted;
real o = 0.4;
draw(p00-(o,o)--p30-(-o,o), PEN2);
draw(p00+(-o,o)--p30+(o,o), PEN2);
draw(p01-(o,o)--p31-(-o,o), PEN2);
draw(p01+(-o,o)--p31+(o,o), PEN2);
draw(p02-(o,o)--p32-(-o,o), PEN2);
draw(p02+(-o,o)--p32+(o,o), PEN2);
draw(p03-(o,o)--p33-(-o,o), PEN2);
draw(p03+(-o,o)--p33+(o,o), PEN2);

draw(p00-(o,o)--p03-(o,-o), PEN2);
draw(p00+(o,-o)--p03+(o,o), PEN2);
draw(p10-(o,o)--p13-(o,-o), PEN2);
draw(p10+(o,-o)--p13+(o,o), PEN2);
draw(p20-(o,o)--p23-(o,-o), PEN2);
draw(p20+(o,-o)--p23+(o,o), PEN2);
draw(p30-(o,o)--p33-(o,-o), PEN2);
draw(p30+(o,-o)--p33+(o,o), PEN2);

draw(p00-(o,0)--p00, PEN2);
draw(p01-(o,0)--p01, PEN2);
draw(p02-(o,0)--p02, PEN2);
draw(p03-(o,0)--p03, PEN2);
draw(p30+(o,0)--p30, PEN2);
draw(p31+(o,0)--p31, PEN2);
draw(p32+(o,0)--p32, PEN2);
draw(p33+(o,0)--p33, PEN2);
draw(p00-(0,o)--p00, PEN2);
draw(p10-(0,o)--p10, PEN2);
draw(p20-(0,o)--p20, PEN2);
draw(p30-(0,o)--p30, PEN2);
draw(p03+(0,o)--p03, PEN2);
draw(p13+(0,o)--p13, PEN2);
draw(p23+(0,o)--p23, PEN2);
draw(p33+(0,o)--p33, PEN2);
+5.64 KiB

File added.

No diff preview for this file type.

+53 −0
Original line number Diff line number Diff line
pen PEN = fontsize(10) + linewidth(1.5);
unitsize(1cm);

real x0 = 0;
real x1 = x0 + 3;
real x2 = x1 + 3;
real x3 = x2 + 3;

real y0 = 0;
real y1 = y0 + 2;
real y2 = y1 + 2;
real y3 = y2 + 2;

pair p00 = (x0, y0);
pair p10 = (x1, y0);
pair p20 = (x2, y0);
pair p30 = (x3, y0);

pair p01 = (x0, y1);
pair p11 = (x1, y1);
pair p21 = (x2, y1);
pair p31 = (x3, y1);

pair p02 = (x0, y2);
pair p12 = (x1, y2);
pair p22 = (x2, y2);
pair p32 = (x3, y2);

pair p03 = (x0, y3);
pair p13 = (x1, y3);
pair p23 = (x2, y3);
pair p33 = (x3, y3);

draw(p00--p10--p11--p01--cycle, PEN);
draw(p10--p20--p21--p11, PEN);
draw(p20--p30--p31--p21, PEN);
draw(p02--p12--p13--p03--cycle, PEN);
draw(p12--p22--p23--p13, PEN);
draw(p22--p32--p33--p23, PEN);
draw(p01--p02, PEN);
draw(p11--p12, PEN);
draw(p21--p22, PEN);
draw(p31--p32, PEN);

label("Rank 0", (p00 + p11) / 2);
label("Rank 1", (p10 + p21) / 2);
label("Rank 2", (p20 + p31) / 2);
label("Rank 3", (p01 + p12) / 2);
label("Rank 4", (p11 + p22) / 2);
label("Rank 5", (p21 + p32) / 2);
label("Rank 6", (p02 + p13) / 2);
label("Rank 7", (p12 + p23) / 2);
label("Rank 8", (p22 + p33) / 2);
+5.41 KiB

File added.

No diff preview for this file type.