X-Git-Url: https://bilbo.iut-bm.univ-fcomte.fr/and/gitweb/kahina_paper1.git/blobdiff_plain/462bee975421e21ea006477722fa96dcf261b1ae..1245c0d9665437ae2a44d0393333555b940e4587:/paper.tex?ds=sidebyside diff --git a/paper.tex b/paper.tex index a72d177..1ba7a17 100644 --- a/paper.tex +++ b/paper.tex @@ -79,12 +79,12 @@ \address[mysecondaryaddress]{FEMTO-ST Institute, University of Franche-Compté } \begin{abstract} -Polynomials are mathematical algebraic structures that play a great role in science and engineering. But the process of solving them for high and large degrees is computationally demanding and still not solved. In this paper, we present the results of a parallel implementation of the Ehrlish-Aberth algorithm for the problem root finding for +Polynomials are mathematical algebraic structures that play a great role in science and engineering. But the process of solving them for high and large degrees is computationally demanding and still not solved. In this paper, we present the results of a parallel implementation of the Ehrlich-Aberth algorithm for the problem root finding for high degree polynomials on GPU architectures (Graphics Processing Unit). The main result of this work is to be able to solve high and very large degree polynomials (up to 100000) very efficiently. We also compare the results with a sequential implementation and the Durand-Kerner method on full and sparse polynomials. \end{abstract} \begin{keyword} -root finding of polynomials, high degree, iterative methods, Ehrlish-Aberth, Durant-Kerner, GPU, CUDA, CPU , Parallelization +root finding of polynomials, high degree, iterative methods, Ehrlich-Aberth, Durant-Kerner, GPU, CUDA, CPU , Parallelization \end{keyword} \end{frontmatter} @@ -156,7 +156,7 @@ Aberth~\cite{Aberth73} uses a different iteration formula given as fellows : %%\end{center} Aberth, Ehrlich and Farmer-Loizou~\cite{Loizon83} have proved that -the Ehrlisch-Aberth method (EA) has a cubic order of convergence for simple roots whereas the Durand-Kerner has a quadratic order of convergence. +the Ehrlich-Aberth method (EA) has a cubic order of convergence for simple roots whereas the Durand-Kerner has a quadratic order of convergence. Iterative methods raise several problem when implemented e.g. @@ -288,9 +288,9 @@ converges sufficiently when : \end{equation} -\section{Improving the Ehrlisch-Aberth Method} +\section{Improving the Ehrlich-Aberth Method} \label{sec2} -The Ehrlisch-Aberth method implementation suffers of overflow problems. This +The Ehrlich-Aberth method implementation suffers of overflow problems. This situation occurs, for instance, in the case where a polynomial having positive coefficients and a large degree is computed at a point $\xi$ where $|\xi| > 1$, where $|x|$ stands for the modolus of a complex $x$. Indeed, the limited number in the @@ -358,13 +358,13 @@ in~\cite{Benall68,Jana06,Janall99,Riceall06}. There are many schemes for the simultaneous approximation of all roots of a given polynomial. Several works on different methods and issues of root -finding have been reported in~\cite{Azad07, Gemignani07, Kalantari08, Skachek08, Zhancall08, Zhuall08}. However, Durand-Kerner and Ehrlisch-Aberth methods are the most practical choices among +finding have been reported in~\cite{Azad07, Gemignani07, Kalantari08, Skachek08, Zhancall08, Zhuall08}. However, Durand-Kerner and Ehrlich-Aberth methods are the most practical choices among them~\cite{Bini04}. These two methods have been extensively studied for parallelization due to their intrinsics, i.e. the computations involved in both methods has some inherent parallelism that can be suitably exploited by SIMD machines. Moreover, they have fast rate of convergence (quadratic for the -Durand-Kerner and cubic for the Ehrlisch-Aberth). Various parallel +Durand-Kerner and cubic for the Ehrlich-Aberth). Various parallel algorithms reported for these methods can be found in~\cite{Cosnard90, Freeman89,Freemanall90,Jana99,Janall99}. Freeman and Bane~\cite{Freemanall90} presented two parallel @@ -374,7 +374,7 @@ each processor to communicate its current approximation to all other processors at the end of each iteration (synchronous). Therefore they cause a high degree of memory conflict. Recently the author in~\cite{Mirankar71} proposed two versions of parallel algorithm -for the Durand-Kerner method, and Ehrlisch-Aberth method on a model of +for the Durand-Kerner method, and Ehrlich-Aberth method on a model of Optoelectronic Transpose Interconnection System (OTIS).The algorithms are mapped on an OTIS-2D torus using N processors. This solution needs N processors to compute N roots, which is not @@ -391,9 +391,9 @@ polynomials of 48000. In this paper we present a parallel implementation of Ehli GPUs, which details are discussed in the sequel. -\section {A CUDA parallel Ehrlisch-Aberth method} -In the following, we describe the parallel implementation of Ehrlisch-Aberth method on GPU -for solving high degree polynomials. First, the hardware and software of the GPUs are presented. Then, a CUDA parallel Ehrlisch-Aberth method are presented. +\section {A CUDA parallel Ehrlich-Aberth method} +In the following, we describe the parallel implementation of Ehrlich-Aberth method on GPU +for solving high degree polynomials. First, the hardware and software of the GPUs are presented. Then, a CUDA parallel Ehrlich-Aberth method are presented. \subsection{Background on the GPU architecture} A GPU is viewed as an accelerator for the data-parallel and @@ -595,17 +595,15 @@ or from GPU memory to CPU memory \verb=(cudaMemcpyDeviceToHost))=. %%HIER END MY REVISIONS (SIDER) \section{Experimental study} -\subsection{Definition of the polynomial used} -We study two forms of polynomials the sparse polynomials and the full polynomials: -\paragraph{Sparse polynomial}: in this following form, the roots are distributed on 2 distinct circles: +\subsection{Definition of the used polynomials } +We study two categories of polynomials : the sparse polynomials and the full polynomials. +\paragraph{A sparse polynomial}: is a polynomial for which only some coefficients are not null. We use in the following polonymial for which the roots are distributed on 2 distinct circles : \begin{equation} \forall \alpha_{1} \alpha_{2} \in C,\forall n_{1},n_{2} \in N^{*}; P(z)= (z^{n_{1}}-\alpha_{1})(z^{n_{2}}-\alpha_{2}) \end{equation} -This form makes it possible to associate roots having two -different modules and thus to work on a polynomial constitute -of four non zero terms. -\paragraph{Full polynomial}: the second form used to obtain a full polynomial is: + +\paragraph{A full polynomial} is in contrast, a polynomial for which all the coefficients are not null. the second form used to obtain a full polynomial is: %%\begin{equation} %%\forall \alpha_{i} \in C,\forall n_{i}\in N^{*}; P(z)= \sum^{n}_{i=1}(z^{n^{i}}.a_{i}) %%\end{equation} @@ -613,7 +611,7 @@ of four non zero terms. \begin{equation} {\Large \forall a_{i} \in C, i\in N; p(x)=\sum^{n}_{i=0} a_{i}.x^{i}} \end{equation} -with this form, we can have until \textit{n} non zero terms. +With this form, we can have until \textit{n} non zero terms whereas the sparse ones have just two non zero terms. \subsection{The study condition} The our experiences results concern two parameters which are @@ -627,23 +625,23 @@ E5620@2.40GHz and a GPU K40 (with 6 Go of ram). \subsection{Comparative study} -In this section, we discuss the performance Ehrlish-Aberth method of root finding polynomials implemented on CPUs and on GPUs. +In this section, we discuss the performance Ehrlich-Aberth method of root finding polynomials implemented on CPUs and on GPUs. We performed a set of experiments on the sequential and the parallel algorithms, for both sparse and full polynomials and different sizes. We took into account the execution time,the polynomial size and the number of threads per block performed by sum or each experiment on CPUs and on GPUs. -All experimental results obtained from the simulations are made in double precision data, for a convergence tolerance of the methods set to $10^{-7}$. Since we were more interested in the comparison of the performance behaviors of Ehrlish-Aberth and Durand-Kerner methods on CPUs versus on GPUs. The initialization values of the vector solution of the Ehrlich-Aberth method are given in section 2.2. -\subsubsection{The execution time in seconds of Ehrlisch-Aberth algorithm on CPU core vs. on a Tesla GPU} +All experimental results obtained from the simulations are made in double precision data, for a convergence tolerance of the methods set to $10^{-7}$. Since we were more interested in the comparison of the performance behaviors of Ehrlich-Aberth and Durand-Kerner methods on CPUs versus on GPUs. The initialization values of the vector solution of the Ehrlich-Aberth method are given in section 2.2. +\subsubsection{The execution time in seconds of Ehrlich-Aberth algorithm on CPU core vs. on a Tesla GPU} \begin{figure}[H] \centering \includegraphics[width=0.8\textwidth]{figures/Compar_EA_algorithm_CPU_GPU} -\caption{The execution time in seconds of Ehrlisch-Aberth algorithm on CPU core vs. on a Tesla GPU} +\caption{The execution time in seconds of Ehrlich-Aberth algorithm on CPU core vs. on a Tesla GPU} \label{fig:01} \end{figure} -Figure 1 %%show a comparison of execution time between the parallel and sequential version of the Ehrlisch-Aberth algorithm with sparse polynomial exceed 100000, -We report the execution times of the Ehrlisch-Aberth method implemented on one core of the Quad-Core Xeon E5620 CPU and those of the same methods implemented on one Nvidia Tesla K40c GPU, with sparse polynomial degrees ranging from 100,000 to 1,000,000. We can see that the methods implemented on the GPU are faster than those implemented on the CPU. This is due to the GPU ability to compute the data-parallel functions faster than its CPU counterpart. However, the execution time for the sequential implementation exceed 16,000 s for 450,000 degrees polynomials, in counterpart the GPU implementation for the same polynomials need only 350 s, more than again, with 1,000,000 polynomials degrees GPU implementation not reach 2,300 s degrees. While CPU implementation need more than 10 hours. We can also notice that the GPU implementation are almost 47 faster then those implementation on the CPU. Furthermore, we verify that the number of iterations is the same. This reduction of time allows us to compute roots of polynomial of more important degree at the same time than with a CPU. +Figure 1 %%show a comparison of execution time between the parallel and sequential version of the Ehrlich-Aberth algorithm with sparse polynomial exceed 100000, +We report the execution times of the Ehrlich-Aberth method implemented on one core of the Quad-Core Xeon E5620 CPU and those of the same methods implemented on one Nvidia Tesla K40c GPU, with sparse polynomial degrees ranging from 100,000 to 1,000,000. We can see that the methods implemented on the GPU are faster than those implemented on the CPU. This is due to the GPU ability to compute the data-parallel functions faster than its CPU counterpart. However, the execution time for the sequential implementation exceed 16,000 s for 450,000 degrees polynomials, in counterpart the GPU implementation for the same polynomials need only 350 s, more than again, with 1,000,000 polynomials degrees GPU implementation not reach 2,300 s degrees. While CPU implementation need more than 10 hours. We can also notice that the GPU implementation are almost 47 faster then those implementation on the CPU. Furthermore, we verify that the number of iterations is the same. This reduction of time allows us to compute roots of polynomial of more important degree at the same time than with a CPU. @@ -664,36 +662,42 @@ The figure 2 show that, the best execution time for both sparse and full polynom In this experiment we report the performance of log.exp solution describe in ~\ref{sec2} to compute very high degrees polynomials. \begin{figure}[H] \centering - \includegraphics[width=0.8\textwidth]{figures/log_exp} + \includegraphics[width=0.8\textwidth]{figures/sparse_full_explog} \caption{The impact of exp-log solution to compute very high degrees of polynomial.} \label{fig:01} \end{figure} -The figure 3, show a comparison between the execution time of the Ehrlisch-Aberth algorithm applying log-exp solution and the execution time of the Ehrlisch-Aberth algorithm without applying log-exp solution, with full polynomials degrees. We can see that the execution time for the both algorithms are the same while the polynomials degrees are less than 4500. After,we show clearly that the classical version of Ehrlisch-Aberth algorithm (without applying log.exp) stop to converge and can not solving polynomial exceed 4500, in counterpart, the new version of Ehrlisch-Aberth algorithm (applying log.exp solution) can solve very high and large full polynomial exceed 100,000 degrees. +The figure 3, show a comparison between the execution time of the Ehrlich-Aberth algorithm applying log-exp solution and the execution time of the Ehrlich-Aberth algorithm without applying log-exp solution, with full polynomials degrees. We can see that the execution time for the both algorithms are the same while the polynomials degrees are less than 4500. After,we show clearly that the classical version of Ehrlich-Aberth algorithm (without applying log.exp) stop to converge and can not solving polynomial exceed 4500, in counterpart, the new version of Ehrlich-Aberth algorithm (applying log.exp solution) can solve very high and large full polynomial exceed 100,000 degrees. -in fact, when the modulus of the roots are up than \textit{R} given in ~\ref{R},this exceed the limited number in the mantissa of floating points representations and can not compute the iterative function given in ~\ref{eq:Aberth-H-GS} to obtain the root solution, who justify the divergence of the classical Ehrlisch-Aberth algorithm. However, applying log.exp solution given in ~\ref{sec2} took into account the limit of floating using the iterative function in(Eq.~\ref{Log_H1},Eq.~\ref{Log_H2}and allows to solve a very large polynomials degrees . +in fact, when the modulus of the roots are up than \textit{R} given in ~\ref{R},this exceed the limited number in the mantissa of floating points representations and can not compute the iterative function given in ~\ref{eq:Aberth-H-GS} to obtain the root solution, who justify the divergence of the classical Ehrlich-Aberth algorithm. However, applying log.exp solution given in ~\ref{sec2} took into account the limit of floating using the iterative function in(Eq.~\ref{Log_H1},Eq.~\ref{Log_H2}and allows to solve a very large polynomials degrees . +%\begin{figure}[H] +\%centering + %\includegraphics[width=0.8\textwidth]{figures/log_exp_Sparse} +%\caption{The impact of exp-log solution to compute very high degrees of polynomial.} +%\label{fig:01} +%\end{figure} -%we report the performances of the exp.log for the Ehrlisch-Aberth algorithm for solving very high degree of polynomial. +%we report the performances of the exp.log for the Ehrlich-Aberth algorithm for solving very high degree of polynomial. -\subsubsection{A comparative study between Ehrlisch-Aberth algorithm and Durand-kerner algorithm} -In this part, we are interesting to compare the simultaneous methods, Ehrlisch-Aberth and Durand-Kerner in parallel computer using GPU. We took into account the execution time, the number of iteration and the polynomial's size. for the both sparse and full polynomials. +\subsubsection{A comparative study between Ehrlich-Aberth algorithm and Durand-kerner algorithm} +In this part, we are interesting to compare the simultaneous methods, Ehrlich-Aberth and Durand-Kerner in parallel computer using GPU. We took into account the execution time, the number of iteration and the polynomial's size. for the both sparse and full polynomials. \begin{figure}[H] \centering \includegraphics[width=0.8\textwidth]{figures/EA_DK} -\caption{The execution time of Ehrlisch-Aberth versus Durand-Kerner algorithm on GPU} +\caption{The execution time of Ehrlich-Aberth versus Durand-Kerner algorithm on GPU} \label{fig:01} \end{figure} -This figure show the execution time of the both algorithm EA and DK with sparse polynomial degrees ranging from 1000 to 1000000. We can see that the Ehrlisch-Aberth algorithm are faster than Durand-Kerner algorithm, with an average of 25 times as fast. Then, when degrees of polynomial exceed 500000 the execution time with EA is of the order 100 whereas DK passes in the order 1000. %with double precision not exceed $10^{-5}$. +This figure show the execution time of the both algorithm EA and DK with sparse polynomial degrees ranging from 1000 to 1000000. We can see that the Ehrlich-Aberth algorithm are faster than Durand-Kerner algorithm, with an average of 25 times as fast. Then, when degrees of polynomial exceed 500000 the execution time with EA is of the order 100 whereas DK passes in the order 1000. %with double precision not exceed $10^{-5}$. \begin{figure}[H] \centering \includegraphics[width=0.8\textwidth]{figures/EA_DK_nbr} -\caption{The iteration number of Ehrlisch-Aberth versus Durand-Kerner algorithm} +\caption{The iteration number of Ehrlich-Aberth versus Durand-Kerner algorithm} \label{fig:01} \end{figure}