Support for L1- variants of hybrid Gauss-Seidel

pizdaint-runs
Salvatore Filippone 5 years ago
parent 940609564f
commit 4260dc74d5

@ -134,11 +134,32 @@ subroutine mld_c_base_onelev_csetc(lv,what,val,info,pos,idx)
call lv%set(mld_c_as_smoother_mold,info,pos=pos) call lv%set(mld_c_as_smoother_mold,info,pos=pos)
if (info == 0) call lv%set(mld_c_ilu_solver_mold,info,pos=pos) if (info == 0) call lv%set(mld_c_ilu_solver_mold,info,pos=pos)
case ('GS','FWGS')
call lv%set(mld_c_jac_smoother_mold,info,pos='pre')
if (info == 0) call lv%set(mld_c_gs_solver_mold,info,pos='pre')
if (allocated(lv%sm2a)) deallocate(lv%sm2a)
case ('BWGS')
call lv%set(mld_c_jac_smoother_mold,info,pos='pre')
if (info == 0) call lv%set(mld_c_bwgs_solver_mold,info,pos='pre')
if (allocated(lv%sm2a)) deallocate(lv%sm2a)
case ('FBGS') case ('FBGS')
call lv%set(mld_c_jac_smoother_mold,info,pos='pre') call lv%set(mld_c_jac_smoother_mold,info,pos='pre')
if (info == 0) call lv%set(mld_c_gs_solver_mold,info,pos='pre') if (info == 0) call lv%set(mld_c_gs_solver_mold,info,pos='pre')
call lv%set(mld_c_jac_smoother_mold,info,pos='post') call lv%set(mld_c_jac_smoother_mold,info,pos='post')
if (info == 0) call lv%set(mld_c_bwgs_solver_mold,info,pos='post') if (info == 0) call lv%set(mld_c_bwgs_solver_mold,info,pos='post')
case ('L1-GS','L1-FWGS')
call lv%set(mld_c_l1_jac_smoother_mold,info,pos='pre')
if (info == 0) call lv%set(mld_c_gs_solver_mold,info,pos='pre')
if (allocated(lv%sm2a)) deallocate(lv%sm2a)
case ('L1-BWGS')
call lv%set(mld_c_l1_jac_smoother_mold,info,pos='pre')
if (info == 0) call lv%set(mld_c_bwgs_solver_mold,info,pos='pre')
if (allocated(lv%sm2a)) deallocate(lv%sm2a)
case ('L1-FBGS')
call lv%set(mld_c_l1_jac_smoother_mold,info,pos='pre')
if (info == 0) call lv%set(mld_c_gs_solver_mold,info,pos='pre')
call lv%set(mld_c_l1_jac_smoother_mold,info,pos='post')
if (info == 0) call lv%set(mld_c_bwgs_solver_mold,info,pos='post')
case default case default
! !

@ -146,11 +146,32 @@ subroutine mld_d_base_onelev_csetc(lv,what,val,info,pos,idx)
call lv%set(mld_d_as_smoother_mold,info,pos=pos) call lv%set(mld_d_as_smoother_mold,info,pos=pos)
if (info == 0) call lv%set(mld_d_ilu_solver_mold,info,pos=pos) if (info == 0) call lv%set(mld_d_ilu_solver_mold,info,pos=pos)
case ('GS','FWGS')
call lv%set(mld_d_jac_smoother_mold,info,pos='pre')
if (info == 0) call lv%set(mld_d_gs_solver_mold,info,pos='pre')
if (allocated(lv%sm2a)) deallocate(lv%sm2a)
case ('BWGS')
call lv%set(mld_d_jac_smoother_mold,info,pos='pre')
if (info == 0) call lv%set(mld_d_bwgs_solver_mold,info,pos='pre')
if (allocated(lv%sm2a)) deallocate(lv%sm2a)
case ('FBGS') case ('FBGS')
call lv%set(mld_d_jac_smoother_mold,info,pos='pre') call lv%set(mld_d_jac_smoother_mold,info,pos='pre')
if (info == 0) call lv%set(mld_d_gs_solver_mold,info,pos='pre') if (info == 0) call lv%set(mld_d_gs_solver_mold,info,pos='pre')
call lv%set(mld_d_jac_smoother_mold,info,pos='post') call lv%set(mld_d_jac_smoother_mold,info,pos='post')
if (info == 0) call lv%set(mld_d_bwgs_solver_mold,info,pos='post') if (info == 0) call lv%set(mld_d_bwgs_solver_mold,info,pos='post')
case ('L1-GS','L1-FWGS')
call lv%set(mld_d_l1_jac_smoother_mold,info,pos='pre')
if (info == 0) call lv%set(mld_d_gs_solver_mold,info,pos='pre')
if (allocated(lv%sm2a)) deallocate(lv%sm2a)
case ('L1-BWGS')
call lv%set(mld_d_l1_jac_smoother_mold,info,pos='pre')
if (info == 0) call lv%set(mld_d_bwgs_solver_mold,info,pos='pre')
if (allocated(lv%sm2a)) deallocate(lv%sm2a)
case ('L1-FBGS')
call lv%set(mld_d_l1_jac_smoother_mold,info,pos='pre')
if (info == 0) call lv%set(mld_d_gs_solver_mold,info,pos='pre')
call lv%set(mld_d_l1_jac_smoother_mold,info,pos='post')
if (info == 0) call lv%set(mld_d_bwgs_solver_mold,info,pos='post')
case default case default
! !

