X-Git-Url: https://bilbo.iut-bm.univ-fcomte.fr/and/gitweb/GMRES2stage.git/blobdiff_plain/7ff6342cfd0d2fa0e5df79322a88117ece68880e..16f0ca498711e0af6a2de8200c2fbee0e5f8810e:/paper.tex diff --git a/paper.tex b/paper.tex index 36298aa..35d9ed7 100644 --- a/paper.tex +++ b/paper.tex @@ -637,8 +637,8 @@ direct method in the parallel context. \Input $A$ (sparse matrix), $b$ (right-hand side) \Output $x$ (solution vector)\vspace{0.2cm} \State Set the initial guess $x^0$ - \For {$k=1,2,3,\ldots$ until convergence} - \State Solve iteratively $Ax^k=b$ + \For {$k=1,2,3,\ldots$ until convergence} \label{algo:conv} + \State Solve iteratively $Ax^k=b$ \label{algo:solve} \State $S_{k~mod~s}=x^k$ \If {$k$ mod $s=0$ {\bf and} not convergence} \State Compute dense matrix $R=AS$ @@ -668,7 +668,8 @@ reused with the new values of the residuals. In order to see the influence of our algorithm with only one processor, we first show a comparison with the standard version of GMRES and our algorithm. In table~\ref{tab:01}, we show the matrices we have used and some of them -characteristics. +characteristics. For all the matrices, the name, the field, the number of rows +and the number of nonzero elements is given. \begin{table} \begin{center} @@ -689,7 +690,28 @@ torso3 & 2D/3D problem & 259,156 & 4,429,042 \\ \end{center} \end{table} - +The following parameters have been chosen for our experiments. As by default +the restart of GMRES is performed every 30 iterations, we have chosen to stop +the GMRES every 30 iterations (line \ref{algo:solve} in +Algorithm~\ref{algo:01}). $s$ is set to 8. CGLS is chosen to minimize the +least-squares problem. Two conditions are used to stop CGLS, either the +precision is under $1e-40$ or the number of iterations is greater to $20$. The +external precision is set to $1e-10$ (line \ref{algo:conv} in +Algorithm~\ref{algo:01}). Those experiments have been performed on a Intel(R) +Core(TM) i7-3630QM CPU @ 2.40GHz with the version 3.5.1 of PETSc. + + +In Table~\ref{tab:02}, some experiments comparing the solving of the linear +systems obtained with the previous matrices with a GMRES variant and with out 2 +stage algorithm are given. In the second column, it can be noticed that either +gmres or fgmres is used to solve the linear system. According to the matrices, +different preconditioner is used. With the 2 stage algorithm, the same solver +and the same preconditionner is used. This Table shows that the 2 stage +algorithm can drastically reduce the number of iterations to reach the +convergence when the number of iterations for the normal GMRES is more or less +greater than 500. In fact this also depends on tow parameters: the number of +iterations to stop GMRES and the number of iterations to perform the +minimization. \begin{table} @@ -697,15 +719,16 @@ torso3 & 2D/3D problem & 259,156 & 4,429,042 \\ \begin{tabular}{|c|c|r|r|r|r|} \hline - \multirow{2}{*}{Matrix name} & Solver / & \multicolumn{2}{c|}{gmres variant} & \multicolumn{2}{c|}{2 stage} \\ + \multirow{2}{*}{Matrix name} & Solver / & \multicolumn{2}{c|}{gmres variant} & \multicolumn{2}{c|}{2 stage} \\ +\cline{3-6} & precond & Time & \# Iter. & Time & \# Iter. \\\hline \hline crashbasis & gmres / none & 15.65 & 518 & 14.12 & 450 \\ -parabolic\_fem & gmres / ilu & 2152 & ?? & 724 & ?? \\ +parabolic\_fem & gmres / ilu & 1009.94 & 7573 & 401.52 & 2970 \\ epb3 & fgmres / sor & 8.67 & 600 & 8.21 & 540 \\ atmosmodj & fgmres / sor & 104.23 & 451 & 88.97 & 366 \\ bfwa398 & gmres / none & 1.42 & 9612 & 0.28 & 1650 \\ -torso3 & fgmres/sor & 565 & 37.70 & 34.97 & 510 \\ +torso3 & fgmres/sor & 37.70 & 565 & 34.97 & 510 \\ \hline \end{tabular} @@ -715,13 +738,6 @@ torso3 & fgmres/sor & 565 & 37.70 & 34.97 & 510 \\ \end{table} -Param : retart 30 iters -cols = 8 -iter cgls = 20 -cgls prec = 1e-40 -prec = 1e-10 -Intel(R) Core(TM) i7-3630QM CPU @ 2.40GHz - %%%********************************************************* %%%*********************************************************