Change interface to descr with verbosity level

documentation
Salvatore Filippone 4 years ago
parent 7f378e445d
commit 6541e3a95c

@ -256,7 +256,7 @@ module amg_c_onelev_mod
end interface end interface
interface interface
subroutine amg_c_base_onelev_descr(lv,il,nl,ilmin,info,iout) subroutine amg_c_base_onelev_descr(lv,il,nl,ilmin,info,iout, verbosity)
import :: psb_cspmat_type, psb_c_vect_type, psb_c_base_vect_type, & import :: psb_cspmat_type, psb_c_vect_type, psb_c_base_vect_type, &
& psb_clinmap_type, psb_spk_, amg_c_onelev_type, & & psb_clinmap_type, psb_spk_, amg_c_onelev_type, &
& psb_ipk_, psb_epk_, psb_desc_type & psb_ipk_, psb_epk_, psb_desc_type
@ -266,6 +266,7 @@ module amg_c_onelev_mod
integer(psb_ipk_), intent(in) :: il,nl,ilmin integer(psb_ipk_), intent(in) :: il,nl,ilmin
integer(psb_ipk_), intent(out) :: info integer(psb_ipk_), intent(out) :: info
integer(psb_ipk_), intent(in), optional :: iout integer(psb_ipk_), intent(in), optional :: iout
integer(psb_ipk_), intent(in), optional :: verbosity
end subroutine amg_c_base_onelev_descr end subroutine amg_c_base_onelev_descr
end interface end interface

@ -155,13 +155,14 @@ module amg_c_prec_type
interface amg_precdescr interface amg_precdescr
subroutine amg_cfile_prec_descr(prec,iout,root) subroutine amg_cfile_prec_descr(prec,iout,root,verbosity)
import :: amg_cprec_type, psb_ipk_ import :: amg_cprec_type, psb_ipk_
implicit none implicit none
! Arguments ! Arguments
class(amg_cprec_type), intent(in) :: prec class(amg_cprec_type), intent(in) :: prec
integer(psb_ipk_), intent(in), optional :: iout integer(psb_ipk_), intent(in), optional :: iout
integer(psb_ipk_), intent(in), optional :: root integer(psb_ipk_), intent(in), optional :: root
integer(psb_ipk_), intent(in), optional :: verbosity
end subroutine amg_cfile_prec_descr end subroutine amg_cfile_prec_descr
end interface end interface

@ -256,7 +256,7 @@ module amg_d_onelev_mod
end interface end interface
interface interface
subroutine amg_d_base_onelev_descr(lv,il,nl,ilmin,info,iout) subroutine amg_d_base_onelev_descr(lv,il,nl,ilmin,info,iout, verbosity)
import :: psb_dspmat_type, psb_d_vect_type, psb_d_base_vect_type, & import :: psb_dspmat_type, psb_d_vect_type, psb_d_base_vect_type, &
& psb_dlinmap_type, psb_dpk_, amg_d_onelev_type, & & psb_dlinmap_type, psb_dpk_, amg_d_onelev_type, &
& psb_ipk_, psb_epk_, psb_desc_type & psb_ipk_, psb_epk_, psb_desc_type
@ -266,6 +266,7 @@ module amg_d_onelev_mod
integer(psb_ipk_), intent(in) :: il,nl,ilmin integer(psb_ipk_), intent(in) :: il,nl,ilmin
integer(psb_ipk_), intent(out) :: info integer(psb_ipk_), intent(out) :: info
integer(psb_ipk_), intent(in), optional :: iout integer(psb_ipk_), intent(in), optional :: iout
integer(psb_ipk_), intent(in), optional :: verbosity
end subroutine amg_d_base_onelev_descr end subroutine amg_d_base_onelev_descr
end interface end interface

@ -155,13 +155,14 @@ module amg_d_prec_type
interface amg_precdescr interface amg_precdescr
subroutine amg_dfile_prec_descr(prec,iout,root) subroutine amg_dfile_prec_descr(prec,iout,root,verbosity)
import :: amg_dprec_type, psb_ipk_ import :: amg_dprec_type, psb_ipk_
implicit none implicit none
! Arguments ! Arguments
class(amg_dprec_type), intent(in) :: prec class(amg_dprec_type), intent(in) :: prec
integer(psb_ipk_), intent(in), optional :: iout integer(psb_ipk_), intent(in), optional :: iout
integer(psb_ipk_), intent(in), optional :: root integer(psb_ipk_), intent(in), optional :: root
integer(psb_ipk_), intent(in), optional :: verbosity
end subroutine amg_dfile_prec_descr end subroutine amg_dfile_prec_descr
end interface end interface