@ -134,11 +134,32 @@ subroutine mld_s_base_onelev_csetc(lv,what,val,info,pos,idx)
call lv%set(mld_s_as_smoother_mold,info,pos=pos) call lv%set(mld_s_as_smoother_mold,info,pos=pos)
if (info == 0) call lv%set(mld_s_ilu_solver_mold,info,pos=pos) if (info == 0) call lv%set(mld_s_ilu_solver_mold,info,pos=pos)
case ('GS','FWGS')
call lv%set(mld_s_jac_smoother_mold,info,pos='pre')
if (info == 0) call lv%set(mld_s_gs_solver_mold,info,pos='pre')
if (allocated(lv%sm2a)) deallocate(lv%sm2a)
case ('BWGS')
call lv%set(mld_s_jac_smoother_mold,info,pos='pre')
if (info == 0) call lv%set(mld_s_bwgs_solver_mold,info,pos='pre')
if (allocated(lv%sm2a)) deallocate(lv%sm2a)
case ('FBGS') case ('FBGS')
call lv%set(mld_s_jac_smoother_mold,info,pos='pre') call lv%set(mld_s_jac_smoother_mold,info,pos='pre')
if (info == 0) call lv%set(mld_s_gs_solver_mold,info,pos='pre') if (info == 0) call lv%set(mld_s_gs_solver_mold,info,pos='pre')
call lv%set(mld_s_jac_smoother_mold,info,pos='post') call lv%set(mld_s_jac_smoother_mold,info,pos='post')
if (info == 0) call lv%set(mld_s_bwgs_solver_mold,info,pos='post') if (info == 0) call lv%set(mld_s_bwgs_solver_mold,info,pos='post')
case ('L1-GS','L1-FWGS')
call lv%set(mld_s_l1_jac_smoother_mold,info,pos='pre')
if (info == 0) call lv%set(mld_s_gs_solver_mold,info,pos='pre')
if (allocated(lv%sm2a)) deallocate(lv%sm2a)
case ('L1-BWGS')
call lv%set(mld_s_l1_jac_smoother_mold,info,pos='pre')
if (info == 0) call lv%set(mld_s_bwgs_solver_mold,info,pos='pre')
if (allocated(lv%sm2a)) deallocate(lv%sm2a)
case ('L1-FBGS')
call lv%set(mld_s_l1_jac_smoother_mold,info,pos='pre')
if (info == 0) call lv%set(mld_s_gs_solver_mold,info,pos='pre')
call lv%set(mld_s_l1_jac_smoother_mold,info,pos='post')
if (info == 0) call lv%set(mld_s_bwgs_solver_mold,info,pos='post')
case default case default
! !

@ -146,11 +146,32 @@ subroutine mld_z_base_onelev_csetc(lv,what,val,info,pos,idx)
call lv%set(mld_z_as_smoother_mold,info,pos=pos) call lv%set(mld_z_as_smoother_mold,info,pos=pos)
if (info == 0) call lv%set(mld_z_ilu_solver_mold,info,pos=pos) if (info == 0) call lv%set(mld_z_ilu_solver_mold,info,pos=pos)
case ('GS','FWGS')
call lv%set(mld_z_jac_smoother_mold,info,pos='pre')
if (info == 0) call lv%set(mld_z_gs_solver_mold,info,pos='pre')
if (allocated(lv%sm2a)) deallocate(lv%sm2a)
case ('BWGS')
call lv%set(mld_z_jac_smoother_mold,info,pos='pre')
if (info == 0) call lv%set(mld_z_bwgs_solver_mold,info,pos='pre')
if (allocated(lv%sm2a)) deallocate(lv%sm2a)
case ('FBGS') case ('FBGS')
call lv%set(mld_z_jac_smoother_mold,info,pos='pre') call lv%set(mld_z_jac_smoother_mold,info,pos='pre')
if (info == 0) call lv%set(mld_z_gs_solver_mold,info,pos='pre') if (info == 0) call lv%set(mld_z_gs_solver_mold,info,pos='pre')
call lv%set(mld_z_jac_smoother_mold,info,pos='post') call lv%set(mld_z_jac_smoother_mold,info,pos='post')
if (info == 0) call lv%set(mld_z_bwgs_solver_mold,info,pos='post') if (info == 0) call lv%set(mld_z_bwgs_solver_mold,info,pos='post')
case ('L1-GS','L1-FWGS')
call lv%set(mld_z_l1_jac_smoother_mold,info,pos='pre')
if (info == 0) call lv%set(mld_z_gs_solver_mold,info,pos='pre')
if (allocated(lv%sm2a)) deallocate(lv%sm2a)
case ('L1-BWGS')
call lv%set(mld_z_l1_jac_smoother_mold,info,pos='pre')
if (info == 0) call lv%set(mld_z_bwgs_solver_mold,info,pos='pre')
if (allocated(lv%sm2a)) deallocate(lv%sm2a)
case ('L1-FBGS')
call lv%set(mld_z_l1_jac_smoother_mold,info,pos='pre')
if (info == 0) call lv%set(mld_z_gs_solver_mold,info,pos='pre')
call lv%set(mld_z_l1_jac_smoother_mold,info,pos='post')
if (info == 0) call lv%set(mld_z_bwgs_solver_mold,info,pos='post')
case default case default
! !

@ -256,7 +256,7 @@ subroutine mld_c_smoothers_bld(a,desc_a,prec,info,amold,vmold,imold)
& ' but the coarse matrix has been changed to replicated' & ' but the coarse matrix has been changed to replicated'
end if end if
case(mld_bjac_,mld_l1_bjac_,mld_jac_, mld_l1_jac_) case(mld_bjac_,mld_l1_bjac_,mld_jac_, mld_l1_jac_, mld_gs_, mld_fbgs_, mld_l1_gs_,mld_l1_fbgs_)
if (prec%precv(iszv)%parms%coarse_mat /= mld_distr_mat_) then if (prec%precv(iszv)%parms%coarse_mat /= mld_distr_mat_) then
write(psb_err_unit,*) & write(psb_err_unit,*) &
& 'MLD2P4: Warning: original coarse solver was requested as ',& & 'MLD2P4: Warning: original coarse solver was requested as ',&

