mirror of
https://github.com/sfilippone/amg4psblas.git
synced 2026-10-06 22:55:12 +00:00
New structure of input files. Fixed defaults.
This commit is contained in:
@@ -442,7 +442,7 @@ contains
|
||||
lv%parms%aggr_eig = mld_max_norm_
|
||||
lv%parms%aggr_filter = mld_no_filter_mat_
|
||||
lv%parms%aggr_omega_val = szero
|
||||
lv%parms%aggr_thresh = 0.05_psb_spk_
|
||||
lv%parms%aggr_thresh = 0.01_psb_spk_
|
||||
|
||||
if (allocated(lv%sm)) call lv%sm%default()
|
||||
if (allocated(lv%sm2a)) then
|
||||
|
||||
@@ -442,7 +442,7 @@ contains
|
||||
lv%parms%aggr_eig = mld_max_norm_
|
||||
lv%parms%aggr_filter = mld_no_filter_mat_
|
||||
lv%parms%aggr_omega_val = dzero
|
||||
lv%parms%aggr_thresh = 0.05_psb_dpk_
|
||||
lv%parms%aggr_thresh = 0.01_psb_dpk_
|
||||
|
||||
if (allocated(lv%sm)) call lv%sm%default()
|
||||
if (allocated(lv%sm2a)) then
|
||||
|
||||
@@ -442,7 +442,7 @@ contains
|
||||
lv%parms%aggr_eig = mld_max_norm_
|
||||
lv%parms%aggr_filter = mld_no_filter_mat_
|
||||
lv%parms%aggr_omega_val = szero
|
||||
lv%parms%aggr_thresh = 0.05_psb_spk_
|
||||
lv%parms%aggr_thresh = 0.01_psb_spk_
|
||||
|
||||
if (allocated(lv%sm)) call lv%sm%default()
|
||||
if (allocated(lv%sm2a)) then
|
||||
|
||||
@@ -442,7 +442,7 @@ contains
|
||||
lv%parms%aggr_eig = mld_max_norm_
|
||||
lv%parms%aggr_filter = mld_no_filter_mat_
|
||||
lv%parms%aggr_omega_val = dzero
|
||||
lv%parms%aggr_thresh = 0.05_psb_dpk_
|
||||
lv%parms%aggr_thresh = 0.01_psb_dpk_
|
||||
|
||||
if (allocated(lv%sm)) call lv%sm%default()
|
||||
if (allocated(lv%sm2a)) then
|
||||
|
||||
@@ -53,15 +53,33 @@ module data_input
|
||||
|
||||
character(len=4096), private :: charbuf
|
||||
character, private, parameter :: def_marker="!"
|
||||
character, private, parameter :: cmt_marker="%"
|
||||
|
||||
contains
|
||||
|
||||
subroutine get_buffer(file,buffer)
|
||||
integer(psb_ipk_), intent(in) :: file
|
||||
character(len=*), intent(inout) :: buffer
|
||||
integer :: idx
|
||||
do
|
||||
read(file,'(a)',end=999) buffer
|
||||
buffer = adjustl(buffer)
|
||||
idx=index(charbuf,cmt_marker)
|
||||
if (idx == 1 ) then
|
||||
cycle
|
||||
else
|
||||
exit
|
||||
end if
|
||||
end do
|
||||
999 continue
|
||||
return
|
||||
end subroutine get_buffer
|
||||
|
||||
subroutine read_logical(val,file,marker)
|
||||
logical, intent(out) :: val
|
||||
integer(psb_ipk_), intent(in) :: file
|
||||
character(len=1), optional, intent(in) :: marker
|
||||
|
||||
read(file,'(a)')charbuf
|
||||
call get_buffer(file,charbuf)
|
||||
call read_data(val,charbuf,marker)
|
||||
|
||||
end subroutine read_logical
|
||||
@@ -71,7 +89,7 @@ contains
|
||||
integer(psb_ipk_), intent(in) :: file
|
||||
character(len=1), optional, intent(in) :: marker
|
||||
|
||||
read(file,'(a)')charbuf
|
||||
call get_buffer(file,charbuf)
|
||||
call read_data(val,charbuf,marker)
|
||||
|
||||
end subroutine read_char
|
||||
@@ -81,7 +99,7 @@ contains
|
||||
integer(psb_ipk_), intent(in) :: file
|
||||
character(len=1), optional, intent(in) :: marker
|
||||
|
||||
read(file,'(a)')charbuf
|
||||
call get_buffer(file,charbuf)
|
||||
call read_data(val,charbuf,marker)
|
||||
|
||||
end subroutine read_int
|
||||
@@ -91,7 +109,7 @@ contains
|
||||
integer(psb_ipk_), intent(in) :: file
|
||||
character(len=1), optional, intent(in) :: marker
|
||||
|
||||
read(file,'(a)')charbuf
|
||||
call get_buffer(file,charbuf)
|
||||
call read_data(val,charbuf,marker)
|
||||
|
||||
end subroutine read_int_array
|
||||
@@ -101,7 +119,7 @@ contains
|
||||
integer(psb_ipk_), intent(in) :: file
|
||||
character(len=1), optional, intent(in) :: marker
|
||||
|
||||
read(file,'(a)')charbuf
|
||||
call get_buffer(file,charbuf)
|
||||
call read_data(val,charbuf,marker)
|
||||
|
||||
end subroutine read_single
|
||||
@@ -111,7 +129,7 @@ contains
|
||||
integer(psb_ipk_), intent(in) :: file
|
||||
character(len=1), optional, intent(in) :: marker
|
||||
|
||||
read(file,'(a)')charbuf
|
||||
call get_buffer(file,charbuf)
|
||||
call read_data(val,charbuf,marker)
|
||||
|
||||
end subroutine read_single_array
|
||||
@@ -121,7 +139,7 @@ contains
|
||||
integer(psb_ipk_), intent(in) :: file
|
||||
character(len=1), optional, intent(in) :: marker
|
||||
|
||||
read(file,'(a)')charbuf
|
||||
call get_buffer(file,charbuf)
|
||||
call read_data(val,charbuf,marker)
|
||||
|
||||
end subroutine read_double
|
||||
@@ -131,7 +149,7 @@ contains
|
||||
integer(psb_ipk_), intent(in) :: file
|
||||
character(len=1), optional, intent(in) :: marker
|
||||
|
||||
read(file,'(a)')charbuf
|
||||
call get_buffer(file,charbuf)
|
||||
call read_data(val,charbuf,marker)
|
||||
|
||||
end subroutine read_double_array
|
||||
|
||||
@@ -580,7 +580,7 @@ program mld_d_pde2d
|
||||
|
||||
case ('JACOBI','GS','FWGS','FBGS')
|
||||
! 1-level sweeps from "outer_sweeps"
|
||||
call prec%set('smoother_sweeps', p_choice%outer_sweeps, info)
|
||||
call prec%set('smoother_sweeps', p_choice%jsweeps, info)
|
||||
|
||||
case ('BJAC')
|
||||
call prec%set('smoother_sweeps', p_choice%jsweeps, info)
|
||||
@@ -624,29 +624,41 @@ program mld_d_pde2d
|
||||
|
||||
call prec%set('smoother_type', p_choice%smther, info)
|
||||
call prec%set('smoother_sweeps', p_choice%jsweeps, info)
|
||||
call prec%set('sub_ovr', p_choice%novr, info)
|
||||
call prec%set('sub_restr', p_choice%restr, info)
|
||||
call prec%set('sub_prol', p_choice%prol, info)
|
||||
call prec%set('sub_solve', p_choice%solve, info)
|
||||
call prec%set('sub_fillin', p_choice%fill, info)
|
||||
call prec%set('sub_iluthrs', p_choice%thr, info)
|
||||
|
||||
select case (psb_toupper(p_choice%smther))
|
||||
case ('GS','BWGS','FBGS','JACOBI')
|
||||
! do nothing
|
||||
case default
|
||||
call prec%set('sub_ovr', p_choice%novr, info)
|
||||
call prec%set('sub_restr', p_choice%restr, info)
|
||||
call prec%set('sub_prol', p_choice%prol, info)
|
||||
call prec%set('sub_solve', p_choice%solve, info)
|
||||
call prec%set('sub_fillin', p_choice%fill, info)
|
||||
call prec%set('sub_iluthrs', p_choice%thr, info)
|
||||
end select
|
||||
|
||||
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('sub_ovr', p_choice%novr2, info,pos='post')
|
||||
call prec%set('sub_restr', p_choice%restr2, info,pos='post')
|
||||
call prec%set('sub_prol', p_choice%prol2, info,pos='post')
|
||||
call prec%set('sub_solve', p_choice%solve2, info,pos='post')
|
||||
call prec%set('sub_fillin', p_choice%fill2, info,pos='post')
|
||||
call prec%set('sub_iluthrs', p_choice%thr2, info,pos='post')
|
||||
select case (psb_toupper(p_choice%smther2))
|
||||
case ('GS','BWGS','FBGS','JACOBI')
|
||||
! do nothing
|
||||
case default
|
||||
call prec%set('sub_ovr', p_choice%novr2, info,pos='post')
|
||||
call prec%set('sub_restr', p_choice%restr2, info,pos='post')
|
||||
call prec%set('sub_prol', p_choice%prol2, info,pos='post')
|
||||
call prec%set('sub_solve', p_choice%solve2, info,pos='post')
|
||||
call prec%set('sub_fillin', p_choice%fill2, info,pos='post')
|
||||
call prec%set('sub_iluthrs', p_choice%thr2, info,pos='post')
|
||||
end select
|
||||
end if
|
||||
|
||||
if (psb_toupper(p_choice%csolve) /= 'DEFLT') then
|
||||
call prec%set('coarse_solve', p_choice%csolve, info)
|
||||
if (psb_toupper(p_choice%csolve) == 'BJAC') &
|
||||
& call prec%set('coarse_subsolve', p_choice%csbsolve, info)
|
||||
call prec%set('coarse_mat', p_choice%cmat, info)
|
||||
if (psb_toupper(p_choice%cmat) /= 'DEFLT')&
|
||||
& call prec%set('coarse_mat', p_choice%cmat, info)
|
||||
call prec%set('coarse_fillin', p_choice%cfill, info)
|
||||
call prec%set('coarse_iluthrs', p_choice%cthres, info)
|
||||
call prec%set('coarse_sweeps', p_choice%cjswp, info)
|
||||
@@ -800,9 +812,27 @@ contains
|
||||
! preconditioner type
|
||||
call read_data(prec%descr,psb_inp_unit) ! verbose description of the prec
|
||||
call read_data(prec%ptype,psb_inp_unit) ! preconditioner type
|
||||
call read_data(prec%outer_sweeps,psb_inp_unit) ! number of 1lev/outer sweeps
|
||||
! First smoother / 1-lev preconditioner
|
||||
call read_data(prec%smther,psb_inp_unit) ! smoother type
|
||||
call read_data(prec%jsweeps,psb_inp_unit) ! (pre-)smoother / 1-lev prec sweeps
|
||||
call read_data(prec%novr,psb_inp_unit) ! number of overlap layers
|
||||
call read_data(prec%restr,psb_inp_unit) ! restriction over application of AS
|
||||
call read_data(prec%prol,psb_inp_unit) ! prolongation over application of AS
|
||||
call read_data(prec%solve,psb_inp_unit) ! local subsolver
|
||||
call read_data(prec%fill,psb_inp_unit) ! fill-in for incomplete LU
|
||||
call read_data(prec%thr,psb_inp_unit) ! threshold for ILUT
|
||||
! Second smoother/ AMG post-smoother (if NONE ignored in main)
|
||||
call read_data(prec%smther2,psb_inp_unit) ! smoother type
|
||||
call read_data(prec%jsweeps2,psb_inp_unit) ! (post-)smoother sweeps
|
||||
call read_data(prec%novr2,psb_inp_unit) ! number of overlap layers
|
||||
call read_data(prec%restr2,psb_inp_unit) ! restriction over application of AS
|
||||
call read_data(prec%prol2,psb_inp_unit) ! prolongation over application of AS
|
||||
call read_data(prec%solve2,psb_inp_unit) ! local subsolver
|
||||
call read_data(prec%fill2,psb_inp_unit) ! fill-in for incomplete LU
|
||||
call read_data(prec%thr2,psb_inp_unit) ! threshold for ILUT
|
||||
! general AMG data
|
||||
call read_data(prec%mlcycle,psb_inp_unit) ! AMG cycle type
|
||||
call read_data(prec%outer_sweeps,psb_inp_unit) ! number of 1lev/outer sweeps
|
||||
call read_data(prec%maxlevs,psb_inp_unit) ! max number of levels in AMG prec
|
||||
call read_data(prec%csize,psb_inp_unit) ! min size coarsest mat
|
||||
! aggregation
|
||||
@@ -819,24 +849,6 @@ contains
|
||||
read(psb_inp_unit,*) ! dummy read to skip a record
|
||||
end if
|
||||
call read_data(prec%athres,psb_inp_unit) ! smoothed aggr thresh
|
||||
! AMG smoother (or pre-smoother) / 1-lev preconditioner
|
||||
call read_data(prec%smther,psb_inp_unit) ! smoother type
|
||||
call read_data(prec%jsweeps,psb_inp_unit) ! (pre-)smoother / 1-lev prec sweeps
|
||||
call read_data(prec%novr,psb_inp_unit) ! number of overlap layers
|
||||
call read_data(prec%restr,psb_inp_unit) ! restriction over application of AS
|
||||
call read_data(prec%prol,psb_inp_unit) ! prolongation over application of AS
|
||||
call read_data(prec%solve,psb_inp_unit) ! local subsolver
|
||||
call read_data(prec%fill,psb_inp_unit) ! fill-in for incomplete LU
|
||||
call read_data(prec%thr,psb_inp_unit) ! threshold for ILUT
|
||||
! AMG post-smoother
|
||||
call read_data(prec%smther2,psb_inp_unit) ! smoother type
|
||||
call read_data(prec%jsweeps2,psb_inp_unit) ! (post-)smoother sweeps
|
||||
call read_data(prec%novr2,psb_inp_unit) ! number of overlap layers
|
||||
call read_data(prec%restr2,psb_inp_unit) ! restriction over application of AS
|
||||
call read_data(prec%prol2,psb_inp_unit) ! prolongation over application of AS
|
||||
call read_data(prec%solve2,psb_inp_unit) ! local subsolver
|
||||
call read_data(prec%fill2,psb_inp_unit) ! fill-in for incomplete LU
|
||||
call read_data(prec%thr2,psb_inp_unit) ! threshold for ILUT
|
||||
! coasest-level solver
|
||||
call read_data(prec%csolve,psb_inp_unit) ! coarsest-lev solver
|
||||
call read_data(prec%csbsolve,psb_inp_unit) ! coarsest-lev subsolver
|
||||
@@ -860,7 +872,7 @@ contains
|
||||
call psb_bcast(icontxt,prec%ptype)
|
||||
|
||||
! broadcast first (pre-)smoother / 1-lev prec data
|
||||
call psb_bcast(icontxt,prec%smther) ! actually not needed for 1-lev precs
|
||||
call psb_bcast(icontxt,prec%smther)
|
||||
call psb_bcast(icontxt,prec%jsweeps)
|
||||
call psb_bcast(icontxt,prec%novr)
|
||||
call psb_bcast(icontxt,prec%restr)
|
||||
@@ -868,44 +880,41 @@ contains
|
||||
call psb_bcast(icontxt,prec%solve)
|
||||
call psb_bcast(icontxt,prec%fill)
|
||||
call psb_bcast(icontxt,prec%thr)
|
||||
! broadcast second (post-)smoother
|
||||
call psb_bcast(icontxt,prec%smther2)
|
||||
call psb_bcast(icontxt,prec%jsweeps2)
|
||||
call psb_bcast(icontxt,prec%novr2)
|
||||
call psb_bcast(icontxt,prec%restr2)
|
||||
call psb_bcast(icontxt,prec%prol2)
|
||||
call psb_bcast(icontxt,prec%solve2)
|
||||
call psb_bcast(icontxt,prec%fill2)
|
||||
call psb_bcast(icontxt,prec%thr2)
|
||||
|
||||
! broadcast AMG parameters
|
||||
call psb_bcast(icontxt,prec%mlcycle)
|
||||
call psb_bcast(icontxt,prec%outer_sweeps)
|
||||
|
||||
! broadcast (other) AMG parameters
|
||||
if (psb_toupper(prec%ptype) == 'ML') then
|
||||
|
||||
call psb_bcast(icontxt,prec%mlcycle)
|
||||
call psb_bcast(icontxt,prec%maxlevs)
|
||||
|
||||
call psb_bcast(icontxt,prec%smther2)
|
||||
call psb_bcast(icontxt,prec%jsweeps2)
|
||||
call psb_bcast(icontxt,prec%novr2)
|
||||
call psb_bcast(icontxt,prec%restr2)
|
||||
call psb_bcast(icontxt,prec%prol2)
|
||||
call psb_bcast(icontxt,prec%solve2)
|
||||
call psb_bcast(icontxt,prec%fill2)
|
||||
call psb_bcast(icontxt,prec%thr2)
|
||||
|
||||
call psb_bcast(icontxt,prec%aggr_prol)
|
||||
call psb_bcast(icontxt,prec%par_aggr_alg)
|
||||
call psb_bcast(icontxt,prec%aggr_ord)
|
||||
call psb_bcast(icontxt,prec%aggr_filter)
|
||||
call psb_bcast(icontxt,prec%mncrratio)
|
||||
call psb_bcast(ictxt,prec%thrvsz)
|
||||
if (prec%thrvsz > 0) then
|
||||
if (iam /= psb_root_) call psb_realloc(prec%thrvsz,prec%athresv,info)
|
||||
call psb_bcast(ictxt,prec%athresv)
|
||||
end if
|
||||
call psb_bcast(ictxt,prec%athres)
|
||||
|
||||
call psb_bcast(icontxt,prec%csize)
|
||||
call psb_bcast(icontxt,prec%cmat)
|
||||
call psb_bcast(icontxt,prec%csolve)
|
||||
call psb_bcast(icontxt,prec%csbsolve)
|
||||
call psb_bcast(icontxt,prec%cfill)
|
||||
call psb_bcast(icontxt,prec%cthres)
|
||||
call psb_bcast(icontxt,prec%cjswp)
|
||||
|
||||
call psb_bcast(icontxt,prec%maxlevs)
|
||||
|
||||
call psb_bcast(icontxt,prec%aggr_prol)
|
||||
call psb_bcast(icontxt,prec%par_aggr_alg)
|
||||
call psb_bcast(icontxt,prec%aggr_ord)
|
||||
call psb_bcast(icontxt,prec%aggr_filter)
|
||||
call psb_bcast(icontxt,prec%mncrratio)
|
||||
call psb_bcast(ictxt,prec%thrvsz)
|
||||
if (prec%thrvsz > 0) then
|
||||
if (iam /= psb_root_) call psb_realloc(prec%thrvsz,prec%athresv,info)
|
||||
call psb_bcast(ictxt,prec%athresv)
|
||||
end if
|
||||
call psb_bcast(ictxt,prec%athres)
|
||||
|
||||
call psb_bcast(icontxt,prec%csize)
|
||||
call psb_bcast(icontxt,prec%cmat)
|
||||
call psb_bcast(icontxt,prec%csolve)
|
||||
call psb_bcast(icontxt,prec%csbsolve)
|
||||
call psb_bcast(icontxt,prec%cfill)
|
||||
call psb_bcast(icontxt,prec%cthres)
|
||||
call psb_bcast(icontxt,prec%cjswp)
|
||||
|
||||
|
||||
end subroutine get_parms
|
||||
|
||||
|
||||
@@ -634,7 +634,7 @@ program mld_d_pde3d
|
||||
|
||||
case ('JACOBI','GS','FWGS','FBGS')
|
||||
! 1-level sweeps from "outer_sweeps"
|
||||
call prec%set('smoother_sweeps', p_choice%outer_sweeps, info)
|
||||
call prec%set('smoother_sweeps', p_choice%jsweeps, info)
|
||||
|
||||
case ('BJAC')
|
||||
call prec%set('smoother_sweeps', p_choice%jsweeps, info)
|
||||
@@ -678,29 +678,41 @@ program mld_d_pde3d
|
||||
|
||||
call prec%set('smoother_type', p_choice%smther, info)
|
||||
call prec%set('smoother_sweeps', p_choice%jsweeps, info)
|
||||
call prec%set('sub_ovr', p_choice%novr, info)
|
||||
call prec%set('sub_restr', p_choice%restr, info)
|
||||
call prec%set('sub_prol', p_choice%prol, info)
|
||||
call prec%set('sub_solve', p_choice%solve, info)
|
||||
call prec%set('sub_fillin', p_choice%fill, info)
|
||||
call prec%set('sub_iluthrs', p_choice%thr, info)
|
||||
|
||||
select case (psb_toupper(p_choice%smther))
|
||||
case ('GS','BWGS','FBGS','JACOBI')
|
||||
! do nothing
|
||||
case default
|
||||
call prec%set('sub_ovr', p_choice%novr, info)
|
||||
call prec%set('sub_restr', p_choice%restr, info)
|
||||
call prec%set('sub_prol', p_choice%prol, info)
|
||||
call prec%set('sub_solve', p_choice%solve, info)
|
||||
call prec%set('sub_fillin', p_choice%fill, info)
|
||||
call prec%set('sub_iluthrs', p_choice%thr, info)
|
||||
end select
|
||||
|
||||
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('sub_ovr', p_choice%novr2, info,pos='post')
|
||||
call prec%set('sub_restr', p_choice%restr2, info,pos='post')
|
||||
call prec%set('sub_prol', p_choice%prol2, info,pos='post')
|
||||
call prec%set('sub_solve', p_choice%solve2, info,pos='post')
|
||||
call prec%set('sub_fillin', p_choice%fill2, info,pos='post')
|
||||
call prec%set('sub_iluthrs', p_choice%thr2, info,pos='post')
|
||||
select case (psb_toupper(p_choice%smther2))
|
||||
case ('GS','BWGS','FBGS','JACOBI')
|
||||
! do nothing
|
||||
case default
|
||||
call prec%set('sub_ovr', p_choice%novr2, info,pos='post')
|
||||
call prec%set('sub_restr', p_choice%restr2, info,pos='post')
|
||||
call prec%set('sub_prol', p_choice%prol2, info,pos='post')
|
||||
call prec%set('sub_solve', p_choice%solve2, info,pos='post')
|
||||
call prec%set('sub_fillin', p_choice%fill2, info,pos='post')
|
||||
call prec%set('sub_iluthrs', p_choice%thr2, info,pos='post')
|
||||
end select
|
||||
end if
|
||||
|
||||
if (psb_toupper(p_choice%csolve) /= 'DEFLT') then
|
||||
call prec%set('coarse_solve', p_choice%csolve, info)
|
||||
if (psb_toupper(p_choice%csolve) == 'BJAC') &
|
||||
& call prec%set('coarse_subsolve', p_choice%csbsolve, info)
|
||||
call prec%set('coarse_mat', p_choice%cmat, info)
|
||||
if (psb_toupper(p_choice%cmat) /= 'DEFLT')&
|
||||
& call prec%set('coarse_mat', p_choice%cmat, info)
|
||||
call prec%set('coarse_fillin', p_choice%cfill, info)
|
||||
call prec%set('coarse_iluthrs', p_choice%cthres, info)
|
||||
call prec%set('coarse_sweeps', p_choice%cjswp, info)
|
||||
@@ -854,9 +866,27 @@ contains
|
||||
! preconditioner type
|
||||
call read_data(prec%descr,psb_inp_unit) ! verbose description of the prec
|
||||
call read_data(prec%ptype,psb_inp_unit) ! preconditioner type
|
||||
call read_data(prec%outer_sweeps,psb_inp_unit) ! number of 1lev/outer sweeps
|
||||
! First smoother / 1-lev preconditioner
|
||||
call read_data(prec%smther,psb_inp_unit) ! smoother type
|
||||
call read_data(prec%jsweeps,psb_inp_unit) ! (pre-)smoother / 1-lev prec sweeps
|
||||
call read_data(prec%novr,psb_inp_unit) ! number of overlap layers
|
||||
call read_data(prec%restr,psb_inp_unit) ! restriction over application of AS
|
||||
call read_data(prec%prol,psb_inp_unit) ! prolongation over application of AS
|
||||
call read_data(prec%solve,psb_inp_unit) ! local subsolver
|
||||
call read_data(prec%fill,psb_inp_unit) ! fill-in for incomplete LU
|
||||
call read_data(prec%thr,psb_inp_unit) ! threshold for ILUT
|
||||
! Second smoother/ AMG post-smoother (if NONE ignored in main)
|
||||
call read_data(prec%smther2,psb_inp_unit) ! smoother type
|
||||
call read_data(prec%jsweeps2,psb_inp_unit) ! (post-)smoother sweeps
|
||||
call read_data(prec%novr2,psb_inp_unit) ! number of overlap layers
|
||||
call read_data(prec%restr2,psb_inp_unit) ! restriction over application of AS
|
||||
call read_data(prec%prol2,psb_inp_unit) ! prolongation over application of AS
|
||||
call read_data(prec%solve2,psb_inp_unit) ! local subsolver
|
||||
call read_data(prec%fill2,psb_inp_unit) ! fill-in for incomplete LU
|
||||
call read_data(prec%thr2,psb_inp_unit) ! threshold for ILUT
|
||||
! general AMG data
|
||||
call read_data(prec%mlcycle,psb_inp_unit) ! AMG cycle type
|
||||
call read_data(prec%outer_sweeps,psb_inp_unit) ! number of 1lev/outer sweeps
|
||||
call read_data(prec%maxlevs,psb_inp_unit) ! max number of levels in AMG prec
|
||||
call read_data(prec%csize,psb_inp_unit) ! min size coarsest mat
|
||||
! aggregation
|
||||
@@ -873,24 +903,6 @@ contains
|
||||
read(psb_inp_unit,*) ! dummy read to skip a record
|
||||
end if
|
||||
call read_data(prec%athres,psb_inp_unit) ! smoothed aggr thresh
|
||||
! AMG smoother (or pre-smoother) / 1-lev preconditioner
|
||||
call read_data(prec%smther,psb_inp_unit) ! smoother type
|
||||
call read_data(prec%jsweeps,psb_inp_unit) ! (pre-)smoother / 1-lev prec sweeps
|
||||
call read_data(prec%novr,psb_inp_unit) ! number of overlap layers
|
||||
call read_data(prec%restr,psb_inp_unit) ! restriction over application of AS
|
||||
call read_data(prec%prol,psb_inp_unit) ! prolongation over application of AS
|
||||
call read_data(prec%solve,psb_inp_unit) ! local subsolver
|
||||
call read_data(prec%fill,psb_inp_unit) ! fill-in for incomplete LU
|
||||
call read_data(prec%thr,psb_inp_unit) ! threshold for ILUT
|
||||
! AMG post-smoother
|
||||
call read_data(prec%smther2,psb_inp_unit) ! smoother type
|
||||
call read_data(prec%jsweeps2,psb_inp_unit) ! (post-)smoother sweeps
|
||||
call read_data(prec%novr2,psb_inp_unit) ! number of overlap layers
|
||||
call read_data(prec%restr2,psb_inp_unit) ! restriction over application of AS
|
||||
call read_data(prec%prol2,psb_inp_unit) ! prolongation over application of AS
|
||||
call read_data(prec%solve2,psb_inp_unit) ! local subsolver
|
||||
call read_data(prec%fill2,psb_inp_unit) ! fill-in for incomplete LU
|
||||
call read_data(prec%thr2,psb_inp_unit) ! threshold for ILUT
|
||||
! coasest-level solver
|
||||
call read_data(prec%csolve,psb_inp_unit) ! coarsest-lev solver
|
||||
call read_data(prec%csbsolve,psb_inp_unit) ! coarsest-lev subsolver
|
||||
@@ -914,7 +926,7 @@ contains
|
||||
call psb_bcast(icontxt,prec%ptype)
|
||||
|
||||
! broadcast first (pre-)smoother / 1-lev prec data
|
||||
call psb_bcast(icontxt,prec%smther) ! actually not needed for 1-lev precs
|
||||
call psb_bcast(icontxt,prec%smther)
|
||||
call psb_bcast(icontxt,prec%jsweeps)
|
||||
call psb_bcast(icontxt,prec%novr)
|
||||
call psb_bcast(icontxt,prec%restr)
|
||||
@@ -922,44 +934,41 @@ contains
|
||||
call psb_bcast(icontxt,prec%solve)
|
||||
call psb_bcast(icontxt,prec%fill)
|
||||
call psb_bcast(icontxt,prec%thr)
|
||||
! broadcast second (post-)smoother
|
||||
call psb_bcast(icontxt,prec%smther2)
|
||||
call psb_bcast(icontxt,prec%jsweeps2)
|
||||
call psb_bcast(icontxt,prec%novr2)
|
||||
call psb_bcast(icontxt,prec%restr2)
|
||||
call psb_bcast(icontxt,prec%prol2)
|
||||
call psb_bcast(icontxt,prec%solve2)
|
||||
call psb_bcast(icontxt,prec%fill2)
|
||||
call psb_bcast(icontxt,prec%thr2)
|
||||
|
||||
! broadcast AMG parameters
|
||||
call psb_bcast(icontxt,prec%mlcycle)
|
||||
call psb_bcast(icontxt,prec%outer_sweeps)
|
||||
|
||||
! broadcast (other) AMG parameters
|
||||
if (psb_toupper(prec%ptype) == 'ML') then
|
||||
|
||||
call psb_bcast(icontxt,prec%mlcycle)
|
||||
call psb_bcast(icontxt,prec%maxlevs)
|
||||
|
||||
call psb_bcast(icontxt,prec%smther2)
|
||||
call psb_bcast(icontxt,prec%jsweeps2)
|
||||
call psb_bcast(icontxt,prec%novr2)
|
||||
call psb_bcast(icontxt,prec%restr2)
|
||||
call psb_bcast(icontxt,prec%prol2)
|
||||
call psb_bcast(icontxt,prec%solve2)
|
||||
call psb_bcast(icontxt,prec%fill2)
|
||||
call psb_bcast(icontxt,prec%thr2)
|
||||
|
||||
call psb_bcast(icontxt,prec%aggr_prol)
|
||||
call psb_bcast(icontxt,prec%par_aggr_alg)
|
||||
call psb_bcast(icontxt,prec%aggr_ord)
|
||||
call psb_bcast(icontxt,prec%aggr_filter)
|
||||
call psb_bcast(icontxt,prec%mncrratio)
|
||||
call psb_bcast(ictxt,prec%thrvsz)
|
||||
if (prec%thrvsz > 0) then
|
||||
if (iam /= psb_root_) call psb_realloc(prec%thrvsz,prec%athresv,info)
|
||||
call psb_bcast(ictxt,prec%athresv)
|
||||
end if
|
||||
call psb_bcast(ictxt,prec%athres)
|
||||
|
||||
call psb_bcast(icontxt,prec%csize)
|
||||
call psb_bcast(icontxt,prec%cmat)
|
||||
call psb_bcast(icontxt,prec%csolve)
|
||||
call psb_bcast(icontxt,prec%csbsolve)
|
||||
call psb_bcast(icontxt,prec%cfill)
|
||||
call psb_bcast(icontxt,prec%cthres)
|
||||
call psb_bcast(icontxt,prec%cjswp)
|
||||
|
||||
call psb_bcast(icontxt,prec%maxlevs)
|
||||
|
||||
call psb_bcast(icontxt,prec%aggr_prol)
|
||||
call psb_bcast(icontxt,prec%par_aggr_alg)
|
||||
call psb_bcast(icontxt,prec%aggr_ord)
|
||||
call psb_bcast(icontxt,prec%aggr_filter)
|
||||
call psb_bcast(icontxt,prec%mncrratio)
|
||||
call psb_bcast(ictxt,prec%thrvsz)
|
||||
if (prec%thrvsz > 0) then
|
||||
if (iam /= psb_root_) call psb_realloc(prec%thrvsz,prec%athresv,info)
|
||||
call psb_bcast(ictxt,prec%athresv)
|
||||
end if
|
||||
call psb_bcast(ictxt,prec%athres)
|
||||
|
||||
call psb_bcast(icontxt,prec%csize)
|
||||
call psb_bcast(icontxt,prec%cmat)
|
||||
call psb_bcast(icontxt,prec%csolve)
|
||||
call psb_bcast(icontxt,prec%csbsolve)
|
||||
call psb_bcast(icontxt,prec%cfill)
|
||||
call psb_bcast(icontxt,prec%cthres)
|
||||
call psb_bcast(icontxt,prec%cjswp)
|
||||
|
||||
|
||||
end subroutine get_parms
|
||||
|
||||
|
||||
@@ -580,7 +580,7 @@ program mld_s_pde2d
|
||||
|
||||
case ('JACOBI','GS','FWGS','FBGS')
|
||||
! 1-level sweeps from "outer_sweeps"
|
||||
call prec%set('smoother_sweeps', p_choice%outer_sweeps, info)
|
||||
call prec%set('smoother_sweeps', p_choice%jsweeps, info)
|
||||
|
||||
case ('BJAC')
|
||||
call prec%set('smoother_sweeps', p_choice%jsweeps, info)
|
||||
@@ -624,29 +624,41 @@ program mld_s_pde2d
|
||||
|
||||
call prec%set('smoother_type', p_choice%smther, info)
|
||||
call prec%set('smoother_sweeps', p_choice%jsweeps, info)
|
||||
call prec%set('sub_ovr', p_choice%novr, info)
|
||||
call prec%set('sub_restr', p_choice%restr, info)
|
||||
call prec%set('sub_prol', p_choice%prol, info)
|
||||
call prec%set('sub_solve', p_choice%solve, info)
|
||||
call prec%set('sub_fillin', p_choice%fill, info)
|
||||
call prec%set('sub_iluthrs', p_choice%thr, info)
|
||||
|
||||
select case (psb_toupper(p_choice%smther))
|
||||
case ('GS','BWGS','FBGS','JACOBI')
|
||||
! do nothing
|
||||
case default
|
||||
call prec%set('sub_ovr', p_choice%novr, info)
|
||||
call prec%set('sub_restr', p_choice%restr, info)
|
||||
call prec%set('sub_prol', p_choice%prol, info)
|
||||
call prec%set('sub_solve', p_choice%solve, info)
|
||||
call prec%set('sub_fillin', p_choice%fill, info)
|
||||
call prec%set('sub_iluthrs', p_choice%thr, info)
|
||||
end select
|
||||
|
||||
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('sub_ovr', p_choice%novr2, info,pos='post')
|
||||
call prec%set('sub_restr', p_choice%restr2, info,pos='post')
|
||||
call prec%set('sub_prol', p_choice%prol2, info,pos='post')
|
||||
call prec%set('sub_solve', p_choice%solve2, info,pos='post')
|
||||
call prec%set('sub_fillin', p_choice%fill2, info,pos='post')
|
||||
call prec%set('sub_iluthrs', p_choice%thr2, info,pos='post')
|
||||
select case (psb_toupper(p_choice%smther2))
|
||||
case ('GS','BWGS','FBGS','JACOBI')
|
||||
! do nothing
|
||||
case default
|
||||
call prec%set('sub_ovr', p_choice%novr2, info,pos='post')
|
||||
call prec%set('sub_restr', p_choice%restr2, info,pos='post')
|
||||
call prec%set('sub_prol', p_choice%prol2, info,pos='post')
|
||||
call prec%set('sub_solve', p_choice%solve2, info,pos='post')
|
||||
call prec%set('sub_fillin', p_choice%fill2, info,pos='post')
|
||||
call prec%set('sub_iluthrs', p_choice%thr2, info,pos='post')
|
||||
end select
|
||||
end if
|
||||
|
||||
if (psb_toupper(p_choice%csolve) /= 'DEFLT') then
|
||||
call prec%set('coarse_solve', p_choice%csolve, info)
|
||||
if (psb_toupper(p_choice%csolve) == 'BJAC') &
|
||||
& call prec%set('coarse_subsolve', p_choice%csbsolve, info)
|
||||
call prec%set('coarse_mat', p_choice%cmat, info)
|
||||
if (psb_toupper(p_choice%cmat) /= 'DEFLT')&
|
||||
& call prec%set('coarse_mat', p_choice%cmat, info)
|
||||
call prec%set('coarse_fillin', p_choice%cfill, info)
|
||||
call prec%set('coarse_iluthrs', p_choice%cthres, info)
|
||||
call prec%set('coarse_sweeps', p_choice%cjswp, info)
|
||||
@@ -800,9 +812,27 @@ contains
|
||||
! preconditioner type
|
||||
call read_data(prec%descr,psb_inp_unit) ! verbose description of the prec
|
||||
call read_data(prec%ptype,psb_inp_unit) ! preconditioner type
|
||||
call read_data(prec%outer_sweeps,psb_inp_unit) ! number of 1lev/outer sweeps
|
||||
! First smoother / 1-lev preconditioner
|
||||
call read_data(prec%smther,psb_inp_unit) ! smoother type
|
||||
call read_data(prec%jsweeps,psb_inp_unit) ! (pre-)smoother / 1-lev prec sweeps
|
||||
call read_data(prec%novr,psb_inp_unit) ! number of overlap layers
|
||||
call read_data(prec%restr,psb_inp_unit) ! restriction over application of AS
|
||||
call read_data(prec%prol,psb_inp_unit) ! prolongation over application of AS
|
||||
call read_data(prec%solve,psb_inp_unit) ! local subsolver
|
||||
call read_data(prec%fill,psb_inp_unit) ! fill-in for incomplete LU
|
||||
call read_data(prec%thr,psb_inp_unit) ! threshold for ILUT
|
||||
! Second smoother/ AMG post-smoother (if NONE ignored in main)
|
||||
call read_data(prec%smther2,psb_inp_unit) ! smoother type
|
||||
call read_data(prec%jsweeps2,psb_inp_unit) ! (post-)smoother sweeps
|
||||
call read_data(prec%novr2,psb_inp_unit) ! number of overlap layers
|
||||
call read_data(prec%restr2,psb_inp_unit) ! restriction over application of AS
|
||||
call read_data(prec%prol2,psb_inp_unit) ! prolongation over application of AS
|
||||
call read_data(prec%solve2,psb_inp_unit) ! local subsolver
|
||||
call read_data(prec%fill2,psb_inp_unit) ! fill-in for incomplete LU
|
||||
call read_data(prec%thr2,psb_inp_unit) ! threshold for ILUT
|
||||
! general AMG data
|
||||
call read_data(prec%mlcycle,psb_inp_unit) ! AMG cycle type
|
||||
call read_data(prec%outer_sweeps,psb_inp_unit) ! number of 1lev/outer sweeps
|
||||
call read_data(prec%maxlevs,psb_inp_unit) ! max number of levels in AMG prec
|
||||
call read_data(prec%csize,psb_inp_unit) ! min size coarsest mat
|
||||
! aggregation
|
||||
@@ -819,24 +849,6 @@ contains
|
||||
read(psb_inp_unit,*) ! dummy read to skip a record
|
||||
end if
|
||||
call read_data(prec%athres,psb_inp_unit) ! smoothed aggr thresh
|
||||
! AMG smoother (or pre-smoother) / 1-lev preconditioner
|
||||
call read_data(prec%smther,psb_inp_unit) ! smoother type
|
||||
call read_data(prec%jsweeps,psb_inp_unit) ! (pre-)smoother / 1-lev prec sweeps
|
||||
call read_data(prec%novr,psb_inp_unit) ! number of overlap layers
|
||||
call read_data(prec%restr,psb_inp_unit) ! restriction over application of AS
|
||||
call read_data(prec%prol,psb_inp_unit) ! prolongation over application of AS
|
||||
call read_data(prec%solve,psb_inp_unit) ! local subsolver
|
||||
call read_data(prec%fill,psb_inp_unit) ! fill-in for incomplete LU
|
||||
call read_data(prec%thr,psb_inp_unit) ! threshold for ILUT
|
||||
! AMG post-smoother
|
||||
call read_data(prec%smther2,psb_inp_unit) ! smoother type
|
||||
call read_data(prec%jsweeps2,psb_inp_unit) ! (post-)smoother sweeps
|
||||
call read_data(prec%novr2,psb_inp_unit) ! number of overlap layers
|
||||
call read_data(prec%restr2,psb_inp_unit) ! restriction over application of AS
|
||||
call read_data(prec%prol2,psb_inp_unit) ! prolongation over application of AS
|
||||
call read_data(prec%solve2,psb_inp_unit) ! local subsolver
|
||||
call read_data(prec%fill2,psb_inp_unit) ! fill-in for incomplete LU
|
||||
call read_data(prec%thr2,psb_inp_unit) ! threshold for ILUT
|
||||
! coasest-level solver
|
||||
call read_data(prec%csolve,psb_inp_unit) ! coarsest-lev solver
|
||||
call read_data(prec%csbsolve,psb_inp_unit) ! coarsest-lev subsolver
|
||||
@@ -860,7 +872,7 @@ contains
|
||||
call psb_bcast(icontxt,prec%ptype)
|
||||
|
||||
! broadcast first (pre-)smoother / 1-lev prec data
|
||||
call psb_bcast(icontxt,prec%smther) ! actually not needed for 1-lev precs
|
||||
call psb_bcast(icontxt,prec%smther)
|
||||
call psb_bcast(icontxt,prec%jsweeps)
|
||||
call psb_bcast(icontxt,prec%novr)
|
||||
call psb_bcast(icontxt,prec%restr)
|
||||
@@ -868,44 +880,41 @@ contains
|
||||
call psb_bcast(icontxt,prec%solve)
|
||||
call psb_bcast(icontxt,prec%fill)
|
||||
call psb_bcast(icontxt,prec%thr)
|
||||
! broadcast second (post-)smoother
|
||||
call psb_bcast(icontxt,prec%smther2)
|
||||
call psb_bcast(icontxt,prec%jsweeps2)
|
||||
call psb_bcast(icontxt,prec%novr2)
|
||||
call psb_bcast(icontxt,prec%restr2)
|
||||
call psb_bcast(icontxt,prec%prol2)
|
||||
call psb_bcast(icontxt,prec%solve2)
|
||||
call psb_bcast(icontxt,prec%fill2)
|
||||
call psb_bcast(icontxt,prec%thr2)
|
||||
|
||||
! broadcast AMG parameters
|
||||
call psb_bcast(icontxt,prec%mlcycle)
|
||||
call psb_bcast(icontxt,prec%outer_sweeps)
|
||||
|
||||
! broadcast (other) AMG parameters
|
||||
if (psb_toupper(prec%ptype) == 'ML') then
|
||||
|
||||
call psb_bcast(icontxt,prec%mlcycle)
|
||||
call psb_bcast(icontxt,prec%maxlevs)
|
||||
|
||||
call psb_bcast(icontxt,prec%smther2)
|
||||
call psb_bcast(icontxt,prec%jsweeps2)
|
||||
call psb_bcast(icontxt,prec%novr2)
|
||||
call psb_bcast(icontxt,prec%restr2)
|
||||
call psb_bcast(icontxt,prec%prol2)
|
||||
call psb_bcast(icontxt,prec%solve2)
|
||||
call psb_bcast(icontxt,prec%fill2)
|
||||
call psb_bcast(icontxt,prec%thr2)
|
||||
|
||||
call psb_bcast(icontxt,prec%aggr_prol)
|
||||
call psb_bcast(icontxt,prec%par_aggr_alg)
|
||||
call psb_bcast(icontxt,prec%aggr_ord)
|
||||
call psb_bcast(icontxt,prec%aggr_filter)
|
||||
call psb_bcast(icontxt,prec%mncrratio)
|
||||
call psb_bcast(ictxt,prec%thrvsz)
|
||||
if (prec%thrvsz > 0) then
|
||||
if (iam /= psb_root_) call psb_realloc(prec%thrvsz,prec%athresv,info)
|
||||
call psb_bcast(ictxt,prec%athresv)
|
||||
end if
|
||||
call psb_bcast(ictxt,prec%athres)
|
||||
|
||||
call psb_bcast(icontxt,prec%csize)
|
||||
call psb_bcast(icontxt,prec%cmat)
|
||||
call psb_bcast(icontxt,prec%csolve)
|
||||
call psb_bcast(icontxt,prec%csbsolve)
|
||||
call psb_bcast(icontxt,prec%cfill)
|
||||
call psb_bcast(icontxt,prec%cthres)
|
||||
call psb_bcast(icontxt,prec%cjswp)
|
||||
|
||||
call psb_bcast(icontxt,prec%maxlevs)
|
||||
|
||||
call psb_bcast(icontxt,prec%aggr_prol)
|
||||
call psb_bcast(icontxt,prec%par_aggr_alg)
|
||||
call psb_bcast(icontxt,prec%aggr_ord)
|
||||
call psb_bcast(icontxt,prec%aggr_filter)
|
||||
call psb_bcast(icontxt,prec%mncrratio)
|
||||
call psb_bcast(ictxt,prec%thrvsz)
|
||||
if (prec%thrvsz > 0) then
|
||||
if (iam /= psb_root_) call psb_realloc(prec%thrvsz,prec%athresv,info)
|
||||
call psb_bcast(ictxt,prec%athresv)
|
||||
end if
|
||||
call psb_bcast(ictxt,prec%athres)
|
||||
|
||||
call psb_bcast(icontxt,prec%csize)
|
||||
call psb_bcast(icontxt,prec%cmat)
|
||||
call psb_bcast(icontxt,prec%csolve)
|
||||
call psb_bcast(icontxt,prec%csbsolve)
|
||||
call psb_bcast(icontxt,prec%cfill)
|
||||
call psb_bcast(icontxt,prec%cthres)
|
||||
call psb_bcast(icontxt,prec%cjswp)
|
||||
|
||||
|
||||
end subroutine get_parms
|
||||
|
||||
|
||||
@@ -634,7 +634,7 @@ program mld_s_pde3d
|
||||
|
||||
case ('JACOBI','GS','FWGS','FBGS')
|
||||
! 1-level sweeps from "outer_sweeps"
|
||||
call prec%set('smoother_sweeps', p_choice%outer_sweeps, info)
|
||||
call prec%set('smoother_sweeps', p_choice%jsweeps, info)
|
||||
|
||||
case ('BJAC')
|
||||
call prec%set('smoother_sweeps', p_choice%jsweeps, info)
|
||||
@@ -678,29 +678,41 @@ program mld_s_pde3d
|
||||
|
||||
call prec%set('smoother_type', p_choice%smther, info)
|
||||
call prec%set('smoother_sweeps', p_choice%jsweeps, info)
|
||||
call prec%set('sub_ovr', p_choice%novr, info)
|
||||
call prec%set('sub_restr', p_choice%restr, info)
|
||||
call prec%set('sub_prol', p_choice%prol, info)
|
||||
call prec%set('sub_solve', p_choice%solve, info)
|
||||
call prec%set('sub_fillin', p_choice%fill, info)
|
||||
call prec%set('sub_iluthrs', p_choice%thr, info)
|
||||
|
||||
select case (psb_toupper(p_choice%smther))
|
||||
case ('GS','BWGS','FBGS','JACOBI')
|
||||
! do nothing
|
||||
case default
|
||||
call prec%set('sub_ovr', p_choice%novr, info)
|
||||
call prec%set('sub_restr', p_choice%restr, info)
|
||||
call prec%set('sub_prol', p_choice%prol, info)
|
||||
call prec%set('sub_solve', p_choice%solve, info)
|
||||
call prec%set('sub_fillin', p_choice%fill, info)
|
||||
call prec%set('sub_iluthrs', p_choice%thr, info)
|
||||
end select
|
||||
|
||||
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('sub_ovr', p_choice%novr2, info,pos='post')
|
||||
call prec%set('sub_restr', p_choice%restr2, info,pos='post')
|
||||
call prec%set('sub_prol', p_choice%prol2, info,pos='post')
|
||||
call prec%set('sub_solve', p_choice%solve2, info,pos='post')
|
||||
call prec%set('sub_fillin', p_choice%fill2, info,pos='post')
|
||||
call prec%set('sub_iluthrs', p_choice%thr2, info,pos='post')
|
||||
select case (psb_toupper(p_choice%smther2))
|
||||
case ('GS','BWGS','FBGS','JACOBI')
|
||||
! do nothing
|
||||
case default
|
||||
call prec%set('sub_ovr', p_choice%novr2, info,pos='post')
|
||||
call prec%set('sub_restr', p_choice%restr2, info,pos='post')
|
||||
call prec%set('sub_prol', p_choice%prol2, info,pos='post')
|
||||
call prec%set('sub_solve', p_choice%solve2, info,pos='post')
|
||||
call prec%set('sub_fillin', p_choice%fill2, info,pos='post')
|
||||
call prec%set('sub_iluthrs', p_choice%thr2, info,pos='post')
|
||||
end select
|
||||
end if
|
||||
|
||||
if (psb_toupper(p_choice%csolve) /= 'DEFLT') then
|
||||
call prec%set('coarse_solve', p_choice%csolve, info)
|
||||
if (psb_toupper(p_choice%csolve) == 'BJAC') &
|
||||
& call prec%set('coarse_subsolve', p_choice%csbsolve, info)
|
||||
call prec%set('coarse_mat', p_choice%cmat, info)
|
||||
if (psb_toupper(p_choice%cmat) /= 'DEFLT')&
|
||||
& call prec%set('coarse_mat', p_choice%cmat, info)
|
||||
call prec%set('coarse_fillin', p_choice%cfill, info)
|
||||
call prec%set('coarse_iluthrs', p_choice%cthres, info)
|
||||
call prec%set('coarse_sweeps', p_choice%cjswp, info)
|
||||
@@ -854,9 +866,27 @@ contains
|
||||
! preconditioner type
|
||||
call read_data(prec%descr,psb_inp_unit) ! verbose description of the prec
|
||||
call read_data(prec%ptype,psb_inp_unit) ! preconditioner type
|
||||
call read_data(prec%outer_sweeps,psb_inp_unit) ! number of 1lev/outer sweeps
|
||||
! First smoother / 1-lev preconditioner
|
||||
call read_data(prec%smther,psb_inp_unit) ! smoother type
|
||||
call read_data(prec%jsweeps,psb_inp_unit) ! (pre-)smoother / 1-lev prec sweeps
|
||||
call read_data(prec%novr,psb_inp_unit) ! number of overlap layers
|
||||
call read_data(prec%restr,psb_inp_unit) ! restriction over application of AS
|
||||
call read_data(prec%prol,psb_inp_unit) ! prolongation over application of AS
|
||||
call read_data(prec%solve,psb_inp_unit) ! local subsolver
|
||||
call read_data(prec%fill,psb_inp_unit) ! fill-in for incomplete LU
|
||||
call read_data(prec%thr,psb_inp_unit) ! threshold for ILUT
|
||||
! Second smoother/ AMG post-smoother (if NONE ignored in main)
|
||||
call read_data(prec%smther2,psb_inp_unit) ! smoother type
|
||||
call read_data(prec%jsweeps2,psb_inp_unit) ! (post-)smoother sweeps
|
||||
call read_data(prec%novr2,psb_inp_unit) ! number of overlap layers
|
||||
call read_data(prec%restr2,psb_inp_unit) ! restriction over application of AS
|
||||
call read_data(prec%prol2,psb_inp_unit) ! prolongation over application of AS
|
||||
call read_data(prec%solve2,psb_inp_unit) ! local subsolver
|
||||
call read_data(prec%fill2,psb_inp_unit) ! fill-in for incomplete LU
|
||||
call read_data(prec%thr2,psb_inp_unit) ! threshold for ILUT
|
||||
! general AMG data
|
||||
call read_data(prec%mlcycle,psb_inp_unit) ! AMG cycle type
|
||||
call read_data(prec%outer_sweeps,psb_inp_unit) ! number of 1lev/outer sweeps
|
||||
call read_data(prec%maxlevs,psb_inp_unit) ! max number of levels in AMG prec
|
||||
call read_data(prec%csize,psb_inp_unit) ! min size coarsest mat
|
||||
! aggregation
|
||||
@@ -873,24 +903,6 @@ contains
|
||||
read(psb_inp_unit,*) ! dummy read to skip a record
|
||||
end if
|
||||
call read_data(prec%athres,psb_inp_unit) ! smoothed aggr thresh
|
||||
! AMG smoother (or pre-smoother) / 1-lev preconditioner
|
||||
call read_data(prec%smther,psb_inp_unit) ! smoother type
|
||||
call read_data(prec%jsweeps,psb_inp_unit) ! (pre-)smoother / 1-lev prec sweeps
|
||||
call read_data(prec%novr,psb_inp_unit) ! number of overlap layers
|
||||
call read_data(prec%restr,psb_inp_unit) ! restriction over application of AS
|
||||
call read_data(prec%prol,psb_inp_unit) ! prolongation over application of AS
|
||||
call read_data(prec%solve,psb_inp_unit) ! local subsolver
|
||||
call read_data(prec%fill,psb_inp_unit) ! fill-in for incomplete LU
|
||||
call read_data(prec%thr,psb_inp_unit) ! threshold for ILUT
|
||||
! AMG post-smoother
|
||||
call read_data(prec%smther2,psb_inp_unit) ! smoother type
|
||||
call read_data(prec%jsweeps2,psb_inp_unit) ! (post-)smoother sweeps
|
||||
call read_data(prec%novr2,psb_inp_unit) ! number of overlap layers
|
||||
call read_data(prec%restr2,psb_inp_unit) ! restriction over application of AS
|
||||
call read_data(prec%prol2,psb_inp_unit) ! prolongation over application of AS
|
||||
call read_data(prec%solve2,psb_inp_unit) ! local subsolver
|
||||
call read_data(prec%fill2,psb_inp_unit) ! fill-in for incomplete LU
|
||||
call read_data(prec%thr2,psb_inp_unit) ! threshold for ILUT
|
||||
! coasest-level solver
|
||||
call read_data(prec%csolve,psb_inp_unit) ! coarsest-lev solver
|
||||
call read_data(prec%csbsolve,psb_inp_unit) ! coarsest-lev subsolver
|
||||
@@ -914,7 +926,7 @@ contains
|
||||
call psb_bcast(icontxt,prec%ptype)
|
||||
|
||||
! broadcast first (pre-)smoother / 1-lev prec data
|
||||
call psb_bcast(icontxt,prec%smther) ! actually not needed for 1-lev precs
|
||||
call psb_bcast(icontxt,prec%smther)
|
||||
call psb_bcast(icontxt,prec%jsweeps)
|
||||
call psb_bcast(icontxt,prec%novr)
|
||||
call psb_bcast(icontxt,prec%restr)
|
||||
@@ -922,44 +934,41 @@ contains
|
||||
call psb_bcast(icontxt,prec%solve)
|
||||
call psb_bcast(icontxt,prec%fill)
|
||||
call psb_bcast(icontxt,prec%thr)
|
||||
! broadcast second (post-)smoother
|
||||
call psb_bcast(icontxt,prec%smther2)
|
||||
call psb_bcast(icontxt,prec%jsweeps2)
|
||||
call psb_bcast(icontxt,prec%novr2)
|
||||
call psb_bcast(icontxt,prec%restr2)
|
||||
call psb_bcast(icontxt,prec%prol2)
|
||||
call psb_bcast(icontxt,prec%solve2)
|
||||
call psb_bcast(icontxt,prec%fill2)
|
||||
call psb_bcast(icontxt,prec%thr2)
|
||||
|
||||
! broadcast AMG parameters
|
||||
call psb_bcast(icontxt,prec%mlcycle)
|
||||
call psb_bcast(icontxt,prec%outer_sweeps)
|
||||
|
||||
! broadcast (other) AMG parameters
|
||||
if (psb_toupper(prec%ptype) == 'ML') then
|
||||
|
||||
call psb_bcast(icontxt,prec%mlcycle)
|
||||
call psb_bcast(icontxt,prec%maxlevs)
|
||||
|
||||
call psb_bcast(icontxt,prec%smther2)
|
||||
call psb_bcast(icontxt,prec%jsweeps2)
|
||||
call psb_bcast(icontxt,prec%novr2)
|
||||
call psb_bcast(icontxt,prec%restr2)
|
||||
call psb_bcast(icontxt,prec%prol2)
|
||||
call psb_bcast(icontxt,prec%solve2)
|
||||
call psb_bcast(icontxt,prec%fill2)
|
||||
call psb_bcast(icontxt,prec%thr2)
|
||||
|
||||
call psb_bcast(icontxt,prec%aggr_prol)
|
||||
call psb_bcast(icontxt,prec%par_aggr_alg)
|
||||
call psb_bcast(icontxt,prec%aggr_ord)
|
||||
call psb_bcast(icontxt,prec%aggr_filter)
|
||||
call psb_bcast(icontxt,prec%mncrratio)
|
||||
call psb_bcast(ictxt,prec%thrvsz)
|
||||
if (prec%thrvsz > 0) then
|
||||
if (iam /= psb_root_) call psb_realloc(prec%thrvsz,prec%athresv,info)
|
||||
call psb_bcast(ictxt,prec%athresv)
|
||||
end if
|
||||
call psb_bcast(ictxt,prec%athres)
|
||||
|
||||
call psb_bcast(icontxt,prec%csize)
|
||||
call psb_bcast(icontxt,prec%cmat)
|
||||
call psb_bcast(icontxt,prec%csolve)
|
||||
call psb_bcast(icontxt,prec%csbsolve)
|
||||
call psb_bcast(icontxt,prec%cfill)
|
||||
call psb_bcast(icontxt,prec%cthres)
|
||||
call psb_bcast(icontxt,prec%cjswp)
|
||||
|
||||
call psb_bcast(icontxt,prec%maxlevs)
|
||||
|
||||
call psb_bcast(icontxt,prec%aggr_prol)
|
||||
call psb_bcast(icontxt,prec%par_aggr_alg)
|
||||
call psb_bcast(icontxt,prec%aggr_ord)
|
||||
call psb_bcast(icontxt,prec%aggr_filter)
|
||||
call psb_bcast(icontxt,prec%mncrratio)
|
||||
call psb_bcast(ictxt,prec%thrvsz)
|
||||
if (prec%thrvsz > 0) then
|
||||
if (iam /= psb_root_) call psb_realloc(prec%thrvsz,prec%athresv,info)
|
||||
call psb_bcast(ictxt,prec%athresv)
|
||||
end if
|
||||
call psb_bcast(ictxt,prec%athres)
|
||||
|
||||
call psb_bcast(icontxt,prec%csize)
|
||||
call psb_bcast(icontxt,prec%cmat)
|
||||
call psb_bcast(icontxt,prec%csolve)
|
||||
call psb_bcast(icontxt,prec%csbsolve)
|
||||
call psb_bcast(icontxt,prec%cfill)
|
||||
call psb_bcast(icontxt,prec%cthres)
|
||||
call psb_bcast(icontxt,prec%cjswp)
|
||||
|
||||
|
||||
end subroutine get_parms
|
||||
|
||||
|
||||
@@ -1,44 +1,50 @@
|
||||
%%%%%%%%%%% General arguments % Lines starting with % are ignored.
|
||||
CSR ! Storage format CSR COO JAD
|
||||
0080 ! IDIM; domain size is idim**3
|
||||
0200 ! IDIM; domain size. Linear system size is IDIM**2
|
||||
CG ! Iterative method: BiCGSTAB BiCGSTABL BiCG CG CGS FCG GCR RGMRES
|
||||
2 ! ISTOPC
|
||||
00500 ! ITMAX
|
||||
1 ! ITRACE
|
||||
30 ! IRST (restart for RGMRES and BiCGSTABL)
|
||||
1.d-6 ! EPS
|
||||
%%%%%%%%%%% Main preconditioner choices %%%%%%%%%%%%%%%%
|
||||
ML-VCYCLE-FBGS-R-UMF ! Longer descriptive name for preconditioner (up to 20 chars)
|
||||
FBGS ! Preconditioner type: NONE JACOBI GS FBGS BJAC AS ML
|
||||
4 ! Number of sweeps for 1-level, outer sweeps for ML; lines below ignored for non-ML
|
||||
VCYCLE ! Type of multilevel CYCLE: VCYCLE WCYCLE KCYCLE MULT ADD
|
||||
-3 ! Max Number of levels in a multilevel preconditioner; if <0, lib default
|
||||
-3 ! Target coarse matrix size; if <0, lib default
|
||||
SMOOTHED ! Type of aggregation: SMOOTHED UNSMOOTHED
|
||||
DEC ! Parallel aggregation: DEC, SYMDEC
|
||||
NATURAL ! Ordering of aggregation NATURAL DEGREE
|
||||
NOFILTER ! Filtering of matrix ? FILTER NOFILTER
|
||||
-1.5 ! Coarsening ratio, if < 0 use library default
|
||||
2 ! Number of thresholds in vector, next line ignored if <= 0
|
||||
0.05 0.025 ! Thresholds
|
||||
0.0100d0 ! Smoothed aggregation threshold: >= 0.0
|
||||
FBGS ! Smoother type JACOBI FBGS GS BGS BJAC AS; ignored for non-ML
|
||||
1 ! Number of sweeps for (pre) smoother
|
||||
ML ! Preconditioner type: NONE JACOBI GS FBGS BJAC AS ML
|
||||
%%%%%%%%%%% First smoother (for all levels but coarsest) %%%%%%%%%%%%%%%%
|
||||
FBGS ! Smoother type JACOBI FBGS GS BWGS BJAC AS. For 1-level, repeats previous.
|
||||
1 ! Number of sweeps for smoother
|
||||
0 ! Number of overlap layers for AS preconditioner
|
||||
HALO ! AS restriction operator: NONE HALO
|
||||
NONE ! AS prolongation operator: NONE SUM AVG
|
||||
JACOBI ! Subdomain solver: JACOBI GS BGS ILU ILUT MILU MUMPS SLU UMF
|
||||
ILU ! Subdomain solver for BJAC/AS: JACOBI GS BGS ILU ILUT MILU MUMPS SLU UMF
|
||||
0 ! Fill level P for ILU(P) and ILU(T,P)
|
||||
1.d-4 ! Threshold T for ILU(T,P)
|
||||
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
|
||||
0 ! Number of overlap layers for AS preconditioner
|
||||
HALO ! AS restriction operator: NONE HALO
|
||||
NONE ! AS prolongation operator: NONE SUM AVG
|
||||
JACOBI ! Subdomain solver: JACOBI GS BGS ILU ILUT MILU MUMPS SLU UMF
|
||||
ILU ! Subdomain solver for BJAC/AS: JACOBI GS BGS ILU ILUT MILU MUMPS SLU UMF
|
||||
0 ! Fill level P for ILU(P) and ILU(T,P)
|
||||
1.d-4 ! Threshold T for ILU(T,P)
|
||||
%%%%%%%%%%% Multilevel parameters %%%%%%%%%%%%%%%%
|
||||
VCYCLE ! Type of multilevel CYCLE: VCYCLE WCYCLE KCYCLE MULT ADD
|
||||
4 ! Number of outer sweeps for ML
|
||||
-3 ! Max Number of levels in a multilevel preconditioner; if <0, lib default
|
||||
-3 ! Target coarse matrix size; if <0, lib default
|
||||
SMOOTHED ! Type of aggregation: SMOOTHED UNSMOOTHED
|
||||
DEC ! Parallel aggregation: DEC, SYMDEC
|
||||
NATURAL ! Ordering of aggregation NATURAL DEGREE
|
||||
FILTER ! Filtering of matrix: FILTER NOFILTER
|
||||
-1.5 ! Coarsening ratio, if < 0 use library default
|
||||
-2 ! Number of thresholds in vector, next line ignored if <= 0
|
||||
0.05 0.025 ! Thresholds
|
||||
-0.0100d0 ! Smoothed aggregation threshold, ignored if < 0
|
||||
%%%%%%%%%%% Coarse level solver %%%%%%%%%%%%%%%%
|
||||
DEFLT ! Coarsest-level solver: MUMPS UMF SLU SLUDIST JACOBI GS BJAC DEFLT
|
||||
UMF ! Coarsest-level subsolver: ILU ILUT MILU UMF MUMPS SLU
|
||||
REPL ! Coarsest-level matrix distribution: DIST REPL
|
||||
UMF ! Coarsest-level subsolver for BJAC: ILU ILUT MILU UMF MUMPS SLU
|
||||
DEFLT ! Coarsest-level matrix distribution: DIST REPL, DEFLT
|
||||
1 ! Coarsest-level fillin P for ILU(P) and ILU(T,P)
|
||||
1.d-4 ! Coarsest-level threshold T for ILU(T,P)
|
||||
1 ! Number of Jacobi sweeps for JACOBI/GS/BJAC coarsest-level solver
|
||||
1 ! Number of sweeps for JACOBI/GS/BJAC coarsest-level solver
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
%%%%%%%%%%% General arguments % Lines starting with % are ignored.
|
||||
CSR ! Storage format CSR COO JAD
|
||||
040 ! IDIM; domain size is idim**3
|
||||
0080 ! IDIM; domain size. Linear system size is IDIM**3
|
||||
CG ! Iterative method: BiCGSTAB BiCGSTABL BiCG CG CGS FCG GCR RGMRES
|
||||
2 ! ISTOPC
|
||||
00500 ! ITMAX
|
||||
@@ -7,38 +8,42 @@ CG ! Iterative method: BiCGSTAB BiCGSTABL BiCG CG CGS F
|
||||
30 ! IRST (restart for RGMRES and BiCGSTABL)
|
||||
1.d-6 ! EPS
|
||||
ML-VCYCLE-FBGS-R-UMF ! Longer descriptive name for preconditioner (up to 20 chars)
|
||||
ML ! Preconditioner type: NONE JACOBI GS FBGS BJAC AS ML
|
||||
4 ! Number of sweeps for 1-level, outer sweeps for ML; lines below ignored for non-ML
|
||||
VCYCLE ! Type of multilevel CYCLE: VCYCLE WCYCLE KCYCLE MULT ADD
|
||||
-3 ! Max Number of levels in a multilevel preconditioner; if <0, lib default
|
||||
-3 ! Target coarse matrix size; if <0, lib default
|
||||
SMOOTHED ! Type of aggregation: SMOOTHED UNSMOOTHED
|
||||
DEC ! Parallel aggregation: DEC, SYMDEC
|
||||
NATURAL ! Ordering of aggregation NATURAL DEGREE
|
||||
NOFILTER ! Filtering of matrix ? FILTER NOFILTER
|
||||
-1.5 ! Coarsening ratio, if < 0 use library default
|
||||
2 ! Number of thresholds in vector, next line ignored if <= 0
|
||||
0.05 0.025 ! Thresholds
|
||||
0.0100d0 ! Smoothed aggregation threshold: >= 0.0
|
||||
FBGS ! Smoother type JACOBI FBGS GS BGS BJAC AS; ignored for non-ML
|
||||
2 ! Number of sweeps for (pre) smoother
|
||||
ML ! Preconditioner type: NONE JACOBI GS FBGS BJAC AS ML
|
||||
%%%%%%%%%%% First smoother (for all levels but coarsest) %%%%%%%%%%%%%%%%
|
||||
FBGS ! Smoother type JACOBI FBGS GS BWGS BJAC AS. For 1-level, repeats previous.
|
||||
1 ! Number of sweeps for smoother
|
||||
0 ! Number of overlap layers for AS preconditioner
|
||||
HALO ! AS restriction operator: NONE HALO
|
||||
NONE ! AS prolongation operator: NONE SUM AVG
|
||||
JACOBI ! Subdomain solver: JACOBI GS BGS ILU ILUT MILU MUMPS SLU UMF
|
||||
ILU ! Subdomain solver for BJAC/AS: JACOBI GS BGS ILU ILUT MILU MUMPS SLU UMF
|
||||
0 ! Fill level P for ILU(P) and ILU(T,P)
|
||||
1.d-4 ! Threshold T for ILU(T,P)
|
||||
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
|
||||
0 ! Number of overlap layers for AS preconditioner
|
||||
HALO ! AS restriction operator: NONE HALO
|
||||
NONE ! AS prolongation operator: NONE SUM AVG
|
||||
JACOBI ! Subdomain solver: JACOBI GS BGS ILU ILUT MILU MUMPS SLU UMF
|
||||
ILU ! Subdomain solver for BJAC/AS: JACOBI GS BGS ILU ILUT MILU MUMPS SLU UMF
|
||||
0 ! Fill level P for ILU(P) and ILU(T,P)
|
||||
1.d-4 ! Threshold T for ILU(T,P)
|
||||
DEFLT ! Coarsest-level solver: MUMPS UMF SLU SLUDIST JACOBI GS BJAC DEFLT
|
||||
UMF ! Coarsest-level subsolver: ILU ILUT MILU UMF MUMPS SLU
|
||||
REPL ! Coarsest-level matrix distribution: DIST REPL
|
||||
%%%%%%%%%%% Multilevel parameters %%%%%%%%%%%%%%%%
|
||||
VCYCLE ! Type of multilevel CYCLE: VCYCLE WCYCLE KCYCLE MULT ADD
|
||||
4 ! Number of outer sweeps for ML
|
||||
-3 ! Max Number of levels in a multilevel preconditioner; if <0, lib default
|
||||
-3 ! Target coarse matrix size; if <0, lib default
|
||||
SMOOTHED ! Type of aggregation: SMOOTHED UNSMOOTHED
|
||||
DEC ! Parallel aggregation: DEC, SYMDEC
|
||||
NATURAL ! Ordering of aggregation NATURAL DEGREE
|
||||
NOFILTER ! Filtering of matrix: FILTER NOFILTER
|
||||
-1.5 ! Coarsening ratio, if < 0 use library default
|
||||
-2 ! Number of thresholds in vector, next line ignored if <= 0
|
||||
0.05 0.025 ! Thresholds
|
||||
-0.0100d0 ! Smoothed aggregation threshold, ignored if < 0
|
||||
%%%%%%%%%%% Coarse level solver %%%%%%%%%%%%%%%%
|
||||
DEFLT ! Coarsest-level solver: MUMPS UMF SLU SLUDIST JACOBI GS BJAC DEFLT
|
||||
UMF ! Coarsest-level subsolver for BJAC: ILU ILUT MILU UMF MUMPS SLU
|
||||
DEFLT ! Coarsest-level matrix distribution: DIST REPL, DEFLT
|
||||
1 ! Coarsest-level fillin P for ILU(P) and ILU(T,P)
|
||||
1.d-4 ! Coarsest-level threshold T for ILU(T,P)
|
||||
1 ! Number of Jacobi sweeps for JACOBI/GS/BJAC coarsest-level solver
|
||||
1 ! Number of sweeps for JACOBI/GS/BJAC coarsest-level solver
|
||||
|
||||
Reference in New Issue
Block a user