@ -256,7 +256,7 @@ module amg_s_onelev_mod
end interface end interface
interface interface
subroutine amg_s_base_onelev_descr(lv,il,nl,ilmin,info,iout) subroutine amg_s_base_onelev_descr(lv,il,nl,ilmin,info,iout, verbosity)
import :: psb_sspmat_type, psb_s_vect_type, psb_s_base_vect_type, & import :: psb_sspmat_type, psb_s_vect_type, psb_s_base_vect_type, &
& psb_slinmap_type, psb_spk_, amg_s_onelev_type, & & psb_slinmap_type, psb_spk_, amg_s_onelev_type, &
& psb_ipk_, psb_epk_, psb_desc_type & psb_ipk_, psb_epk_, psb_desc_type
@ -266,6 +266,7 @@ module amg_s_onelev_mod
integer(psb_ipk_), intent(in) :: il,nl,ilmin integer(psb_ipk_), intent(in) :: il,nl,ilmin
integer(psb_ipk_), intent(out) :: info integer(psb_ipk_), intent(out) :: info
integer(psb_ipk_), intent(in), optional :: iout integer(psb_ipk_), intent(in), optional :: iout
integer(psb_ipk_), intent(in), optional :: verbosity
end subroutine amg_s_base_onelev_descr end subroutine amg_s_base_onelev_descr
end interface end interface

@ -155,13 +155,14 @@ module amg_s_prec_type
interface amg_precdescr interface amg_precdescr
subroutine amg_sfile_prec_descr(prec,iout,root) subroutine amg_sfile_prec_descr(prec,iout,root,verbosity)
import :: amg_sprec_type, psb_ipk_ import :: amg_sprec_type, psb_ipk_
implicit none implicit none
! Arguments ! Arguments
class(amg_sprec_type), intent(in) :: prec class(amg_sprec_type), intent(in) :: prec
integer(psb_ipk_), intent(in), optional :: iout integer(psb_ipk_), intent(in), optional :: iout
integer(psb_ipk_), intent(in), optional :: root integer(psb_ipk_), intent(in), optional :: root
integer(psb_ipk_), intent(in), optional :: verbosity
end subroutine amg_sfile_prec_descr end subroutine amg_sfile_prec_descr
end interface end interface

@ -256,7 +256,7 @@ module amg_z_onelev_mod
end interface end interface
interface interface
subroutine amg_z_base_onelev_descr(lv,il,nl,ilmin,info,iout) subroutine amg_z_base_onelev_descr(lv,il,nl,ilmin,info,iout, verbosity)
import :: psb_zspmat_type, psb_z_vect_type, psb_z_base_vect_type, & import :: psb_zspmat_type, psb_z_vect_type, psb_z_base_vect_type, &
& psb_zlinmap_type, psb_dpk_, amg_z_onelev_type, & & psb_zlinmap_type, psb_dpk_, amg_z_onelev_type, &
& psb_ipk_, psb_epk_, psb_desc_type & psb_ipk_, psb_epk_, psb_desc_type
@ -266,6 +266,7 @@ module amg_z_onelev_mod
integer(psb_ipk_), intent(in) :: il,nl,ilmin integer(psb_ipk_), intent(in) :: il,nl,ilmin
integer(psb_ipk_), intent(out) :: info integer(psb_ipk_), intent(out) :: info
integer(psb_ipk_), intent(in), optional :: iout integer(psb_ipk_), intent(in), optional :: iout
integer(psb_ipk_), intent(in), optional :: verbosity
end subroutine amg_z_base_onelev_descr end subroutine amg_z_base_onelev_descr
end interface end interface

@ -155,13 +155,14 @@ module amg_z_prec_type
interface amg_precdescr interface amg_precdescr
subroutine amg_zfile_prec_descr(prec,iout,root) subroutine amg_zfile_prec_descr(prec,iout,root,verbosity)
import :: amg_zprec_type, psb_ipk_ import :: amg_zprec_type, psb_ipk_
implicit none implicit none
! Arguments ! Arguments
class(amg_zprec_type), intent(in) :: prec class(amg_zprec_type), intent(in) :: prec
integer(psb_ipk_), intent(in), optional :: iout integer(psb_ipk_), intent(in), optional :: iout
integer(psb_ipk_), intent(in), optional :: root integer(psb_ipk_), intent(in), optional :: root
integer(psb_ipk_), intent(in), optional :: verbosity
end subroutine amg_zfile_prec_descr end subroutine amg_zfile_prec_descr
end interface end interface