@ -267,6 +267,18 @@ subroutine mld_ccprecseti(p,what,val,info,ilev,ilmax,pos,idx)
call p%precv(nlev_)%set('SMOOTHER_TYPE',mld_bjac_,info,pos=pos) call p%precv(nlev_)%set('SMOOTHER_TYPE',mld_bjac_,info,pos=pos)
call p%precv(nlev_)%set('SUB_SOLVE',mld_l1_diag_scale_,info,pos=pos) call p%precv(nlev_)%set('SUB_SOLVE',mld_l1_diag_scale_,info,pos=pos)
call p%precv(nlev_)%set('COARSE_MAT',mld_distr_mat_,info,pos=pos) call p%precv(nlev_)%set('COARSE_MAT',mld_distr_mat_,info,pos=pos)
case(mld_gs_,mld_fbgs_)
call p%precv(nlev_)%set('SMOOTHER_TYPE',mld_bjac_,info,pos=pos)
call p%precv(nlev_)%set('SUB_SOLVE',mld_gs_,info,pos=pos)
call p%precv(nlev_)%set('COARSE_MAT',mld_distr_mat_,info,pos=pos)
case(mld_bwgs_)
call p%precv(nlev_)%set('SMOOTHER_TYPE',mld_bjac_,info,pos=pos)
call p%precv(nlev_)%set('SUB_SOLVE',mld_bwgs_,info,pos=pos)
call p%precv(nlev_)%set('COARSE_MAT',mld_distr_mat_,info,pos=pos)
case(mld_l1_gs_,mld_l1_fbgs_)
call p%precv(nlev_)%set('SMOOTHER_TYPE',mld_l1_bjac_,info,pos=pos)
call p%precv(nlev_)%set('SUB_SOLVE',mld_gs_,info,pos=pos)
call p%precv(nlev_)%set('COARSE_MAT',mld_distr_mat_,info,pos=pos)
end select end select
endif endif
@ -401,6 +413,18 @@ subroutine mld_ccprecseti(p,what,val,info,ilev,ilmax,pos,idx)
call p%precv(nlev_)%set('SMOOTHER_TYPE',mld_bjac_,info,pos=pos) call p%precv(nlev_)%set('SMOOTHER_TYPE',mld_bjac_,info,pos=pos)
call p%precv(nlev_)%set('SUB_SOLVE',mld_l1_diag_scale_,info,pos=pos) call p%precv(nlev_)%set('SUB_SOLVE',mld_l1_diag_scale_,info,pos=pos)
call p%precv(nlev_)%set('COARSE_MAT',mld_distr_mat_,info,pos=pos) call p%precv(nlev_)%set('COARSE_MAT',mld_distr_mat_,info,pos=pos)
case(mld_gs_,mld_fbgs_)
call p%precv(nlev_)%set('SMOOTHER_TYPE',mld_bjac_,info,pos=pos)
call p%precv(nlev_)%set('SUB_SOLVE',mld_gs_,info,pos=pos)
call p%precv(nlev_)%set('COARSE_MAT',mld_distr_mat_,info,pos=pos)
case(mld_bwgs_)
call p%precv(nlev_)%set('SMOOTHER_TYPE',mld_bjac_,info,pos=pos)
call p%precv(nlev_)%set('SUB_SOLVE',mld_bwgs_,info,pos=pos)
call p%precv(nlev_)%set('COARSE_MAT',mld_distr_mat_,info,pos=pos)
case(mld_l1_gs_,mld_l1_fbgs_)
call p%precv(nlev_)%set('SMOOTHER_TYPE',mld_l1_bjac_,info,pos=pos)
call p%precv(nlev_)%set('SUB_SOLVE',mld_gs_,info,pos=pos)
call p%precv(nlev_)%set('COARSE_MAT',mld_distr_mat_,info,pos=pos)
end select end select
endif endif
@ -648,6 +672,18 @@ subroutine mld_ccprecsetc(p,what,string,info,ilev,ilmax,pos,idx)
call p%precv(nlev_)%set('SMOOTHER_TYPE','BJAC',info,pos=pos) call p%precv(nlev_)%set('SMOOTHER_TYPE','BJAC',info,pos=pos)
call p%precv(nlev_)%set('SUB_SOLVE','L1-DIAG',info,pos=pos) call p%precv(nlev_)%set('SUB_SOLVE','L1-DIAG',info,pos=pos)
call p%precv(nlev_)%set('COARSE_MAT','DIST',info,pos=pos) call p%precv(nlev_)%set('COARSE_MAT','DIST',info,pos=pos)
case('GS','FWGS','FBGS')
call p%precv(nlev_)%set('SMOOTHER_TYPE','BJAC',info,pos=pos)
call p%precv(nlev_)%set('SUB_SOLVE','GS',info,pos=pos)
call p%precv(nlev_)%set('COARSE_MAT','DIST',info,pos=pos)
case('BWGS')
call p%precv(nlev_)%set('SMOOTHER_TYPE','BJAC',info,pos=pos)
call p%precv(nlev_)%set('SUB_SOLVE','BWGS',info,pos=pos)
call p%precv(nlev_)%set('COARSE_MAT','DIST',info,pos=pos)
case('L1-GS')
call p%precv(nlev_)%set('SMOOTHER_TYPE','L1-BJAC',info,pos=pos)
call p%precv(nlev_)%set('SUB_SOLVE','GS',info,pos=pos)
call p%precv(nlev_)%set('COARSE_MAT','DIST',info,pos=pos)
end select end select
endif endif
@ -759,11 +795,22 @@ subroutine mld_ccprecsetc(p,what,string,info,ilev,ilmax,pos,idx)
call p%precv(nlev_)%set('SMOOTHER_TYPE','BJAC',info,pos=pos) call p%precv(nlev_)%set('SMOOTHER_TYPE','BJAC',info,pos=pos)
call p%precv(nlev_)%set('SUB_SOLVE','DIAG',info,pos=pos) call p%precv(nlev_)%set('SUB_SOLVE','DIAG',info,pos=pos)
call p%precv(nlev_)%set('COARSE_MAT','DIST',info,pos=pos) call p%precv(nlev_)%set('COARSE_MAT','DIST',info,pos=pos)
case('L1-JACOBI') case('L1-JACOBI')
call p%precv(nlev_)%set('SMOOTHER_TYPE','BJAC',info,pos=pos) call p%precv(nlev_)%set('SMOOTHER_TYPE','BJAC',info,pos=pos)
call p%precv(nlev_)%set('SUB_SOLVE','L1-DIAG',info,pos=pos) call p%precv(nlev_)%set('SUB_SOLVE','L1-DIAG',info,pos=pos)
call p%precv(nlev_)%set('COARSE_MAT','DIST',info,pos=pos) call p%precv(nlev_)%set('COARSE_MAT','DIST',info,pos=pos)
case('GS','FWGS','FBGS')
call p%precv(nlev_)%set('SMOOTHER_TYPE','BJAC',info,pos=pos)
call p%precv(nlev_)%set('SUB_SOLVE','GS',info,pos=pos)
call p%precv(nlev_)%set('COARSE_MAT','DIST',info,pos=pos)
case('BWGS')
call p%precv(nlev_)%set('SMOOTHER_TYPE','BJAC',info,pos=pos)
call p%precv(nlev_)%set('SUB_SOLVE','BWGS',info,pos=pos)
call p%precv(nlev_)%set('COARSE_MAT','DIST',info,pos=pos)
case('L1-GS')
call p%precv(nlev_)%set('SMOOTHER_TYPE','L1-BJAC',info,pos=pos)
call p%precv(nlev_)%set('SUB_SOLVE','GS',info,pos=pos)
call p%precv(nlev_)%set('COARSE_MAT','DIST',info,pos=pos)
end select end select
endif endif

