From: lilia Date: Sun, 27 Apr 2014 00:35:16 +0000 (+0200) Subject: 27-04-2014 X-Git-Url: https://bilbo.iut-bm.univ-fcomte.fr/and/gitweb/Krylov_multi.git/commitdiff_plain/8165928aadd0ebeac12cb85263ea5fd32425c81a?ds=inline;hp=22dbef42c491b27f1b290799ec5827db3be0bb45 27-04-2014 --- diff --git a/krylov_multi.tex b/krylov_multi.tex index a9d498f..d296dcf 100644 --- a/krylov_multi.tex +++ b/krylov_multi.tex @@ -169,7 +169,7 @@ Y_l = B_l - \displaystyle\sum_{\substack{m=1\\m\neq l}}^{L}A_{lm}X_m, \right. \label{sec03:eq03} \end{equation} -is solved independently by a {\it cluster of processors} and communication are required to update the right-hand side vectors $Y_l$, such that the vectors $X_m$ represent the data dependencies between the clusters. In this work, we use the parallel GMRES method~\cite{ref34} as an inner iteration method to solve sub-systems~(\ref{sec03:eq03}). GMRES is one of the most used Krylov iterative methods to solve sparse linear systems in parallel on clusters of processors. In practice, GMRES is used with a preconditioner to improve its convergence. In this work, we used a preconditioning matrix equivalent to the main diagonal of sparse sub-matrix $A_{ll}$. This preconditioner is straightforward to implement in parallel and gives good performances in many situations. +is solved independently by a {\it cluster of processors} and communication are required to update the right-hand side vectors $Y_l$, such that the vectors $X_m$ represent the data dependencies between the clusters. In this work, we use the parallel restarted GMRES method~\cite{ref34} as an inner iteration method to solve sub-systems~(\ref{sec03:eq03}). GMRES is one of the most used Krylov iterative methods to solve sparse linear systems in parallel on clusters of processors. %In practice, GMRES is used with a preconditioner to improve its convergence. In this work, we used a preconditioning matrix equivalent to the main diagonal of sparse sub-matrix $A_{ll}$. This preconditioner is straightforward to implement in parallel and gives good performances in many situations. It should be noted that the convergence of the inner iterative solver for the different sub-systems~(\ref{sec03:eq03}) does not necessarily involve the convergence of the multisplitting method. It strongly depends on the properties of the global sparse linear system to be solved and the computing environment~\cite{o1985multi,ref18}. Furthermore, the multisplitting of the linear system among several clusters of processors increases the spectral radius of the iteration matrix, thereby slowing the convergence. In this work, we based on the work presented in~\cite{huang1993krylov} to increase the convergence and improve the scalability of the multisplitting methods. @@ -238,7 +238,7 @@ where $R^T$ denotes the transpose of the matrix $R$. Since $R$ (i.e. $AS$) and $ \label{algo:01} \end{algorithm} -The main key points of our multisplitting method to solve a large sparse linear system are given in Algorithm~\ref{algo:01}. This algorithm is based on a two-stage method with a minimization using GMRES iterative method as an inner solver. It is executed in parallel by each cluster of processors. Matrices and vectors with the subscript $l$ represent the local data for cluster $l$, where $l\in\{1,\ldots,L\}$. The two-stage solver uses two different parallel iterative algorithms: GMRES method to solve each splitting~(\ref{sec03:eq03}) on a cluster of processors, and CGNR method executed in parallel by all clusters to minimize the function error~(\ref{sec03:eq07}) over the Krylov subspace spanned by $S$. The algorithm requires two global synchronizations between $L$ clusters. The first one is performed at line~$12$ in Algorithm~\ref{algo:01} to exchange local values of vector solution $x$ (i.e. the minimizer $\tilde{x}$) required to restart the multisplitting solver. The second one is needed to construct the matrix $R$ of the Krylov subspace. We chose to perform this latter synchronization $s$ times in every outer iteration $k$ (line~$7$ in Algorithm~\ref{algo:01}). This is a straightforward way to compute the sparse matrix-dense matrix multiplication $R=AS$. We implemented all synchronizations by using message passing collective communications of MPI library. +The main key points of our multisplitting method to solve a large sparse linear system are given in Algorithm~\ref{algo:01}. This algorithm is based on a two-stage method with a minimization using restarted GMRES iterative method as an inner solver. It is executed in parallel by each cluster of processors. Matrices and vectors with the subscript $l$ represent the local data for cluster $l$, where $l\in\{1,\ldots,L\}$. The two-stage solver uses two different parallel iterative algorithms: GMRES method to solve each splitting~(\ref{sec03:eq03}) on a cluster of processors, and CGNR method executed in parallel by all clusters to minimize the function error~(\ref{sec03:eq07}) over the Krylov subspace spanned by $S$. The algorithm requires two global synchronizations between $L$ clusters. The first one is performed at line~$12$ in Algorithm~\ref{algo:01} to exchange local values of vector solution $x$ (i.e. the minimizer $\tilde{x}$) required to restart the multisplitting solver. The second one is needed to construct the matrix $R$ of the Krylov subspace. We chose to perform this latter synchronization $s$ times in every outer iteration $k$ (line~$7$ in Algorithm~\ref{algo:01}). This is a straightforward way to compute the sparse matrix-dense matrix multiplication $R=AS$. We implemented all synchronizations by using message passing collective communications of MPI library. %%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%% @@ -277,7 +277,7 @@ the size of the 3D Poisson problem. The size is chosen in order to have approximately 50,000 components per core. The second column represents the number of cores used. In parenthesis, there is the decomposition used for the Krylov multisplitting. The third column and the sixth column respectively show -the execution time for the GMRES and the Kyrlow multisplitting code. The fourth +the execution time for the GMRES and the Kyrlov multisplitting codes. The fourth and the seventh column describes the number of iterations. For the multisplitting code, the total number of inner iterations is represented in parenthesis. For the GMRES code (alone and in the multisplitting version) the @@ -288,8 +288,8 @@ is fixed to 1e-10. It should be noted that a high precision is used but we also fixed a maximum number of iterations for each internal step. In practise, we limit the number of internal step to 10. So an internal iteration is finished when the precision is reached or when the maximum internal number of iterations -is reached. - +is reached. The precision and the maximum number of iterations of CGNR method are fixed to 1e-25 and 20, respectively. The size of the Krylov subspace basis $S$ is fixed to 10 vectors. +\LZK{J'ai ajouté les paramètres concernant la résolution du problème de moindres carrés. Confirmer leur valeurs.} @@ -320,15 +320,22 @@ $743^3$ & 8192 (4x2048) & 704.4 & 87,822 & 4.80e-07 & 110.3 & 1 From these experiments, it can be observed that the multisplitting version is always faster than the GMRES version. The acceleration gain of the multisplitting version is between 4 and 6. It can be noticed that the number of -iteration is drastically reduced with the multisplitting version even it is not +iterations is drastically reduced with the multisplitting version even it is not neglectable. \section{Conclusion and perspectives} +We have implemented a Krylov multisplitting method to solve sparse linear systems on large-scale computing platforms. We have developed a synchronous two-stage method based on the block Jacobi multisplitting and uses GMRES iterative method as an inner iteration. Our contribution in this paper is twofold. First we have constituted a multi-cluster environment based on processors of the large-scale computing platform on which each linear sub-system issued from the splitting is solved in parallel by a cluster of processors. Second, we have implemented the outer iteration of the multisplitting method as a Krylov subspace method which minimizes some error function. This increases the convergence and improves the scalability of the multisplitting method. + +We have tested our multisplitting method for solving the sparse linear system issued from the discretization of the 3D Poisson problem. We have compared its performances to GMRES method on a supercomputer composed of 2048 to 8192 cores. The experimental results showed that the multisplitting method is about 4 to 6 times faster than the GMRES method for different sizes of the problem split into 2 or 4 blocks when using the multisplitting method. Indeed, the GMRES method has difficulties to scale with many cores while the Krylov multisplitting method allows to hide latency and reduce the inter-cluster communications. + +In future works, we plan to conduct experiments on larger number of cores and test the scalability of our Krylov multisplitting method. It would be interesting to validate its performances for solving other linear/nonlinear and symmetric/nonsymmetric problems. Moreover, we intend to develop multisplitting methods based on asynchronous iteration in which communications are overlapped by computations. These methods would be interesting for platforms composed of distant clusters interconnected by a high-latency network. In addition, we intend to investigate the convergence improvements by using preconditioning techniques and multisplitting methods with overlapping blocks. + -Other applications (=> other matrices)\\ -Larger experiments\\ -Async\\ -Overlapping +%Other applications (=> other matrices)\\ +%Larger experiments\\ +%Async\\ +%Overlapping\\ +%preconditioning %%%%%%%%%%%%%%%%%%%%%%%%