X-Git-Url: https://bilbo.iut-bm.univ-fcomte.fr/and/gitweb/GMRES2stage.git/blobdiff_plain/3f095ff7f3fff2553897be9e8dce25d2c3e9298f..e8b2791c920612ee2d944379890d2a6b76e0acea:/IJHPCN/paper.tex

diff --git a/IJHPCN/paper.tex b/IJHPCN/paper.tex
index 999ce37..f67fa56 100644
--- a/IJHPCN/paper.tex
+++ b/IJHPCN/paper.tex
@@ -786,6 +786,30 @@ taken into account with TSIRM.
 
 %%NEW
 
+{\bf example ex45/ksp Ã  dÃ©crire et commenter en montrant que hypre est pourri avec cet exemple}
+
+\begin{table*}[htbp]
+\begin{center}
+\begin{tabular}{|r|r|r|r|r|r|r|r|} 
+\hline
+
+  nb. cores   & \multicolumn{2}{c|}{FGMRES/ASM} & \multicolumn{2}{c|}{TSIRM CGLS/ASM} & gain& \multicolumn{2}{c|}{FGMRES/HYPRE}   \\ 
+\cline{2-5} \cline{7-8}
+                    & Time  & \# Iter.  & Time  & \# Iter. &        & Time  & \# Iter.   \\\hline \hline
+   512              & 5.54      & 685    & 2.5 &       570 & 2.21   & 128.9 & 9     \\
+   2048             & 14.95     & 1,560  &  4.32 &     746 & 3.48   & 335.7 & 9 \\
+   4096             & 25.13    & 2,369   & 5.61 &   859    & 4.48   & >1000  & -- \\
+   8192             & 44.35   & 3,197   &  7.6  &  1083    &  5.84  & >1000 &  --   \\
+
+\hline
+
+\end{tabular}
+\caption{Comparison of FGMRES  and TSIRM for ex45 of PETSc/KSP with two preconditioner (ASM and HYPRE)  having 5,000 components per core on Curie ($\epsilon_{tsirm}=1e-10$, $max\_iter_{kryl}=30$, $s=12$, $max\_iter_{ls}=15$,$\epsilon_{ls}=1e-40$),  time is expressed in seconds.}
+\label{tab:06}
+\end{center}
+\end{table*}
+
+
 \subsection{Parallel nonlinear problems}
 
 With  PETSc,  linear  solvers  are  used inside  nonlinear  solvers.   The  SNES
@@ -799,10 +823,17 @@ classical solvers. Consequently, we have chosen  two of these examples: ex14 and
 ex20.  In ex14, the code solves the  Bratu (SFI - solid fuel ignition) nonlinear
 partial  difference equations  in 3  dimension.  In  ex20, the  code solves  a 3
 dimension radiative transport test problem.  For more details on these examples,
-interested readers are invited to see the code in the PETSc examples.
-
-In Table~\ref{tab:07} we  report the result of our experiments  for the example
-ex14. 
+interested readers are invited  to see the code in the  PETSc examples. For both
+these  examples,   a  weak  scaling   case  is  chosen  where   processors  have
+approximately a number of components equals to 100,000.
+
+In Table~\ref{tab:07}  we report the result  of our experiments for  the example
+ex14 with the block Jacobi preconditioner.  For TSIRM the CGLS algorithm is used
+to solve  the minimization step. In  this table, we  can see that the  number of
+iterations used by the linear solver is smaller with TSIRM compared with FGMRES.
+Consequently the execution times are smaller  with TSIRM. The gain between TSIRM
+and FGMRES  is around  6 and  7. The parameters  of TSIRM  are expressed  in the
+caption of the table.
 
 \begin{table*}[htbp]
 \begin{center}
@@ -812,10 +843,10 @@ ex14.
   nb. cores   & \multicolumn{2}{c|}{FGMRES/BJAC} & \multicolumn{2}{c|}{TSIRM CGLS/BJAC} & gain  \\ 
 \cline{2-5}
                     & Time         & \# Iter.  & Time   & \# Iter. &  \\\hline \hline
-   1024              & 159.52      & 11,584    &  26.34  &     1,563  &  6.06  \\
-   2048             & 226.24       & 16,459    &  37.23 &     2,248   &  6.08\\
-   4096             & 391.21     & 27,794   &  50.93 &   2,911  &  7.69\\
-   8192             & 543.23     & 37,770   &  79.21  &  4,324  & 6.86 \\
+   1,024              & 159.52      & 11,584    &  26.34  &     1,563  &  6.06  \\
+   2,048             & 226.24       & 16,459    &  37.23 &     2,248   &  6.08\\
+   4,096             & 391.21     & 27,794   &  50.93 &   2,911  &  7.69\\
+   8,192             & 543.23     & 37,770   &  79.21  &  4,324  & 6.86 \\
 
 \hline
 