@ -256,7 +256,7 @@ subroutine mld_d_smoothers_bld(a,desc_a,prec,info,amold,vmold,imold)
& ' but the coarse matrix has been changed to replicated' & ' but the coarse matrix has been changed to replicated'
end if end if
case(mld_bjac_,mld_l1_bjac_,mld_jac_, mld_l1_jac_) case(mld_bjac_,mld_l1_bjac_,mld_jac_, mld_l1_jac_, mld_gs_, mld_fbgs_, mld_l1_gs_,mld_l1_fbgs_)
if (prec%precv(iszv)%parms%coarse_mat /= mld_distr_mat_) then if (prec%precv(iszv)%parms%coarse_mat /= mld_distr_mat_) then
write(psb_err_unit,*) & write(psb_err_unit,*) &
& 'MLD2P4: Warning: original coarse solver was requested as ',& & 'MLD2P4: Warning: original coarse solver was requested as ',&

@ -287,6 +287,18 @@ subroutine mld_dcprecseti(p,what,val,info,ilev,ilmax,pos,idx)
call p%precv(nlev_)%set('SMOOTHER_TYPE',mld_bjac_,info,pos=pos) call p%precv(nlev_)%set('SMOOTHER_TYPE',mld_bjac_,info,pos=pos)
call p%precv(nlev_)%set('SUB_SOLVE',mld_l1_diag_scale_,info,pos=pos) call p%precv(nlev_)%set('SUB_SOLVE',mld_l1_diag_scale_,info,pos=pos)
call p%precv(nlev_)%set('COARSE_MAT',mld_distr_mat_,info,pos=pos) call p%precv(nlev_)%set('COARSE_MAT',mld_distr_mat_,info,pos=pos)
case(mld_gs_,mld_fbgs_)
call p%precv(nlev_)%set('SMOOTHER_TYPE',mld_bjac_,info,pos=pos)
call p%precv(nlev_)%set('SUB_SOLVE',mld_gs_,info,pos=pos)
call p%precv(nlev_)%set('COARSE_MAT',mld_distr_mat_,info,pos=pos)
case(mld_bwgs_)
call p%precv(nlev_)%set('SMOOTHER_TYPE',mld_bjac_,info,pos=pos)
call p%precv(nlev_)%set('SUB_SOLVE',mld_bwgs_,info,pos=pos)
call p%precv(nlev_)%set('COARSE_MAT',mld_distr_mat_,info,pos=pos)
case(mld_l1_gs_,mld_l1_fbgs_)
call p%precv(nlev_)%set('SMOOTHER_TYPE',mld_l1_bjac_,info,pos=pos)
call p%precv(nlev_)%set('SUB_SOLVE',mld_gs_,info,pos=pos)
call p%precv(nlev_)%set('COARSE_MAT',mld_distr_mat_,info,pos=pos)
end select end select
endif endif
@ -435,6 +447,18 @@ subroutine mld_dcprecseti(p,what,val,info,ilev,ilmax,pos,idx)
call p%precv(nlev_)%set('SMOOTHER_TYPE',mld_bjac_,info,pos=pos) call p%precv(nlev_)%set('SMOOTHER_TYPE',mld_bjac_,info,pos=pos)
call p%precv(nlev_)%set('SUB_SOLVE',mld_l1_diag_scale_,info,pos=pos) call p%precv(nlev_)%set('SUB_SOLVE',mld_l1_diag_scale_,info,pos=pos)
call p%precv(nlev_)%set('COARSE_MAT',mld_distr_mat_,info,pos=pos) call p%precv(nlev_)%set('COARSE_MAT',mld_distr_mat_,info,pos=pos)
case(mld_gs_,mld_fbgs_)
call p%precv(nlev_)%set('SMOOTHER_TYPE',mld_bjac_,info,pos=pos)
call p%precv(nlev_)%set('SUB_SOLVE',mld_gs_,info,pos=pos)
call p%precv(nlev_)%set('COARSE_MAT',mld_distr_mat_,info,pos=pos)
case(mld_bwgs_)
call p%precv(nlev_)%set('SMOOTHER_TYPE',mld_bjac_,info,pos=pos)
call p%precv(nlev_)%set('SUB_SOLVE',mld_bwgs_,info,pos=pos)
call p%precv(nlev_)%set('COARSE_MAT',mld_distr_mat_,info,pos=pos)
case(mld_l1_gs_,mld_l1_fbgs_)
call p%precv(nlev_)%set('SMOOTHER_TYPE',mld_l1_bjac_,info,pos=pos)
call p%precv(nlev_)%set('SUB_SOLVE',mld_gs_,info,pos=pos)
call p%precv(nlev_)%set('COARSE_MAT',mld_distr_mat_,info,pos=pos)
end select end select
endif endif
@ -670,7 +694,6 @@ subroutine mld_dcprecsetc(p,what,string,info,ilev,ilmax,pos,idx)
call p%precv(nlev_)%set('SUB_SOLVE','ILU',info,pos=pos) call p%precv(nlev_)%set('SUB_SOLVE','ILU',info,pos=pos)
call p%precv(nlev_)%set('COARSE_MAT','DIST',info,pos=pos) call p%precv(nlev_)%set('COARSE_MAT','DIST',info,pos=pos)
#endif #endif
case('SLUDIST') case('SLUDIST')
#if defined(HAVE_SLUDIST_) #if defined(HAVE_SLUDIST_)
call p%precv(nlev_)%set('SMOOTHER_TYPE','BJAC',info,pos=pos) call p%precv(nlev_)%set('SMOOTHER_TYPE','BJAC',info,pos=pos)
@ -702,6 +725,18 @@ subroutine mld_dcprecsetc(p,what,string,info,ilev,ilmax,pos,idx)
call p%precv(nlev_)%set('SMOOTHER_TYPE','BJAC',info,pos=pos) call p%precv(nlev_)%set('SMOOTHER_TYPE','BJAC',info,pos=pos)
call p%precv(nlev_)%set('SUB_SOLVE','L1-DIAG',info,pos=pos) call p%precv(nlev_)%set('SUB_SOLVE','L1-DIAG',info,pos=pos)
call p%precv(nlev_)%set('COARSE_MAT','DIST',info,pos=pos) call p%precv(nlev_)%set('COARSE_MAT','DIST',info,pos=pos)
case('GS','FWGS','FBGS')
call p%precv(nlev_)%set('SMOOTHER_TYPE','BJAC',info,pos=pos)
call p%precv(nlev_)%set('SUB_SOLVE','GS',info,pos=pos)
call p%precv(nlev_)%set('COARSE_MAT','DIST',info,pos=pos)
case('BWGS')
call p%precv(nlev_)%set('SMOOTHER_TYPE','BJAC',info,pos=pos)
call p%precv(nlev_)%set('SUB_SOLVE','BWGS',info,pos=pos)
call p%precv(nlev_)%set('COARSE_MAT','DIST',info,pos=pos)
case('L1-GS')
call p%precv(nlev_)%set('SMOOTHER_TYPE','L1-BJAC',info,pos=pos)
call p%precv(nlev_)%set('SUB_SOLVE','GS',info,pos=pos)
call p%precv(nlev_)%set('COARSE_MAT','DIST',info,pos=pos)
end select end select
endif endif
@ -827,11 +862,22 @@ subroutine mld_dcprecsetc(p,what,string,info,ilev,ilmax,pos,idx)
call p%precv(nlev_)%set('SMOOTHER_TYPE','BJAC',info,pos=pos) call p%precv(nlev_)%set('SMOOTHER_TYPE','BJAC',info,pos=pos)
call p%precv(nlev_)%set('SUB_SOLVE','DIAG',info,pos=pos) call p%precv(nlev_)%set('SUB_SOLVE','DIAG',info,pos=pos)
call p%precv(nlev_)%set('COARSE_MAT','DIST',info,pos=pos) call p%precv(nlev_)%set('COARSE_MAT','DIST',info,pos=pos)
case('L1-JACOBI') case('L1-JACOBI')
call p%precv(nlev_)%set('SMOOTHER_TYPE','BJAC',info,pos=pos) call p%precv(nlev_)%set('SMOOTHER_TYPE','BJAC',info,pos=pos)
call p%precv(nlev_)%set('SUB_SOLVE','L1-DIAG',info,pos=pos) call p%precv(nlev_)%set('SUB_SOLVE','L1-DIAG',info,pos=pos)
call p%precv(nlev_)%set('COARSE_MAT','DIST',info,pos=pos) call p%precv(nlev_)%set('COARSE_MAT','DIST',info,pos=pos)
case('GS','FWGS','FBGS')
call p%precv(nlev_)%set('SMOOTHER_TYPE','BJAC',info,pos=pos)
call p%precv(nlev_)%set('SUB_SOLVE','GS',info,pos=pos)
call p%precv(nlev_)%set('COARSE_MAT','DIST',info,pos=pos)
case('BWGS')
call p%precv(nlev_)%set('SMOOTHER_TYPE','BJAC',info,pos=pos)
call p%precv(nlev_)%set('SUB_SOLVE','BWGS',info,pos=pos)
call p%precv(nlev_)%set('COARSE_MAT','DIST',info,pos=pos)
case('L1-GS')
call p%precv(nlev_)%set('SMOOTHER_TYPE','L1-BJAC',info,pos=pos)
call p%precv(nlev_)%set('SUB_SOLVE','GS',info,pos=pos)
call p%precv(nlev_)%set('COARSE_MAT','DIST',info,pos=pos)
end select end select
endif endif