@ -58,7 +58,14 @@
! The id of the process printing the message; -1 acts as a wildcard. ! The id of the process printing the message; -1 acts as a wildcard.
! Default is psb_root_ ! Default is psb_root_
! !
subroutine amg_cfile_prec_descr(prec,iout,root) !
!
! verbosity:
! <0: suppress all messages
! 0: normal
! >1: increased details
!
subroutine amg_cfile_prec_descr(prec,iout,root, verbosity)
use psb_base_mod use psb_base_mod
use amg_c_prec_mod, amg_protect_name => amg_cfile_prec_descr use amg_c_prec_mod, amg_protect_name => amg_cfile_prec_descr
use amg_c_inner_mod use amg_c_inner_mod
@ -69,6 +76,8 @@ subroutine amg_cfile_prec_descr(prec,iout,root)
class(amg_cprec_type), intent(in) :: prec class(amg_cprec_type), intent(in) :: prec
integer(psb_ipk_), intent(in), optional :: iout integer(psb_ipk_), intent(in), optional :: iout
integer(psb_ipk_), intent(in), optional :: root integer(psb_ipk_), intent(in), optional :: root
integer(psb_ipk_), intent(in), optional :: verbosity
! Local variables ! Local variables
integer(psb_ipk_) :: ilev, nlev, ilmin, info, nswps integer(psb_ipk_) :: ilev, nlev, ilmin, info, nswps
@ -76,8 +85,7 @@ subroutine amg_cfile_prec_descr(prec,iout,root)
integer(psb_ipk_) :: me, np integer(psb_ipk_) :: me, np
logical :: is_symgs logical :: is_symgs
character(len=20), parameter :: name='amg_file_prec_descr' character(len=20), parameter :: name='amg_file_prec_descr'
integer(psb_ipk_) :: iout_ integer(psb_ipk_) :: iout_, root_, verbosity_
integer(psb_ipk_) :: root_
info = psb_success_ info = psb_success_
if (present(iout)) then if (present(iout)) then
@ -86,6 +94,12 @@ subroutine amg_cfile_prec_descr(prec,iout,root)
iout_ = psb_out_unit iout_ = psb_out_unit
end if end if
if (iout_ < 0) iout_ = psb_out_unit if (iout_ < 0) iout_ = psb_out_unit
if (present(verbosity)) then
verbosity_ = verbosity
else
verbosity_ = 0
end if
if (verbosity_ < 0) goto 9998
ctxt = prec%ctxt ctxt = prec%ctxt
@ -99,6 +113,7 @@ subroutine amg_cfile_prec_descr(prec,iout,root)
end if end if
if (root_ == -1) root_ = me if (root_ == -1) root_ = me
if (verbosity_ >=0) then
! !
! The preconditioner description is printed by processor psb_root_. ! The preconditioner description is printed by processor psb_root_.
! This agrees with the fact that all the parameters defining the ! This agrees with the fact that all the parameters defining the
@ -177,7 +192,8 @@ subroutine amg_cfile_prec_descr(prec,iout,root)
ilmin = 2 ilmin = 2
if (nlev == 2) ilmin=1 if (nlev == 2) ilmin=1
do ilev=ilmin,nlev do ilev=ilmin,nlev
call prec%precv(ilev)%descr(ilev,nlev,ilmin,info,iout=iout_) call prec%precv(ilev)%descr(ilev,nlev,ilmin,info, &
& iout=iout_,verbosity=verbosity)
end do end do
write(iout_,*) write(iout_,*)
@ -189,12 +205,12 @@ subroutine amg_cfile_prec_descr(prec,iout,root)
end if end if
end if end if
end if
else else
write(iout_,*) trim(name), & write(iout_,*) trim(name), &
& ': Error: no base preconditioner available, something is wrong!' & ': Error: no base preconditioner available, something is wrong!'
info = -2 info = -2
return return
endif endif
9998 continue
end subroutine amg_cfile_prec_descr end subroutine amg_cfile_prec_descr

@ -58,7 +58,14 @@
! The id of the process printing the message; -1 acts as a wildcard. ! The id of the process printing the message; -1 acts as a wildcard.
! Default is psb_root_ ! Default is psb_root_
! !
subroutine amg_dfile_prec_descr(prec,iout,root) !
!
! verbosity:
! <0: suppress all messages
! 0: normal
! >1: increased details
!
subroutine amg_dfile_prec_descr(prec,iout,root, verbosity)
use psb_base_mod use psb_base_mod
use amg_d_prec_mod, amg_protect_name => amg_dfile_prec_descr use amg_d_prec_mod, amg_protect_name => amg_dfile_prec_descr
use amg_d_inner_mod use amg_d_inner_mod
@ -69,6 +76,8 @@ subroutine amg_dfile_prec_descr(prec,iout,root)
class(amg_dprec_type), intent(in) :: prec class(amg_dprec_type), intent(in) :: prec
integer(psb_ipk_), intent(in), optional :: iout integer(psb_ipk_), intent(in), optional :: iout
integer(psb_ipk_), intent(in), optional :: root integer(psb_ipk_), intent(in), optional :: root
integer(psb_ipk_), intent(in), optional :: verbosity
! Local variables ! Local variables
integer(psb_ipk_) :: ilev, nlev, ilmin, info, nswps integer(psb_ipk_) :: ilev, nlev, ilmin, info, nswps
@ -76,8 +85,7 @@ subroutine amg_dfile_prec_descr(prec,iout,root)
integer(psb_ipk_) :: me, np integer(psb_ipk_) :: me, np
logical :: is_symgs logical :: is_symgs
character(len=20), parameter :: name='amg_file_prec_descr' character(len=20), parameter :: name='amg_file_prec_descr'
integer(psb_ipk_) :: iout_ integer(psb_ipk_) :: iout_, root_, verbosity_
integer(psb_ipk_) :: root_
info = psb_success_ info = psb_success_
if (present(iout)) then if (present(iout)) then
@ -86,6 +94,12 @@ subroutine amg_dfile_prec_descr(prec,iout,root)
iout_ = psb_out_unit iout_ = psb_out_unit
end if end if
if (iout_ < 0) iout_ = psb_out_unit if (iout_ < 0) iout_ = psb_out_unit
if (present(verbosity)) then
verbosity_ = verbosity
else
verbosity_ = 0
end if
if (verbosity_ < 0) goto 9998
ctxt = prec%ctxt ctxt = prec%ctxt
@ -99,6 +113,7 @@ subroutine amg_dfile_prec_descr(prec,iout,root)
end if end if
if (root_ == -1) root_ = me if (root_ == -1) root_ = me
if (verbosity_ >=0) then
! !
! The preconditioner description is printed by processor psb_root_. ! The preconditioner description is printed by processor psb_root_.
! This agrees with the fact that all the parameters defining the ! This agrees with the fact that all the parameters defining the
@ -177,7 +192,8 @@ subroutine amg_dfile_prec_descr(prec,iout,root)
ilmin = 2 ilmin = 2
if (nlev == 2) ilmin=1 if (nlev == 2) ilmin=1
do ilev=ilmin,nlev do ilev=ilmin,nlev
call prec%precv(ilev)%descr(ilev,nlev,ilmin,info,iout=iout_) call prec%precv(ilev)%descr(ilev,nlev,ilmin,info, &
& iout=iout_,verbosity=verbosity)
end do end do
write(iout_,*) write(iout_,*)
@ -189,12 +205,12 @@ subroutine amg_dfile_prec_descr(prec,iout,root)
end if end if
end if end if
end if
else else
write(iout_,*) trim(name), & write(iout_,*) trim(name), &
& ': Error: no base preconditioner available, something is wrong!' & ': Error: no base preconditioner available, something is wrong!'
info = -2 info = -2
return return
endif endif
9998 continue
end subroutine amg_dfile_prec_descr end subroutine amg_dfile_prec_descr

