X-Git-Url: https://bilbo.iut-bm.univ-fcomte.fr/and/gitweb/GMRES2stage.git/blobdiff_plain/ba3b9727d9fd530a7720c711811688d796cf783b..26119b98c896e296f4ec91c15272a9575fe250a9:/IJHPCN/paper.tex diff --git a/IJHPCN/paper.tex b/IJHPCN/paper.tex index 80a5a12..410b7ad 100644 --- a/IJHPCN/paper.tex +++ b/IJHPCN/paper.tex @@ -366,41 +366,48 @@ in practice. As explained previously, at least two methods seem to be interesting to solve the least-squares minimization, the CGLS and the LSQR methods. -In Algorithm~\ref{algo:02} we remind the CGLS algorithm. The LSQR method follows -more or less the same principle but it takes more place, so we briefly explain -the parallelization of CGLS which is similar to LSQR. - -\begin{algorithm}[t] -\caption{CGLS} -\begin{algorithmic}[1] - \Input $A$ (matrix), $b$ (right-hand side) - \Output $x$ (solution vector)\vspace{0.2cm} - \State Let $x_0$ be an initial approximation - \State $r_0=b-Ax_0$ - \State $p_1=A^Tr_0$ - \State $s_0=p_1$ - \State $\gamma=||s_0||^2_2$ - \For {$k=1,2,3,\ldots$ until convergence ($\gamma<\epsilon_{ls}$)} \label{algo2:conv} - \State $q_k=Ap_k$ - \State $\alpha_k=\gamma/||q_k||^2_2$ - \State $x_k=x_{k-1}+\alpha_kp_k$ - \State $r_k=r_{k-1}-\alpha_kq_k$ - \State $s_k=A^Tr_k$ - \State $\gamma_{old}=\gamma$ - \State $\gamma=||s_k||^2_2$ - \State $\beta_k=\gamma/\gamma_{old}$ - \State $p_{k+1}=s_k+\beta_kp_k$ - \EndFor -\end{algorithmic} -\label{algo:02} -\end{algorithm} +%% In Algorithm~\ref{algo:02} we remind the CGLS algorithm. The LSQR method follows +%% more or less the same principle but it takes more place, so we briefly explain +%% the parallelization of CGLS which is similar to LSQR. + +%% \begin{algorithm}[t] +%% \caption{CGLS} +%% \begin{algorithmic}[1] +%% \Input $A$ (matrix), $b$ (right-hand side) +%% \Output $x$ (solution vector)\vspace{0.2cm} +%% \State Let $x_0$ be an initial approximation +%% \State $r_0=b-Ax_0$ +%% \State $p_1=A^Tr_0$ +%% \State $s_0=p_1$ +%% \State $\gamma=||s_0||^2_2$ +%% \For {$k=1,2,3,\ldots$ until convergence ($\gamma<\epsilon_{ls}$)} \label{algo2:conv} +%% \State $q_k=Ap_k$ +%% \State $\alpha_k=\gamma/||q_k||^2_2$ +%% \State $x_k=x_{k-1}+\alpha_kp_k$ +%% \State $r_k=r_{k-1}-\alpha_kq_k$ +%% \State $s_k=A^Tr_k$ +%% \State $\gamma_{old}=\gamma$ +%% \State $\gamma=||s_k||^2_2$ +%% \State $\beta_k=\gamma/\gamma_{old}$ +%% \State $p_{k+1}=s_k+\beta_kp_k$ +%% \EndFor +%% \end{algorithmic} +%% \label{algo:02} +%% \end{algorithm} +%%NEW -In each iteration of CGLS, there are two matrix-vector multiplications and some -classical operations: dot product, norm, multiplication, and addition on -vectors. All these operations are easy to implement in PETSc or similar -environment. It should be noticed that LSQR follows the same principle, it is a -little bit longer but it performs more or less the same operations. +The PETSc code we have develop is avaiable here: {\bf a mettre} and it will soon +be integrated with the PETSc sources. TSIRM has been implemented as any solver +for linear systems in PETSc. As it requires to use another solver, we have used +a very interesting feature of PETSc that enables to use a preconditioner as a +linear system with the function {\it PCKSPGetKSP}. As the LSQR function is +already implemented in PETSc, we have used it. CGLS was not implemented yet, so +we have implemented it and we plan to define it as a minimization solver in +PETSc similarly to LSQR. Both CGLS and LSQR are not complex from the computation +point of view. They involves matrix-vector multiplications and some classical +operations: dot product, norm, multiplication, and addition on vectors. As +presented in Section~\ref{sec:05} the minimization step is scalable. %%%********************************************************* @@ -409,8 +416,6 @@ little bit longer but it performs more or less the same operations. \section{Convergence results} \label{sec:04} -%%NEW - We suppose in this section that GMRES($m$) is used as solver in the TSIRM algorithm applied on a complex matrix $A$. Let us denote $A^\ast$ the conjugate transpose of $A$, and let $\mathfrak{R}(A)=\dfrac{1}{2} \left( A + A^\ast\right)$, $\mathfrak{I}(A)=\dfrac{1}{2i} \left( A - A^\ast\right)$. @@ -599,16 +604,18 @@ with $|\mu|<1$. Furthermore, it is \emph{a priori} possible in some particular c regarding $A$, that the proposed TSIRM converges while the GMRES($m$) does not. -%%ENDNEW - %%%********************************************************* %%%********************************************************* \section{Experiments using PETSc} \label{sec:05} -%%NEW -In this section four kinds of experiments have been performed. First, some experiments on real matrices issued from the sparse matrix florida have been achieved out. Second, some experiments in parallel with some linear problems are reported and analyzed. Third, some experiments in parallèle with som nonlinear problems are illustrated. Finally some parameters of TSIRM are studied in order to understand their influences. +In this section four kinds of experiments have been performed. First, some +experiments on real matrices issued from the sparse matrix florida have been +achieved out. Second, some experiments in parallel with some linear problems are +reported and analyzed. Third, some experiments in parallèle with som nonlinear +problems are illustrated. Finally some parameters of TSIRM are studied in order +to understand their influences. \subsection{Real matrices}