@ -256,7 +256,7 @@ subroutine mld_s_smoothers_bld(a,desc_a,prec,info,amold,vmold,imold)
& ' but the coarse matrix has been changed to replicated' & ' but the coarse matrix has been changed to replicated'
end if end if
case(mld_bjac_,mld_l1_bjac_,mld_jac_, mld_l1_jac_) case(mld_bjac_,mld_l1_bjac_,mld_jac_, mld_l1_jac_, mld_gs_, mld_fbgs_, mld_l1_gs_,mld_l1_fbgs_)
if (prec%precv(iszv)%parms%coarse_mat /= mld_distr_mat_) then if (prec%precv(iszv)%parms%coarse_mat /= mld_distr_mat_) then
write(psb_err_unit,*) & write(psb_err_unit,*) &
& 'MLD2P4: Warning: original coarse solver was requested as ',& & 'MLD2P4: Warning: original coarse solver was requested as ',&

@ -267,6 +267,18 @@ subroutine mld_scprecseti(p,what,val,info,ilev,ilmax,pos,idx)
call p%precv(nlev_)%set('SMOOTHER_TYPE',mld_bjac_,info,pos=pos) call p%precv(nlev_)%set('SMOOTHER_TYPE',mld_bjac_,info,pos=pos)
call p%precv(nlev_)%set('SUB_SOLVE',mld_l1_diag_scale_,info,pos=pos) call p%precv(nlev_)%set('SUB_SOLVE',mld_l1_diag_scale_,info,pos=pos)
call p%precv(nlev_)%set('COARSE_MAT',mld_distr_mat_,info,pos=pos) call p%precv(nlev_)%set('COARSE_MAT',mld_distr_mat_,info,pos=pos)
case(mld_gs_,mld_fbgs_)
call p%precv(nlev_)%set('SMOOTHER_TYPE',mld_bjac_,info,pos=pos)
call p%precv(nlev_)%set('SUB_SOLVE',mld_gs_,info,pos=pos)
call p%precv(nlev_)%set('COARSE_MAT',mld_distr_mat_,info,pos=pos)
case(mld_bwgs_)
call p%precv(nlev_)%set('SMOOTHER_TYPE',mld_bjac_,info,pos=pos)
call p%precv(nlev_)%set('SUB_SOLVE',mld_bwgs_,info,pos=pos)
call p%precv(nlev_)%set('COARSE_MAT',mld_distr_mat_,info,pos=pos)
case(mld_l1_gs_,mld_l1_fbgs_)
call p%precv(nlev_)%set('SMOOTHER_TYPE',mld_l1_bjac_,info,pos=pos)
call p%precv(nlev_)%set('SUB_SOLVE',mld_gs_,info,pos=pos)
call p%precv(nlev_)%set('COARSE_MAT',mld_distr_mat_,info,pos=pos)
end select end select
endif endif
@ -401,6 +413,18 @@ subroutine mld_scprecseti(p,what,val,info,ilev,ilmax,pos,idx)
call p%precv(nlev_)%set('SMOOTHER_TYPE',mld_bjac_,info,pos=pos) call p%precv(nlev_)%set('SMOOTHER_TYPE',mld_bjac_,info,pos=pos)
call p%precv(nlev_)%set('SUB_SOLVE',mld_l1_diag_scale_,info,pos=pos) call p%precv(nlev_)%set('SUB_SOLVE',mld_l1_diag_scale_,info,pos=pos)
call p%precv(nlev_)%set('COARSE_MAT',mld_distr_mat_,info,pos=pos) call p%precv(nlev_)%set('COARSE_MAT',mld_distr_mat_,info,pos=pos)
case(mld_gs_,mld_fbgs_)
call p%precv(nlev_)%set('SMOOTHER_TYPE',mld_bjac_,info,pos=pos)
call p%precv(nlev_)%set('SUB_SOLVE',mld_gs_,info,pos=pos)
call p%precv(nlev_)%set('COARSE_MAT',mld_distr_mat_,info,pos=pos)
case(mld_bwgs_)
call p%precv(nlev_)%set('SMOOTHER_TYPE',mld_bjac_,info,pos=pos)
call p%precv(nlev_)%set('SUB_SOLVE',mld_bwgs_,info,pos=pos)
call p%precv(nlev_)%set('COARSE_MAT',mld_distr_mat_,info,pos=pos)
case(mld_l1_gs_,mld_l1_fbgs_)
call p%precv(nlev_)%set('SMOOTHER_TYPE',mld_l1_bjac_,info,pos=pos)
call p%precv(nlev_)%set('SUB_SOLVE',mld_gs_,info,pos=pos)
call p%precv(nlev_)%set('COARSE_MAT',mld_distr_mat_,info,pos=pos)
end select end select
endif endif
@ -648,6 +672,18 @@ subroutine mld_scprecsetc(p,what,string,info,ilev,ilmax,pos,idx)
call p%precv(nlev_)%set('SMOOTHER_TYPE','BJAC',info,pos=pos) call p%precv(nlev_)%set('SMOOTHER_TYPE','BJAC',info,pos=pos)
call p%precv(nlev_)%set('SUB_SOLVE','L1-DIAG',info,pos=pos) call p%precv(nlev_)%set('SUB_SOLVE','L1-DIAG',info,pos=pos)
call p%precv(nlev_)%set('COARSE_MAT','DIST',info,pos=pos) call p%precv(nlev_)%set('COARSE_MAT','DIST',info,pos=pos)
case('GS','FWGS','FBGS')
call p%precv(nlev_)%set('SMOOTHER_TYPE','BJAC',info,pos=pos)
call p%precv(nlev_)%set('SUB_SOLVE','GS',info,pos=pos)
call p%precv(nlev_)%set('COARSE_MAT','DIST',info,pos=pos)
case('BWGS')
call p%precv(nlev_)%set('SMOOTHER_TYPE','BJAC',info,pos=pos)
call p%precv(nlev_)%set('SUB_SOLVE','BWGS',info,pos=pos)
call p%precv(nlev_)%set('COARSE_MAT','DIST',info,pos=pos)
case('L1-GS')
call p%precv(nlev_)%set('SMOOTHER_TYPE','L1-BJAC',info,pos=pos)
call p%precv(nlev_)%set('SUB_SOLVE','GS',info,pos=pos)
call p%precv(nlev_)%set('COARSE_MAT','DIST',info,pos=pos)
end select end select
endif endif
@ -759,11 +795,22 @@ subroutine mld_scprecsetc(p,what,string,info,ilev,ilmax,pos,idx)
call p%precv(nlev_)%set('SMOOTHER_TYPE','BJAC',info,pos=pos) call p%precv(nlev_)%set('SMOOTHER_TYPE','BJAC',info,pos=pos)
call p%precv(nlev_)%set('SUB_SOLVE','DIAG',info,pos=pos) call p%precv(nlev_)%set('SUB_SOLVE','DIAG',info,pos=pos)
call p%precv(nlev_)%set('COARSE_MAT','DIST',info,pos=pos) call p%precv(nlev_)%set('COARSE_MAT','DIST',info,pos=pos)
case('L1-JACOBI') case('L1-JACOBI')
call p%precv(nlev_)%set('SMOOTHER_TYPE','BJAC',info,pos=pos) call p%precv(nlev_)%set('SMOOTHER_TYPE','BJAC',info,pos=pos)
call p%precv(nlev_)%set('SUB_SOLVE','L1-DIAG',info,pos=pos) call p%precv(nlev_)%set('SUB_SOLVE','L1-DIAG',info,pos=pos)
call p%precv(nlev_)%set('COARSE_MAT','DIST',info,pos=pos) call p%precv(nlev_)%set('COARSE_MAT','DIST',info,pos=pos)
case('GS','FWGS','FBGS')
call p%precv(nlev_)%set('SMOOTHER_TYPE','BJAC',info,pos=pos)
call p%precv(nlev_)%set('SUB_SOLVE','GS',info,pos=pos)
call p%precv(nlev_)%set('COARSE_MAT','DIST',info,pos=pos)
case('BWGS')
call p%precv(nlev_)%set('SMOOTHER_TYPE','BJAC',info,pos=pos)
call p%precv(nlev_)%set('SUB_SOLVE','BWGS',info,pos=pos)
call p%precv(nlev_)%set('COARSE_MAT','DIST',info,pos=pos)
case('L1-GS')
call p%precv(nlev_)%set('SMOOTHER_TYPE','L1-BJAC',info,pos=pos)
call p%precv(nlev_)%set('SUB_SOLVE','GS',info,pos=pos)
call p%precv(nlev_)%set('COARSE_MAT','DIST',info,pos=pos)
end select end select
endif endif