@ -58,7 +58,14 @@
! The id of the process printing the message; -1 acts as a wildcard. ! The id of the process printing the message; -1 acts as a wildcard.
! Default is psb_root_ ! Default is psb_root_
! !
subroutine amg_sfile_prec_descr(prec,iout,root) !
!
! verbosity:
! <0: suppress all messages
! 0: normal
! >1: increased details
!
subroutine amg_sfile_prec_descr(prec,iout,root, verbosity)
use psb_base_mod use psb_base_mod
use amg_s_prec_mod, amg_protect_name => amg_sfile_prec_descr use amg_s_prec_mod, amg_protect_name => amg_sfile_prec_descr
use amg_s_inner_mod use amg_s_inner_mod
@ -69,6 +76,8 @@ subroutine amg_sfile_prec_descr(prec,iout,root)
class(amg_sprec_type), intent(in) :: prec class(amg_sprec_type), intent(in) :: prec
integer(psb_ipk_), intent(in), optional :: iout integer(psb_ipk_), intent(in), optional :: iout
integer(psb_ipk_), intent(in), optional :: root integer(psb_ipk_), intent(in), optional :: root
integer(psb_ipk_), intent(in), optional :: verbosity
! Local variables ! Local variables
integer(psb_ipk_) :: ilev, nlev, ilmin, info, nswps integer(psb_ipk_) :: ilev, nlev, ilmin, info, nswps
@ -76,8 +85,7 @@ subroutine amg_sfile_prec_descr(prec,iout,root)
integer(psb_ipk_) :: me, np integer(psb_ipk_) :: me, np
logical :: is_symgs logical :: is_symgs
character(len=20), parameter :: name='amg_file_prec_descr' character(len=20), parameter :: name='amg_file_prec_descr'
integer(psb_ipk_) :: iout_ integer(psb_ipk_) :: iout_, root_, verbosity_
integer(psb_ipk_) :: root_
info = psb_success_ info = psb_success_
if (present(iout)) then if (present(iout)) then
@ -86,6 +94,12 @@ subroutine amg_sfile_prec_descr(prec,iout,root)
iout_ = psb_out_unit iout_ = psb_out_unit
end if end if
if (iout_ < 0) iout_ = psb_out_unit if (iout_ < 0) iout_ = psb_out_unit
if (present(verbosity)) then
verbosity_ = verbosity
else
verbosity_ = 0
end if
if (verbosity_ < 0) goto 9998
ctxt = prec%ctxt ctxt = prec%ctxt
@ -99,6 +113,7 @@ subroutine amg_sfile_prec_descr(prec,iout,root)
end if end if
if (root_ == -1) root_ = me if (root_ == -1) root_ = me
if (verbosity_ >=0) then
! !
! The preconditioner description is printed by processor psb_root_. ! The preconditioner description is printed by processor psb_root_.
! This agrees with the fact that all the parameters defining the ! This agrees with the fact that all the parameters defining the
@ -177,7 +192,8 @@ subroutine amg_sfile_prec_descr(prec,iout,root)
ilmin = 2 ilmin = 2
if (nlev == 2) ilmin=1 if (nlev == 2) ilmin=1
do ilev=ilmin,nlev do ilev=ilmin,nlev
call prec%precv(ilev)%descr(ilev,nlev,ilmin,info,iout=iout_) call prec%precv(ilev)%descr(ilev,nlev,ilmin,info, &
& iout=iout_,verbosity=verbosity)
end do end do
write(iout_,*) write(iout_,*)
@ -189,12 +205,12 @@ subroutine amg_sfile_prec_descr(prec,iout,root)
end if end if
end if end if
end if
else else
write(iout_,*) trim(name), & write(iout_,*) trim(name), &
& ': Error: no base preconditioner available, something is wrong!' & ': Error: no base preconditioner available, something is wrong!'
info = -2 info = -2
return return
endif endif
9998 continue
end subroutine amg_sfile_prec_descr end subroutine amg_sfile_prec_descr

