X-Git-Url: https://bilbo.iut-bm.univ-fcomte.fr/and/gitweb/Krylov_multi.git/blobdiff_plain/b326ff727ce4fef24bfa1adef99d0239aa636ea1..8165928aadd0ebeac12cb85263ea5fd32425c81a:/krylov_multi.tex?ds=sidebyside diff --git a/krylov_multi.tex b/krylov_multi.tex index 1affc17..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. %%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%% @@ -272,21 +272,28 @@ it. In the following we presented some experiments we could achieved out on the Hector architecture, the previous UK's high-end computing resource, funded by the UK Research Councils, which has been stopped in the early 2014. -In the experiments we report the size of the 3D poisson considered\LZK[]{Suite\dots ?} - - -The first column shows the size of the problem The size is chosen in order to -have approximately 50,000 components per core. The second column represents the +Table~\ref{tab1} shows the result of the experiments. The first column shows +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 -and the seventh column describes the number of iterations. For the +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. +parenthesis. For the GMRES code (alone and in the multisplitting version) the +restart parameter is fixed to 16. The precision of the GMRES version is fixed to +1e-6. For the multisplitting, there are two precisions, one for the external +solver which is fixed to 1e-6 and another one for the inner solver (GMRES) which +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. 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.} + - We also give the other parameters: the restart for the GRMES method.... -\begin{table}[p] +\begin{table}[htbp] \begin{center} \begin{tabular}{|c|c||c|c|c||c|c|c||c|} \hline @@ -294,7 +301,8 @@ parenthesis. \cline{3-8} & & Time (s) & nb Iter. & $\Delta$ & Time (s)& nb Iter. & $\Delta$ & \\ \hline - +$468^3$ & 2048 (2x1024) & 299.7 & 41,028 & 5.02e-8 & 48.4 & 691(6,146) & 8.24e-08 & 6.19 \\ +\hline $590^3$ & 4096 (2x2048) & 433.1 & 55,494 & 4.92e-7 & 74.1 & 1,101(8,211) & 6.62e-08 & 5.84 \\ \hline $743^3$ & 8192 (2x4096) & 704.4 & 87,822 & 4.80e-07 & 151.2 & 3,061(14,914) & 5.87e-08 & 4.65 \\ @@ -303,40 +311,31 @@ $743^3$ & 8192 (4x2048) & 704.4 & 87,822 & 4.80e-07 & 110.3 & 1 \hline \end{tabular} -\caption{Results without preconditioner} +\caption{Results} \label{tab1} \end{center} \end{table} -\begin{table}[p] -\begin{center} -\begin{tabular}{|c|c||c|c|c||c|c|c||c|} -\hline -\multirow{2}{*}{Pb size}&\multirow{2}{*}{Nb. cores} & \multicolumn{3}{c||}{GMRES} & \multicolumn{3}{c||}{Krylov Multisplitting} & \multirow{2}{*}{Ratio}\\ - \cline{3-8} - & & Time (s) & nb Iter. & $\Delta$ & Time (s)& nb Iter. & $\Delta$ & \\ -\hline +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 +iterations is drastically reduced with the multisplitting version even it is not +neglectable. -$590^3$ & 4096 (2x2048) & 433.0 & 55,494 & 4.92e-7 & 80.4 & 1,091(9,545) & 7.64e-08 & 5.39 \\ -\hline -$743^3$ & 8192 (2x4096) & 704.4 & 87,822 & 4.80e-07 & 110.2 & 1,401(12,379) & 1.11e-07 & 6.39 \\ -\hline -$743^3$ & 8192 (4x2048) & 704.4 & 87,822 & 4.80e-07 & 139.8 & 1,891(15,960) & 1.60e-07& 5.03 \\ -\hline +\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. -\end{tabular} -\caption{Results with preconditioner} -\label{tab2} -\end{center} -\end{table} +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. -\section{Conclusion and perspectives} -Other applications (=> other matrices)\\ -Larger experiments\\ -Async\\ -Overlapping +%Other applications (=> other matrices)\\ +%Larger experiments\\ +%Async\\ +%Overlapping\\ +%preconditioning %%%%%%%%%%%%%%%%%%%%%%%%