@ -256,7 +256,7 @@ subroutine mld_z_smoothers_bld(a,desc_a,prec,info,amold,vmold,imold)
& ' but the coarse matrix has been changed to replicated' & ' but the coarse matrix has been changed to replicated'
end if end if
case(mld_bjac_,mld_l1_bjac_,mld_jac_, mld_l1_jac_) case(mld_bjac_,mld_l1_bjac_,mld_jac_, mld_l1_jac_, mld_gs_, mld_fbgs_, mld_l1_gs_,mld_l1_fbgs_)
if (prec%precv(iszv)%parms%coarse_mat /= mld_distr_mat_) then if (prec%precv(iszv)%parms%coarse_mat /= mld_distr_mat_) then
write(psb_err_unit,*) & write(psb_err_unit,*) &
& 'MLD2P4: Warning: original coarse solver was requested as ',& & 'MLD2P4: Warning: original coarse solver was requested as ',&

@ -287,6 +287,18 @@ subroutine mld_zcprecseti(p,what,val,info,ilev,ilmax,pos,idx)
call p%precv(nlev_)%set('SMOOTHER_TYPE',mld_bjac_,info,pos=pos) call p%precv(nlev_)%set('SMOOTHER_TYPE',mld_bjac_,info,pos=pos)
call p%precv(nlev_)%set('SUB_SOLVE',mld_l1_diag_scale_,info,pos=pos) call p%precv(nlev_)%set('SUB_SOLVE',mld_l1_diag_scale_,info,pos=pos)
call p%precv(nlev_)%set('COARSE_MAT',mld_distr_mat_,info,pos=pos) call p%precv(nlev_)%set('COARSE_MAT',mld_distr_mat_,info,pos=pos)
case(mld_gs_,mld_fbgs_)
call p%precv(nlev_)%set('SMOOTHER_TYPE',mld_bjac_,info,pos=pos)
call p%precv(nlev_)%set('SUB_SOLVE',mld_gs_,info,pos=pos)
call p%precv(nlev_)%set('COARSE_MAT',mld_distr_mat_,info,pos=pos)
case(mld_bwgs_)
call p%precv(nlev_)%set('SMOOTHER_TYPE',mld_bjac_,info,pos=pos)
call p%precv(nlev_)%set('SUB_SOLVE',mld_bwgs_,info,pos=pos)
call p%precv(nlev_)%set('COARSE_MAT',mld_distr_mat_,info,pos=pos)
case(mld_l1_gs_,mld_l1_fbgs_)
call p%precv(nlev_)%set('SMOOTHER_TYPE',mld_l1_bjac_,info,pos=pos)
call p%precv(nlev_)%set('SUB_SOLVE',mld_gs_,info,pos=pos)
call p%precv(nlev_)%set('COARSE_MAT',mld_distr_mat_,info,pos=pos)
end select end select
endif endif
@ -435,6 +447,18 @@ subroutine mld_zcprecseti(p,what,val,info,ilev,ilmax,pos,idx)
call p%precv(nlev_)%set('SMOOTHER_TYPE',mld_bjac_,info,pos=pos) call p%precv(nlev_)%set('SMOOTHER_TYPE',mld_bjac_,info,pos=pos)
call p%precv(nlev_)%set('SUB_SOLVE',mld_l1_diag_scale_,info,pos=pos) call p%precv(nlev_)%set('SUB_SOLVE',mld_l1_diag_scale_,info,pos=pos)
call p%precv(nlev_)%set('COARSE_MAT',mld_distr_mat_,info,pos=pos) call p%precv(nlev_)%set('COARSE_MAT',mld_distr_mat_,info,pos=pos)
case(mld_gs_,mld_fbgs_)
call p%precv(nlev_)%set('SMOOTHER_TYPE',mld_bjac_,info,pos=pos)
call p%precv(nlev_)%set('SUB_SOLVE',mld_gs_,info,pos=pos)
call p%precv(nlev_)%set('COARSE_MAT',mld_distr_mat_,info,pos=pos)
case(mld_bwgs_)
call p%precv(nlev_)%set('SMOOTHER_TYPE',mld_bjac_,info,pos=pos)
call p%precv(nlev_)%set('SUB_SOLVE',mld_bwgs_,info,pos=pos)
call p%precv(nlev_)%set('COARSE_MAT',mld_distr_mat_,info,pos=pos)
case(mld_l1_gs_,mld_l1_fbgs_)
call p%precv(nlev_)%set('SMOOTHER_TYPE',mld_l1_bjac_,info,pos=pos)
call p%precv(nlev_)%set('SUB_SOLVE',mld_gs_,info,pos=pos)
call p%precv(nlev_)%set('COARSE_MAT',mld_distr_mat_,info,pos=pos)
end select end select
endif endif
@ -670,7 +694,6 @@ subroutine mld_zcprecsetc(p,what,string,info,ilev,ilmax,pos,idx)
call p%precv(nlev_)%set('SUB_SOLVE','ILU',info,pos=pos) call p%precv(nlev_)%set('SUB_SOLVE','ILU',info,pos=pos)
call p%precv(nlev_)%set('COARSE_MAT','DIST',info,pos=pos) call p%precv(nlev_)%set('COARSE_MAT','DIST',info,pos=pos)
#endif #endif
case('SLUDIST') case('SLUDIST')
#if defined(HAVE_SLUDIST_) #if defined(HAVE_SLUDIST_)
call p%precv(nlev_)%set('SMOOTHER_TYPE','BJAC',info,pos=pos) call p%precv(nlev_)%set('SMOOTHER_TYPE','BJAC',info,pos=pos)
@ -702,6 +725,18 @@ subroutine mld_zcprecsetc(p,what,string,info,ilev,ilmax,pos,idx)
call p%precv(nlev_)%set('SMOOTHER_TYPE','BJAC',info,pos=pos) call p%precv(nlev_)%set('SMOOTHER_TYPE','BJAC',info,pos=pos)
call p%precv(nlev_)%set('SUB_SOLVE','L1-DIAG',info,pos=pos) call p%precv(nlev_)%set('SUB_SOLVE','L1-DIAG',info,pos=pos)
call p%precv(nlev_)%set('COARSE_MAT','DIST',info,pos=pos) call p%precv(nlev_)%set('COARSE_MAT','DIST',info,pos=pos)
case('GS','FWGS','FBGS')
call p%precv(nlev_)%set('SMOOTHER_TYPE','BJAC',info,pos=pos)
call p%precv(nlev_)%set('SUB_SOLVE','GS',info,pos=pos)
call p%precv(nlev_)%set('COARSE_MAT','DIST',info,pos=pos)
case('BWGS')
call p%precv(nlev_)%set('SMOOTHER_TYPE','BJAC',info,pos=pos)
call p%precv(nlev_)%set('SUB_SOLVE','BWGS',info,pos=pos)
call p%precv(nlev_)%set('COARSE_MAT','DIST',info,pos=pos)
case('L1-GS')
call p%precv(nlev_)%set('SMOOTHER_TYPE','L1-BJAC',info,pos=pos)
call p%precv(nlev_)%set('SUB_SOLVE','GS',info,pos=pos)
call p%precv(nlev_)%set('COARSE_MAT','DIST',info,pos=pos)
end select end select
endif endif
@ -827,11 +862,22 @@ subroutine mld_zcprecsetc(p,what,string,info,ilev,ilmax,pos,idx)
call p%precv(nlev_)%set('SMOOTHER_TYPE','BJAC',info,pos=pos) call p%precv(nlev_)%set('SMOOTHER_TYPE','BJAC',info,pos=pos)
call p%precv(nlev_)%set('SUB_SOLVE','DIAG',info,pos=pos) call p%precv(nlev_)%set('SUB_SOLVE','DIAG',info,pos=pos)
call p%precv(nlev_)%set('COARSE_MAT','DIST',info,pos=pos) call p%precv(nlev_)%set('COARSE_MAT','DIST',info,pos=pos)
case('L1-JACOBI') case('L1-JACOBI')
call p%precv(nlev_)%set('SMOOTHER_TYPE','BJAC',info,pos=pos) call p%precv(nlev_)%set('SMOOTHER_TYPE','BJAC',info,pos=pos)
call p%precv(nlev_)%set('SUB_SOLVE','L1-DIAG',info,pos=pos) call p%precv(nlev_)%set('SUB_SOLVE','L1-DIAG',info,pos=pos)
call p%precv(nlev_)%set('COARSE_MAT','DIST',info,pos=pos) call p%precv(nlev_)%set('COARSE_MAT','DIST',info,pos=pos)
case('GS','FWGS','FBGS')
call p%precv(nlev_)%set('SMOOTHER_TYPE','BJAC',info,pos=pos)
call p%precv(nlev_)%set('SUB_SOLVE','GS',info,pos=pos)
call p%precv(nlev_)%set('COARSE_MAT','DIST',info,pos=pos)
case('BWGS')
call p%precv(nlev_)%set('SMOOTHER_TYPE','BJAC',info,pos=pos)
call p%precv(nlev_)%set('SUB_SOLVE','BWGS',info,pos=pos)
call p%precv(nlev_)%set('COARSE_MAT','DIST',info,pos=pos)
case('L1-GS')
call p%precv(nlev_)%set('SMOOTHER_TYPE','L1-BJAC',info,pos=pos)
call p%precv(nlev_)%set('SUB_SOLVE','GS',info,pos=pos)
call p%precv(nlev_)%set('COARSE_MAT','DIST',info,pos=pos)
end select end select
endif endif