@ -58,7 +58,14 @@
! The id of the process printing the message; -1 acts as a wildcard. ! The id of the process printing the message; -1 acts as a wildcard.
! Default is psb_root_ ! Default is psb_root_
! !
subroutine amg_zfile_prec_descr(prec,iout,root) !
!
! verbosity:
! <0: suppress all messages
! 0: normal
! >1: increased details
!
subroutine amg_zfile_prec_descr(prec,iout,root, verbosity)
use psb_base_mod use psb_base_mod
use amg_z_prec_mod, amg_protect_name => amg_zfile_prec_descr use amg_z_prec_mod, amg_protect_name => amg_zfile_prec_descr
use amg_z_inner_mod use amg_z_inner_mod
@ -69,6 +76,8 @@ subroutine amg_zfile_prec_descr(prec,iout,root)
class(amg_zprec_type), intent(in) :: prec class(amg_zprec_type), intent(in) :: prec
integer(psb_ipk_), intent(in), optional :: iout integer(psb_ipk_), intent(in), optional :: iout
integer(psb_ipk_), intent(in), optional :: root integer(psb_ipk_), intent(in), optional :: root
integer(psb_ipk_), intent(in), optional :: verbosity
! Local variables ! Local variables
integer(psb_ipk_) :: ilev, nlev, ilmin, info, nswps integer(psb_ipk_) :: ilev, nlev, ilmin, info, nswps
@ -76,8 +85,7 @@ subroutine amg_zfile_prec_descr(prec,iout,root)
integer(psb_ipk_) :: me, np integer(psb_ipk_) :: me, np
logical :: is_symgs logical :: is_symgs
character(len=20), parameter :: name='amg_file_prec_descr' character(len=20), parameter :: name='amg_file_prec_descr'
integer(psb_ipk_) :: iout_ integer(psb_ipk_) :: iout_, root_, verbosity_
integer(psb_ipk_) :: root_
info = psb_success_ info = psb_success_
if (present(iout)) then if (present(iout)) then
@ -86,6 +94,12 @@ subroutine amg_zfile_prec_descr(prec,iout,root)
iout_ = psb_out_unit iout_ = psb_out_unit
end if end if
if (iout_ < 0) iout_ = psb_out_unit if (iout_ < 0) iout_ = psb_out_unit
if (present(verbosity)) then
verbosity_ = verbosity
else
verbosity_ = 0
end if
if (verbosity_ < 0) goto 9998
ctxt = prec%ctxt ctxt = prec%ctxt
@ -99,6 +113,7 @@ subroutine amg_zfile_prec_descr(prec,iout,root)
end if end if
if (root_ == -1) root_ = me if (root_ == -1) root_ = me
if (verbosity_ >=0) then
! !
! The preconditioner description is printed by processor psb_root_. ! The preconditioner description is printed by processor psb_root_.
! This agrees with the fact that all the parameters defining the ! This agrees with the fact that all the parameters defining the
@ -177,7 +192,8 @@ subroutine amg_zfile_prec_descr(prec,iout,root)
ilmin = 2 ilmin = 2
if (nlev == 2) ilmin=1 if (nlev == 2) ilmin=1
do ilev=ilmin,nlev do ilev=ilmin,nlev
call prec%precv(ilev)%descr(ilev,nlev,ilmin,info,iout=iout_) call prec%precv(ilev)%descr(ilev,nlev,ilmin,info, &
& iout=iout_,verbosity=verbosity)
end do end do
write(iout_,*) write(iout_,*)
@ -189,12 +205,12 @@ subroutine amg_zfile_prec_descr(prec,iout,root)
end if end if
end if end if
end if
else else
write(iout_,*) trim(name), & write(iout_,*) trim(name), &
& ': Error: no base preconditioner available, something is wrong!' & ': Error: no base preconditioner available, something is wrong!'
info = -2 info = -2
return return
endif endif
9998 continue
end subroutine amg_zfile_prec_descr end subroutine amg_zfile_prec_descr

