diff --git a/mlprec/impl/level/mld_c_base_onelev_build.f90 b/mlprec/impl/level/mld_c_base_onelev_build.f90 index f0a21fe4..c0912bb3 100644 --- a/mlprec/impl/level/mld_c_base_onelev_build.f90 +++ b/mlprec/impl/level/mld_c_base_onelev_build.f90 @@ -35,7 +35,7 @@ ! POSSIBILITY OF SUCH DAMAGE. ! ! -subroutine mld_c_base_onelev_build(lv,info,amold,vmold,imold) +subroutine mld_c_base_onelev_build(lv,info,amold,vmold,imold,ilv) use psb_base_mod use mld_c_onelev_mod, mld_protect_name => mld_c_base_onelev_build implicit none @@ -44,6 +44,7 @@ subroutine mld_c_base_onelev_build(lv,info,amold,vmold,imold) class(psb_c_base_sparse_mat), intent(in), optional :: amold class(psb_c_base_vect_type), intent(in), optional :: vmold class(psb_i_base_vect_type), intent(in), optional :: imold + integer(psb_ipk_), intent(in), optional :: ilv ! Local integer(psb_ipk_) :: err,i,k, err_act integer(psb_ipk_) :: ictxt, me, np @@ -120,6 +121,24 @@ subroutine mld_c_base_onelev_build(lv,info,amold,vmold,imold) goto 9999 end if + if (lv%sm%sv%is_global()) then + if ((lv%parms%sweeps_pre>1).or.(lv%parms%sweeps_post>1)) then + lv%parms%sweeps_pre = 1 + lv%parms%sweeps_post = 1 + if (me == 0) then + if (present(ilv)) then + write(debug_unit,*) 'Warning: the solver "',trim(lv%sm%sv%get_fmt()),& + & '" at level ',ilv + write(debug_unit,*) ' is configured as a global solver ' + else + write(debug_unit,*) 'Warning: the solver "',trim(lv%sm%sv%get_fmt()),& + & '" is configured as a global solver ' + end if + write(debug_unit,*) ' Pre and post sweeps at this level reset to 1' + end if + end if + end if + if (any((/present(amold),present(vmold),present(imold)/))) & & call lv%cnv(info,amold=amold,vmold=vmold,imold=imold) diff --git a/mlprec/impl/level/mld_d_base_onelev_build.f90 b/mlprec/impl/level/mld_d_base_onelev_build.f90 index e3d3653b..9b1a49c9 100644 --- a/mlprec/impl/level/mld_d_base_onelev_build.f90 +++ b/mlprec/impl/level/mld_d_base_onelev_build.f90 @@ -35,7 +35,7 @@ ! POSSIBILITY OF SUCH DAMAGE. ! ! -subroutine mld_d_base_onelev_build(lv,info,amold,vmold,imold) +subroutine mld_d_base_onelev_build(lv,info,amold,vmold,imold,ilv) use psb_base_mod use mld_d_onelev_mod, mld_protect_name => mld_d_base_onelev_build implicit none @@ -44,6 +44,7 @@ subroutine mld_d_base_onelev_build(lv,info,amold,vmold,imold) class(psb_d_base_sparse_mat), intent(in), optional :: amold class(psb_d_base_vect_type), intent(in), optional :: vmold class(psb_i_base_vect_type), intent(in), optional :: imold + integer(psb_ipk_), intent(in), optional :: ilv ! Local integer(psb_ipk_) :: err,i,k, err_act integer(psb_ipk_) :: ictxt, me, np @@ -120,6 +121,24 @@ subroutine mld_d_base_onelev_build(lv,info,amold,vmold,imold) goto 9999 end if + if (lv%sm%sv%is_global()) then + if ((lv%parms%sweeps_pre>1).or.(lv%parms%sweeps_post>1)) then + lv%parms%sweeps_pre = 1 + lv%parms%sweeps_post = 1 + if (me == 0) then + if (present(ilv)) then + write(debug_unit,*) 'Warning: the solver "',trim(lv%sm%sv%get_fmt()),& + & '" at level ',ilv + write(debug_unit,*) ' is configured as a global solver ' + else + write(debug_unit,*) 'Warning: the solver "',trim(lv%sm%sv%get_fmt()),& + & '" is configured as a global solver ' + end if + write(debug_unit,*) ' Pre and post sweeps at this level reset to 1' + end if + end if + end if + if (any((/present(amold),present(vmold),present(imold)/))) & & call lv%cnv(info,amold=amold,vmold=vmold,imold=imold) diff --git a/mlprec/impl/level/mld_s_base_onelev_build.f90 b/mlprec/impl/level/mld_s_base_onelev_build.f90 index cce7b529..4e91967a 100644 --- a/mlprec/impl/level/mld_s_base_onelev_build.f90 +++ b/mlprec/impl/level/mld_s_base_onelev_build.f90 @@ -35,7 +35,7 @@ ! POSSIBILITY OF SUCH DAMAGE. ! ! -subroutine mld_s_base_onelev_build(lv,info,amold,vmold,imold) +subroutine mld_s_base_onelev_build(lv,info,amold,vmold,imold,ilv) use psb_base_mod use mld_s_onelev_mod, mld_protect_name => mld_s_base_onelev_build implicit none @@ -44,6 +44,7 @@ subroutine mld_s_base_onelev_build(lv,info,amold,vmold,imold) class(psb_s_base_sparse_mat), intent(in), optional :: amold class(psb_s_base_vect_type), intent(in), optional :: vmold class(psb_i_base_vect_type), intent(in), optional :: imold + integer(psb_ipk_), intent(in), optional :: ilv ! Local integer(psb_ipk_) :: err,i,k, err_act integer(psb_ipk_) :: ictxt, me, np @@ -120,6 +121,24 @@ subroutine mld_s_base_onelev_build(lv,info,amold,vmold,imold) goto 9999 end if + if (lv%sm%sv%is_global()) then + if ((lv%parms%sweeps_pre>1).or.(lv%parms%sweeps_post>1)) then + lv%parms%sweeps_pre = 1 + lv%parms%sweeps_post = 1 + if (me == 0) then + if (present(ilv)) then + write(debug_unit,*) 'Warning: the solver "',trim(lv%sm%sv%get_fmt()),& + & '" at level ',ilv + write(debug_unit,*) ' is configured as a global solver ' + else + write(debug_unit,*) 'Warning: the solver "',trim(lv%sm%sv%get_fmt()),& + & '" is configured as a global solver ' + end if + write(debug_unit,*) ' Pre and post sweeps at this level reset to 1' + end if + end if + end if + if (any((/present(amold),present(vmold),present(imold)/))) & & call lv%cnv(info,amold=amold,vmold=vmold,imold=imold) diff --git a/mlprec/impl/level/mld_z_base_onelev_build.f90 b/mlprec/impl/level/mld_z_base_onelev_build.f90 index b9e07e7f..80a6c973 100644 --- a/mlprec/impl/level/mld_z_base_onelev_build.f90 +++ b/mlprec/impl/level/mld_z_base_onelev_build.f90 @@ -35,7 +35,7 @@ ! POSSIBILITY OF SUCH DAMAGE. ! ! -subroutine mld_z_base_onelev_build(lv,info,amold,vmold,imold) +subroutine mld_z_base_onelev_build(lv,info,amold,vmold,imold,ilv) use psb_base_mod use mld_z_onelev_mod, mld_protect_name => mld_z_base_onelev_build implicit none @@ -44,6 +44,7 @@ subroutine mld_z_base_onelev_build(lv,info,amold,vmold,imold) class(psb_z_base_sparse_mat), intent(in), optional :: amold class(psb_z_base_vect_type), intent(in), optional :: vmold class(psb_i_base_vect_type), intent(in), optional :: imold + integer(psb_ipk_), intent(in), optional :: ilv ! Local integer(psb_ipk_) :: err,i,k, err_act integer(psb_ipk_) :: ictxt, me, np @@ -120,6 +121,24 @@ subroutine mld_z_base_onelev_build(lv,info,amold,vmold,imold) goto 9999 end if + if (lv%sm%sv%is_global()) then + if ((lv%parms%sweeps_pre>1).or.(lv%parms%sweeps_post>1)) then + lv%parms%sweeps_pre = 1 + lv%parms%sweeps_post = 1 + if (me == 0) then + if (present(ilv)) then + write(debug_unit,*) 'Warning: the solver "',trim(lv%sm%sv%get_fmt()),& + & '" at level ',ilv + write(debug_unit,*) ' is configured as a global solver ' + else + write(debug_unit,*) 'Warning: the solver "',trim(lv%sm%sv%get_fmt()),& + & '" is configured as a global solver ' + end if + write(debug_unit,*) ' Pre and post sweeps at this level reset to 1' + end if + end if + end if + if (any((/present(amold),present(vmold),present(imold)/))) & & call lv%cnv(info,amold=amold,vmold=vmold,imold=imold) diff --git a/mlprec/impl/mld_c_smoothers_bld.f90 b/mlprec/impl/mld_c_smoothers_bld.f90 index 4fb35009..dd4bede7 100644 --- a/mlprec/impl/mld_c_smoothers_bld.f90 +++ b/mlprec/impl/mld_c_smoothers_bld.f90 @@ -288,7 +288,7 @@ subroutine mld_c_smoothers_bld(a,desc_a,prec,info,amold,vmold,imold) ! ! build the base preconditioner at level i ! - call prec%precv(i)%bld(info,amold=amold,vmold=vmold,imold=imold) + call prec%precv(i)%bld(info,amold=amold,vmold=vmold,imold=imold,ilv=i) if (info /= psb_success_) then write(ch_err,'(a,i7)') 'Error @ level',i diff --git a/mlprec/impl/mld_d_smoothers_bld.f90 b/mlprec/impl/mld_d_smoothers_bld.f90 index 6fb1aa5e..167cca50 100644 --- a/mlprec/impl/mld_d_smoothers_bld.f90 +++ b/mlprec/impl/mld_d_smoothers_bld.f90 @@ -288,7 +288,7 @@ subroutine mld_d_smoothers_bld(a,desc_a,prec,info,amold,vmold,imold) ! ! build the base preconditioner at level i ! - call prec%precv(i)%bld(info,amold=amold,vmold=vmold,imold=imold) + call prec%precv(i)%bld(info,amold=amold,vmold=vmold,imold=imold,ilv=i) if (info /= psb_success_) then write(ch_err,'(a,i7)') 'Error @ level',i diff --git a/mlprec/impl/mld_s_smoothers_bld.f90 b/mlprec/impl/mld_s_smoothers_bld.f90 index 39ca6687..a0ec8fbd 100644 --- a/mlprec/impl/mld_s_smoothers_bld.f90 +++ b/mlprec/impl/mld_s_smoothers_bld.f90 @@ -288,7 +288,7 @@ subroutine mld_s_smoothers_bld(a,desc_a,prec,info,amold,vmold,imold) ! ! build the base preconditioner at level i ! - call prec%precv(i)%bld(info,amold=amold,vmold=vmold,imold=imold) + call prec%precv(i)%bld(info,amold=amold,vmold=vmold,imold=imold,ilv=i) if (info /= psb_success_) then write(ch_err,'(a,i7)') 'Error @ level',i diff --git a/mlprec/impl/mld_z_smoothers_bld.f90 b/mlprec/impl/mld_z_smoothers_bld.f90 index 80e02db7..5a51ffb1 100644 --- a/mlprec/impl/mld_z_smoothers_bld.f90 +++ b/mlprec/impl/mld_z_smoothers_bld.f90 @@ -288,7 +288,7 @@ subroutine mld_z_smoothers_bld(a,desc_a,prec,info,amold,vmold,imold) ! ! build the base preconditioner at level i ! - call prec%precv(i)%bld(info,amold=amold,vmold=vmold,imold=imold) + call prec%precv(i)%bld(info,amold=amold,vmold=vmold,imold=imold,ilv=i) if (info /= psb_success_) then write(ch_err,'(a,i7)') 'Error @ level',i diff --git a/mlprec/mld_c_onelev_mod.f90 b/mlprec/mld_c_onelev_mod.f90 index 8f582e27..b8dcff1e 100644 --- a/mlprec/mld_c_onelev_mod.f90 +++ b/mlprec/mld_c_onelev_mod.f90 @@ -225,7 +225,7 @@ module mld_c_onelev_mod end interface interface - subroutine mld_c_base_onelev_build(lv,info,amold,vmold,imold) + subroutine mld_c_base_onelev_build(lv,info,amold,vmold,imold,ilv) import :: psb_c_base_sparse_mat, psb_c_base_vect_type, & & psb_i_base_vect_type, psb_spk_, mld_c_onelev_type, & & psb_ipk_, psb_epk_, psb_desc_type @@ -235,6 +235,7 @@ module mld_c_onelev_mod class(psb_c_base_sparse_mat), intent(in), optional :: amold class(psb_c_base_vect_type), intent(in), optional :: vmold class(psb_i_base_vect_type), intent(in), optional :: imold + integer(psb_ipk_), intent(in), optional :: ilv end subroutine mld_c_base_onelev_build end interface diff --git a/mlprec/mld_d_onelev_mod.f90 b/mlprec/mld_d_onelev_mod.f90 index 4b30e83b..705f12dc 100644 --- a/mlprec/mld_d_onelev_mod.f90 +++ b/mlprec/mld_d_onelev_mod.f90 @@ -225,7 +225,7 @@ module mld_d_onelev_mod end interface interface - subroutine mld_d_base_onelev_build(lv,info,amold,vmold,imold) + subroutine mld_d_base_onelev_build(lv,info,amold,vmold,imold,ilv) import :: psb_d_base_sparse_mat, psb_d_base_vect_type, & & psb_i_base_vect_type, psb_dpk_, mld_d_onelev_type, & & psb_ipk_, psb_epk_, psb_desc_type @@ -235,6 +235,7 @@ module mld_d_onelev_mod class(psb_d_base_sparse_mat), intent(in), optional :: amold class(psb_d_base_vect_type), intent(in), optional :: vmold class(psb_i_base_vect_type), intent(in), optional :: imold + integer(psb_ipk_), intent(in), optional :: ilv end subroutine mld_d_base_onelev_build end interface diff --git a/mlprec/mld_s_onelev_mod.f90 b/mlprec/mld_s_onelev_mod.f90 index 3df61f7a..a3e6208f 100644 --- a/mlprec/mld_s_onelev_mod.f90 +++ b/mlprec/mld_s_onelev_mod.f90 @@ -225,7 +225,7 @@ module mld_s_onelev_mod end interface interface - subroutine mld_s_base_onelev_build(lv,info,amold,vmold,imold) + subroutine mld_s_base_onelev_build(lv,info,amold,vmold,imold,ilv) import :: psb_s_base_sparse_mat, psb_s_base_vect_type, & & psb_i_base_vect_type, psb_spk_, mld_s_onelev_type, & & psb_ipk_, psb_epk_, psb_desc_type @@ -235,6 +235,7 @@ module mld_s_onelev_mod class(psb_s_base_sparse_mat), intent(in), optional :: amold class(psb_s_base_vect_type), intent(in), optional :: vmold class(psb_i_base_vect_type), intent(in), optional :: imold + integer(psb_ipk_), intent(in), optional :: ilv end subroutine mld_s_base_onelev_build end interface diff --git a/mlprec/mld_z_onelev_mod.f90 b/mlprec/mld_z_onelev_mod.f90 index 92253b26..e0122502 100644 --- a/mlprec/mld_z_onelev_mod.f90 +++ b/mlprec/mld_z_onelev_mod.f90 @@ -225,7 +225,7 @@ module mld_z_onelev_mod end interface interface - subroutine mld_z_base_onelev_build(lv,info,amold,vmold,imold) + subroutine mld_z_base_onelev_build(lv,info,amold,vmold,imold,ilv) import :: psb_z_base_sparse_mat, psb_z_base_vect_type, & & psb_i_base_vect_type, psb_dpk_, mld_z_onelev_type, & & psb_ipk_, psb_epk_, psb_desc_type @@ -235,6 +235,7 @@ module mld_z_onelev_mod class(psb_z_base_sparse_mat), intent(in), optional :: amold class(psb_z_base_vect_type), intent(in), optional :: vmold class(psb_i_base_vect_type), intent(in), optional :: imold + integer(psb_ipk_), intent(in), optional :: ilv end subroutine mld_z_base_onelev_build end interface