Changes from Pasqua to example files and docs.

This commit is contained in:
Pasqua D'Ambra
2017-07-20 20:35:05 +02:00
parent 3fc588520f
commit d45c198b48
10 changed files with 55 additions and 61 deletions
+10 -10
View File
@@ -219,14 +219,15 @@ Furthermore, specifying block-Jacobi as coarsest-level
solver implies that the coarsest-level matrix is distributed
among the processes.
Figure~\ref{fig:ex3} shows how to set a W-cycle preconditioner which
applies 2 Gauss-Seidel sweeps as pre- and post-smoother,
applies 2 hybrid Gauss-Seidel sweeps as pre- and post-smoother,
and solves the coarsest-level system with the multifrontal LU factorization
implemented in MUMPS. It is specified that the coarsest-level
matrix is distributed, since MUMPS can be used on both
replicated and distributed matrices, and by default
it is used on replicated ones. Note the use of the parameter \verb|pos|
to specify a property only for the pre-smoother or the post-smoother
(see Section~\ref{sec:precset} for more details).
it is used on replicated ones.
%Note the use of the parameter \verb|pos|
%to specify a property only for the pre-smoother or the post-smoother
%(see Section~\ref{sec:precset} for more details).
The code fragments shown in Figures~\ref{fig:ex2} and \ref{fig:ex3} are
included in the example program file \verb|mld_dexample_ml.f90| too.
@@ -281,14 +282,13 @@ boundary conditions are also available in the directory \verb|examples/pdegen|.
{\small
\begin{verbatim}
... ...
! build a W-cycle preconditioner with 2 Gauss-Seidel sweeps as
! pre- and post-smoother, a distributed coarsest
! build a W-cycle preconditioner with 2 hybrid Gauss-Seidel sweeps
! as pre- and post-smoother, a distributed coarsest
! matrix, and MUMPS as coarsest-level solver
call P%init('ML',info)
call P%set('ML_TYPE','WCYCLE',info)
call P%set('SMOOTHER_TYPE','GS',info)
call P%set('SMOOTHER_SWEEPS',2,info,pos='PRE')
call P%set('SMOOTHER_SWEEPS',2,info,pos='POST')
call P%set('ML_CYCLE','WCYCLE',info)
call P%set('SMOOTHER_TYPE','FBGS',info)
call P%set('SMOOTHER_SWEEPS',2,info)
call P%set('COARSE_SOLVE','MUMPS',info)
call P%set('COARSE_MAT','DIST',info)
call P%hierarchy_build(A,desc_A,info)
+7 -8
View File
@@ -52,8 +52,8 @@
! (with ILU(0) on the blocks) as pre- and post-smoother, and 8 block-Jacobi
! sweeps (with ILU(0) on the blocks) as coarsest-level solver(Sec. 5.1, Fig. 3)
!
! - choice = 3, build a W-cycle preconditioner with 2 Gauss-Seidel sweeps as
! pre- and post-smoother, a distributed coarsest
! - choice = 3, build a W-cycle preconditioner with 2 hybrid forward/backward
! GS sweeps as pre/post-smoother, a distributed coarsest
! matrix, and MUMPS as coarsest-level solver (Sec. 5.1, Fig. 4)
!
! The matrix and the rhs are read from files (if an rhs is not available, the
@@ -231,15 +231,14 @@ program mld_cexample_ml
case(3)
! initialize a W-cycle preconditioner with 2 Gauss-Seidel sweeps as
! post-smoother (and no pre-smoother), a distributed coarsest
! initialize a W-cycle preconditioner with 2 hybrid forward/backward
! GS sweeps as pre/post-smoother, a distributed coarsest
! matrix, and MUMPS as coarsest-level solver
call P%init('ML',info)
call P%set('ML_TYPE','WCYCLE',info)
call P%set('SMOOTHER_TYPE','GS',info)
call P%set('SMOOTHER_SWEEPS',2,info,pos='PRE')
call P%set('SMOOTHER_SWEEPS',2,info,pos='POST')
call P%set('ML_CYCLE','WCYCLE',info)
call P%set('SMOOTHER_TYPE','FBGS',info)
call P%set('SMOOTHER_SWEEPS',2,info)
call P%set('COARSE_SOLVE','MUMPS',info)
call P%set('COARSE_MAT','DIST',info)
kmethod = 'CG'
+7 -8
View File
@@ -52,8 +52,8 @@
! (with ILU(0) on the blocks) as pre- and post-smoother, and 8 block-Jacobi
! sweeps (with ILU(0) on the blocks) as coarsest-level solver(Sec. 5.1, Fig. 3)
!
! - choice = 3, build a W-cycle preconditioner with 2 Gauss-Seidel sweeps as
! pre- and post-smoother, a distributed coarsest
! - choice = 3, build a W-cycle preconditioner with 2 hybrid forward/backward
! GS sweeps as pre/post-smoother, a distributed coarsest
! matrix, and MUMPS as coarsest-level solver (Sec. 5.1, Fig. 4)
!
! The matrix and the rhs are read from files (if an rhs is not available, the
@@ -231,15 +231,14 @@ program mld_dexample_ml
case(3)
! initialize a W-cycle preconditioner with 2 Gauss-Seidel sweeps as
! post-smoother (and no pre-smoother), a distributed coarsest
! initialize a W-cycle preconditioner with 2 hybrid forward/backward
! GS sweeps as pre/post-smoother, a distributed coarsest
! matrix, and MUMPS as coarsest-level solver
call P%init('ML',info)
call P%set('ML_TYPE','WCYCLE',info)
call P%set('SMOOTHER_TYPE','GS',info)
call P%set('SMOOTHER_SWEEPS',2,info,pos='PRE')
call P%set('SMOOTHER_SWEEPS',2,info,pos='POST')
call P%set('ML_CYCLE','WCYCLE',info)
call P%set('SMOOTHER_TYPE','FBGS',info)
call P%set('SMOOTHER_SWEEPS',2,info)
call P%set('COARSE_SOLVE','MUMPS',info)
call P%set('COARSE_MAT','DIST',info)
kmethod = 'CG'
+7 -8
View File
@@ -52,8 +52,8 @@
! (with ILU(0) on the blocks) as pre- and post-smoother, and 8 block-Jacobi
! sweeps (with ILU(0) on the blocks) as coarsest-level solver(Sec. 5.1, Fig. 3)
!
! - choice = 3, build a W-cycle preconditioner with 2 Gauss-Seidel sweeps as
! pre- and post-smoother, a distributed coarsest
! - choice = 3, build a W-cycle preconditioner with 2 hybrid forward/backward
! GS sweeps as pre/post-smoother, a distributed coarsest
! matrix, and MUMPS as coarsest-level solver (Sec. 5.1, Fig. 4)
!
! The matrix and the rhs are read from files (if an rhs is not available, the
@@ -231,15 +231,14 @@ program mld_sexample_ml
case(3)
! initialize a W-cycle preconditioner with 2 Gauss-Seidel sweeps as
! post-smoother (and no pre-smoother), a distributed coarsest
! initialize a W-cycle preconditioner with 2 hybrid forward/backward
! GS sweeps as pre/post-smoother, a distributed coarsest
! matrix, and MUMPS as coarsest-level solver
call P%init('ML',info)
call P%set('ML_TYPE','WCYCLE',info)
call P%set('SMOOTHER_TYPE','GS',info)
call P%set('SMOOTHER_SWEEPS',2,info,pos='PRE')
call P%set('SMOOTHER_SWEEPS',2,info,pos='POST')
call P%set('ML_CYCLE','WCYCLE',info)
call P%set('SMOOTHER_TYPE','FBGS',info)
call P%set('SMOOTHER_SWEEPS',2,info)
call P%set('COARSE_SOLVE','MUMPS',info)
call P%set('COARSE_MAT','DIST',info)
kmethod = 'CG'
+7 -8
View File
@@ -52,8 +52,8 @@
! (with ILU(0) on the blocks) as pre- and post-smoother, and 8 block-Jacobi
! sweeps (with ILU(0) on the blocks) as coarsest-level solver(Sec. 5.1, Fig. 3)
!
! - choice = 3, build a W-cycle preconditioner with 2 Gauss-Seidel sweeps as
! pre- and post-smoother, a distributed coarsest
! - choice = 3, build a W-cycle preconditioner with 2 hybrid forward/backward
! GS sweeps as pre/post-smoother, a distributed coarsest
! matrix, and MUMPS as coarsest-level solver (Sec. 5.1, Fig. 4)
!
! The matrix and the rhs are read from files (if an rhs is not available, the
@@ -231,15 +231,14 @@ program mld_zexample_ml
case(3)
! initialize a W-cycle preconditioner with 2 Gauss-Seidel sweeps as
! post-smoother (and no pre-smoother), a distributed coarsest
! initialize a W-cycle preconditioner with 2 hybrid forward/backward
! GS sweeps as pre/post-smoother, a distributed coarsest
! matrix, and MUMPS as coarsest-level solver
call P%init('ML',info)
call P%set('ML_TYPE','WCYCLE',info)
call P%set('SMOOTHER_TYPE','GS',info)
call P%set('SMOOTHER_SWEEPS',2,info,pos='PRE')
call P%set('SMOOTHER_SWEEPS',2,info,pos='POST')
call P%set('ML_CYCLE','WCYCLE',info)
call P%set('SMOOTHER_TYPE','FBGS',info)
call P%set('SMOOTHER_SWEEPS',2,info)
call P%set('COARSE_SOLVE','MUMPS',info)
call P%set('COARSE_MAT','DIST',info)
kmethod = 'CG'
+1 -1
View File
@@ -1,6 +1,6 @@
mld_mat.mtx ! This matrix (and others) from: http://math.nist.gov/MatrixMarket/ or
mld_rhs.mtx ! rhs | http://www.cise.ufl.edu/research/sparse/matrices/index.html
MM ! File format: MM (Matrix Market) HB (Harwell-Boeing).
1 ! Preconditioner choice
3 ! Preconditioner choice
0100 ! ITMAX
1.d-6 ! EPS
+7 -8
View File
@@ -53,8 +53,8 @@
! (with ILU(0) on the blocks) as pre- and post-smoother, and 8 block-Jacobi
! sweeps (with ILU(0) on the blocks) as coarsest-level solver(Sec. 5.1, Fig. 3)
!
! - choice = 3, build a W-cycle preconditioner with 2 Gauss-Seidel sweeps as
! pre- and post-smoother, a distributed coarsest
! - choice = 3, build a W-cycle preconditioner with 2 hybrid forward/backward
! GS sweeps as pre/post-smoother, a distributed coarsest
! matrix, and MUMPS as coarsest-level solver (Sec. 5.1, Fig. 4)
!
! The PDE is a general second order equation in 3d
@@ -248,15 +248,14 @@ program mld_dexample_ml
case(3)
! initialize a W-cycle preconditioner with 2 Gauss-Seidel sweeps as
! post-smoother (and no pre-smoother), a distributed coarsest
! initialize a W-cycle preconditioner with 2 hybrid forward/backward
! GS sweeps as pre/post-smoother, a distributed coarsest
! matrix, and MUMPS as coarsest-level solver
call P%init('ML',info)
call P%set('ML_TYPE','WCYCLE',info)
call P%set('SMOOTHER_TYPE','GS',info)
call P%set('SMOOTHER_SWEEPS',2,info,pos='PRE')
call P%set('SMOOTHER_SWEEPS',2,info,pos='POST')
call P%set('ML_CYCLE','WCYCLE',info)
call P%set('SMOOTHER_TYPE','FBGS',info)
call P%set('SMOOTHER_SWEEPS',2,info)
call P%set('COARSE_SOLVE','MUMPS',info)
call P%set('COARSE_MAT','DIST',info)
kmethod = 'CG'
+7 -8
View File
@@ -53,8 +53,8 @@
! (with ILU(0) on the blocks) as pre- and post-smoother, and 8 block-Jacobi
! sweeps (with ILU(0) on the blocks) as coarsest-level solver(Sec. 5.1, Fig. 3)
!
! - choice = 3, build a W-cycle preconditioner with 2 Gauss-Seidel sweeps as
! pre- and post-smoother, a distributed coarsest
! - choice = 3, build a W-cycle preconditioner with 2 hybrid forward/backward
! GS sweeps pre/post-smoother, a distributed coarsest
! matrix, and MUMPS as coarsest-level solver (Sec. 5.1, Fig. 4)
!
! The PDE is a general second order equation in 3d
@@ -248,15 +248,14 @@ program mld_sexample_ml
case(3)
! initialize a W-cycle preconditioner with 2 Gauss-Seidel sweeps as
! post-smoother (and no pre-smoother), a distributed coarsest
! initialize a W-cycle preconditioner with 2 hybrid forward/backward
! GS sweeps as pre/post-smoother, a distributed coarsest
! matrix, and MUMPS as coarsest-level solver
call P%init('ML',info)
call P%set('ML_TYPE','WCYCLE',info)
call P%set('SMOOTHER_TYPE','GS',info)
call P%set('SMOOTHER_SWEEPS',2,info,pos='PRE')
call P%set('SMOOTHER_SWEEPS',2,info,pos='POST')
call P%set('ML_CYCLE','WCYCLE',info)
call P%set('SMOOTHER_TYPE','FBGS',info)
call P%set('SMOOTHER_SWEEPS',2,info)
call P%set('COARSE_SOLVE','MUMPS',info)
call P%set('COARSE_MAT','DIST',info)
kmethod = 'CG'
+1 -1
View File
@@ -1,3 +1,3 @@
15 ! IDIM; domain size is idim**3
10 ! ITMAX
100 ! ITMAX
1.d-6 ! EPS
+1 -1
View File
@@ -1,4 +1,4 @@
2 ! Preconditioner choice
3 ! Preconditioner choice
10 ! IDIM; domain size is idim**3
500 ! ITMAX
1.d-6 ! EPS