From ac699bb490942cea02be7b088a0cfa4e0dcdd105 Mon Sep 17 00:00:00 2001 From: couturie Date: Thu, 9 May 2013 20:29:51 +0200 Subject: [PATCH] new --- BookGPU/BookGPU.tex | 2 +- BookGPU/Chapters/chapter11/ch11.tex | 12 ++++++++---- BookGPU/Chapters/chapter12/ch12.tex | 8 ++++---- BookGPU/Chapters/chapter14/ch14.tex | 3 ++- BookGPU/Chapters/chapter15/ch15.tex | 2 +- BookGPU/Chapters/chapter17/ch17.tex | 2 +- BookGPU/Chapters/chapter7/ch7.tex | 6 +++--- 7 files changed, 20 insertions(+), 15 deletions(-) diff --git a/BookGPU/BookGPU.tex b/BookGPU/BookGPU.tex index fae7a1b..7212cf1 100755 --- a/BookGPU/BookGPU.tex +++ b/BookGPU/BookGPU.tex @@ -177,9 +177,9 @@ %\include{frontmatter/Foreword} \include{frontmatter/preface} +\tableofcontents \listoffigures \listoftables -\tableofcontents \mainmatter diff --git a/BookGPU/Chapters/chapter11/ch11.tex b/BookGPU/Chapters/chapter11/ch11.tex index 5f81d1f..a9667e7 100644 --- a/BookGPU/Chapters/chapter11/ch11.tex +++ b/BookGPU/Chapters/chapter11/ch11.tex @@ -104,9 +104,13 @@ $$ It is almost straightforward to parallelise this scheme for GPUs, by processing each subinterval $[x_i,x_{i+1}]$ independently in a separate thread. However, it is not known in advance whether an extra knot $t_i$ needs to be inserted or not, and therefore calculation of the position of the knot in the output sequence of knots ${t_i}$ is problematic for parallel implementation (for a sequential algorithm no such issue arises). To avoid serialisation, we decided to insert an additional knot in every interval $[x_i,x_{i+1}]$, but set $t_i=x_i$ when the extra knot is not actually needed. This way we know in advance the position of the output knots and the length of this sequence is $2(n-1)$, and therefore all calculations can now be performed independently. The price we pay is that some of the spline knots can coincide. However, this does not affect spline evaluation, as one of the coinciding knots is simply disregarded, and the spline coefficients are replicated (so for a double knot $t_i=t_{i+1}$, we have $\alpha_i=\alpha_{i+1}$, $\beta_i=\beta_{i+1}$, $\gamma_i=\gamma_{i+1}$). Our implementation is presented in Figures \ref{ch11:algcoef}-\ref{ch11:algcoef1}. +\lstinputlisting[label=ch11:algcoef1,caption=Calculation of monotone spline knots and coefficients.]{Chapters/chapter11/code2.cu} + + At the spline evaluation stage we need to compute $s(z_k)$ for a sequence of query values ${z_k}, k=1,\ldots,K$. For each $z_k$ we locate the interval $[t_i,t_{i+1}]$ containing $z_k$, using bisection algorithm presented in Figure \ref{ch11:algeval}, and then apply the appropriate coefficients of the quadratic function. This is also done in parallel. The bisection algorithm could be implemented using texture memory (to cache the array \texttt{z}), but this is not shown in Figure \ref{ch11:algeval}. +\pagebreak \lstinputlisting[label=ch11:algcoef,caption=Implementation of the kernel for calculating spline knots and coefficients. Function fmax is used to avoid division by zero for data with coinciding abscissae.]{Chapters/chapter11/code1.cu} @@ -167,7 +171,6 @@ The bisection algorithm could be implemented using texture memory (to cache the %% \end{figure} -\lstinputlisting[label=ch11:algcoef1,caption=Calculation of monotone spline knots and coefficients.]{Chapters/chapter11/code2.cu} %% \begin{figure}[!hp] %% \renewcommand{\baselinestretch}{1} @@ -409,9 +412,8 @@ with $\hat y(k,l)$ being the unrestricted maximum likelihood estimator of $y_k\l %% %\renewcommand{\baselinestretch}{1} \begin{table}[!h] \begin{center} -\caption{The average CPU time (sec) of the serial PAVA, MLS and parallel MLS algorithms. } \label{ch11:table1} \begin{tabular}{|r|r|r|r|} - +\hline Data & PAVA & MLS & GPU MLS \\ \hline monotone increasing $f$ & & & \\ @@ -430,9 +432,11 @@ $n=10^6$ &0.2&0.1& 38\\ $n=10 \times 10^6$ &1.9& 1.9& 3500 \\ $n=20 \times 10^6$ &3.5& 4.0&-- \\ $n=50 \times 10^6$ &11& 11& -- \\ - +\hline \end{tabular} \end{center} +\caption{The average CPU time (sec) of the serial PAVA, MLS and parallel MLS algorithms. } +\label{ch11:table1} \end{table} %% %\renewcommand{\baselinestretch}{2} diff --git a/BookGPU/Chapters/chapter12/ch12.tex b/BookGPU/Chapters/chapter12/ch12.tex index 8b869b3..7f97864 100755 --- a/BookGPU/Chapters/chapter12/ch12.tex +++ b/BookGPU/Chapters/chapter12/ch12.tex @@ -9,7 +9,7 @@ \chapterauthor{Raphaël Couturier}{Femto-ST Institute, University of Franche-Comte, France} \chapterauthor{Jacques Bahi}{Femto-ST Institute, University of Franche-Comte, France} -\chapter{Solving sparse linear systems with GMRES and CG methods on GPU clusters} +\chapter[Solving linear systems with GMRES and CG methods on GPU clusters]{Solving sparse linear systems with GMRES and CG methods on GPU clusters} \label{ch12} %%--------------------------%% @@ -688,13 +688,13 @@ from the Davis collection. Then, it puts all these copies on the main diagonal o diagonal are filled with sub-copies (left-copy and right-copy in Figure~\ref{ch12:fig:06}) of the same initial matrix. -\begin{figure} +\begin{figure}[htbp] \centerline{\includegraphics[scale=0.30]{Chapters/chapter12/figures/generation}} \caption{Parallel generation of a large sparse matrix by four computing nodes.} \label{ch12:fig:06} \end{figure} -\begin{table}[!h] +\begin{table}[htbp] \centering \begin{tabular}{|c|c|c|c|} \hline @@ -729,7 +729,7 @@ initial matrix. \label{ch12:tab:04} \end{table} -\begin{table} +\begin{table}[htbp] \begin{center} \begin{tabular}{|c|c|c|c|c|c|c|} \hline diff --git a/BookGPU/Chapters/chapter14/ch14.tex b/BookGPU/Chapters/chapter14/ch14.tex index d50db31..bf3cd66 100755 --- a/BookGPU/Chapters/chapter14/ch14.tex +++ b/BookGPU/Chapters/chapter14/ch14.tex @@ -1,6 +1,7 @@ \chapterauthor{Alan Gray and Kevin Stratford}{EPCC, The University of Edinburgh} -\chapter{Ludwig: multiple GPUs for a complex fluid lattice Boltzmann +\chapter[Ludwig: multiple GPUs for a fluid lattice Boltzmann +application]{Ludwig: multiple GPUs for a complex fluid lattice Boltzmann application} %\putbib[biblio] diff --git a/BookGPU/Chapters/chapter15/ch15.tex b/BookGPU/Chapters/chapter15/ch15.tex index cf464c7..c0de11e 100644 --- a/BookGPU/Chapters/chapter15/ch15.tex +++ b/BookGPU/Chapters/chapter15/ch15.tex @@ -7,7 +7,7 @@ The Queen's University of Belfast} %\newcommand{\fixme}[1]{{\bf #1}} -\chapter[Numerical validation and performance optimization on GPUs in atomic physics]{Numerical validation and performance optimization on GPUs of an application in atomic physics} +\chapter[Numerical validation on GPUs in atomic physics]{Numerical validation and performance optimization on GPUs of an application in atomic physics} \label{chapter15} \section{Introduction}\label{ch15:intro} diff --git a/BookGPU/Chapters/chapter17/ch17.tex b/BookGPU/Chapters/chapter17/ch17.tex index 4aa06b8..77cdd11 100755 --- a/BookGPU/Chapters/chapter17/ch17.tex +++ b/BookGPU/Chapters/chapter17/ch17.tex @@ -1,7 +1,7 @@ \chapterauthor{Guillaume Laville}{Femto-ST Institute, University of Franche-Comte, France} \chapterauthor{Christophe Lang}{Femto-ST Institute, University of Franche-Comte, France} \chapterauthor{Kamel Mazouzi}{Franche-Comte Computing Center, University of Franche-Comte, France} -\chapterauthor{Nicolas Marilleau}{UMMISCO, Institut de Recherche pour le Développement (IRD), France} +\chapterauthor{Nicolas Marilleau}{UMMISCO, Institut de Recherche pour le Developpement (IRD), France} \chapterauthor{Bénédicte Herrmann}{Femto-ST Institute, University of Franche-Comte, France} \chapterauthor{Laurent Philippe}{Femto-ST Institute, University of Franche-Comte, France} diff --git a/BookGPU/Chapters/chapter7/ch7.tex b/BookGPU/Chapters/chapter7/ch7.tex index 6ca2080..ab70af2 100644 --- a/BookGPU/Chapters/chapter7/ch7.tex +++ b/BookGPU/Chapters/chapter7/ch7.tex @@ -820,14 +820,14 @@ Ideally, the ratio $\mathcal{C}_\mathcal{G}/\mathcal{C}_\mathcal{F}$ is small an \begin{figure}[!htb] \begin{center} \setlength\figureheight{0.35\textwidth} - \setlength\figurewidth{0.37\textwidth} + \setlength\figurewidth{0.35\textwidth} \subfigure[Performance scaling]{ % {\small\input{Chapters/chapter7/figures/PararealScaletestGTX590.tikz}} - \includegraphics[width=0.5\textwidth]{Chapters/chapter7/figures/PararealScaletestGTX590_conv.pdf} + \includegraphics[width=0.47\textwidth]{Chapters/chapter7/figures/PararealScaletestGTX590_conv.pdf} } \subfigure[Speedup]{ % {\small\input{Chapters/chapter7/figures/PararealSpeedupGTX590.tikz}} - \includegraphics[width=0.5\textwidth]{Chapters/chapter7/figures/PararealSpeedupGTX590_conv.pdf} + \includegraphics[width=0.47\textwidth]{Chapters/chapter7/figures/PararealSpeedupGTX590_conv.pdf} } \end{center} \caption[Parareal absolute timings and parareal speedup.]{(a) Parareal absolute timings for an increasingly number of water waves traveling one wave length, each wave resolution is ($33\times 9$). (b) Parareal speedup for two to sixteen compute nodes compared to the purely sequential single GPU solver. Notice how insensitive the parareal scheme is to the size of the problem solved. Test environment 2.}\label{ch7:fig:DDPA_SPEEDUP} -- 2.39.5