@ -35,7 +35,14 @@
! POSSIBILITY OF SUCH DAMAGE. ! POSSIBILITY OF SUCH DAMAGE.
! !
! !
subroutine amg_c_base_onelev_descr(lv,il,nl,ilmin,info,iout) !
!
! verbosity:
! <0: suppress all messages
! 0: normal
! >1: increased details
!
subroutine amg_c_base_onelev_descr(lv,il,nl,ilmin,info,iout,verbosity)
use psb_base_mod use psb_base_mod
use amg_c_onelev_mod, amg_protect_name => amg_c_base_onelev_descr use amg_c_onelev_mod, amg_protect_name => amg_c_base_onelev_descr
@ -45,11 +52,13 @@ subroutine amg_c_base_onelev_descr(lv,il,nl,ilmin,info,iout)
integer(psb_ipk_), intent(in) :: il,nl,ilmin integer(psb_ipk_), intent(in) :: il,nl,ilmin
integer(psb_ipk_), intent(out) :: info integer(psb_ipk_), intent(out) :: info
integer(psb_ipk_), intent(in), optional :: iout integer(psb_ipk_), intent(in), optional :: iout
integer(psb_ipk_), intent(in), optional :: verbosity
! Local variables ! Local variables
integer(psb_ipk_) :: err_act integer(psb_ipk_) :: err_act
character(len=20), parameter :: name='amg_c_base_onelev_descr' character(len=20), parameter :: name='amg_c_base_onelev_descr'
integer(psb_ipk_) :: iout_ integer(psb_ipk_) :: iout_, verbosity_
logical :: coarse logical :: coarse
@ -64,6 +73,13 @@ subroutine amg_c_base_onelev_descr(lv,il,nl,ilmin,info,iout)
iout_ = psb_out_unit iout_ = psb_out_unit
end if end if
if (present(verbosity)) then
verbosity_ = verbosity
else
verbosity_ = 0
end if
if (verbosity_ < 0) goto 9998
write(iout_,*) write(iout_,*)
if (il == ilmin) then if (il == ilmin) then
call lv%parms%mlcycledsc(iout_,info) call lv%parms%mlcycledsc(iout_,info)
@ -91,10 +107,20 @@ subroutine amg_c_base_onelev_descr(lv,il,nl,ilmin,info,iout)
if (nl > 1) then if (nl > 1) then
if (allocated(lv%linmap%naggr)) then if (allocated(lv%linmap%naggr)) then
write(iout_,*) ' Coarse Matrix: Global size: ', & write(iout_,*) ' Coarse Matrix: Global size: ', &
& sum((1_psb_lpk_*lv%linmap%naggr(:))),' Nonzeros: ',lv%ac_nz_tot & lv%linmap%nagtot
write(iout_,*) ' Nonzeros: ',lv%ac_nz_tot
if (verbosity_>0) then
write(iout_,*) ' Local matrix sizes: ', & write(iout_,*) ' Local matrix sizes: ', &
& lv%linmap%naggr(:) & lv%linmap%naggr(:)
write(iout_,*) ' Aggregation ratio: ', & else
write(iout_,'(2(a,1x,i12))') &
& ' Local matrix sizes: min:', &
& lv%linmap%nagmin,' max:', lv%linmap%nagmax
write(iout_,'(a,1x,f14.1)') &
& ' avg:', &
& lv%linmap%nagavg
end if
write(iout_,'(a,1x,f14.2)') ' Aggregation ratio: ', &
& lv%szratio & lv%szratio
end if end if
end if end if
@ -103,6 +129,7 @@ subroutine amg_c_base_onelev_descr(lv,il,nl,ilmin,info,iout)
& call lv%sm%descr(info,iout=iout_,coarse=coarse) & call lv%sm%descr(info,iout=iout_,coarse=coarse)
end if end if
9998 continue
call psb_erractionrestore(err_act) call psb_erractionrestore(err_act)
return return

