X-Git-Url: https://bilbo.iut-bm.univ-fcomte.fr/and/gitweb/kahina_paper1.git/blobdiff_plain/22285cf247eb5754cde0cd2568dfd8c0f8ee3d4d..a8b5d85346363a68616d59b94c83ac7f6a83a9bf:/Root.tex?ds=inline diff --git a/Root.tex b/Root.tex index b4edff1..fd6cc0e 100644 --- a/Root.tex +++ b/Root.tex @@ -6,6 +6,14 @@ %%\usepackage{algorithm2e} \usepackage[ruled,vlined]{algorithm2e} %%\usepackage{algo} + +\usepackage{array,multirow,makecell} +\setcellgapes{1pt} +\makegapedcells +\newcolumntype{R}[1]{>{\raggedleft\arraybackslash }b{#1}} +\newcolumntype{L}[1]{>{\raggedright\arraybackslash }b{#1}} +\newcolumntype{C}[1]{>{\centering\arraybackslash }b{#1}} + \author{ghidouche} \title{Paper1_kahina} \begin{document} @@ -483,9 +491,8 @@ $kernel\_update\_Log(d\_z^{k})$\; The first form execute the formula(8) if all the module's $( |Z(k)|<= R)$, else the kernel execute the formulas(13,14).the radius R was computed like: -$$R = \exp( \log(DBL\_MAX) / (2*(double).N) )$$ +$$R = \exp( \log(DBL\_MAX) / (2*(double)P.degrePolynome) )$$ -where N the degree of the polynomial,DBL\_MAX is the maximum value of a double. The last kernel verify the convergence of the root after each update of $Z^{(k)}$, as formula(), we used the function of the CUBLAS Library (CUDA Basic Linear Algebra Subroutines) to implement this kernel. The kernels terminates its computations when all the root are converged. Finally, the solution of the root finding problem is copied back from the GPU global memory to the CPU memory. We use the communication functions of CUDA for the memory allocations in the GPU \verb=(cudaMalloc())= and the data transfers from the CPU memory to the GPU memory \verb=(cudaMemcpyHostToDevice)= @@ -494,8 +501,94 @@ or from the GPU memory to the CPU memory \verb=(cudaMemcpyDeviceToHost))=. -\subsubsection{the kernel corresponding } -\subsubsection{Comparison between sequential algorithm and GPU algorithm } +\subsection{Experimental study} + +\subsubsection{Definition of the polynomial used} +We use a polynomial of the following form 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. +\\ + An other form of the polynomial to obtain more non zero terms is: +\begin{equation} + \forall \alpha_{i} \in C,\forall n_{i}\in N^{*}; P(z)= \sum^{i=1}_{p}(z^{n^{i}}-\alpha_{i}) +\end{equation} + +with this formula, we can have until 2p non zero terms. + +\subsubsection{The study condition} +In order to have representative average values, for each +point of our curves we measured the roots finding of 10 +different polynomials. + +The our experiences results concern two parameters which are +the polynomial degree and the execution time of our program +to converge on the solution. The polynomial degree allows us +to validate that our algorithm is powerful with high degree +polynomials. The execution time remains the +element-key which justifies our work of parallelization. + For our tests we used a CPU Intel(R) Xeon(R) CPU +E5620@2.40GHz and a GPU Tesla C2070 (with 6 Go of ram) + +\subsubsection{Comparative study} +We initially carried out the convergence of Aberth algorithm with various sizes of polynomial, in second we evaluate the influence of the size of the threads per block.... + +\paragraph{The convergence of Aberth algorithm} + +\begin{table}[!h] + \centering + \begin{tabular} {|R{2cm}|L{2.5cm}|L{2.5cm}|L{1.5cm}|L{1.5cm}|} + \hline Polynomial's degrees & $T_{exe}$ on CPU & $T_{exe}$ on GPU & CPU iteration & GPU iteration\\ + \hline 5000 & 1.90 & 0.40 & 18 & 17\\ + \hline 50000 & 172.723 & 3.92 & 21 & 18\\ + \hline 500000 & -- & 497.109 & -- & 24\\ + \hline 1000000 & -- & 1524,51 & -- & 24\\ + \hline + \end{tabular} + \caption{the convergence of Aberth algorithm} + \label{tab:theConvergenceOfAberthAlgorithm} +\end{table} + +\paragraph{The impact of the thread's number into the convergence of Aberth algorithm} + +\begin{table}[!h] + \centering + \begin{tabular} {|R{2.5cm}|L{2.5cm}|L{2.5cm}|} + \hline Tread's numbers & Execution time &Number of iteration\\ + \hline 1024 & 523 & 27\\ + \hline 512 & 449.426 & 24\\ + \hline 256 & 440.805 & 24\\ + \hline 128 & 456.175 & 22\\ + \hline 64 & 472.862 & 23\\ + \hline 32 & 830.152 & 24\\ + \hline 8 & 2632.78 & 23 \\ + \hline + \end{tabular} + \caption{The impact of the thread's number into the convergence of Aberth algorithm} + \label{tab:Theimpactofthethread'snumberintotheconvergenceofAberthalgorithm} + +\end{table} + +\paragraph{A comparative study between Aberth and Durand\-kerner algorithm} +\begin{table}[htbp] + \centering + \begin{tabular} {|R{2cm}|L{2.5cm}|L{2.5cm}|L{1.5cm}|L{1.5cm}|} + \hline Polynomial's degrees & Aberth $T_{exe}$ & D-Kerner $T_{exe}$ & Aberth iteration & D-Kerner iteration\\ + \hline 5000 & 0.40 & 3.42 & 17 & 138 \\ + \hline 50000 & 3.92 & 385.266 & 17 & 823\\ + \hline 500000 & 497.109 & 4677.36 & 24 & 214\\ + \hline + \end{tabular} + \caption{Aberth algorith compare to Durand-Kerner algorithm} + \label{tab:AberthAlgorithCompareToDurandKernerAlgorithm} +\end{table} + + \bibliographystyle{plain} \bibliography{biblio} %% \begin{thebibliography}{2}