@ -210,8 +210,10 @@ module mld_base_prec_type
integer(psb_ipk_), parameter :: mld_bjac_ = 3 integer(psb_ipk_), parameter :: mld_bjac_ = 3
integer(psb_ipk_), parameter :: mld_l1_bjac_ = 4 integer(psb_ipk_), parameter :: mld_l1_bjac_ = 4
integer(psb_ipk_), parameter :: mld_as_ = 5 integer(psb_ipk_), parameter :: mld_as_ = 5
integer(psb_ipk_), parameter :: mld_max_prec_ = 5 integer(psb_ipk_), parameter :: mld_fbgs_ = 6
integer(psb_ipk_), parameter :: mld_fbgs_ = mld_max_prec_+1 integer(psb_ipk_), parameter :: mld_l1_gs_ = 7
integer(psb_ipk_), parameter :: mld_l1_fbgs_ = 8
integer(psb_ipk_), parameter :: mld_max_prec_ = 8
! !
! Constants for pre/post signaling. Now only used internally ! Constants for pre/post signaling. Now only used internally
! !
@ -387,7 +389,8 @@ module mld_base_prec_type
& mld_fact_names(0:mld_max_sub_solve_)=(/& & mld_fact_names(0:mld_max_sub_solve_)=(/&
& 'none ','Jacobi ',& & 'none ','Jacobi ',&
& 'L1-Jacobi ','none ','none ',& & 'L1-Jacobi ','none ','none ',&
& 'none ','none ','Point Jacobi ',& & 'none ','none ','L1-GS ',&
& 'L1-FBGS ','none ','Point Jacobi ',&
& 'L1-Jacobi ','Gauss-Seidel ','ILU(n) ',& & 'L1-Jacobi ','Gauss-Seidel ','ILU(n) ',&
& 'MILU(n) ','ILU(t,n) ',& & 'MILU(n) ','ILU(t,n) ',&
& 'SuperLU ','UMFPACK LU ',& & 'SuperLU ','UMFPACK LU ',&
@ -510,6 +513,10 @@ contains
val = mld_noprec_ val = mld_noprec_
case('BJAC') case('BJAC')
val = mld_bjac_ val = mld_bjac_
case('L1-GS')
val = mld_l1_gs_
case('L1-FBGS')
val = mld_l1_fbgs_
case('L1-BJAC') case('L1-BJAC')
val = mld_l1_bjac_ val = mld_l1_bjac_
case('JAC','JACOBI') case('JAC','JACOBI')

Loading…
Cancel
Save