mirror of
https://github.com/sfilippone/amg4psblas.git
synced 2026-10-06 22:55:12 +00:00
mld2p4-smooth-2side:
tests/fileread/cf_sample.f90 tests/fileread/df_sample.f90 tests/fileread/runs/cfs.inp tests/fileread/runs/dfs.inp tests/fileread/runs/sfs.inp tests/fileread/runs/zfs.inp tests/fileread/sf_sample.f90 tests/fileread/zf_sample.f90 Aligned test cases.
This commit is contained in:
@@ -62,6 +62,7 @@ program cf_sample
|
||||
integer(psb_ipk_) :: nlev ! number of levels in multilevel prec.
|
||||
character(len=16) :: aggrkind ! smoothed, raw aggregation
|
||||
character(len=16) :: aggr_alg ! aggregation algorithm (currently only decoupled)
|
||||
character(len=16) :: aggr_ord ! Ordering for aggregation
|
||||
character(len=16) :: mltype ! additive or multiplicative multi-level prec
|
||||
character(len=16) :: smthpos ! side: pre, post, both smoothing
|
||||
character(len=16) :: cmat ! coarse mat: distributed, replicated
|
||||
@@ -71,6 +72,7 @@ program cf_sample
|
||||
real(psb_spk_) :: cthres ! threshold for coarse fact. ILU(T)
|
||||
integer(psb_ipk_) :: cjswp ! block-Jacobi sweeps
|
||||
real(psb_spk_) :: athres ! smoothed aggregation threshold
|
||||
real(psb_spk_) :: ascale ! smoothed aggregation scale factor
|
||||
end type precdata
|
||||
type(precdata) :: prec_choice
|
||||
|
||||
@@ -260,12 +262,14 @@ program cf_sample
|
||||
call mld_precset(prec,mld_sub_restr_, prec_choice%restr, info)
|
||||
call mld_precset(prec,mld_sub_prol_, prec_choice%prol, info)
|
||||
call mld_precset(prec,mld_sub_solve_, prec_choice%solve, info)
|
||||
call mld_precset(prec,mld_sub_fillin_, prec_choice%fill, info)
|
||||
call mld_precset(prec,mld_sub_iluthrs_, prec_choice%thr, info)
|
||||
call mld_precset(prec,mld_sub_fillin_, prec_choice%fill, info)
|
||||
call mld_precset(prec,mld_sub_iluthrs_, prec_choice%thr, info)
|
||||
call mld_precset(prec,mld_aggr_kind_, prec_choice%aggrkind,info)
|
||||
call mld_precset(prec,mld_aggr_alg_, prec_choice%aggr_alg,info)
|
||||
call mld_precset(prec,mld_aggr_ord_, prec_choice%aggr_ord,info)
|
||||
call mld_precset(prec,mld_ml_type_, prec_choice%mltype, info)
|
||||
call mld_precset(prec,mld_smoother_pos_, prec_choice%smthpos, info)
|
||||
call mld_precset(prec,mld_aggr_scale_, prec_choice%ascale, info)
|
||||
call mld_precset(prec,mld_aggr_thresh_, prec_choice%athres, info)
|
||||
call mld_precset(prec,mld_coarse_solve_, prec_choice%csolve, info)
|
||||
call mld_precset(prec,mld_coarse_subsolve_, prec_choice%csbsolve,info)
|
||||
@@ -276,15 +280,16 @@ program cf_sample
|
||||
else
|
||||
nlv = 1
|
||||
call mld_precinit(prec,prec_choice%prec,info)
|
||||
call mld_precset(prec,mld_smoother_sweeps_, prec_choice%jsweeps, info)
|
||||
call mld_precset(prec,mld_sub_ovr_, prec_choice%novr, info)
|
||||
call mld_precset(prec,mld_sub_restr_, prec_choice%restr, info)
|
||||
call mld_precset(prec,mld_sub_prol_, prec_choice%prol, info)
|
||||
call mld_precset(prec,mld_sub_solve_, prec_choice%solve, info)
|
||||
call mld_precset(prec,mld_sub_fillin_, prec_choice%fill, info)
|
||||
call mld_precset(prec,mld_sub_iluthrs_, prec_choice%thr, info)
|
||||
if (psb_toupper(prec_choice%prec) /= 'NONE') then
|
||||
call mld_precset(prec,mld_smoother_sweeps_, prec_choice%jsweeps, info)
|
||||
call mld_precset(prec,mld_sub_ovr_, prec_choice%novr, info)
|
||||
call mld_precset(prec,mld_sub_restr_, prec_choice%restr, info)
|
||||
call mld_precset(prec,mld_sub_prol_, prec_choice%prol, info)
|
||||
call mld_precset(prec,mld_sub_solve_, prec_choice%solve, info)
|
||||
call mld_precset(prec,mld_sub_fillin_, prec_choice%fill, info)
|
||||
call mld_precset(prec,mld_sub_iluthrs_, prec_choice%thr, info)
|
||||
end if
|
||||
end if
|
||||
|
||||
! building the preconditioner
|
||||
t1 = psb_wtime()
|
||||
call mld_precbld(a,desc_a,prec,info)
|
||||
@@ -336,6 +341,8 @@ program cf_sample
|
||||
write(psb_out_unit,'("Total memory occupation for A : ",i12)')amatsize
|
||||
write(psb_out_unit,'("Total memory occupation for DESC_A : ",i12)')descsize
|
||||
write(psb_out_unit,'("Total memory occupation for PREC : ",i12)')precsize
|
||||
write(psb_out_unit,'("Storage format for A : ",a )')a%get_fmt()
|
||||
write(psb_out_unit,'("Storage format for DESC_A : ",a )')desc_a%get_fmt()
|
||||
end if
|
||||
|
||||
call psb_gather(x_col_glob,x_col,desc_a,info,root=psb_root_)
|
||||
@@ -366,6 +373,7 @@ program cf_sample
|
||||
call psb_spfree(a, desc_a,info)
|
||||
call mld_precfree(prec,info)
|
||||
call psb_cdfree(desc_a,info)
|
||||
|
||||
call psb_exit(ictxt)
|
||||
stop
|
||||
|
||||
@@ -418,15 +426,17 @@ contains
|
||||
call read_data(prec%smther,psb_inp_unit) ! Smoother type.
|
||||
call read_data(prec%aggrkind,psb_inp_unit) ! smoothed/raw aggregatin
|
||||
call read_data(prec%aggr_alg,psb_inp_unit) ! local or global aggregation
|
||||
call read_data(prec%aggr_ord,psb_inp_unit) ! Ordering for aggregation
|
||||
call read_data(prec%mltype,psb_inp_unit) ! additive or multiplicative 2nd level prec
|
||||
call read_data(prec%smthpos,psb_inp_unit) ! side: pre, post, both smoothing
|
||||
call read_data(prec%cmat,psb_inp_unit) ! coarse mat
|
||||
call read_data(prec%csolve,psb_inp_unit) ! Factorization type: ILU, SuperLU, UMFPACK.
|
||||
call read_data(prec%csolve,psb_inp_unit) ! Factorization type: BJAC, SuperLU, UMFPACK.
|
||||
call read_data(prec%csbsolve,psb_inp_unit) ! Factorization type: ILU, SuperLU, UMFPACK.
|
||||
call read_data(prec%cfill,psb_inp_unit) ! Fill-in for factorization
|
||||
call read_data(prec%cthres,psb_inp_unit) ! Threshold for fact. ILU(T)
|
||||
call read_data(prec%cjswp,psb_inp_unit) ! Jacobi sweeps
|
||||
call read_data(prec%athres,psb_inp_unit) ! smoother aggr thresh
|
||||
call read_data(prec%ascale,psb_inp_unit) ! smoother aggr thresh
|
||||
end if
|
||||
end if
|
||||
|
||||
@@ -441,7 +451,6 @@ contains
|
||||
call psb_bcast(icontxt,itrace)
|
||||
call psb_bcast(icontxt,irst)
|
||||
call psb_bcast(icontxt,eps)
|
||||
|
||||
call psb_bcast(icontxt,prec%descr) ! verbose description of the prec
|
||||
call psb_bcast(icontxt,prec%prec) ! overall prectype
|
||||
call psb_bcast(icontxt,prec%novr) ! number of overlap layers
|
||||
@@ -456,6 +465,7 @@ contains
|
||||
call psb_bcast(icontxt,prec%nlev) ! Number of levels in multilevel prec.
|
||||
call psb_bcast(icontxt,prec%aggrkind) ! smoothed/raw aggregatin
|
||||
call psb_bcast(icontxt,prec%aggr_alg) ! local or global aggregation
|
||||
call psb_bcast(icontxt,prec%aggr_ord) ! Ordering for aggregation
|
||||
call psb_bcast(icontxt,prec%mltype) ! additive or multiplicative 2nd level prec
|
||||
call psb_bcast(icontxt,prec%smthpos) ! side: pre, post, both smoothing
|
||||
call psb_bcast(icontxt,prec%cmat) ! coarse mat
|
||||
@@ -465,6 +475,7 @@ contains
|
||||
call psb_bcast(icontxt,prec%cthres) ! Threshold for fact. ILU(T)
|
||||
call psb_bcast(icontxt,prec%cjswp) ! Jacobi sweeps
|
||||
call psb_bcast(icontxt,prec%athres) ! smoother aggr thresh
|
||||
call psb_bcast(icontxt,prec%ascale) ! smoother aggr scale factor
|
||||
end if
|
||||
|
||||
end subroutine get_parms
|
||||
|
||||
@@ -62,6 +62,7 @@ program df_sample
|
||||
integer(psb_ipk_) :: nlev ! number of levels in multilevel prec.
|
||||
character(len=16) :: aggrkind ! smoothed, raw aggregation
|
||||
character(len=16) :: aggr_alg ! aggregation algorithm (currently only decoupled)
|
||||
character(len=16) :: aggr_ord ! Ordering for aggregation
|
||||
character(len=16) :: mltype ! additive or multiplicative multi-level prec
|
||||
character(len=16) :: smthpos ! side: pre, post, both smoothing
|
||||
character(len=16) :: cmat ! coarse mat: distributed, replicated
|
||||
@@ -74,8 +75,6 @@ program df_sample
|
||||
real(psb_dpk_) :: ascale ! smoothed aggregation scale factor
|
||||
end type precdata
|
||||
type(precdata) :: prec_choice
|
||||
type(mld_d_jac_smoother_type) :: dbsmth
|
||||
type(mld_d_bwgs_solver_type) :: dbwgs
|
||||
|
||||
! sparse matrices
|
||||
type(psb_dspmat_type) :: a, aux_a
|
||||
@@ -106,12 +105,12 @@ program df_sample
|
||||
character(len=40) :: fprefix
|
||||
|
||||
! other variables
|
||||
integer(psb_ipk_) :: i,info,j,m_problem, lbw,ubw,prf
|
||||
integer(psb_ipk_) :: internal, m,ii,nnzero
|
||||
real(psb_dpk_) :: t1, t2, tprec
|
||||
real(psb_dpk_) :: r_amax, b_amax, scale,resmx,resmxp
|
||||
integer(psb_ipk_) :: nrhs, nrow, n_row, dim, nv, ne
|
||||
integer(psb_ipk_), allocatable :: ivg(:), ipv(:),perm(:)
|
||||
integer(psb_ipk_) :: i,info,j,m_problem
|
||||
integer(psb_ipk_) :: internal, m,ii,nnzero
|
||||
real(psb_dpk_) :: t1, t2, tprec
|
||||
real(psb_dpk_) :: r_amax, b_amax, scale,resmx,resmxp
|
||||
integer(psb_ipk_) :: nrhs, nrow, n_row, dim, nv, ne
|
||||
integer(psb_ipk_), allocatable :: ivg(:), ipv(:)
|
||||
|
||||
call psb_init(ictxt)
|
||||
call psb_info(ictxt,iam,np)
|
||||
@@ -127,7 +126,6 @@ program df_sample
|
||||
if(psb_get_errstatus() /= 0) goto 9999
|
||||
info=psb_success_
|
||||
call psb_set_errverbosity(itwo)
|
||||
call psb_cd_set_large_threshold(itwo)
|
||||
!
|
||||
! Hello world
|
||||
!
|
||||
@@ -194,6 +192,7 @@ program df_sample
|
||||
b_col_glob(i) = 1.d0
|
||||
enddo
|
||||
endif
|
||||
call psb_bcast(ictxt,b_col_glob(1:m_problem))
|
||||
else
|
||||
call psb_bcast(ictxt,m_problem)
|
||||
call psb_realloc(m_problem,1,aux_b,ircode)
|
||||
@@ -202,35 +201,9 @@ program df_sample
|
||||
goto 9999
|
||||
endif
|
||||
b_col_glob =>aux_b(:,1)
|
||||
call psb_bcast(ictxt,b_col_glob(1:m_problem))
|
||||
end if
|
||||
|
||||
!
|
||||
! Renumbering?
|
||||
!
|
||||
if (iam==psb_root_) then
|
||||
renum='NONE'
|
||||
call psb_cmp_bwpf(aux_a,lbw,ubw,prf,info)
|
||||
write(*,*) 'Bandwidth and profile (original): ',lbw,ubw,prf
|
||||
write(*,*) 'Renumbering algorithm : ',psb_toupper(renum)
|
||||
if (trim(psb_toupper(renum))/='NONE') then
|
||||
call psb_mat_renum(renum,aux_a,info,perm=perm)
|
||||
if (info /= 0) then
|
||||
write(0,*) 'Error from RENUM',info
|
||||
goto 9999
|
||||
end if
|
||||
|
||||
call psb_gelp('N',perm(1:m_problem),&
|
||||
& b_col_glob(1:m_problem),info)
|
||||
call psb_cmp_bwpf(aux_a,lbw,ubw,prf,info)
|
||||
end if
|
||||
|
||||
write(*,*) 'Bandwidth and profile (renumbrd):',lbw,ubw,prf
|
||||
end if
|
||||
|
||||
call psb_bcast(ictxt,b_col_glob(1:m_problem))
|
||||
|
||||
call aux_a%clean_zeros(info)
|
||||
|
||||
! switch over different partition types
|
||||
if (ipart == 0) then
|
||||
call psb_barrier(ictxt)
|
||||
@@ -283,7 +256,6 @@ program df_sample
|
||||
if (psb_toupper(prec_choice%prec) == 'ML') then
|
||||
nlv = prec_choice%nlev
|
||||
call mld_precinit(prec,prec_choice%prec,info,nlev=nlv)
|
||||
|
||||
call mld_precset(prec,mld_smoother_type_, prec_choice%smther, info)
|
||||
call mld_precset(prec,mld_smoother_sweeps_, prec_choice%jsweeps, info)
|
||||
call mld_precset(prec,mld_sub_ovr_, prec_choice%novr, info)
|
||||
@@ -294,22 +266,17 @@ program df_sample
|
||||
call mld_precset(prec,mld_sub_iluthrs_, prec_choice%thr, info)
|
||||
call mld_precset(prec,mld_aggr_kind_, prec_choice%aggrkind,info)
|
||||
call mld_precset(prec,mld_aggr_alg_, prec_choice%aggr_alg,info)
|
||||
call mld_precset(prec,mld_aggr_ord_, prec_choice%aggr_ord,info)
|
||||
call mld_precset(prec,mld_ml_type_, prec_choice%mltype, info)
|
||||
call mld_precset(prec,mld_smoother_pos_, prec_choice%smthpos, info)
|
||||
call mld_precset(prec,mld_aggr_scale_, prec_choice%ascale, info)
|
||||
call mld_precset(prec,mld_aggr_thresh_, prec_choice%athres, info)
|
||||
call mld_precset(prec,mld_coarse_solve_, prec_choice%csolve, info)
|
||||
call mld_precset(prec,mld_coarse_sweeps_, 4, info)
|
||||
call mld_precset(prec,mld_coarse_subsolve_, prec_choice%csbsolve,info)
|
||||
call mld_precset(prec,mld_coarse_mat_, prec_choice%cmat, info)
|
||||
call mld_precset(prec,mld_coarse_fillin_, prec_choice%cfill, info)
|
||||
call mld_precset(prec,mld_coarse_iluthrs_, prec_choice%cthres, info)
|
||||
call mld_precset(prec,mld_coarse_sweeps_, prec_choice%cjswp, info)
|
||||
call prec%set(dbsmth,info,pos='post')
|
||||
call prec%set('sub_solve','gs',info,pos='post')
|
||||
call prec%set('sub_solve','bwgs',info,pos='pre')
|
||||
call mld_precset(prec,'solver_sweeps', 4, info, pos='pre')
|
||||
call mld_precset(prec,'solver_sweeps', 4, info, pos='post')
|
||||
else
|
||||
nlv = 1
|
||||
call mld_precinit(prec,prec_choice%prec,info)
|
||||
@@ -339,11 +306,6 @@ program df_sample
|
||||
write(psb_out_unit,'(" ")')
|
||||
end if
|
||||
|
||||
write(fprefix,'(a,i3.3,a,i3.3)') 'proc-',iam,'-',np
|
||||
call prec%dump(info,head='Pressure test case',ac=.true.)
|
||||
|
||||
|
||||
|
||||
iparm = 0
|
||||
call psb_barrier(ictxt)
|
||||
t1 = psb_wtime()
|
||||
@@ -418,7 +380,6 @@ program df_sample
|
||||
9999 continue
|
||||
call psb_error(ictxt)
|
||||
|
||||
|
||||
contains
|
||||
!
|
||||
! get iteration parameters from standard input
|
||||
@@ -465,6 +426,7 @@ contains
|
||||
call read_data(prec%smther,psb_inp_unit) ! Smoother type.
|
||||
call read_data(prec%aggrkind,psb_inp_unit) ! smoothed/raw aggregatin
|
||||
call read_data(prec%aggr_alg,psb_inp_unit) ! local or global aggregation
|
||||
call read_data(prec%aggr_ord,psb_inp_unit) ! Ordering for aggregation
|
||||
call read_data(prec%mltype,psb_inp_unit) ! additive or multiplicative 2nd level prec
|
||||
call read_data(prec%smthpos,psb_inp_unit) ! side: pre, post, both smoothing
|
||||
call read_data(prec%cmat,psb_inp_unit) ! coarse mat
|
||||
@@ -503,6 +465,7 @@ contains
|
||||
call psb_bcast(icontxt,prec%nlev) ! Number of levels in multilevel prec.
|
||||
call psb_bcast(icontxt,prec%aggrkind) ! smoothed/raw aggregatin
|
||||
call psb_bcast(icontxt,prec%aggr_alg) ! local or global aggregation
|
||||
call psb_bcast(icontxt,prec%aggr_ord) ! Ordering for aggregation
|
||||
call psb_bcast(icontxt,prec%mltype) ! additive or multiplicative 2nd level prec
|
||||
call psb_bcast(icontxt,prec%smthpos) ! side: pre, post, both smoothing
|
||||
call psb_bcast(icontxt,prec%cmat) ! coarse mat
|
||||
|
||||
@@ -10,24 +10,26 @@ CSR ! Storage format: CSR COO JAD
|
||||
30 ! IRST (restart for RGMRES and BiCGSTABL)
|
||||
1.d-5 ! EPS
|
||||
3L-M-RAS-I-D4 ! Longer descriptive name for preconditioner (up to 20 chars)
|
||||
ML ! Preconditioner type: NONE DIAG BJAC AS ML
|
||||
ML ! Preconditioner type: NONE JACOBI BJAC AS ML
|
||||
0 ! Number of overlap layers for AS preconditioner
|
||||
HALO ! AS restriction operator: NONE HALO
|
||||
NONE ! AS prolongation operator: NONE SUM AVG
|
||||
ILU ! AS subdomain solver: ILU MILU ILUT UMF SLU MUMPS
|
||||
ILU ! AS subdomain solver: DSCALE ILU MILU ILUT UMF SLU MUMPS
|
||||
1 ! Fill level P for ILU(P) and ILU(T,P)
|
||||
1.d-4 ! Threshold T for ILU(T,P)
|
||||
1 ! Jacobi sweeps
|
||||
1 ! Jacobi sweeps for base smoother
|
||||
3 ! Number of levels in a multilevel preconditioner
|
||||
AS ! Smoother type JACOBI BJAC AS ignored for non-ML
|
||||
SMOOTHED ! Type of aggregation: SMOOTHED NONSMOOTHED MINENERGY
|
||||
SMOOTHED ! Type of aggregation: SMOOTHED NONSMOOTHED
|
||||
DEC ! Type of aggregation: DEC
|
||||
NATURAL ! Ordering of aggregation NATURAL DEGREE
|
||||
MULT ! Type of multilevel correction: ADD MULT
|
||||
POST ! Side of multiplicative correction PRE POST TWOSIDE (ignored for ADD)
|
||||
DIST ! Coarsest-level matrix distribution: DIST REPL
|
||||
BJAC ! Coarsest-level solver: BJAC UMF SLU SLUDIST MUMPS
|
||||
ILU ! Coarsest-level subsolver: ILU UMF SLU SLUDIST MUMPS
|
||||
REPL ! Coarsest-level matrix distribution: DIST REPL
|
||||
BJAC ! Coarsest-level solver: JACOBI BJAC UMF SLU SLUDIST MUMPS
|
||||
ILU ! Coarsest-level subsolver: ILU UMF SLU MUMPS SLUDIST (DSCALE for JACOBI)
|
||||
0 ! Coarsest-level fillin P for ILU(P) and ILU(T,P)
|
||||
1.d-4 ! Coarsest-level threshold T for ILU(T,P)
|
||||
4 ! Number of Jacobi sweeps for BJAC coarsest-level solver
|
||||
0.10d0 ! Smoothed aggregation threshold: >= 0.0
|
||||
4 ! Number of Jacobi sweeps for BJAC/PJAC coarsest-level solver
|
||||
0.0125d0 ! Smoothed aggregation threshold: >= 0.0
|
||||
0.5 ! Smoothed aggregation scaling factor.
|
||||
|
||||
@@ -9,7 +9,7 @@ CSR ! Storage format: CSR COO JAD
|
||||
01 ! ITRACE
|
||||
30 ! IRST (restart for RGMRES and BiCGSTABL)
|
||||
1.d-6 ! EPS
|
||||
5L-M-RAS-I-UR ! Longer descriptive name for preconditioner (up to 20 chars)
|
||||
4L-M-RAS-I-UR ! Longer descriptive name for preconditioner (up to 20 chars)
|
||||
ML ! Preconditioner type: NONE JACOBI BJAC AS ML
|
||||
0 ! Number of overlap layers for AS preconditioner
|
||||
HALO ! AS restriction operator: NONE HALO
|
||||
@@ -22,12 +22,13 @@ GS ! AS subdomain solver: DSCALE ILU MILU ILUT UMF SLU
|
||||
BJAC ! Smoother type JACOBI BJAC AS ignored for non-ML
|
||||
SMOOTHED ! Type of aggregation: SMOOTHED NONSMOOTHED
|
||||
DEC ! Type of aggregation: DEC
|
||||
NATURAL ! Ordering of aggregation NATURAL DEGREE
|
||||
MULT ! Type of multilevel correction: ADD MULT
|
||||
TWOSIDE ! Side of correction PRE POST TWOSIDE (ignored for ADD)
|
||||
DIST ! Coarsest-level matrix distribution: DIST REPL
|
||||
BJAC ! Coarsest-level solver: JACOBI BJAC UMF SLU MUMPS SLUDIST
|
||||
GS ! Coarsest-level subsolver: ILU UMF SLU MUMPS SLUDIST (DSCALE for JACOBI)
|
||||
1 ! Coarsest-level fillin P for ILU(P) and ILU(T,P)
|
||||
POST ! Side of multiplicative correction PRE POST TWOSIDE (ignored for ADD)
|
||||
REPL ! Coarsest-level matrix distribution: DIST REPL
|
||||
BJAC ! Coarsest-level solver: JACOBI BJAC UMF SLU SLUDIST MUMPS
|
||||
ILU ! Coarsest-level subsolver: ILU UMF SLU MUMPS SLUDIST (DSCALE for JACOBI)
|
||||
0 ! Coarsest-level fillin P for ILU(P) and ILU(T,P)
|
||||
1.d-4 ! Coarsest-level threshold T for ILU(T,P)
|
||||
4 ! Number of Jacobi sweeps for BJAC/PJAC coarsest-level solver
|
||||
0.0125d0 ! Smoothed aggregation threshold: >= 0.0
|
||||
|
||||
+13
-11
@@ -10,24 +10,26 @@ CSR ! Storage format: CSR COO JAD
|
||||
30 ! IRST (restart for RGMRES and BiCGSTABL)
|
||||
1.d-5 ! EPS
|
||||
3L-M-RAS-I-D4 ! Longer descriptive name for preconditioner (up to 20 chars)
|
||||
ML ! Preconditioner type: NONE DIAG BJAC AS ML
|
||||
ML ! Preconditioner type: NONE JACOBI BJAC AS ML
|
||||
0 ! Number of overlap layers for AS preconditioner
|
||||
HALO ! AS restriction operator: NONE HALO
|
||||
NONE ! AS prolongation operator: NONE SUM AVG
|
||||
ILU ! AS subdomain solver: ILU MILU ILUT UMF SLU MUMPS
|
||||
ILU ! AS subdomain solver: DSCALE ILU MILU ILUT UMF SLU MUMPS
|
||||
1 ! Fill level P for ILU(P) and ILU(T,P)
|
||||
1.d-4 ! Threshold T for ILU(T,P)
|
||||
1 ! Jacobi sweeps
|
||||
3 ! Number of levels in a multilevel preconditioner
|
||||
AS ! Smoother type JACOBI BJAC AS ignored for non-ML
|
||||
SMOOTHED ! Type of aggregation: SMOOTHED NONSMOOTHED MINENERGY
|
||||
4 ! Number of Jacobi sweeps for base smoother
|
||||
4 ! Number of levels in a multilevel preconditioner
|
||||
BJAC ! Smoother type JACOBI BJAC AS ignored for non-ML
|
||||
SMOOTHED ! Type of aggregation: SMOOTHED NONSMOOTHED
|
||||
DEC ! Type of aggregation: DEC
|
||||
NATURAL ! Ordering of aggregation NATURAL DEGREE
|
||||
MULT ! Type of multilevel correction: ADD MULT
|
||||
POST ! Side of multiplicative correction PRE POST TWOSIDE (ignored for ADD)
|
||||
DIST ! Coarsest-level matrix distribution: DIST REPL
|
||||
BJAC ! Coarsest-level solver: BJAC UMF SLU SLUDIST MUMPS
|
||||
ILU ! Coarsest-level subsolver: ILU UMF SLU SLUDIST MUMPS
|
||||
REPL ! Coarsest-level matrix distribution: DIST REPL
|
||||
BJAC ! Coarsest-level solver: JACOBI BJAC UMF SLU SLUDIST MUMPS
|
||||
ILU ! Coarsest-level subsolver: ILU UMF SLU MUMPS SLUDIST (DSCALE for JACOBI)
|
||||
0 ! Coarsest-level fillin P for ILU(P) and ILU(T,P)
|
||||
1.d-4 ! Coarsest-level threshold T for ILU(T,P)
|
||||
4 ! Number of Jacobi sweeps for BJAC coarsest-level solver
|
||||
0.10d0 ! Smoothed aggregation threshold: >= 0.0
|
||||
4 ! Number of Jacobi sweeps for BJAC/PJAC coarsest-level solver
|
||||
0.0125d0 ! Smoothed aggregation threshold: >= 0.0
|
||||
0.5 ! Smoothed aggregation scaling factor.
|
||||
|
||||
@@ -14,20 +14,22 @@ ML ! Preconditioner type: NONE JACOBI BJAC AS ML
|
||||
0 ! Number of overlap layers for AS preconditioner
|
||||
HALO ! AS restriction operator: NONE HALO
|
||||
NONE ! AS prolongation operator: NONE SUM AVG
|
||||
ILU ! AS subdomain solver: ILU MILU ILUT UMF SLU MUMPS
|
||||
ILU ! AS subdomain solver: DSCALE ILU MILU ILUT UMF SLU MUMPS
|
||||
1 ! Fill level P for ILU(P) and ILU(T,P)
|
||||
1.d-4 ! Threshold T for ILU(T,P)
|
||||
4 ! Number of Jacobi sweeps for base smoother
|
||||
3 ! Number of levels in a multilevel preconditioner
|
||||
AS ! Smoother type JACOBI BJAC AS ignored for non-ML
|
||||
SMOOTHED ! Type of aggregation: SMOOTHED NONSMOOTHED MINENERGY
|
||||
4 ! Number of levels in a multilevel preconditioner
|
||||
BJAC ! Smoother type JACOBI BJAC AS ignored for non-ML
|
||||
SMOOTHED ! Type of aggregation: SMOOTHED NONSMOOTHED
|
||||
DEC ! Type of aggregation: DEC
|
||||
NATURAL ! Ordering of aggregation NATURAL DEGREE
|
||||
MULT ! Type of multilevel correction: ADD MULT
|
||||
POST ! Side of multiplicative correction PRE POST TWOSIDE (ignored for ADD)
|
||||
REPL ! Coarsest-level matrix distribution: DIST REPL
|
||||
BJAC ! Coarsest-level solver: JACOBI BJAC UMF SLU SLUDIST MUMPS
|
||||
UMF ! Coarsest-level subsolver: ILU UMF SLU MUMPS SLUDIST (DSCALE for JACOBI)
|
||||
ILU ! Coarsest-level subsolver: ILU UMF SLU MUMPS SLUDIST (DSCALE for JACOBI)
|
||||
0 ! Coarsest-level fillin P for ILU(P) and ILU(T,P)
|
||||
1.d-4 ! Coarsest-level threshold T for ILU(T,P)
|
||||
4 ! Number of Jacobi sweeps for BJAC coarsest-level solver
|
||||
0.10d0 ! Smoothed aggregation threshold: >= 0.0
|
||||
4 ! Number of Jacobi sweeps for BJAC/PJAC coarsest-level solver
|
||||
0.0125d0 ! Smoothed aggregation threshold: >= 0.0
|
||||
0.5 ! Smoothed aggregation scaling factor.
|
||||
|
||||
@@ -62,6 +62,7 @@ program sf_sample
|
||||
integer(psb_ipk_) :: nlev ! number of levels in multilevel prec.
|
||||
character(len=16) :: aggrkind ! smoothed, raw aggregation
|
||||
character(len=16) :: aggr_alg ! aggregation algorithm (currently only decoupled)
|
||||
character(len=16) :: aggr_ord ! Ordering for aggregation
|
||||
character(len=16) :: mltype ! additive or multiplicative multi-level prec
|
||||
character(len=16) :: smthpos ! side: pre, post, both smoothing
|
||||
character(len=16) :: cmat ! coarse mat: distributed, replicated
|
||||
@@ -71,6 +72,7 @@ program sf_sample
|
||||
real(psb_spk_) :: cthres ! threshold for coarse fact. ILU(T)
|
||||
integer(psb_ipk_) :: cjswp ! block-Jacobi sweeps
|
||||
real(psb_spk_) :: athres ! smoothed aggregation threshold
|
||||
real(psb_spk_) :: ascale ! smoothed aggregation scale factor
|
||||
end type precdata
|
||||
type(precdata) :: prec_choice
|
||||
|
||||
@@ -260,12 +262,14 @@ program sf_sample
|
||||
call mld_precset(prec,mld_sub_restr_, prec_choice%restr, info)
|
||||
call mld_precset(prec,mld_sub_prol_, prec_choice%prol, info)
|
||||
call mld_precset(prec,mld_sub_solve_, prec_choice%solve, info)
|
||||
call mld_precset(prec,mld_sub_fillin_, prec_choice%fill, info)
|
||||
call mld_precset(prec,mld_sub_iluthrs_, prec_choice%thr, info)
|
||||
call mld_precset(prec,mld_sub_fillin_, prec_choice%fill, info)
|
||||
call mld_precset(prec,mld_sub_iluthrs_, prec_choice%thr, info)
|
||||
call mld_precset(prec,mld_aggr_kind_, prec_choice%aggrkind,info)
|
||||
call mld_precset(prec,mld_aggr_alg_, prec_choice%aggr_alg,info)
|
||||
call mld_precset(prec,mld_aggr_ord_, prec_choice%aggr_ord,info)
|
||||
call mld_precset(prec,mld_ml_type_, prec_choice%mltype, info)
|
||||
call mld_precset(prec,mld_smoother_pos_, prec_choice%smthpos, info)
|
||||
call mld_precset(prec,mld_aggr_scale_, prec_choice%ascale, info)
|
||||
call mld_precset(prec,mld_aggr_thresh_, prec_choice%athres, info)
|
||||
call mld_precset(prec,mld_coarse_solve_, prec_choice%csolve, info)
|
||||
call mld_precset(prec,mld_coarse_subsolve_, prec_choice%csbsolve,info)
|
||||
@@ -276,15 +280,16 @@ program sf_sample
|
||||
else
|
||||
nlv = 1
|
||||
call mld_precinit(prec,prec_choice%prec,info)
|
||||
call mld_precset(prec,mld_smoother_sweeps_, prec_choice%jsweeps, info)
|
||||
call mld_precset(prec,mld_sub_ovr_, prec_choice%novr, info)
|
||||
call mld_precset(prec,mld_sub_restr_, prec_choice%restr, info)
|
||||
call mld_precset(prec,mld_sub_prol_, prec_choice%prol, info)
|
||||
call mld_precset(prec,mld_sub_solve_, prec_choice%solve, info)
|
||||
call mld_precset(prec,mld_sub_fillin_, prec_choice%fill, info)
|
||||
call mld_precset(prec,mld_sub_iluthrs_, prec_choice%thr, info)
|
||||
if (psb_toupper(prec_choice%prec) /= 'NONE') then
|
||||
call mld_precset(prec,mld_smoother_sweeps_, prec_choice%jsweeps, info)
|
||||
call mld_precset(prec,mld_sub_ovr_, prec_choice%novr, info)
|
||||
call mld_precset(prec,mld_sub_restr_, prec_choice%restr, info)
|
||||
call mld_precset(prec,mld_sub_prol_, prec_choice%prol, info)
|
||||
call mld_precset(prec,mld_sub_solve_, prec_choice%solve, info)
|
||||
call mld_precset(prec,mld_sub_fillin_, prec_choice%fill, info)
|
||||
call mld_precset(prec,mld_sub_iluthrs_, prec_choice%thr, info)
|
||||
end if
|
||||
end if
|
||||
|
||||
! building the preconditioner
|
||||
t1 = psb_wtime()
|
||||
call mld_precbld(a,desc_a,prec,info)
|
||||
@@ -336,6 +341,8 @@ program sf_sample
|
||||
write(psb_out_unit,'("Total memory occupation for A : ",i12)')amatsize
|
||||
write(psb_out_unit,'("Total memory occupation for DESC_A : ",i12)')descsize
|
||||
write(psb_out_unit,'("Total memory occupation for PREC : ",i12)')precsize
|
||||
write(psb_out_unit,'("Storage format for A : ",a )')a%get_fmt()
|
||||
write(psb_out_unit,'("Storage format for DESC_A : ",a )')desc_a%get_fmt()
|
||||
end if
|
||||
|
||||
call psb_gather(x_col_glob,x_col,desc_a,info,root=psb_root_)
|
||||
@@ -383,12 +390,12 @@ contains
|
||||
use psb_base_mod
|
||||
implicit none
|
||||
|
||||
integer(psb_ipk_) :: icontxt
|
||||
integer(psb_ipk_) :: icontxt
|
||||
character(len=*) :: kmethd, mtrx, rhs, afmt,filefmt
|
||||
type(precdata) :: prec
|
||||
real(psb_spk_) :: eps
|
||||
integer(psb_ipk_) :: iret, istopc,itmax,itrace, ipart, irst
|
||||
integer(psb_ipk_) :: iam, nm, np, i
|
||||
integer(psb_ipk_) :: iret, istopc,itmax,itrace, ipart, irst
|
||||
integer(psb_ipk_) :: iam, nm, np, i
|
||||
|
||||
call psb_info(icontxt,iam,np)
|
||||
|
||||
@@ -419,15 +426,17 @@ contains
|
||||
call read_data(prec%smther,psb_inp_unit) ! Smoother type.
|
||||
call read_data(prec%aggrkind,psb_inp_unit) ! smoothed/raw aggregatin
|
||||
call read_data(prec%aggr_alg,psb_inp_unit) ! local or global aggregation
|
||||
call read_data(prec%aggr_ord,psb_inp_unit) ! Ordering for aggregation
|
||||
call read_data(prec%mltype,psb_inp_unit) ! additive or multiplicative 2nd level prec
|
||||
call read_data(prec%smthpos,psb_inp_unit) ! side: pre, post, both smoothing
|
||||
call read_data(prec%cmat,psb_inp_unit) ! coarse mat
|
||||
call read_data(prec%csolve,psb_inp_unit) ! Factorization type: ILU, SuperLU, UMFPACK.
|
||||
call read_data(prec%csolve,psb_inp_unit) ! Factorization type: BJAC, SuperLU, UMFPACK.
|
||||
call read_data(prec%csbsolve,psb_inp_unit) ! Factorization type: ILU, SuperLU, UMFPACK.
|
||||
call read_data(prec%cfill,psb_inp_unit) ! Fill-in for factorization
|
||||
call read_data(prec%cthres,psb_inp_unit) ! Threshold for fact. ILU(T)
|
||||
call read_data(prec%cjswp,psb_inp_unit) ! Jacobi sweeps
|
||||
call read_data(prec%athres,psb_inp_unit) ! smoother aggr thresh
|
||||
call read_data(prec%ascale,psb_inp_unit) ! smoother aggr thresh
|
||||
end if
|
||||
end if
|
||||
|
||||
@@ -442,7 +451,6 @@ contains
|
||||
call psb_bcast(icontxt,itrace)
|
||||
call psb_bcast(icontxt,irst)
|
||||
call psb_bcast(icontxt,eps)
|
||||
|
||||
call psb_bcast(icontxt,prec%descr) ! verbose description of the prec
|
||||
call psb_bcast(icontxt,prec%prec) ! overall prectype
|
||||
call psb_bcast(icontxt,prec%novr) ! number of overlap layers
|
||||
@@ -457,6 +465,7 @@ contains
|
||||
call psb_bcast(icontxt,prec%nlev) ! Number of levels in multilevel prec.
|
||||
call psb_bcast(icontxt,prec%aggrkind) ! smoothed/raw aggregatin
|
||||
call psb_bcast(icontxt,prec%aggr_alg) ! local or global aggregation
|
||||
call psb_bcast(icontxt,prec%aggr_ord) ! Ordering for aggregation
|
||||
call psb_bcast(icontxt,prec%mltype) ! additive or multiplicative 2nd level prec
|
||||
call psb_bcast(icontxt,prec%smthpos) ! side: pre, post, both smoothing
|
||||
call psb_bcast(icontxt,prec%cmat) ! coarse mat
|
||||
@@ -466,6 +475,7 @@ contains
|
||||
call psb_bcast(icontxt,prec%cthres) ! Threshold for fact. ILU(T)
|
||||
call psb_bcast(icontxt,prec%cjswp) ! Jacobi sweeps
|
||||
call psb_bcast(icontxt,prec%athres) ! smoother aggr thresh
|
||||
call psb_bcast(icontxt,prec%ascale) ! smoother aggr scale factor
|
||||
end if
|
||||
|
||||
end subroutine get_parms
|
||||
|
||||
@@ -62,6 +62,7 @@ program zf_sample
|
||||
integer(psb_ipk_) :: nlev ! number of levels in multilevel prec.
|
||||
character(len=16) :: aggrkind ! smoothed, raw aggregation
|
||||
character(len=16) :: aggr_alg ! aggregation algorithm (currently only decoupled)
|
||||
character(len=16) :: aggr_ord ! Ordering for aggregation
|
||||
character(len=16) :: mltype ! additive or multiplicative multi-level prec
|
||||
character(len=16) :: smthpos ! side: pre, post, both smoothing
|
||||
character(len=16) :: cmat ! coarse mat: distributed, replicated
|
||||
@@ -71,6 +72,7 @@ program zf_sample
|
||||
real(psb_dpk_) :: cthres ! threshold for coarse fact. ILU(T)
|
||||
integer(psb_ipk_) :: cjswp ! block-Jacobi sweeps
|
||||
real(psb_dpk_) :: athres ! smoothed aggregation threshold
|
||||
real(psb_dpk_) :: ascale ! smoothed aggregation scale factor
|
||||
end type precdata
|
||||
type(precdata) :: prec_choice
|
||||
|
||||
@@ -260,12 +262,14 @@ program zf_sample
|
||||
call mld_precset(prec,mld_sub_restr_, prec_choice%restr, info)
|
||||
call mld_precset(prec,mld_sub_prol_, prec_choice%prol, info)
|
||||
call mld_precset(prec,mld_sub_solve_, prec_choice%solve, info)
|
||||
call mld_precset(prec,mld_sub_fillin_, prec_choice%fill, info)
|
||||
call mld_precset(prec,mld_sub_iluthrs_, prec_choice%thr, info)
|
||||
call mld_precset(prec,mld_sub_fillin_, prec_choice%fill, info)
|
||||
call mld_precset(prec,mld_sub_iluthrs_, prec_choice%thr, info)
|
||||
call mld_precset(prec,mld_aggr_kind_, prec_choice%aggrkind,info)
|
||||
call mld_precset(prec,mld_aggr_alg_, prec_choice%aggr_alg,info)
|
||||
call mld_precset(prec,mld_aggr_ord_, prec_choice%aggr_ord,info)
|
||||
call mld_precset(prec,mld_ml_type_, prec_choice%mltype, info)
|
||||
call mld_precset(prec,mld_smoother_pos_, prec_choice%smthpos, info)
|
||||
call mld_precset(prec,mld_aggr_scale_, prec_choice%ascale, info)
|
||||
call mld_precset(prec,mld_aggr_thresh_, prec_choice%athres, info)
|
||||
call mld_precset(prec,mld_coarse_solve_, prec_choice%csolve, info)
|
||||
call mld_precset(prec,mld_coarse_subsolve_, prec_choice%csbsolve,info)
|
||||
@@ -276,15 +280,16 @@ program zf_sample
|
||||
else
|
||||
nlv = 1
|
||||
call mld_precinit(prec,prec_choice%prec,info)
|
||||
call mld_precset(prec,mld_smoother_sweeps_, prec_choice%jsweeps, info)
|
||||
call mld_precset(prec,mld_sub_ovr_, prec_choice%novr, info)
|
||||
call mld_precset(prec,mld_sub_restr_, prec_choice%restr, info)
|
||||
call mld_precset(prec,mld_sub_prol_, prec_choice%prol, info)
|
||||
call mld_precset(prec,mld_sub_solve_, prec_choice%solve, info)
|
||||
call mld_precset(prec,mld_sub_fillin_, prec_choice%fill, info)
|
||||
call mld_precset(prec,mld_sub_iluthrs_, prec_choice%thr, info)
|
||||
if (psb_toupper(prec_choice%prec) /= 'NONE') then
|
||||
call mld_precset(prec,mld_smoother_sweeps_, prec_choice%jsweeps, info)
|
||||
call mld_precset(prec,mld_sub_ovr_, prec_choice%novr, info)
|
||||
call mld_precset(prec,mld_sub_restr_, prec_choice%restr, info)
|
||||
call mld_precset(prec,mld_sub_prol_, prec_choice%prol, info)
|
||||
call mld_precset(prec,mld_sub_solve_, prec_choice%solve, info)
|
||||
call mld_precset(prec,mld_sub_fillin_, prec_choice%fill, info)
|
||||
call mld_precset(prec,mld_sub_iluthrs_, prec_choice%thr, info)
|
||||
end if
|
||||
end if
|
||||
|
||||
! building the preconditioner
|
||||
t1 = psb_wtime()
|
||||
call mld_precbld(a,desc_a,prec,info)
|
||||
@@ -336,6 +341,8 @@ program zf_sample
|
||||
write(psb_out_unit,'("Total memory occupation for A : ",i12)')amatsize
|
||||
write(psb_out_unit,'("Total memory occupation for DESC_A : ",i12)')descsize
|
||||
write(psb_out_unit,'("Total memory occupation for PREC : ",i12)')precsize
|
||||
write(psb_out_unit,'("Storage format for A : ",a )')a%get_fmt()
|
||||
write(psb_out_unit,'("Storage format for DESC_A : ",a )')desc_a%get_fmt()
|
||||
end if
|
||||
|
||||
call psb_gather(x_col_glob,x_col,desc_a,info,root=psb_root_)
|
||||
@@ -366,6 +373,7 @@ program zf_sample
|
||||
call psb_spfree(a, desc_a,info)
|
||||
call mld_precfree(prec,info)
|
||||
call psb_cdfree(desc_a,info)
|
||||
|
||||
call psb_exit(ictxt)
|
||||
stop
|
||||
|
||||
@@ -382,12 +390,12 @@ contains
|
||||
use psb_base_mod
|
||||
implicit none
|
||||
|
||||
integer(psb_ipk_) :: icontxt
|
||||
integer(psb_ipk_) :: icontxt
|
||||
character(len=*) :: kmethd, mtrx, rhs, afmt,filefmt
|
||||
type(precdata) :: prec
|
||||
real(psb_dpk_) :: eps
|
||||
integer(psb_ipk_) :: iret, istopc,itmax,itrace, ipart, irst
|
||||
integer(psb_ipk_) :: iam, nm, np, i
|
||||
integer(psb_ipk_) :: iret, istopc,itmax,itrace, ipart, irst
|
||||
integer(psb_ipk_) :: iam, nm, np, i
|
||||
|
||||
call psb_info(icontxt,iam,np)
|
||||
|
||||
@@ -418,15 +426,17 @@ contains
|
||||
call read_data(prec%smther,psb_inp_unit) ! Smoother type.
|
||||
call read_data(prec%aggrkind,psb_inp_unit) ! smoothed/raw aggregatin
|
||||
call read_data(prec%aggr_alg,psb_inp_unit) ! local or global aggregation
|
||||
call read_data(prec%aggr_ord,psb_inp_unit) ! Ordering for aggregation
|
||||
call read_data(prec%mltype,psb_inp_unit) ! additive or multiplicative 2nd level prec
|
||||
call read_data(prec%smthpos,psb_inp_unit) ! side: pre, post, both smoothing
|
||||
call read_data(prec%cmat,psb_inp_unit) ! coarse mat
|
||||
call read_data(prec%csolve,psb_inp_unit) ! Factorization type: ILU, SuperLU, UMFPACK.
|
||||
call read_data(prec%csolve,psb_inp_unit) ! Factorization type: BJAC, SuperLU, UMFPACK.
|
||||
call read_data(prec%csbsolve,psb_inp_unit) ! Factorization type: ILU, SuperLU, UMFPACK.
|
||||
call read_data(prec%cfill,psb_inp_unit) ! Fill-in for factorization
|
||||
call read_data(prec%cthres,psb_inp_unit) ! Threshold for fact. ILU(T)
|
||||
call read_data(prec%cjswp,psb_inp_unit) ! Jacobi sweeps
|
||||
call read_data(prec%athres,psb_inp_unit) ! smoother aggr thresh
|
||||
call read_data(prec%ascale,psb_inp_unit) ! smoother aggr thresh
|
||||
end if
|
||||
end if
|
||||
|
||||
@@ -441,7 +451,6 @@ contains
|
||||
call psb_bcast(icontxt,itrace)
|
||||
call psb_bcast(icontxt,irst)
|
||||
call psb_bcast(icontxt,eps)
|
||||
|
||||
call psb_bcast(icontxt,prec%descr) ! verbose description of the prec
|
||||
call psb_bcast(icontxt,prec%prec) ! overall prectype
|
||||
call psb_bcast(icontxt,prec%novr) ! number of overlap layers
|
||||
@@ -456,6 +465,7 @@ contains
|
||||
call psb_bcast(icontxt,prec%nlev) ! Number of levels in multilevel prec.
|
||||
call psb_bcast(icontxt,prec%aggrkind) ! smoothed/raw aggregatin
|
||||
call psb_bcast(icontxt,prec%aggr_alg) ! local or global aggregation
|
||||
call psb_bcast(icontxt,prec%aggr_ord) ! Ordering for aggregation
|
||||
call psb_bcast(icontxt,prec%mltype) ! additive or multiplicative 2nd level prec
|
||||
call psb_bcast(icontxt,prec%smthpos) ! side: pre, post, both smoothing
|
||||
call psb_bcast(icontxt,prec%cmat) ! coarse mat
|
||||
@@ -465,6 +475,7 @@ contains
|
||||
call psb_bcast(icontxt,prec%cthres) ! Threshold for fact. ILU(T)
|
||||
call psb_bcast(icontxt,prec%cjswp) ! Jacobi sweeps
|
||||
call psb_bcast(icontxt,prec%athres) ! smoother aggr thresh
|
||||
call psb_bcast(icontxt,prec%ascale) ! smoother aggr scale factor
|
||||
end if
|
||||
|
||||
end subroutine get_parms
|
||||
|
||||
Reference in New Issue
Block a user