mirror of
https://github.com/sfilippone/amg4psblas.git
synced 2026-10-06 14:44:55 +00:00
Merge branch 'PolySmooth' into development
This commit is contained in:
@@ -126,24 +126,26 @@ program amg_d_pde2d
|
||||
! AMG cycles for ML
|
||||
! general AMG data
|
||||
character(len=32) :: mlcycle ! AMG cycle type
|
||||
integer(psb_ipk_) :: maxlevs ! maximum number of levels in AMG preconditioner
|
||||
integer(psb_ipk_) :: maxlevs ! maximum number of levels in AMG preconditioner
|
||||
|
||||
! AMG aggregation
|
||||
character(len=32) :: aggr_prol ! aggregation type: SMOOTHED, NONSMOOTHED
|
||||
character(len=32) :: par_aggr_alg ! parallel aggregation algorithm: DEC, SYMDEC
|
||||
character(len=32) :: aggr_type ! Type of aggregation SOC1, SOC2, MATCHBOXP
|
||||
integer(psb_ipk_) :: aggr_size ! Requested size of the aggregates for MATCHBOXP
|
||||
character(len=32) :: aggr_ord ! ordering for aggregation: NATURAL, DEGREE
|
||||
character(len=32) :: aggr_filter ! filtering: FILTER, NO_FILTER
|
||||
real(psb_dpk_) :: mncrratio ! minimum aggregation ratio
|
||||
character(len=32) :: aggr_type ! Type of aggregation SOC1, SOC2, MATCHBOXP
|
||||
integer(psb_ipk_) :: aggr_size ! Requested size of the aggregates for MATCHBOXP
|
||||
character(len=32) :: aggr_ord ! ordering for aggregation: NATURAL, DEGREE
|
||||
character(len=32) :: aggr_filter ! filtering: FILTER, NO_FILTER
|
||||
real(psb_dpk_) :: mncrratio ! minimum aggregation ratio
|
||||
real(psb_dpk_), allocatable :: athresv(:) ! smoothed aggregation threshold vector
|
||||
integer(psb_ipk_) :: thrvsz ! size of threshold vector
|
||||
real(psb_dpk_) :: athres ! smoothed aggregation threshold
|
||||
integer(psb_ipk_) :: csizepp ! minimum size of coarsest matrix per process
|
||||
integer(psb_ipk_) :: thrvsz ! size of threshold vector
|
||||
real(psb_dpk_) :: athres ! smoothed aggregation threshold
|
||||
integer(psb_ipk_) :: csizepp ! minimum size of coarsest matrix per process
|
||||
|
||||
! AMG smoother or pre-smoother; also 1-lev preconditioner
|
||||
character(len=32) :: smther ! (pre-)smoother type: BJAC, AS
|
||||
integer(psb_ipk_) :: jsweeps ! (pre-)smoother / 1-lev prec. sweeps
|
||||
integer(psb_ipk_) :: degree ! degree for polynomial smoother
|
||||
character(len=32) :: pvariant ! polynomial variant
|
||||
integer(psb_ipk_) :: novr ! number of overlap layers
|
||||
character(len=32) :: restr ! restriction over application of AS
|
||||
character(len=32) :: prol ! prolongation over application of AS
|
||||
@@ -158,6 +160,8 @@ program amg_d_pde2d
|
||||
! AMG post-smoother; ignored by 1-lev preconditioner
|
||||
character(len=32) :: smther2 ! post-smoother type: BJAC, AS
|
||||
integer(psb_ipk_) :: jsweeps2 ! post-smoother sweeps
|
||||
integer(psb_ipk_) :: degree2 ! degree for polynomial smoother
|
||||
character(len=32) :: pvariant2 ! polynomial variant
|
||||
integer(psb_ipk_) :: novr2 ! number of overlap layers
|
||||
character(len=32) :: restr2 ! restriction over application of AS
|
||||
character(len=32) :: prol2 ! prolongation over application of AS
|
||||
@@ -170,15 +174,15 @@ program amg_d_pde2d
|
||||
real(psb_dpk_) :: thr2 ! threshold for ILUT factorization
|
||||
|
||||
! coarsest-level solver
|
||||
character(len=32) :: cmat ! coarsest matrix layout: REPL, DIST
|
||||
character(len=32) :: csolve ! coarsest-lev solver: BJAC, SLUDIST (distr.
|
||||
! mat.); UMF, MUMPS, SLU, ILU, ILUT, MILU
|
||||
! (repl. mat.)
|
||||
character(len=32) :: csbsolve ! coarsest-lev local subsolver: ILU, ILUT,
|
||||
! MILU, UMF, MUMPS, SLU
|
||||
integer(psb_ipk_) :: cfill ! fill-in for incomplete LU factorization
|
||||
real(psb_dpk_) :: cthres ! threshold for ILUT factorization
|
||||
integer(psb_ipk_) :: cjswp ! sweeps for GS or JAC coarsest-lev subsolver
|
||||
character(len=32) :: cmat ! coarsest matrix layout: REPL, DIST
|
||||
character(len=32) :: csolve ! coarsest-lev solver: BJAC, SLUDIST (distr.
|
||||
! mat.); UMF, MUMPS, SLU, ILU, ILUT, MILU
|
||||
! (repl. mat.)
|
||||
character(len=32) :: csbsolve ! coarsest-lev local subsolver: ILU, ILUT,
|
||||
! MILU, UMF, MUMPS, SLU
|
||||
integer(psb_ipk_) :: cfill ! fill-in for incomplete LU factorization
|
||||
real(psb_dpk_) :: cthres ! threshold for ILUT factorization
|
||||
integer(psb_ipk_) :: cjswp ! sweeps for GS or JAC coarsest-lev subsolver
|
||||
|
||||
! Dump data
|
||||
logical :: dump = .false.
|
||||
@@ -285,10 +289,12 @@ program amg_d_pde2d
|
||||
! 1-level sweeps from "outer_sweeps"
|
||||
call prec%set('smoother_sweeps', p_choice%jsweeps, info)
|
||||
|
||||
case ('BJAC')
|
||||
case ('BJAC','POLY')
|
||||
call prec%set('smoother_sweeps', p_choice%jsweeps, info)
|
||||
call prec%set('sub_solve', p_choice%solve, info)
|
||||
call prec%set('solver_sweeps', p_choice%ssweeps, info)
|
||||
call prec%set('poly_degree', p_choice%degree, info)
|
||||
call prec%set('poly_variant', p_choice%pvariant, info)
|
||||
if (psb_toupper(p_choice%solve)=='MUMPS') &
|
||||
& call prec%set('mumps_loc_glob','local_solver',info)
|
||||
call prec%set('sub_fillin', p_choice%fill, info)
|
||||
@@ -312,7 +318,7 @@ program amg_d_pde2d
|
||||
call prec%set('ml_cycle', p_choice%mlcycle, info)
|
||||
call prec%set('outer_sweeps', p_choice%outer_sweeps,info)
|
||||
if (p_choice%csizepp>0)&
|
||||
& call prec%set('min_coarse_size_per_process', p_choice%csizepp, info)
|
||||
& call prec%set('min_coarse_size_per_process', p_choice%csizepp, info)
|
||||
if (p_choice%mncrratio>1)&
|
||||
& call prec%set('min_cr_ratio', p_choice%mncrratio, info)
|
||||
if (p_choice%maxlevs>0)&
|
||||
@@ -336,7 +342,9 @@ program amg_d_pde2d
|
||||
|
||||
call prec%set('smoother_type', p_choice%smther, info)
|
||||
call prec%set('smoother_sweeps', p_choice%jsweeps, info)
|
||||
|
||||
call prec%set('poly_degree', p_choice%degree, info)
|
||||
call prec%set('poly_variant', p_choice%pvariant, info)
|
||||
|
||||
select case (psb_toupper(p_choice%smther))
|
||||
case ('GS','BWGS','FBGS','JACOBI','L1-JACOBI','L1-FBGS')
|
||||
! do nothing
|
||||
@@ -366,6 +374,8 @@ program amg_d_pde2d
|
||||
if (psb_toupper(p_choice%smther2) /= 'NONE') then
|
||||
call prec%set('smoother_type', p_choice%smther2, info,pos='post')
|
||||
call prec%set('smoother_sweeps', p_choice%jsweeps2, info,pos='post')
|
||||
call prec%set('poly_degree', p_choice%degree2, info,pos='post')
|
||||
call prec%set('poly_variant', p_choice%pvariant2, info,pos='post')
|
||||
select case (psb_toupper(p_choice%smther2))
|
||||
case ('GS','BWGS','FBGS','JACOBI','L1-JACOBI','L1-FBGS')
|
||||
! do nothing
|
||||
@@ -581,6 +591,8 @@ contains
|
||||
! First smoother / 1-lev preconditioner
|
||||
call read_data(prec%smther,inp_unit) ! smoother type
|
||||
call read_data(prec%jsweeps,inp_unit) ! (pre-)smoother / 1-lev prec sweeps
|
||||
call read_data(prec%degree,inp_unit) ! (pre-)smoother / 1-lev prec sweeps
|
||||
call read_data(prec%pvariant,inp_unit) !
|
||||
call read_data(prec%novr,inp_unit) ! number of overlap layers
|
||||
call read_data(prec%restr,inp_unit) ! restriction over application of AS
|
||||
call read_data(prec%prol,inp_unit) ! prolongation over application of AS
|
||||
@@ -593,11 +605,13 @@ contains
|
||||
! Second smoother/ AMG post-smoother (if NONE ignored in main)
|
||||
call read_data(prec%smther2,inp_unit) ! smoother type
|
||||
call read_data(prec%jsweeps2,inp_unit) ! (post-)smoother sweeps
|
||||
call read_data(prec%degree2,inp_unit) ! (post-)smoother sweeps
|
||||
call read_data(prec%pvariant2,inp_unit) !
|
||||
call read_data(prec%novr2,inp_unit) ! number of overlap layers
|
||||
call read_data(prec%restr2,inp_unit) ! restriction over application of AS
|
||||
call read_data(prec%prol2,inp_unit) ! prolongation over application of AS
|
||||
call read_data(prec%solve2,inp_unit) ! local subsolver
|
||||
call read_data(prec%ssweeps2,inp_unit) ! inner solver sweeps
|
||||
call read_data(prec%ssweeps2,inp_unit) ! inner solver sweeps
|
||||
call read_data(prec%variant2,inp_unit) ! AINV variant
|
||||
call read_data(prec%fill2,inp_unit) ! fill-in for incomplete LU
|
||||
call read_data(prec%invfill2,inp_unit) !Inverse fill-in for INVK
|
||||
@@ -663,6 +677,8 @@ contains
|
||||
! broadcast first (pre-)smoother / 1-lev prec data
|
||||
call psb_bcast(ctxt,prec%smther)
|
||||
call psb_bcast(ctxt,prec%jsweeps)
|
||||
call psb_bcast(ctxt,prec%degree)
|
||||
call psb_bcast(ctxt,prec%pvariant)
|
||||
call psb_bcast(ctxt,prec%novr)
|
||||
call psb_bcast(ctxt,prec%restr)
|
||||
call psb_bcast(ctxt,prec%prol)
|
||||
@@ -675,6 +691,8 @@ contains
|
||||
! broadcast second (post-)smoother
|
||||
call psb_bcast(ctxt,prec%smther2)
|
||||
call psb_bcast(ctxt,prec%jsweeps2)
|
||||
call psb_bcast(ctxt,prec%degree2)
|
||||
call psb_bcast(ctxt,prec%pvariant2)
|
||||
call psb_bcast(ctxt,prec%novr2)
|
||||
call psb_bcast(ctxt,prec%restr2)
|
||||
call psb_bcast(ctxt,prec%prol2)
|
||||
|
||||
@@ -145,6 +145,8 @@ program amg_d_pde3d
|
||||
! AMG smoother or pre-smoother; also 1-lev preconditioner
|
||||
character(len=32) :: smther ! (pre-)smoother type: BJAC, AS
|
||||
integer(psb_ipk_) :: jsweeps ! (pre-)smoother / 1-lev prec. sweeps
|
||||
integer(psb_ipk_) :: degree ! degree for polynomial smoother
|
||||
character(len=32) :: pvariant ! polynomial variant
|
||||
integer(psb_ipk_) :: novr ! number of overlap layers
|
||||
character(len=32) :: restr ! restriction over application of AS
|
||||
character(len=32) :: prol ! prolongation over application of AS
|
||||
@@ -159,6 +161,8 @@ program amg_d_pde3d
|
||||
! AMG post-smoother; ignored by 1-lev preconditioner
|
||||
character(len=32) :: smther2 ! post-smoother type: BJAC, AS
|
||||
integer(psb_ipk_) :: jsweeps2 ! post-smoother sweeps
|
||||
integer(psb_ipk_) :: degree2 ! degree for polynomial smoother
|
||||
character(len=32) :: pvariant2 ! polynomial variant
|
||||
integer(psb_ipk_) :: novr2 ! number of overlap layers
|
||||
character(len=32) :: restr2 ! restriction over application of AS
|
||||
character(len=32) :: prol2 ! prolongation over application of AS
|
||||
@@ -198,7 +202,7 @@ program amg_d_pde3d
|
||||
! other variables
|
||||
integer(psb_ipk_) :: info, i, k
|
||||
character(len=20) :: name,ch_err
|
||||
type(psb_d_csr_sparse_mat) :: amold
|
||||
|
||||
info=psb_success_
|
||||
|
||||
|
||||
@@ -289,10 +293,12 @@ program amg_d_pde3d
|
||||
! 1-level sweeps from "outer_sweeps"
|
||||
call prec%set('smoother_sweeps', p_choice%jsweeps, info)
|
||||
|
||||
case ('BJAC')
|
||||
case ('BJAC','POLY')
|
||||
call prec%set('smoother_sweeps', p_choice%jsweeps, info)
|
||||
call prec%set('sub_solve', p_choice%solve, info)
|
||||
call prec%set('solver_sweeps', p_choice%ssweeps, info)
|
||||
call prec%set('poly_degree', p_choice%degree, info)
|
||||
call prec%set('poly_variant', p_choice%pvariant, info)
|
||||
if (psb_toupper(p_choice%solve)=='MUMPS') &
|
||||
& call prec%set('mumps_loc_glob','local_solver',info)
|
||||
call prec%set('sub_fillin', p_choice%fill, info)
|
||||
@@ -340,7 +346,9 @@ program amg_d_pde3d
|
||||
|
||||
call prec%set('smoother_type', p_choice%smther, info)
|
||||
call prec%set('smoother_sweeps', p_choice%jsweeps, info)
|
||||
|
||||
call prec%set('poly_degree', p_choice%degree, info)
|
||||
call prec%set('poly_variant', p_choice%pvariant, info)
|
||||
|
||||
select case (psb_toupper(p_choice%smther))
|
||||
case ('GS','BWGS','FBGS','JACOBI','L1-JACOBI','L1-FBGS')
|
||||
! do nothing
|
||||
@@ -370,6 +378,8 @@ program amg_d_pde3d
|
||||
if (psb_toupper(p_choice%smther2) /= 'NONE') then
|
||||
call prec%set('smoother_type', p_choice%smther2, info,pos='post')
|
||||
call prec%set('smoother_sweeps', p_choice%jsweeps2, info,pos='post')
|
||||
call prec%set('poly_degree', p_choice%degree2, info,pos='post')
|
||||
call prec%set('poly_variant', p_choice%pvariant2, info,pos='post')
|
||||
select case (psb_toupper(p_choice%smther2))
|
||||
case ('GS','BWGS','FBGS','JACOBI','L1-JACOBI','L1-FBGS')
|
||||
! do nothing
|
||||
@@ -418,7 +428,7 @@ program amg_d_pde3d
|
||||
end if
|
||||
call psb_barrier(ctxt)
|
||||
t1 = psb_wtime()
|
||||
call prec%smoothers_build(a,desc_a,info,amold=amold)
|
||||
call prec%smoothers_build(a,desc_a,info)
|
||||
tprec = psb_wtime()-t1
|
||||
if (info /= psb_success_) then
|
||||
call psb_errpush(psb_err_from_subroutine_,name,a_err='amg_smoothers_bld')
|
||||
@@ -585,6 +595,8 @@ contains
|
||||
! First smoother / 1-lev preconditioner
|
||||
call read_data(prec%smther,inp_unit) ! smoother type
|
||||
call read_data(prec%jsweeps,inp_unit) ! (pre-)smoother / 1-lev prec sweeps
|
||||
call read_data(prec%degree,inp_unit) ! (pre-)smoother / 1-lev prec sweeps
|
||||
call read_data(prec%pvariant,inp_unit) !
|
||||
call read_data(prec%novr,inp_unit) ! number of overlap layers
|
||||
call read_data(prec%restr,inp_unit) ! restriction over application of AS
|
||||
call read_data(prec%prol,inp_unit) ! prolongation over application of AS
|
||||
@@ -597,11 +609,13 @@ contains
|
||||
! Second smoother/ AMG post-smoother (if NONE ignored in main)
|
||||
call read_data(prec%smther2,inp_unit) ! smoother type
|
||||
call read_data(prec%jsweeps2,inp_unit) ! (post-)smoother sweeps
|
||||
call read_data(prec%degree2,inp_unit) ! (post-)smoother sweeps
|
||||
call read_data(prec%pvariant2,inp_unit) !
|
||||
call read_data(prec%novr2,inp_unit) ! number of overlap layers
|
||||
call read_data(prec%restr2,inp_unit) ! restriction over application of AS
|
||||
call read_data(prec%prol2,inp_unit) ! prolongation over application of AS
|
||||
call read_data(prec%solve2,inp_unit) ! local subsolver
|
||||
call read_data(prec%ssweeps2,inp_unit) ! inner solver sweeps
|
||||
call read_data(prec%ssweeps2,inp_unit) ! inner solver sweeps
|
||||
call read_data(prec%variant2,inp_unit) ! AINV variant
|
||||
call read_data(prec%fill2,inp_unit) ! fill-in for incomplete LU
|
||||
call read_data(prec%invfill2,inp_unit) !Inverse fill-in for INVK
|
||||
@@ -667,6 +681,8 @@ contains
|
||||
! broadcast first (pre-)smoother / 1-lev prec data
|
||||
call psb_bcast(ctxt,prec%smther)
|
||||
call psb_bcast(ctxt,prec%jsweeps)
|
||||
call psb_bcast(ctxt,prec%degree)
|
||||
call psb_bcast(ctxt,prec%pvariant)
|
||||
call psb_bcast(ctxt,prec%novr)
|
||||
call psb_bcast(ctxt,prec%restr)
|
||||
call psb_bcast(ctxt,prec%prol)
|
||||
@@ -679,6 +695,8 @@ contains
|
||||
! broadcast second (post-)smoother
|
||||
call psb_bcast(ctxt,prec%smther2)
|
||||
call psb_bcast(ctxt,prec%jsweeps2)
|
||||
call psb_bcast(ctxt,prec%degree2)
|
||||
call psb_bcast(ctxt,prec%pvariant2)
|
||||
call psb_bcast(ctxt,prec%novr2)
|
||||
call psb_bcast(ctxt,prec%restr2)
|
||||
call psb_bcast(ctxt,prec%prol2)
|
||||
|
||||
@@ -126,24 +126,26 @@ program amg_s_pde2d
|
||||
! AMG cycles for ML
|
||||
! general AMG data
|
||||
character(len=32) :: mlcycle ! AMG cycle type
|
||||
integer(psb_ipk_) :: maxlevs ! maximum number of levels in AMG preconditioner
|
||||
integer(psb_ipk_) :: maxlevs ! maximum number of levels in AMG preconditioner
|
||||
|
||||
! AMG aggregation
|
||||
character(len=32) :: aggr_prol ! aggregation type: SMOOTHED, NONSMOOTHED
|
||||
character(len=32) :: par_aggr_alg ! parallel aggregation algorithm: DEC, SYMDEC
|
||||
character(len=32) :: aggr_type ! Type of aggregation SOC1, SOC2, MATCHBOXP
|
||||
integer(psb_ipk_) :: aggr_size ! Requested size of the aggregates for MATCHBOXP
|
||||
character(len=32) :: aggr_ord ! ordering for aggregation: NATURAL, DEGREE
|
||||
character(len=32) :: aggr_filter ! filtering: FILTER, NO_FILTER
|
||||
real(psb_spk_) :: mncrratio ! minimum aggregation ratio
|
||||
character(len=32) :: aggr_type ! Type of aggregation SOC1, SOC2, MATCHBOXP
|
||||
integer(psb_ipk_) :: aggr_size ! Requested size of the aggregates for MATCHBOXP
|
||||
character(len=32) :: aggr_ord ! ordering for aggregation: NATURAL, DEGREE
|
||||
character(len=32) :: aggr_filter ! filtering: FILTER, NO_FILTER
|
||||
real(psb_spk_) :: mncrratio ! minimum aggregation ratio
|
||||
real(psb_spk_), allocatable :: athresv(:) ! smoothed aggregation threshold vector
|
||||
integer(psb_ipk_) :: thrvsz ! size of threshold vector
|
||||
real(psb_spk_) :: athres ! smoothed aggregation threshold
|
||||
integer(psb_ipk_) :: csizepp ! minimum size of coarsest matrix per process
|
||||
integer(psb_ipk_) :: thrvsz ! size of threshold vector
|
||||
real(psb_spk_) :: athres ! smoothed aggregation threshold
|
||||
integer(psb_ipk_) :: csizepp ! minimum size of coarsest matrix per process
|
||||
|
||||
! AMG smoother or pre-smoother; also 1-lev preconditioner
|
||||
character(len=32) :: smther ! (pre-)smoother type: BJAC, AS
|
||||
integer(psb_ipk_) :: jsweeps ! (pre-)smoother / 1-lev prec. sweeps
|
||||
integer(psb_ipk_) :: degree ! degree for polynomial smoother
|
||||
character(len=32) :: pvariant ! polynomial variant
|
||||
integer(psb_ipk_) :: novr ! number of overlap layers
|
||||
character(len=32) :: restr ! restriction over application of AS
|
||||
character(len=32) :: prol ! prolongation over application of AS
|
||||
@@ -158,6 +160,8 @@ program amg_s_pde2d
|
||||
! AMG post-smoother; ignored by 1-lev preconditioner
|
||||
character(len=32) :: smther2 ! post-smoother type: BJAC, AS
|
||||
integer(psb_ipk_) :: jsweeps2 ! post-smoother sweeps
|
||||
integer(psb_ipk_) :: degree2 ! degree for polynomial smoother
|
||||
character(len=32) :: pvariant2 ! polynomial variant
|
||||
integer(psb_ipk_) :: novr2 ! number of overlap layers
|
||||
character(len=32) :: restr2 ! restriction over application of AS
|
||||
character(len=32) :: prol2 ! prolongation over application of AS
|
||||
@@ -170,15 +174,15 @@ program amg_s_pde2d
|
||||
real(psb_spk_) :: thr2 ! threshold for ILUT factorization
|
||||
|
||||
! coarsest-level solver
|
||||
character(len=32) :: cmat ! coarsest matrix layout: REPL, DIST
|
||||
character(len=32) :: csolve ! coarsest-lev solver: BJAC, SLUDIST (distr.
|
||||
! mat.); UMF, MUMPS, SLU, ILU, ILUT, MILU
|
||||
! (repl. mat.)
|
||||
character(len=32) :: csbsolve ! coarsest-lev local subsolver: ILU, ILUT,
|
||||
! MILU, UMF, MUMPS, SLU
|
||||
integer(psb_ipk_) :: cfill ! fill-in for incomplete LU factorization
|
||||
real(psb_spk_) :: cthres ! threshold for ILUT factorization
|
||||
integer(psb_ipk_) :: cjswp ! sweeps for GS or JAC coarsest-lev subsolver
|
||||
character(len=32) :: cmat ! coarsest matrix layout: REPL, DIST
|
||||
character(len=32) :: csolve ! coarsest-lev solver: BJAC, SLUDIST (distr.
|
||||
! mat.); UMF, MUMPS, SLU, ILU, ILUT, MILU
|
||||
! (repl. mat.)
|
||||
character(len=32) :: csbsolve ! coarsest-lev local subsolver: ILU, ILUT,
|
||||
! MILU, UMF, MUMPS, SLU
|
||||
integer(psb_ipk_) :: cfill ! fill-in for incomplete LU factorization
|
||||
real(psb_spk_) :: cthres ! threshold for ILUT factorization
|
||||
integer(psb_ipk_) :: cjswp ! sweeps for GS or JAC coarsest-lev subsolver
|
||||
|
||||
! Dump data
|
||||
logical :: dump = .false.
|
||||
@@ -285,10 +289,12 @@ program amg_s_pde2d
|
||||
! 1-level sweeps from "outer_sweeps"
|
||||
call prec%set('smoother_sweeps', p_choice%jsweeps, info)
|
||||
|
||||
case ('BJAC')
|
||||
case ('BJAC','POLY')
|
||||
call prec%set('smoother_sweeps', p_choice%jsweeps, info)
|
||||
call prec%set('sub_solve', p_choice%solve, info)
|
||||
call prec%set('solver_sweeps', p_choice%ssweeps, info)
|
||||
call prec%set('poly_degree', p_choice%degree, info)
|
||||
call prec%set('poly_variant', p_choice%pvariant, info)
|
||||
if (psb_toupper(p_choice%solve)=='MUMPS') &
|
||||
& call prec%set('mumps_loc_glob','local_solver',info)
|
||||
call prec%set('sub_fillin', p_choice%fill, info)
|
||||
@@ -312,7 +318,7 @@ program amg_s_pde2d
|
||||
call prec%set('ml_cycle', p_choice%mlcycle, info)
|
||||
call prec%set('outer_sweeps', p_choice%outer_sweeps,info)
|
||||
if (p_choice%csizepp>0)&
|
||||
& call prec%set('min_coarse_size_per_process', p_choice%csizepp, info)
|
||||
& call prec%set('min_coarse_size_per_process', p_choice%csizepp, info)
|
||||
if (p_choice%mncrratio>1)&
|
||||
& call prec%set('min_cr_ratio', p_choice%mncrratio, info)
|
||||
if (p_choice%maxlevs>0)&
|
||||
@@ -336,7 +342,9 @@ program amg_s_pde2d
|
||||
|
||||
call prec%set('smoother_type', p_choice%smther, info)
|
||||
call prec%set('smoother_sweeps', p_choice%jsweeps, info)
|
||||
|
||||
call prec%set('poly_degree', p_choice%degree, info)
|
||||
call prec%set('poly_variant', p_choice%pvariant, info)
|
||||
|
||||
select case (psb_toupper(p_choice%smther))
|
||||
case ('GS','BWGS','FBGS','JACOBI','L1-JACOBI','L1-FBGS')
|
||||
! do nothing
|
||||
@@ -366,6 +374,8 @@ program amg_s_pde2d
|
||||
if (psb_toupper(p_choice%smther2) /= 'NONE') then
|
||||
call prec%set('smoother_type', p_choice%smther2, info,pos='post')
|
||||
call prec%set('smoother_sweeps', p_choice%jsweeps2, info,pos='post')
|
||||
call prec%set('poly_degree', p_choice%degree2, info,pos='post')
|
||||
call prec%set('poly_variant', p_choice%pvariant2, info,pos='post')
|
||||
select case (psb_toupper(p_choice%smther2))
|
||||
case ('GS','BWGS','FBGS','JACOBI','L1-JACOBI','L1-FBGS')
|
||||
! do nothing
|
||||
@@ -581,6 +591,8 @@ contains
|
||||
! First smoother / 1-lev preconditioner
|
||||
call read_data(prec%smther,inp_unit) ! smoother type
|
||||
call read_data(prec%jsweeps,inp_unit) ! (pre-)smoother / 1-lev prec sweeps
|
||||
call read_data(prec%degree,inp_unit) ! (pre-)smoother / 1-lev prec sweeps
|
||||
call read_data(prec%pvariant,inp_unit) !
|
||||
call read_data(prec%novr,inp_unit) ! number of overlap layers
|
||||
call read_data(prec%restr,inp_unit) ! restriction over application of AS
|
||||
call read_data(prec%prol,inp_unit) ! prolongation over application of AS
|
||||
@@ -593,11 +605,13 @@ contains
|
||||
! Second smoother/ AMG post-smoother (if NONE ignored in main)
|
||||
call read_data(prec%smther2,inp_unit) ! smoother type
|
||||
call read_data(prec%jsweeps2,inp_unit) ! (post-)smoother sweeps
|
||||
call read_data(prec%degree2,inp_unit) ! (post-)smoother sweeps
|
||||
call read_data(prec%pvariant2,inp_unit) !
|
||||
call read_data(prec%novr2,inp_unit) ! number of overlap layers
|
||||
call read_data(prec%restr2,inp_unit) ! restriction over application of AS
|
||||
call read_data(prec%prol2,inp_unit) ! prolongation over application of AS
|
||||
call read_data(prec%solve2,inp_unit) ! local subsolver
|
||||
call read_data(prec%ssweeps2,inp_unit) ! inner solver sweeps
|
||||
call read_data(prec%ssweeps2,inp_unit) ! inner solver sweeps
|
||||
call read_data(prec%variant2,inp_unit) ! AINV variant
|
||||
call read_data(prec%fill2,inp_unit) ! fill-in for incomplete LU
|
||||
call read_data(prec%invfill2,inp_unit) !Inverse fill-in for INVK
|
||||
@@ -663,6 +677,8 @@ contains
|
||||
! broadcast first (pre-)smoother / 1-lev prec data
|
||||
call psb_bcast(ctxt,prec%smther)
|
||||
call psb_bcast(ctxt,prec%jsweeps)
|
||||
call psb_bcast(ctxt,prec%degree)
|
||||
call psb_bcast(ctxt,prec%pvariant)
|
||||
call psb_bcast(ctxt,prec%novr)
|
||||
call psb_bcast(ctxt,prec%restr)
|
||||
call psb_bcast(ctxt,prec%prol)
|
||||
@@ -675,6 +691,8 @@ contains
|
||||
! broadcast second (post-)smoother
|
||||
call psb_bcast(ctxt,prec%smther2)
|
||||
call psb_bcast(ctxt,prec%jsweeps2)
|
||||
call psb_bcast(ctxt,prec%degree2)
|
||||
call psb_bcast(ctxt,prec%pvariant2)
|
||||
call psb_bcast(ctxt,prec%novr2)
|
||||
call psb_bcast(ctxt,prec%restr2)
|
||||
call psb_bcast(ctxt,prec%prol2)
|
||||
|
||||
@@ -145,6 +145,8 @@ program amg_s_pde3d
|
||||
! AMG smoother or pre-smoother; also 1-lev preconditioner
|
||||
character(len=32) :: smther ! (pre-)smoother type: BJAC, AS
|
||||
integer(psb_ipk_) :: jsweeps ! (pre-)smoother / 1-lev prec. sweeps
|
||||
integer(psb_ipk_) :: degree ! degree for polynomial smoother
|
||||
character(len=32) :: pvariant ! polynomial variant
|
||||
integer(psb_ipk_) :: novr ! number of overlap layers
|
||||
character(len=32) :: restr ! restriction over application of AS
|
||||
character(len=32) :: prol ! prolongation over application of AS
|
||||
@@ -159,6 +161,8 @@ program amg_s_pde3d
|
||||
! AMG post-smoother; ignored by 1-lev preconditioner
|
||||
character(len=32) :: smther2 ! post-smoother type: BJAC, AS
|
||||
integer(psb_ipk_) :: jsweeps2 ! post-smoother sweeps
|
||||
integer(psb_ipk_) :: degree2 ! degree for polynomial smoother
|
||||
character(len=32) :: pvariant2 ! polynomial variant
|
||||
integer(psb_ipk_) :: novr2 ! number of overlap layers
|
||||
character(len=32) :: restr2 ! restriction over application of AS
|
||||
character(len=32) :: prol2 ! prolongation over application of AS
|
||||
@@ -198,7 +202,7 @@ program amg_s_pde3d
|
||||
! other variables
|
||||
integer(psb_ipk_) :: info, i, k
|
||||
character(len=20) :: name,ch_err
|
||||
type(psb_s_csr_sparse_mat) :: amold
|
||||
|
||||
info=psb_success_
|
||||
|
||||
|
||||
@@ -289,10 +293,12 @@ program amg_s_pde3d
|
||||
! 1-level sweeps from "outer_sweeps"
|
||||
call prec%set('smoother_sweeps', p_choice%jsweeps, info)
|
||||
|
||||
case ('BJAC')
|
||||
case ('BJAC','POLY')
|
||||
call prec%set('smoother_sweeps', p_choice%jsweeps, info)
|
||||
call prec%set('sub_solve', p_choice%solve, info)
|
||||
call prec%set('solver_sweeps', p_choice%ssweeps, info)
|
||||
call prec%set('poly_degree', p_choice%degree, info)
|
||||
call prec%set('poly_variant', p_choice%pvariant, info)
|
||||
if (psb_toupper(p_choice%solve)=='MUMPS') &
|
||||
& call prec%set('mumps_loc_glob','local_solver',info)
|
||||
call prec%set('sub_fillin', p_choice%fill, info)
|
||||
@@ -340,7 +346,9 @@ program amg_s_pde3d
|
||||
|
||||
call prec%set('smoother_type', p_choice%smther, info)
|
||||
call prec%set('smoother_sweeps', p_choice%jsweeps, info)
|
||||
|
||||
call prec%set('poly_degree', p_choice%degree, info)
|
||||
call prec%set('poly_variant', p_choice%pvariant, info)
|
||||
|
||||
select case (psb_toupper(p_choice%smther))
|
||||
case ('GS','BWGS','FBGS','JACOBI','L1-JACOBI','L1-FBGS')
|
||||
! do nothing
|
||||
@@ -370,6 +378,8 @@ program amg_s_pde3d
|
||||
if (psb_toupper(p_choice%smther2) /= 'NONE') then
|
||||
call prec%set('smoother_type', p_choice%smther2, info,pos='post')
|
||||
call prec%set('smoother_sweeps', p_choice%jsweeps2, info,pos='post')
|
||||
call prec%set('poly_degree', p_choice%degree2, info,pos='post')
|
||||
call prec%set('poly_variant', p_choice%pvariant2, info,pos='post')
|
||||
select case (psb_toupper(p_choice%smther2))
|
||||
case ('GS','BWGS','FBGS','JACOBI','L1-JACOBI','L1-FBGS')
|
||||
! do nothing
|
||||
@@ -418,7 +428,7 @@ program amg_s_pde3d
|
||||
end if
|
||||
call psb_barrier(ctxt)
|
||||
t1 = psb_wtime()
|
||||
call prec%smoothers_build(a,desc_a,info,amold=amold)
|
||||
call prec%smoothers_build(a,desc_a,info)
|
||||
tprec = psb_wtime()-t1
|
||||
if (info /= psb_success_) then
|
||||
call psb_errpush(psb_err_from_subroutine_,name,a_err='amg_smoothers_bld')
|
||||
@@ -585,6 +595,8 @@ contains
|
||||
! First smoother / 1-lev preconditioner
|
||||
call read_data(prec%smther,inp_unit) ! smoother type
|
||||
call read_data(prec%jsweeps,inp_unit) ! (pre-)smoother / 1-lev prec sweeps
|
||||
call read_data(prec%degree,inp_unit) ! (pre-)smoother / 1-lev prec sweeps
|
||||
call read_data(prec%pvariant,inp_unit) !
|
||||
call read_data(prec%novr,inp_unit) ! number of overlap layers
|
||||
call read_data(prec%restr,inp_unit) ! restriction over application of AS
|
||||
call read_data(prec%prol,inp_unit) ! prolongation over application of AS
|
||||
@@ -597,11 +609,13 @@ contains
|
||||
! Second smoother/ AMG post-smoother (if NONE ignored in main)
|
||||
call read_data(prec%smther2,inp_unit) ! smoother type
|
||||
call read_data(prec%jsweeps2,inp_unit) ! (post-)smoother sweeps
|
||||
call read_data(prec%degree2,inp_unit) ! (post-)smoother sweeps
|
||||
call read_data(prec%pvariant2,inp_unit) !
|
||||
call read_data(prec%novr2,inp_unit) ! number of overlap layers
|
||||
call read_data(prec%restr2,inp_unit) ! restriction over application of AS
|
||||
call read_data(prec%prol2,inp_unit) ! prolongation over application of AS
|
||||
call read_data(prec%solve2,inp_unit) ! local subsolver
|
||||
call read_data(prec%ssweeps2,inp_unit) ! inner solver sweeps
|
||||
call read_data(prec%ssweeps2,inp_unit) ! inner solver sweeps
|
||||
call read_data(prec%variant2,inp_unit) ! AINV variant
|
||||
call read_data(prec%fill2,inp_unit) ! fill-in for incomplete LU
|
||||
call read_data(prec%invfill2,inp_unit) !Inverse fill-in for INVK
|
||||
@@ -667,6 +681,8 @@ contains
|
||||
! broadcast first (pre-)smoother / 1-lev prec data
|
||||
call psb_bcast(ctxt,prec%smther)
|
||||
call psb_bcast(ctxt,prec%jsweeps)
|
||||
call psb_bcast(ctxt,prec%degree)
|
||||
call psb_bcast(ctxt,prec%pvariant)
|
||||
call psb_bcast(ctxt,prec%novr)
|
||||
call psb_bcast(ctxt,prec%restr)
|
||||
call psb_bcast(ctxt,prec%prol)
|
||||
@@ -679,6 +695,8 @@ contains
|
||||
! broadcast second (post-)smoother
|
||||
call psb_bcast(ctxt,prec%smther2)
|
||||
call psb_bcast(ctxt,prec%jsweeps2)
|
||||
call psb_bcast(ctxt,prec%degree2)
|
||||
call psb_bcast(ctxt,prec%pvariant2)
|
||||
call psb_bcast(ctxt,prec%novr2)
|
||||
call psb_bcast(ctxt,prec%restr2)
|
||||
call psb_bcast(ctxt,prec%prol2)
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
%%%%%%%%%%% General arguments % Lines starting with % are ignored.
|
||||
CSR ! Storage format CSR COO JAD
|
||||
0200 ! IDIM; domain size. Linear system size is IDIM**2
|
||||
CONST ! PDECOEFF: CONST, EXP, BOX Coefficients of the PDE
|
||||
CONST ! PDECOEFF: CONST, EXP, BOX, GAUSS Coefficients of the PDE
|
||||
CG ! Iterative method: BiCGSTAB BiCGSTABL BiCG CG CGS FCG GCR RGMRES
|
||||
2 ! ISTOPC
|
||||
00500 ! ITMAX
|
||||
@@ -9,23 +9,33 @@ CG ! Iterative method: BiCGSTAB BiCGSTABL BiCG CG CGS F
|
||||
30 ! IRST (restart for RGMRES and BiCGSTABL)
|
||||
1.d-6 ! EPS
|
||||
%%%%%%%%%%% Main preconditioner choices %%%%%%%%%%%%%%%%
|
||||
ML-VCYCLE-BJAC-D-BJAC ! Longer descriptive name for preconditioner (up to 20 chars)
|
||||
ML ! Preconditioner type: NONE JACOBI GS FBGS BJAC AS ML
|
||||
ML-VBM-VCYCLE-FBGS-D-BJAC ! Longer descriptive name for preconditioner (up to 20 chars)
|
||||
ML ! Preconditioner type: NONE JACOBI GS FBGS BJAC AS ML POLY
|
||||
%
|
||||
%%%%%%%%%%% First smoother (for all levels but coarsest) %%%%%%%%%%%%%%%%
|
||||
BJAC ! Smoother type JACOBI FBGS GS BWGS BJAC AS. For 1-level, repeats previous.
|
||||
1 ! Number of sweeps for smoother
|
||||
FBGS ! Smoother type JACOBI FBGS GS BWGS BJAC AS POLY r 1-level, repeats previous.
|
||||
6 ! Number of sweeps for smoother
|
||||
1 ! degree for polynomial smoother
|
||||
POLY_LOTTES_BETA ! Polynomial variant
|
||||
% Fields to be added for POLY
|
||||
% POLY_RHO_ESTIMATE Currently only POLY_RHO_EST_POWER
|
||||
% POLY_RHO_ESTIMATE_ITERATIONS default = 20
|
||||
% POLY_RHO_BA set to value
|
||||
%
|
||||
0 ! Number of overlap layers for AS preconditioner
|
||||
HALO ! AS restriction operator: NONE HALO
|
||||
NONE ! AS prolongation operator: NONE SUM AVG
|
||||
ILU ! Subdomain solver for BJAC/AS: JACOBI GS BGS ILU ILUT MILU MUMPS SLU UMF
|
||||
8 ! Inner solver sweeps (GS and JACOBI)
|
||||
LLK ! AINV variant, ignored otherwise
|
||||
L1-JACOBI ! Subdomain solver for BJAC/AS: JACOBI GS BGS ILU ILUT MILU MUMPS SLU UMF
|
||||
1 ! Inner solver sweeps (GS and JACOBI)
|
||||
LLK ! AINV variant
|
||||
0 ! Fill level P for ILU(P) and ILU(T,P)
|
||||
1 ! Inverse Fill level P for INVK
|
||||
1.d-4 ! Threshold T for ILU(T,P)
|
||||
%%%%%%%%%%% Second smoother, always ignored for non-ML %%%%%%%%%%%%%%%%
|
||||
NONE ! Second (post) smoother, ignored if NONE
|
||||
1 ! Number of sweeps for (post) smoother
|
||||
6 ! Number of sweeps for (post) smoother
|
||||
1 ! degree for polynomial smoother
|
||||
POLY_LOTTES_BETA ! Polynomial variant
|
||||
0 ! Number of overlap layers for AS preconditioner
|
||||
HALO ! AS restriction operator: NONE HALO
|
||||
NONE ! AS prolongation operator: NONE SUM AVG
|
||||
|
||||
@@ -1,7 +1,12 @@
|
||||
%%%%%%%%%%% General arguments % Lines starting with % are ignored.
|
||||
CSR ! Storage format CSR COO JAD
|
||||
<<<<<<< HEAD
|
||||
0040 ! IDIM; domain size. Linear system size is IDIM**3
|
||||
CONST ! PDECOEFF: CONST, EXP, GAUSS Coefficients of the PDE
|
||||
=======
|
||||
0150 ! IDIM; domain size. Linear system size is IDIM**3
|
||||
CONST ! PDECOEFF: CONST, EXP, BOX, GAUSS Coefficients of the PDE
|
||||
>>>>>>> PolySmooth
|
||||
CG ! Iterative method: BiCGSTAB BiCGSTABL BiCG CG CGS FCG GCR RGMRES
|
||||
2 ! ISTOPC
|
||||
00008 ! ITMAX
|
||||
@@ -10,27 +15,44 @@ CG ! Iterative method: BiCGSTAB BiCGSTABL BiCG CG CGS F
|
||||
1.d-6 ! EPS
|
||||
%%%%%%%%%%% Main preconditioner choices %%%%%%%%%%%%%%%%
|
||||
ML-VBM-VCYCLE-FBGS-D-BJAC ! Longer descriptive name for preconditioner (up to 20 chars)
|
||||
<<<<<<< HEAD
|
||||
L1-JACOBI ! Preconditioner type: NONE JACOBI GS FBGS BJAC AS ML
|
||||
%%%%%%%%%%% First smoother (for all levels but coarsest) %%%%%%%%%%%%%%%%
|
||||
L1-JACOBI ! Smoother type JACOBI FBGS GS BWGS BJAC AS. For 1-level, repeats previous.
|
||||
4 ! Number of sweeps for smoother
|
||||
=======
|
||||
ML ! Preconditioner type: NONE JACOBI GS FBGS BJAC AS ML POLY
|
||||
%
|
||||
%%%%%%%%%%% First smoother (for all levels but coarsest) %%%%%%%%%%%%%%%%
|
||||
FBGS ! Smoother type JACOBI FBGS GS BWGS BJAC AS POLY r 1-level, repeats previous.
|
||||
6 ! Number of sweeps for smoother
|
||||
1 ! degree for polynomial smoother
|
||||
POLY_LOTTES_BETA ! Polynomial variant
|
||||
% Fields to be added for POLY
|
||||
% POLY_RHO_ESTIMATE Currently only POLY_RHO_EST_POWER
|
||||
% POLY_RHO_ESTIMATE_ITERATIONS default = 20
|
||||
% POLY_RHO_BA set to value
|
||||
%
|
||||
>>>>>>> PolySmooth
|
||||
0 ! Number of overlap layers for AS preconditioner
|
||||
HALO ! AS restriction operator: NONE HALO
|
||||
NONE ! AS prolongation operator: NONE SUM AVG
|
||||
JACOBI ! Subdomain solver for BJAC/AS: JACOBI GS BGS ILU ILUT MILU MUMPS SLU UMF
|
||||
8 ! Inner solver sweeps (GS and JACOBI)
|
||||
L1-JACOBI ! Subdomain solver for BJAC/AS: JACOBI GS BGS ILU ILUT MILU MUMPS SLU UMF
|
||||
1 ! Inner solver sweeps (GS and JACOBI)
|
||||
LLK ! AINV variant
|
||||
0 ! Fill level P for ILU(P) and ILU(T,P)
|
||||
1 ! Inverse Fill level P for INVK
|
||||
1.d-4 ! Threshold T for ILU(T,P)
|
||||
%%%%%%%%%%% Second smoother, always ignored for non-ML %%%%%%%%%%%%%%%%
|
||||
NONE ! Second (post) smoother, ignored if NONE
|
||||
1 ! Number of sweeps for (post) smoother
|
||||
6 ! Number of sweeps for (post) smoother
|
||||
1 ! degree for polynomial smoother
|
||||
POLY_LOTTES_BETA ! Polynomial variant
|
||||
0 ! Number of overlap layers for AS preconditioner
|
||||
HALO ! AS restriction operator: NONE HALO
|
||||
NONE ! AS prolongation operator: NONE SUM AVG
|
||||
ILU ! Subdomain solver for BJAC/AS: JACOBI GS BGS ILU ILUT MILU MUMPS SLU UMF
|
||||
8 ! Inner solver sweeps (GS and JACOBI)
|
||||
L1-JACOBI ! Subdomain solver for BJAC/AS: JACOBI GS BGS ILU ILUT MILU MUMPS SLU UMF
|
||||
1 ! Inner solver sweeps (GS and JACOBI)
|
||||
LLK ! AINV variant
|
||||
0 ! Fill level P for ILU(P) and ILU(T,P)
|
||||
8 ! Inverse Fill level P for INVK
|
||||
|
||||
Reference in New Issue
Block a user