@@ -825,6 +856,15 @@ ex14.
 \end{center}
 \end{table*}
 
+In Table~\cite{tab:08}, the results of the experiments with the example ex20 are
+reported. The block  Jacobi preconditioner has also been used  and CGLS to solve
+the minimization step for TSIRM. For this example, we can observ that the number
+of  iterations  for  FMGRES  increase  drastically  when  the  number  of  cores
+increases. With  TSIRM, we can  see that the  number of iterations  is initially
+very small compared  to the FGMRES ones  and when the number  of cores increase,
+the number  of iterations increases slighther  with TSIRM than with  FGMRES. For
+this example,  the gain  between TSIRM  and FGMRES ranges  between 8  with 1,024
+cores to more than 16 with 8,192 cores.
 
 \begin{table*}[htbp]
 \begin{center}
@@ -834,10 +874,10 @@ ex14.
   nb. cores   & \multicolumn{2}{c|}{FGMRES/BJAC} & \multicolumn{2}{c|}{TSIRM CGLS/BJAC} & gain   \\ 
 \cline{2-5}
                     & Time         & \# Iter.  & Time   & \# Iter.  &  \\\hline \hline
-   1024              & 667.92      & 48,732    & 81.65  &     5,087 &  8.18 \\
-   2048             & 966.87       & 77,177    &  90.34 &     5,716 &  10.70\\
-   4096             & 1,742.31     & 124,411   &  119.21 &   6,905  & 14.61\\
-   8192             & 2,739.21     & 187,626   &  168.9  &  9,000   & 16.22\\
+   1,024              & 667.92      & 48,732    & 81.65  &     5,087 &  8.18 \\
+   2,048             & 966.87       & 77,177    &  90.34 &     5,716 &  10.70\\
+   4,096             & 1,742.31     & 124,411   &  119.21 &   6,905  & 14.61\\
+   8,192             & 2,739.21     & 187,626   &  168.9  &  9,000   & 16.22\\
 
 \hline
 
@@ -850,7 +890,89 @@ ex14.
 
 
 
+
+
+
+%%NEW
 \subsection{Influence of parameters for TSIRM}