@ -35,7 +35,14 @@
! POSSIBILITY OF SUCH DAMAGE. ! POSSIBILITY OF SUCH DAMAGE.
! !
! !
subroutine amg_d_base_onelev_descr(lv,il,nl,ilmin,info,iout) !
!
! verbosity:
! <0: suppress all messages
! 0: normal
! >1: increased details
!
subroutine amg_d_base_onelev_descr(lv,il,nl,ilmin,info,iout,verbosity)
use psb_base_mod use psb_base_mod
use amg_d_onelev_mod, amg_protect_name => amg_d_base_onelev_descr use amg_d_onelev_mod, amg_protect_name => amg_d_base_onelev_descr
@ -45,11 +52,13 @@ subroutine amg_d_base_onelev_descr(lv,il,nl,ilmin,info,iout)
integer(psb_ipk_), intent(in) :: il,nl,ilmin integer(psb_ipk_), intent(in) :: il,nl,ilmin
integer(psb_ipk_), intent(out) :: info integer(psb_ipk_), intent(out) :: info
integer(psb_ipk_), intent(in), optional :: iout integer(psb_ipk_), intent(in), optional :: iout
integer(psb_ipk_), intent(in), optional :: verbosity
! Local variables ! Local variables
integer(psb_ipk_) :: err_act integer(psb_ipk_) :: err_act
character(len=20), parameter :: name='amg_d_base_onelev_descr' character(len=20), parameter :: name='amg_d_base_onelev_descr'
integer(psb_ipk_) :: iout_ integer(psb_ipk_) :: iout_, verbosity_
logical :: coarse logical :: coarse
@ -64,6 +73,13 @@ subroutine amg_d_base_onelev_descr(lv,il,nl,ilmin,info,iout)
iout_ = psb_out_unit iout_ = psb_out_unit
end if end if
if (present(verbosity)) then
verbosity_ = verbosity
else
verbosity_ = 0
end if
if (verbosity_ < 0) goto 9998
write(iout_,*) write(iout_,*)
if (il == ilmin) then if (il == ilmin) then
call lv%parms%mlcycledsc(iout_,info) call lv%parms%mlcycledsc(iout_,info)
@ -91,10 +107,20 @@ subroutine amg_d_base_onelev_descr(lv,il,nl,ilmin,info,iout)
if (nl > 1) then if (nl > 1) then
if (allocated(lv%linmap%naggr)) then if (allocated(lv%linmap%naggr)) then
write(iout_,*) ' Coarse Matrix: Global size: ', & write(iout_,*) ' Coarse Matrix: Global size: ', &
& sum((1_psb_lpk_*lv%linmap%naggr(:))),' Nonzeros: ',lv%ac_nz_tot & lv%linmap%nagtot
write(iout_,*) ' Nonzeros: ',lv%ac_nz_tot
if (verbosity_>0) then
write(iout_,*) ' Local matrix sizes: ', & write(iout_,*) ' Local matrix sizes: ', &
& lv%linmap%naggr(:) & lv%linmap%naggr(:)
write(iout_,*) ' Aggregation ratio: ', & else
write(iout_,'(2(a,1x,i12))') &
& ' Local matrix sizes: min:', &
& lv%linmap%nagmin,' max:', lv%linmap%nagmax
write(iout_,'(a,1x,f14.1)') &
& ' avg:', &
& lv%linmap%nagavg
end if
write(iout_,'(a,1x,f14.2)') ' Aggregation ratio: ', &
& lv%szratio & lv%szratio
end if end if
end if end if
@ -103,6 +129,7 @@ subroutine amg_d_base_onelev_descr(lv,il,nl,ilmin,info,iout)
& call lv%sm%descr(info,iout=iout_,coarse=coarse) & call lv%sm%descr(info,iout=iout_,coarse=coarse)
end if end if
9998 continue
call psb_erractionrestore(err_act) call psb_erractionrestore(err_act)
return return

@ -35,7 +35,14 @@
! POSSIBILITY OF SUCH DAMAGE. ! POSSIBILITY OF SUCH DAMAGE.
! !
! !
subroutine amg_s_base_onelev_descr(lv,il,nl,ilmin,info,iout) !
!
! verbosity:
! <0: suppress all messages
! 0: normal
! >1: increased details
!
subroutine amg_s_base_onelev_descr(lv,il,nl,ilmin,info,iout,verbosity)
use psb_base_mod use psb_base_mod
use amg_s_onelev_mod, amg_protect_name => amg_s_base_onelev_descr use amg_s_onelev_mod, amg_protect_name => amg_s_base_onelev_descr
@ -45,11 +52,13 @@ subroutine amg_s_base_onelev_descr(lv,il,nl,ilmin,info,iout)
integer(psb_ipk_), intent(in) :: il,nl,ilmin integer(psb_ipk_), intent(in) :: il,nl,ilmin
integer(psb_ipk_), intent(out) :: info integer(psb_ipk_), intent(out) :: info
integer(psb_ipk_), intent(in), optional :: iout integer(psb_ipk_), intent(in), optional :: iout
integer(psb_ipk_), intent(in), optional :: verbosity
! Local variables ! Local variables
integer(psb_ipk_) :: err_act integer(psb_ipk_) :: err_act
character(len=20), parameter :: name='amg_s_base_onelev_descr' character(len=20), parameter :: name='amg_s_base_onelev_descr'
integer(psb_ipk_) :: iout_ integer(psb_ipk_) :: iout_, verbosity_
logical :: coarse logical :: coarse
@ -64,6 +73,13 @@ subroutine amg_s_base_onelev_descr(lv,il,nl,ilmin,info,iout)
iout_ = psb_out_unit iout_ = psb_out_unit
end if end if
if (present(verbosity)) then
verbosity_ = verbosity
else
verbosity_ = 0
end if
if (verbosity_ < 0) goto 9998
write(iout_,*) write(iout_,*)
if (il == ilmin) then if (il == ilmin) then
call lv%parms%mlcycledsc(iout_,info) call lv%parms%mlcycledsc(iout_,info)
@ -91,10 +107,20 @@ subroutine amg_s_base_onelev_descr(lv,il,nl,ilmin,info,iout)
if (nl > 1) then if (nl > 1) then
if (allocated(lv%linmap%naggr)) then if (allocated(lv%linmap%naggr)) then
write(iout_,*) ' Coarse Matrix: Global size: ', & write(iout_,*) ' Coarse Matrix: Global size: ', &
& sum((1_psb_lpk_*lv%linmap%naggr(:))),' Nonzeros: ',lv%ac_nz_tot & lv%linmap%nagtot
write(iout_,*) ' Nonzeros: ',lv%ac_nz_tot
if (verbosity_>0) then
write(iout_,*) ' Local matrix sizes: ', & write(iout_,*) ' Local matrix sizes: ', &
& lv%linmap%naggr(:) & lv%linmap%naggr(:)
write(iout_,*) ' Aggregation ratio: ', & else
write(iout_,'(2(a,1x,i12))') &
& ' Local matrix sizes: min:', &
& lv%linmap%nagmin,' max:', lv%linmap%nagmax
write(iout_,'(a,1x,f14.1)') &
& ' avg:', &
& lv%linmap%nagavg
end if
write(iout_,'(a,1x,f14.2)') ' Aggregation ratio: ', &
& lv%szratio & lv%szratio
end if end if
end if end if
@ -103,6 +129,7 @@ subroutine amg_s_base_onelev_descr(lv,il,nl,ilmin,info,iout)
& call lv%sm%descr(info,iout=iout_,coarse=coarse) & call lv%sm%descr(info,iout=iout_,coarse=coarse)
end if end if
9998 continue
call psb_erractionrestore(err_act) call psb_erractionrestore(err_act)
return return