+In this section we present some experimental results in order to study the influence of some parameters on the TSIRM algorithm. We conducted experiments on $16$ cores to solve 3D problems of size $200,000$ components per core. We solved nonlinear problems token from examples of PETSc. We fixed some parameters of the TSIRM algorithm as follows: the nonlinear systems are solved with a precision of $10^{-8}$, block Jacobi preconditioner is used, the tolerance threshold $\epsilon_{tsirm}$ is $10^{-8}$ , the maximum number of iterations $max\_iter_{tsirm}$ is set to $10,000$ iterations, the FGMRES method is used as the inner solver with a tolerance threshold $\epsilon_{kryl}=10^{-10}$ and the least-squares problem is solved with a precision $\epsilon_{ls}=10^{-40}$ in the minimization process.
+
+%time mpirun ../ex48 -da_grid_x 147 -da_grid_y 147 -da_grid_z 147 -snes_rtol 1.e-8 -snes_monitor -ksp_type tsirm -ksp_pc_type bjacobi -pc_type ksp -ksp_tsirm_tol 1e-8 -ksp_tsirm_maxiter 10000 -ksp_ksp_type fgmres -ksp_tsirm_max_inner_iter 30 -ksp_tsirm_inner_restarts 30 -ksp_tsirm_inner_tol 1e-10 -ksp_tsirm_cgls 0 -ksp_tsirm_tol_ls 1.e-40 -ksp_tsirm_maxiter_ls 15 -ksp_tsirm_size_ls 10 
+\begin{figure}[htbp]
+\centering
+  \includegraphics[angle=-90,width=0.5\textwidth]{ksp_tsirm_cgls_iter_total}
+\caption{Number of total iterations using two different methods for the minimization: LSQR and CGLS.}
+\label{fig:cgls-iter} 
+\end{figure}
+
+\begin{figure}[htbp]
+\centering
+  \includegraphics[angle=-90,width=0.5\textwidth]{ksp_tsirm_cgls_time}
+\caption{Execution time in seconds using two different methods for the minimization: LSQR and CGLS.}
+\label{fig:cgls-time} 
+\end{figure}
+
+%time mpirun ../ex35 -da_grid_x 147 -da_grid_y 147 -da_grid_z 147 -snes_rtol 1.e-8 -snes_monitor -ksp_type tsirm -ksp_pc_type bjacobi -pc_type ksp -ksp_tsirm_tol 1e-8 -ksp_tsirm_maxiter 10000 -ksp_ksp_type fgmres -ksp_tsirm_max_inner_iter 30 -ksp_tsirm_inner_restarts 38 -ksp_tsirm_inner_tol 1e-10 -ksp_tsirm_cgls 0 -ksp_tsirm_tol_ls 1.e-40 -ksp_tsirm_maxiter_ls 15 -ksp_tsirm_size_ls 10
+\begin{figure}[htbp]
+\centering
+  \includegraphics[angle=-90,width=0.5\textwidth]{ksp_tsirm_inner_restarts_iter_total}
+\caption{Number of total iterations with variation of restarts in the inner solver FGMRES.}
+\label{fig:inner_restarts_iter_total} 
+\end{figure}
+
+\begin{figure}[htbp]
+\centering
+  \includegraphics[angle=-90,width=0.5\textwidth]{ksp_tsirm_inner_restarts_time}
+\caption{Execution time in seconds with variation of restarts in the inner solver FGMRES.}
+\label{fig:inner_restarts_time} 
+\end{figure}
+
+%time mpirun ../ex14 -da_grid_x 147 -da_grid_y 147 -da_grid_z 147 -snes_rtol 1.e-8 -snes_monitor -ksp_type tsirm -ksp_pc_type bjacobi -pc_type ksp -ksp_tsirm_tol 1e-8 -ksp_tsirm_maxiter 10000 -ksp_ksp_type fgmres -ksp_tsirm_max_inner_iter 1000 -ksp_tsirm_inner_restarts 30 -ksp_tsirm_inner_tol 1e-10 -ksp_tsirm_cgls 0 -ksp_tsirm_tol_ls 1.e-40 -ksp_tsirm_maxiter_ls 15 -ksp_tsirm_size_ls 10
+\begin{figure}[htbp]
+\centering
+  \includegraphics[angle=-90,width=0.5\textwidth]{ksp_tsirm_max_inner_iter}
+\caption{Number of total iterations with variation of number of inner iterations.}
+\label{fig:max_inner_iter} 
+\end{figure}
+
+\begin{figure}[htbp]
+\centering
+  \includegraphics[angle=-90,width=0.5\textwidth]{ksp_tsirm_max_inner_time}
+\caption{Execution time in seconds with variation of number of inner iterations.}
+\label{fig:max_inner_time} 
+\end{figure}
+
+%time mpirun ../ex14 -da_grid_x 147 -da_grid_y 147 -da_grid_z 147 -snes_rtol 1.e-8 -snes_monitor -ksp_type tsirm -ksp_pc_type bjacobi -pc_type ksp -ksp_tsirm_tol 1e-8 -ksp_tsirm_maxiter 10000 -ksp_ksp_type fgmres -ksp_tsirm_max_inner_iter 30 -ksp_tsirm_inner_restarts 30 -ksp_tsirm_inner_tol 1e-10 -ksp_tsirm_cgls 0 -ksp_tsirm_tol_ls 1.e-40 -ksp_tsirm_maxiter_ls 5 -ksp_tsirm_size_ls 10
+\begin{figure}[htbp]
+\centering
+  \includegraphics[angle=-90,width=0.5\textwidth]{ksp_tsirm_maxiter_ls_iter}
+\caption{Number of total iterations with variation of number of iterations in the minimization process.}
+\label{fig:maxiter_ls_iter} 
+\end{figure}
+
+\begin{figure}[htbp]
+\centering
+  \includegraphics[angle=-90,width=0.5\textwidth]{ksp_tsirm_maxiter_ls_time}
+\caption{Execution time in seconds with variation of number of iterations in the minimization process.}
+\label{fig:maxiter_ls_time} 
+\end{figure}
+
+%time mpirun ../ex14 -da_grid_x 147 -da_grid_y 147 -da_grid_z 147 -snes_rtol 1.e-8 -snes_monitor -ksp_type tsirm -ksp_pc_type bjacobi -pc_type ksp -ksp_tsirm_tol 1e-8 -ksp_tsirm_maxiter 10000 -ksp_ksp_type fgmres -ksp_tsirm_max_inner_iter 30 -ksp_tsirm_inner_restarts 30 -ksp_tsirm_inner_tol 1e-10 -ksp_tsirm_cgls 0 -ksp_tsirm_tol_ls 1.e-40 -ksp_tsirm_maxiter_ls 15 -ksp_tsirm_size_ls 2
+\begin{figure}[htbp]
+\centering
+  \includegraphics[angle=-90,width=0.5\textwidth]{ksp_tsirm_size_ls_iter}
+\caption{Number of total iterations with variation of the size of the least-squares problem in the minimization process.}
+\label{fig:size_ls_iter} 
+\end{figure}
+
+\begin{figure}[htbp]
+\centering
+  \includegraphics[angle=-90,width=0.5\textwidth]{ksp_tsirm_size_ls_time}
+\caption{Execution time in seconds with variation of the size of the least-squares problem in the minimization process.}
+\label{fig:size_ls_time} 
+\end{figure}
+
+%%ENDNEW
 
 
 