@ -35,7 +35,14 @@
! POSSIBILITY OF SUCH DAMAGE. ! POSSIBILITY OF SUCH DAMAGE.
! !
! !
subroutine amg_z_base_onelev_descr(lv,il,nl,ilmin,info,iout) !
!
! verbosity:
! <0: suppress all messages
! 0: normal
! >1: increased details
!
subroutine amg_z_base_onelev_descr(lv,il,nl,ilmin,info,iout,verbosity)
use psb_base_mod use psb_base_mod
use amg_z_onelev_mod, amg_protect_name => amg_z_base_onelev_descr use amg_z_onelev_mod, amg_protect_name => amg_z_base_onelev_descr
@ -45,11 +52,13 @@ subroutine amg_z_base_onelev_descr(lv,il,nl,ilmin,info,iout)
integer(psb_ipk_), intent(in) :: il,nl,ilmin integer(psb_ipk_), intent(in) :: il,nl,ilmin
integer(psb_ipk_), intent(out) :: info integer(psb_ipk_), intent(out) :: info
integer(psb_ipk_), intent(in), optional :: iout integer(psb_ipk_), intent(in), optional :: iout
integer(psb_ipk_), intent(in), optional :: verbosity
! Local variables ! Local variables
integer(psb_ipk_) :: err_act integer(psb_ipk_) :: err_act
character(len=20), parameter :: name='amg_z_base_onelev_descr' character(len=20), parameter :: name='amg_z_base_onelev_descr'
integer(psb_ipk_) :: iout_ integer(psb_ipk_) :: iout_, verbosity_
logical :: coarse logical :: coarse
@ -64,6 +73,13 @@ subroutine amg_z_base_onelev_descr(lv,il,nl,ilmin,info,iout)
iout_ = psb_out_unit iout_ = psb_out_unit
end if end if
if (present(verbosity)) then
verbosity_ = verbosity
else
verbosity_ = 0
end if
if (verbosity_ < 0) goto 9998
write(iout_,*) write(iout_,*)
if (il == ilmin) then if (il == ilmin) then
call lv%parms%mlcycledsc(iout_,info) call lv%parms%mlcycledsc(iout_,info)
@ -91,10 +107,20 @@ subroutine amg_z_base_onelev_descr(lv,il,nl,ilmin,info,iout)
if (nl > 1) then if (nl > 1) then
if (allocated(lv%linmap%naggr)) then if (allocated(lv%linmap%naggr)) then
write(iout_,*) ' Coarse Matrix: Global size: ', & write(iout_,*) ' Coarse Matrix: Global size: ', &
& sum((1_psb_lpk_*lv%linmap%naggr(:))),' Nonzeros: ',lv%ac_nz_tot & lv%linmap%nagtot
write(iout_,*) ' Nonzeros: ',lv%ac_nz_tot
if (verbosity_>0) then
write(iout_,*) ' Local matrix sizes: ', & write(iout_,*) ' Local matrix sizes: ', &
& lv%linmap%naggr(:) & lv%linmap%naggr(:)
write(iout_,*) ' Aggregation ratio: ', & else
write(iout_,'(2(a,1x,i12))') &
& ' Local matrix sizes: min:', &
& lv%linmap%nagmin,' max:', lv%linmap%nagmax
write(iout_,'(a,1x,f14.1)') &
& ' avg:', &
& lv%linmap%nagavg
end if
write(iout_,'(a,1x,f14.2)') ' Aggregation ratio: ', &
& lv%szratio & lv%szratio
end if end if
end if end if
@ -103,6 +129,7 @@ subroutine amg_z_base_onelev_descr(lv,il,nl,ilmin,info,iout)
& call lv%sm%descr(info,iout=iout_,coarse=coarse) & call lv%sm%descr(info,iout=iout_,coarse=coarse)
end if end if
9998 continue
call psb_erractionrestore(err_act) call psb_erractionrestore(err_act)
return return

Loading…
Cancel
Save