Implement global_num for smoother%dmp.

richardson
Salvatore Filippone 5 years ago
parent 9c95835ed5
commit 2894a0944b

@ -147,12 +147,12 @@ subroutine mld_c_base_onelev_dump(lv,level,info,prefix,head,ac,rp,&
end if
if (allocated(lv%sm)) then
call lv%sm%dump(icontxt,level,info,smoother=smoother, &
& solver=solver,prefix=trim(prefix_)//"_sm")
call lv%sm%dump(lv%desc_ac,level,info,smoother=smoother, &
& solver=solver,prefix=trim(prefix_)//"_sm",global_num=global_num)
end if
if (allocated(lv%sm2a)) then
call lv%sm2a%dump(icontxt,level,info,smoother=smoother, &
& solver=solver,prefix=trim(prefix_)//"_sm2a")
call lv%sm2a%dump(lv%desc_ac,level,info,smoother=smoother, &
& solver=solver,prefix=trim(prefix_)//"_sm2a",global_num=global_num)
end if
end subroutine mld_c_base_onelev_dump

@ -147,12 +147,12 @@ subroutine mld_d_base_onelev_dump(lv,level,info,prefix,head,ac,rp,&
end if
if (allocated(lv%sm)) then
call lv%sm%dump(icontxt,level,info,smoother=smoother, &
& solver=solver,prefix=trim(prefix_)//"_sm")
call lv%sm%dump(lv%desc_ac,level,info,smoother=smoother, &
& solver=solver,prefix=trim(prefix_)//"_sm",global_num=global_num)
end if
if (allocated(lv%sm2a)) then
call lv%sm2a%dump(icontxt,level,info,smoother=smoother, &
& solver=solver,prefix=trim(prefix_)//"_sm2a")
call lv%sm2a%dump(lv%desc_ac,level,info,smoother=smoother, &
& solver=solver,prefix=trim(prefix_)//"_sm2a",global_num=global_num)
end if
end subroutine mld_d_base_onelev_dump

@ -147,12 +147,12 @@ subroutine mld_s_base_onelev_dump(lv,level,info,prefix,head,ac,rp,&
end if
if (allocated(lv%sm)) then
call lv%sm%dump(icontxt,level,info,smoother=smoother, &
& solver=solver,prefix=trim(prefix_)//"_sm")
call lv%sm%dump(lv%desc_ac,level,info,smoother=smoother, &
& solver=solver,prefix=trim(prefix_)//"_sm",global_num=global_num)
end if
if (allocated(lv%sm2a)) then
call lv%sm2a%dump(icontxt,level,info,smoother=smoother, &
& solver=solver,prefix=trim(prefix_)//"_sm2a")
call lv%sm2a%dump(lv%desc_ac,level,info,smoother=smoother, &
& solver=solver,prefix=trim(prefix_)//"_sm2a",global_num=global_num)
end if
end subroutine mld_s_base_onelev_dump

@ -147,12 +147,12 @@ subroutine mld_z_base_onelev_dump(lv,level,info,prefix,head,ac,rp,&
end if
if (allocated(lv%sm)) then
call lv%sm%dump(icontxt,level,info,smoother=smoother, &
& solver=solver,prefix=trim(prefix_)//"_sm")
call lv%sm%dump(lv%desc_ac,level,info,smoother=smoother, &
& solver=solver,prefix=trim(prefix_)//"_sm",global_num=global_num)
end if
if (allocated(lv%sm2a)) then
call lv%sm2a%dump(icontxt,level,info,smoother=smoother, &
& solver=solver,prefix=trim(prefix_)//"_sm2a")
call lv%sm2a%dump(lv%desc_ac,level,info,smoother=smoother, &
& solver=solver,prefix=trim(prefix_)//"_sm2a",global_num=global_num)
end if
end subroutine mld_z_base_onelev_dump

@ -35,21 +35,22 @@
! POSSIBILITY OF SUCH DAMAGE.
!
!
subroutine mld_c_as_smoother_dmp(sm,ictxt,level,info,prefix,head,smoother,solver)
subroutine mld_c_as_smoother_dmp(sm,desc,level,info,prefix,head,smoother,solver,global_num)
use psb_base_mod
use mld_c_as_smoother, mld_protect_nam => mld_c_as_smoother_dmp
implicit none
class(mld_c_as_smoother_type), intent(in) :: sm
integer(psb_ipk_), intent(in) :: ictxt,level
type(psb_desc_type), intent(in) :: desc
integer(psb_ipk_), intent(in) :: level
integer(psb_ipk_), intent(out) :: info
character(len=*), intent(in), optional :: prefix, head
logical, optional, intent(in) :: smoother, solver
logical, optional, intent(in) :: smoother, solver, global_num
integer(psb_ipk_) :: i, j, il1, iln, lname, lev
integer(psb_ipk_) :: icontxt,iam, np
integer(psb_ipk_) :: ictxt,iam, np
character(len=80) :: prefix_
character(len=120) :: fname ! len should be at least 20 more than
logical :: smoother_
logical :: smoother_, global_num_
! len of prefix_
info = 0
@ -59,7 +60,7 @@ subroutine mld_c_as_smoother_dmp(sm,ictxt,level,info,prefix,head,smoother,solver
else
prefix_ = "dump_smth_c"
end if
ictxt = desc%get_context()
call psb_info(ictxt,iam,np)
if (present(smoother)) then
@ -67,11 +68,18 @@ subroutine mld_c_as_smoother_dmp(sm,ictxt,level,info,prefix,head,smoother,solver
else
smoother_ = .false.
end if
if (present(global_num)) then
global_num_ = global_num
else
global_num_ = .false.
end if
lname = len_trim(prefix_)
fname = trim(prefix_)
write(fname(lname+1:lname+5),'(a,i3.3)') '_p',iam
lname = lname + 5
if (global_num_) then
write(0,*) iam,' Warning: no global num with AS smoothers dump'
end if
if (smoother_) then
write(fname(lname+1:),'(a,i3.3,a)')'_l',level,'_nd.mtx'
if (sm%nd%is_asb()) &

@ -35,21 +35,22 @@
! POSSIBILITY OF SUCH DAMAGE.
!
!
subroutine mld_c_base_smoother_dmp(sm,ictxt,level,info,prefix,head,smoother,solver)
subroutine mld_c_base_smoother_dmp(sm,desc,level,info,prefix,head,smoother,solver,global_num)
use psb_base_mod
use mld_c_base_smoother_mod, mld_protect_name => mld_c_base_smoother_dmp
implicit none
class(mld_c_base_smoother_type), intent(in) :: sm
integer(psb_ipk_), intent(in) :: ictxt,level
type(psb_desc_type), intent(in) :: desc
integer(psb_ipk_), intent(in) :: level
integer(psb_ipk_), intent(out) :: info
character(len=*), intent(in), optional :: prefix, head
logical, optional, intent(in) :: smoother, solver
logical, optional, intent(in) :: smoother, solver, global_num
integer(psb_ipk_) :: i, j, il1, iln, lname, lev
integer(psb_ipk_) :: icontxt,iam, np
integer(psb_ipk_) :: ictxt,iam, np
character(len=80) :: prefix_
character(len=120) :: fname ! len should be at least 20 more than
logical :: smoother_
logical :: smoother_, global_num_
! len of prefix_
info = 0
@ -59,9 +60,14 @@ subroutine mld_c_base_smoother_dmp(sm,ictxt,level,info,prefix,head,smoother,solv
else
prefix_ = "dump_smth_c"
end if
ictxt = desc%get_context()
call psb_info(ictxt,iam,np)
if (present(global_num)) then
global_num_ = global_num
else
global_num_ = .false.
end if
if (present(smoother)) then
smoother_ = smoother
else

@ -35,21 +35,23 @@
! POSSIBILITY OF SUCH DAMAGE.
!
!
subroutine mld_c_jac_smoother_dmp(sm,ictxt,level,info,prefix,head,smoother,solver)
subroutine mld_c_jac_smoother_dmp(sm,desc,level,info,prefix,head,smoother,solver,global_num)
use psb_base_mod
use mld_c_jac_smoother, mld_protect_nam => mld_c_jac_smoother_dmp
implicit none
class(mld_c_jac_smoother_type), intent(in) :: sm
integer(psb_ipk_), intent(in) :: ictxt,level
type(psb_desc_type), intent(in) :: desc
integer(psb_ipk_), intent(in) :: level
integer(psb_ipk_), intent(out) :: info
character(len=*), intent(in), optional :: prefix, head
logical, optional, intent(in) :: smoother, solver
logical, optional, intent(in) :: smoother, solver, global_num
integer(psb_ipk_) :: i, j, il1, iln, lname, lev
integer(psb_ipk_) :: icontxt,iam, np
integer(psb_ipk_) :: ictxt,iam, np
character(len=80) :: prefix_
character(len=120) :: fname ! len should be at least 20 more than
logical :: smoother_
integer(psb_lpk_), allocatable :: iv(:)
logical :: smoother_, global_num_
! len of prefix_
info = 0
@ -59,7 +61,7 @@ subroutine mld_c_jac_smoother_dmp(sm,ictxt,level,info,prefix,head,smoother,solve
else
prefix_ = "dump_smth_c"
end if
ictxt = desc%get_context()
call psb_info(ictxt,iam,np)
if (present(smoother)) then
@ -67,6 +69,11 @@ subroutine mld_c_jac_smoother_dmp(sm,ictxt,level,info,prefix,head,smoother,solve
else
smoother_ = .false.
end if
if (present(global_num)) then
global_num_ = global_num
else
global_num_ = .false.
end if
lname = len_trim(prefix_)
fname = trim(prefix_)
write(fname(lname+1:lname+5),'(a,i3.3)') '_p',iam
@ -74,9 +81,15 @@ subroutine mld_c_jac_smoother_dmp(sm,ictxt,level,info,prefix,head,smoother,solve
if (smoother_) then
write(fname(lname+1:),'(a,i3.3,a)')'_l',level,'_nd.mtx'
if (global_num_) then
iv = desc%get_global_indices(owned=.false.)
if (sm%nd%is_asb()) &
& call sm%nd%print(fname,head=head,iv=iv)
else
if (sm%nd%is_asb()) &
& call sm%nd%print(fname,head=head)
end if
end if
! At base level do nothing for the smoother
if (allocated(sm%sv)) &
& call sm%sv%dump(ictxt,level,info,solver=solver,prefix=prefix)

@ -35,21 +35,22 @@
! POSSIBILITY OF SUCH DAMAGE.
!
!
subroutine mld_d_as_smoother_dmp(sm,ictxt,level,info,prefix,head,smoother,solver)
subroutine mld_d_as_smoother_dmp(sm,desc,level,info,prefix,head,smoother,solver,global_num)
use psb_base_mod
use mld_d_as_smoother, mld_protect_nam => mld_d_as_smoother_dmp
implicit none
class(mld_d_as_smoother_type), intent(in) :: sm
integer(psb_ipk_), intent(in) :: ictxt,level
type(psb_desc_type), intent(in) :: desc
integer(psb_ipk_), intent(in) :: level
integer(psb_ipk_), intent(out) :: info
character(len=*), intent(in), optional :: prefix, head
logical, optional, intent(in) :: smoother, solver
logical, optional, intent(in) :: smoother, solver, global_num
integer(psb_ipk_) :: i, j, il1, iln, lname, lev
integer(psb_ipk_) :: icontxt,iam, np
integer(psb_ipk_) :: ictxt,iam, np
character(len=80) :: prefix_
character(len=120) :: fname ! len should be at least 20 more than
logical :: smoother_
logical :: smoother_, global_num_
! len of prefix_
info = 0
@ -59,7 +60,7 @@ subroutine mld_d_as_smoother_dmp(sm,ictxt,level,info,prefix,head,smoother,solver
else
prefix_ = "dump_smth_d"
end if
ictxt = desc%get_context()
call psb_info(ictxt,iam,np)
if (present(smoother)) then
@ -67,11 +68,18 @@ subroutine mld_d_as_smoother_dmp(sm,ictxt,level,info,prefix,head,smoother,solver
else
smoother_ = .false.
end if
if (present(global_num)) then
global_num_ = global_num
else
global_num_ = .false.
end if
lname = len_trim(prefix_)
fname = trim(prefix_)
write(fname(lname+1:lname+5),'(a,i3.3)') '_p',iam
lname = lname + 5
if (global_num_) then
write(0,*) iam,' Warning: no global num with AS smoothers dump'
end if
if (smoother_) then
write(fname(lname+1:),'(a,i3.3,a)')'_l',level,'_nd.mtx'
if (sm%nd%is_asb()) &

@ -35,21 +35,22 @@
! POSSIBILITY OF SUCH DAMAGE.
!
!
subroutine mld_d_base_smoother_dmp(sm,ictxt,level,info,prefix,head,smoother,solver)
subroutine mld_d_base_smoother_dmp(sm,desc,level,info,prefix,head,smoother,solver,global_num)
use psb_base_mod
use mld_d_base_smoother_mod, mld_protect_name => mld_d_base_smoother_dmp
implicit none
class(mld_d_base_smoother_type), intent(in) :: sm
integer(psb_ipk_), intent(in) :: ictxt,level
type(psb_desc_type), intent(in) :: desc
integer(psb_ipk_), intent(in) :: level
integer(psb_ipk_), intent(out) :: info
character(len=*), intent(in), optional :: prefix, head
logical, optional, intent(in) :: smoother, solver
logical, optional, intent(in) :: smoother, solver, global_num
integer(psb_ipk_) :: i, j, il1, iln, lname, lev
integer(psb_ipk_) :: icontxt,iam, np
integer(psb_ipk_) :: ictxt,iam, np
character(len=80) :: prefix_
character(len=120) :: fname ! len should be at least 20 more than
logical :: smoother_
logical :: smoother_, global_num_
! len of prefix_
info = 0
@ -59,9 +60,14 @@ subroutine mld_d_base_smoother_dmp(sm,ictxt,level,info,prefix,head,smoother,solv
else
prefix_ = "dump_smth_d"
end if
ictxt = desc%get_context()
call psb_info(ictxt,iam,np)
if (present(global_num)) then
global_num_ = global_num
else
global_num_ = .false.
end if
if (present(smoother)) then
smoother_ = smoother
else

@ -35,21 +35,23 @@
! POSSIBILITY OF SUCH DAMAGE.
!
!
subroutine mld_d_jac_smoother_dmp(sm,ictxt,level,info,prefix,head,smoother,solver)
subroutine mld_d_jac_smoother_dmp(sm,desc,level,info,prefix,head,smoother,solver,global_num)
use psb_base_mod
use mld_d_jac_smoother, mld_protect_nam => mld_d_jac_smoother_dmp
implicit none
class(mld_d_jac_smoother_type), intent(in) :: sm
integer(psb_ipk_), intent(in) :: ictxt,level
type(psb_desc_type), intent(in) :: desc
integer(psb_ipk_), intent(in) :: level
integer(psb_ipk_), intent(out) :: info
character(len=*), intent(in), optional :: prefix, head
logical, optional, intent(in) :: smoother, solver
logical, optional, intent(in) :: smoother, solver, global_num
integer(psb_ipk_) :: i, j, il1, iln, lname, lev
integer(psb_ipk_) :: icontxt,iam, np
integer(psb_ipk_) :: ictxt,iam, np
character(len=80) :: prefix_
character(len=120) :: fname ! len should be at least 20 more than
logical :: smoother_
integer(psb_lpk_), allocatable :: iv(:)
logical :: smoother_, global_num_
! len of prefix_
info = 0
@ -59,7 +61,7 @@ subroutine mld_d_jac_smoother_dmp(sm,ictxt,level,info,prefix,head,smoother,solve
else
prefix_ = "dump_smth_d"
end if
ictxt = desc%get_context()
call psb_info(ictxt,iam,np)
if (present(smoother)) then
@ -67,6 +69,11 @@ subroutine mld_d_jac_smoother_dmp(sm,ictxt,level,info,prefix,head,smoother,solve
else
smoother_ = .false.
end if
if (present(global_num)) then
global_num_ = global_num
else
global_num_ = .false.
end if
lname = len_trim(prefix_)
fname = trim(prefix_)
write(fname(lname+1:lname+5),'(a,i3.3)') '_p',iam
@ -74,9 +81,15 @@ subroutine mld_d_jac_smoother_dmp(sm,ictxt,level,info,prefix,head,smoother,solve
if (smoother_) then
write(fname(lname+1:),'(a,i3.3,a)')'_l',level,'_nd.mtx'
if (global_num_) then
iv = desc%get_global_indices(owned=.false.)
if (sm%nd%is_asb()) &
& call sm%nd%print(fname,head=head,iv=iv)
else
if (sm%nd%is_asb()) &
& call sm%nd%print(fname,head=head)
end if
end if
! At base level do nothing for the smoother
if (allocated(sm%sv)) &
& call sm%sv%dump(ictxt,level,info,solver=solver,prefix=prefix)

@ -35,21 +35,22 @@
! POSSIBILITY OF SUCH DAMAGE.
!
!
subroutine mld_s_as_smoother_dmp(sm,ictxt,level,info,prefix,head,smoother,solver)
subroutine mld_s_as_smoother_dmp(sm,desc,level,info,prefix,head,smoother,solver,global_num)
use psb_base_mod
use mld_s_as_smoother, mld_protect_nam => mld_s_as_smoother_dmp
implicit none
class(mld_s_as_smoother_type), intent(in) :: sm
integer(psb_ipk_), intent(in) :: ictxt,level
type(psb_desc_type), intent(in) :: desc
integer(psb_ipk_), intent(in) :: level
integer(psb_ipk_), intent(out) :: info
character(len=*), intent(in), optional :: prefix, head
logical, optional, intent(in) :: smoother, solver
logical, optional, intent(in) :: smoother, solver, global_num
integer(psb_ipk_) :: i, j, il1, iln, lname, lev
integer(psb_ipk_) :: icontxt,iam, np
integer(psb_ipk_) :: ictxt,iam, np
character(len=80) :: prefix_
character(len=120) :: fname ! len should be at least 20 more than
logical :: smoother_
logical :: smoother_, global_num_
! len of prefix_
info = 0
@ -59,7 +60,7 @@ subroutine mld_s_as_smoother_dmp(sm,ictxt,level,info,prefix,head,smoother,solver
else
prefix_ = "dump_smth_s"
end if
ictxt = desc%get_context()
call psb_info(ictxt,iam,np)
if (present(smoother)) then
@ -67,11 +68,18 @@ subroutine mld_s_as_smoother_dmp(sm,ictxt,level,info,prefix,head,smoother,solver
else
smoother_ = .false.
end if
if (present(global_num)) then
global_num_ = global_num
else
global_num_ = .false.
end if
lname = len_trim(prefix_)
fname = trim(prefix_)
write(fname(lname+1:lname+5),'(a,i3.3)') '_p',iam
lname = lname + 5
if (global_num_) then
write(0,*) iam,' Warning: no global num with AS smoothers dump'
end if
if (smoother_) then
write(fname(lname+1:),'(a,i3.3,a)')'_l',level,'_nd.mtx'
if (sm%nd%is_asb()) &

@ -35,21 +35,22 @@
! POSSIBILITY OF SUCH DAMAGE.
!
!
subroutine mld_s_base_smoother_dmp(sm,ictxt,level,info,prefix,head,smoother,solver)
subroutine mld_s_base_smoother_dmp(sm,desc,level,info,prefix,head,smoother,solver,global_num)
use psb_base_mod
use mld_s_base_smoother_mod, mld_protect_name => mld_s_base_smoother_dmp
implicit none
class(mld_s_base_smoother_type), intent(in) :: sm
integer(psb_ipk_), intent(in) :: ictxt,level
type(psb_desc_type), intent(in) :: desc
integer(psb_ipk_), intent(in) :: level
integer(psb_ipk_), intent(out) :: info
character(len=*), intent(in), optional :: prefix, head
logical, optional, intent(in) :: smoother, solver
logical, optional, intent(in) :: smoother, solver, global_num
integer(psb_ipk_) :: i, j, il1, iln, lname, lev
integer(psb_ipk_) :: icontxt,iam, np
integer(psb_ipk_) :: ictxt,iam, np
character(len=80) :: prefix_
character(len=120) :: fname ! len should be at least 20 more than
logical :: smoother_
logical :: smoother_, global_num_
! len of prefix_
info = 0
@ -59,9 +60,14 @@ subroutine mld_s_base_smoother_dmp(sm,ictxt,level,info,prefix,head,smoother,solv
else
prefix_ = "dump_smth_s"
end if
ictxt = desc%get_context()
call psb_info(ictxt,iam,np)
if (present(global_num)) then
global_num_ = global_num
else
global_num_ = .false.
end if
if (present(smoother)) then
smoother_ = smoother
else

@ -35,21 +35,23 @@
! POSSIBILITY OF SUCH DAMAGE.
!
!
subroutine mld_s_jac_smoother_dmp(sm,ictxt,level,info,prefix,head,smoother,solver)
subroutine mld_s_jac_smoother_dmp(sm,desc,level,info,prefix,head,smoother,solver,global_num)
use psb_base_mod
use mld_s_jac_smoother, mld_protect_nam => mld_s_jac_smoother_dmp
implicit none
class(mld_s_jac_smoother_type), intent(in) :: sm
integer(psb_ipk_), intent(in) :: ictxt,level
type(psb_desc_type), intent(in) :: desc
integer(psb_ipk_), intent(in) :: level
integer(psb_ipk_), intent(out) :: info
character(len=*), intent(in), optional :: prefix, head
logical, optional, intent(in) :: smoother, solver
logical, optional, intent(in) :: smoother, solver, global_num
integer(psb_ipk_) :: i, j, il1, iln, lname, lev
integer(psb_ipk_) :: icontxt,iam, np
integer(psb_ipk_) :: ictxt,iam, np
character(len=80) :: prefix_
character(len=120) :: fname ! len should be at least 20 more than
logical :: smoother_
integer(psb_lpk_), allocatable :: iv(:)
logical :: smoother_, global_num_
! len of prefix_
info = 0
@ -59,7 +61,7 @@ subroutine mld_s_jac_smoother_dmp(sm,ictxt,level,info,prefix,head,smoother,solve
else
prefix_ = "dump_smth_s"
end if
ictxt = desc%get_context()
call psb_info(ictxt,iam,np)
if (present(smoother)) then
@ -67,6 +69,11 @@ subroutine mld_s_jac_smoother_dmp(sm,ictxt,level,info,prefix,head,smoother,solve
else
smoother_ = .false.
end if
if (present(global_num)) then
global_num_ = global_num
else
global_num_ = .false.
end if
lname = len_trim(prefix_)
fname = trim(prefix_)
write(fname(lname+1:lname+5),'(a,i3.3)') '_p',iam
@ -74,9 +81,15 @@ subroutine mld_s_jac_smoother_dmp(sm,ictxt,level,info,prefix,head,smoother,solve
if (smoother_) then
write(fname(lname+1:),'(a,i3.3,a)')'_l',level,'_nd.mtx'
if (global_num_) then
iv = desc%get_global_indices(owned=.false.)
if (sm%nd%is_asb()) &
& call sm%nd%print(fname,head=head,iv=iv)
else
if (sm%nd%is_asb()) &
& call sm%nd%print(fname,head=head)
end if
end if
! At base level do nothing for the smoother
if (allocated(sm%sv)) &
& call sm%sv%dump(ictxt,level,info,solver=solver,prefix=prefix)

@ -35,21 +35,22 @@
! POSSIBILITY OF SUCH DAMAGE.
!
!
subroutine mld_z_as_smoother_dmp(sm,ictxt,level,info,prefix,head,smoother,solver)
subroutine mld_z_as_smoother_dmp(sm,desc,level,info,prefix,head,smoother,solver,global_num)
use psb_base_mod
use mld_z_as_smoother, mld_protect_nam => mld_z_as_smoother_dmp
implicit none
class(mld_z_as_smoother_type), intent(in) :: sm
integer(psb_ipk_), intent(in) :: ictxt,level
type(psb_desc_type), intent(in) :: desc
integer(psb_ipk_), intent(in) :: level
integer(psb_ipk_), intent(out) :: info
character(len=*), intent(in), optional :: prefix, head
logical, optional, intent(in) :: smoother, solver
logical, optional, intent(in) :: smoother, solver, global_num
integer(psb_ipk_) :: i, j, il1, iln, lname, lev
integer(psb_ipk_) :: icontxt,iam, np
integer(psb_ipk_) :: ictxt,iam, np
character(len=80) :: prefix_
character(len=120) :: fname ! len should be at least 20 more than
logical :: smoother_
logical :: smoother_, global_num_
! len of prefix_
info = 0
@ -59,7 +60,7 @@ subroutine mld_z_as_smoother_dmp(sm,ictxt,level,info,prefix,head,smoother,solver
else
prefix_ = "dump_smth_z"
end if
ictxt = desc%get_context()
call psb_info(ictxt,iam,np)
if (present(smoother)) then
@ -67,11 +68,18 @@ subroutine mld_z_as_smoother_dmp(sm,ictxt,level,info,prefix,head,smoother,solver
else
smoother_ = .false.
end if
if (present(global_num)) then
global_num_ = global_num
else
global_num_ = .false.
end if
lname = len_trim(prefix_)
fname = trim(prefix_)
write(fname(lname+1:lname+5),'(a,i3.3)') '_p',iam
lname = lname + 5
if (global_num_) then
write(0,*) iam,' Warning: no global num with AS smoothers dump'
end if
if (smoother_) then
write(fname(lname+1:),'(a,i3.3,a)')'_l',level,'_nd.mtx'
if (sm%nd%is_asb()) &

@ -35,21 +35,22 @@
! POSSIBILITY OF SUCH DAMAGE.
!
!
subroutine mld_z_base_smoother_dmp(sm,ictxt,level,info,prefix,head,smoother,solver)
subroutine mld_z_base_smoother_dmp(sm,desc,level,info,prefix,head,smoother,solver,global_num)
use psb_base_mod
use mld_z_base_smoother_mod, mld_protect_name => mld_z_base_smoother_dmp
implicit none
class(mld_z_base_smoother_type), intent(in) :: sm
integer(psb_ipk_), intent(in) :: ictxt,level
type(psb_desc_type), intent(in) :: desc
integer(psb_ipk_), intent(in) :: level
integer(psb_ipk_), intent(out) :: info
character(len=*), intent(in), optional :: prefix, head
logical, optional, intent(in) :: smoother, solver
logical, optional, intent(in) :: smoother, solver, global_num
integer(psb_ipk_) :: i, j, il1, iln, lname, lev
integer(psb_ipk_) :: icontxt,iam, np
integer(psb_ipk_) :: ictxt,iam, np
character(len=80) :: prefix_
character(len=120) :: fname ! len should be at least 20 more than
logical :: smoother_
logical :: smoother_, global_num_
! len of prefix_
info = 0
@ -59,9 +60,14 @@ subroutine mld_z_base_smoother_dmp(sm,ictxt,level,info,prefix,head,smoother,solv
else
prefix_ = "dump_smth_z"
end if
ictxt = desc%get_context()
call psb_info(ictxt,iam,np)
if (present(global_num)) then
global_num_ = global_num
else
global_num_ = .false.
end if
if (present(smoother)) then
smoother_ = smoother
else

@ -35,21 +35,23 @@
! POSSIBILITY OF SUCH DAMAGE.
!
!
subroutine mld_z_jac_smoother_dmp(sm,ictxt,level,info,prefix,head,smoother,solver)
subroutine mld_z_jac_smoother_dmp(sm,desc,level,info,prefix,head,smoother,solver,global_num)
use psb_base_mod
use mld_z_jac_smoother, mld_protect_nam => mld_z_jac_smoother_dmp
implicit none
class(mld_z_jac_smoother_type), intent(in) :: sm
integer(psb_ipk_), intent(in) :: ictxt,level
type(psb_desc_type), intent(in) :: desc
integer(psb_ipk_), intent(in) :: level
integer(psb_ipk_), intent(out) :: info
character(len=*), intent(in), optional :: prefix, head
logical, optional, intent(in) :: smoother, solver
logical, optional, intent(in) :: smoother, solver, global_num
integer(psb_ipk_) :: i, j, il1, iln, lname, lev
integer(psb_ipk_) :: icontxt,iam, np
integer(psb_ipk_) :: ictxt,iam, np
character(len=80) :: prefix_
character(len=120) :: fname ! len should be at least 20 more than
logical :: smoother_
integer(psb_lpk_), allocatable :: iv(:)
logical :: smoother_, global_num_
! len of prefix_
info = 0
@ -59,7 +61,7 @@ subroutine mld_z_jac_smoother_dmp(sm,ictxt,level,info,prefix,head,smoother,solve
else
prefix_ = "dump_smth_z"
end if
ictxt = desc%get_context()
call psb_info(ictxt,iam,np)
if (present(smoother)) then
@ -67,6 +69,11 @@ subroutine mld_z_jac_smoother_dmp(sm,ictxt,level,info,prefix,head,smoother,solve
else
smoother_ = .false.
end if
if (present(global_num)) then
global_num_ = global_num
else
global_num_ = .false.
end if
lname = len_trim(prefix_)
fname = trim(prefix_)
write(fname(lname+1:lname+5),'(a,i3.3)') '_p',iam
@ -74,9 +81,15 @@ subroutine mld_z_jac_smoother_dmp(sm,ictxt,level,info,prefix,head,smoother,solve
if (smoother_) then
write(fname(lname+1:),'(a,i3.3,a)')'_l',level,'_nd.mtx'
if (global_num_) then
iv = desc%get_global_indices(owned=.false.)
if (sm%nd%is_asb()) &
& call sm%nd%print(fname,head=head,iv=iv)
else
if (sm%nd%is_asb()) &
& call sm%nd%print(fname,head=head)
end if
end if
! At base level do nothing for the smoother
if (allocated(sm%sv)) &
& call sm%sv%dump(ictxt,level,info,solver=solver,prefix=prefix)

@ -291,17 +291,17 @@ module mld_c_as_smoother
end interface
interface
subroutine mld_c_as_smoother_dmp(sm,ictxt,level,info,prefix,head,smoother,solver)
subroutine mld_c_as_smoother_dmp(sm,desc,level,info,prefix,head,smoother,solver,global_num)
import :: psb_cspmat_type, psb_c_vect_type, psb_c_base_vect_type, &
& psb_spk_, mld_c_as_smoother_type, psb_epk_, psb_desc_type, &
& psb_ipk_
implicit none
class(mld_c_as_smoother_type), intent(in) :: sm
integer(psb_ipk_), intent(in) :: ictxt
type(psb_desc_type), intent(in) :: desc
integer(psb_ipk_), intent(in) :: level
integer(psb_ipk_), intent(out) :: info
character(len=*), intent(in), optional :: prefix, head
logical, optional, intent(in) :: smoother, solver
logical, optional, intent(in) :: smoother, solver, global_num
end subroutine mld_c_as_smoother_dmp
end interface

@ -285,16 +285,16 @@ module mld_c_base_smoother_mod
end interface
interface
subroutine mld_c_base_smoother_dmp(sm,ictxt,level,info,prefix,head,smoother,solver)
subroutine mld_c_base_smoother_dmp(sm,desc,level,info,prefix,head,smoother,solver,global_num)
import :: psb_desc_type, psb_cspmat_type, psb_c_base_sparse_mat, &
& psb_c_vect_type, psb_c_base_vect_type, psb_spk_, &
& mld_c_base_smoother_type, psb_ipk_
class(mld_c_base_smoother_type), intent(in) :: sm
integer(psb_ipk_), intent(in) :: ictxt
type(psb_desc_type), intent(in) :: desc
integer(psb_ipk_), intent(in) :: level
integer(psb_ipk_), intent(out) :: info
character(len=*), intent(in), optional :: prefix, head
logical, optional, intent(in) :: smoother, solver
logical, optional, intent(in) :: smoother, solver, global_num
end subroutine mld_c_base_smoother_dmp
end interface

@ -175,17 +175,17 @@ module mld_c_jac_smoother
end interface
interface
subroutine mld_c_jac_smoother_dmp(sm,ictxt,level,info,prefix,head,smoother,solver)
subroutine mld_c_jac_smoother_dmp(sm,desc,level,info,prefix,head,smoother,solver,global_num)
import :: psb_cspmat_type, psb_c_vect_type, psb_c_base_vect_type, &
& psb_spk_, mld_c_jac_smoother_type, psb_epk_, psb_desc_type, &
& psb_ipk_
implicit none
class(mld_c_jac_smoother_type), intent(in) :: sm
integer(psb_ipk_), intent(in) :: ictxt
type(psb_desc_type), intent(in) :: desc
integer(psb_ipk_), intent(in) :: level
integer(psb_ipk_), intent(out) :: info
character(len=*), intent(in), optional :: prefix, head
logical, optional, intent(in) :: smoother, solver
logical, optional, intent(in) :: smoother, solver, global_num
end subroutine mld_c_jac_smoother_dmp
end interface

@ -291,17 +291,17 @@ module mld_d_as_smoother
end interface
interface
subroutine mld_d_as_smoother_dmp(sm,ictxt,level,info,prefix,head,smoother,solver)
subroutine mld_d_as_smoother_dmp(sm,desc,level,info,prefix,head,smoother,solver,global_num)
import :: psb_dspmat_type, psb_d_vect_type, psb_d_base_vect_type, &
& psb_dpk_, mld_d_as_smoother_type, psb_epk_, psb_desc_type, &
& psb_ipk_
implicit none
class(mld_d_as_smoother_type), intent(in) :: sm
integer(psb_ipk_), intent(in) :: ictxt
type(psb_desc_type), intent(in) :: desc
integer(psb_ipk_), intent(in) :: level
integer(psb_ipk_), intent(out) :: info
character(len=*), intent(in), optional :: prefix, head
logical, optional, intent(in) :: smoother, solver
logical, optional, intent(in) :: smoother, solver, global_num
end subroutine mld_d_as_smoother_dmp
end interface

@ -285,16 +285,16 @@ module mld_d_base_smoother_mod
end interface
interface
subroutine mld_d_base_smoother_dmp(sm,ictxt,level,info,prefix,head,smoother,solver)
subroutine mld_d_base_smoother_dmp(sm,desc,level,info,prefix,head,smoother,solver,global_num)
import :: psb_desc_type, psb_dspmat_type, psb_d_base_sparse_mat, &
& psb_d_vect_type, psb_d_base_vect_type, psb_dpk_, &
& mld_d_base_smoother_type, psb_ipk_
class(mld_d_base_smoother_type), intent(in) :: sm
integer(psb_ipk_), intent(in) :: ictxt
type(psb_desc_type), intent(in) :: desc
integer(psb_ipk_), intent(in) :: level
integer(psb_ipk_), intent(out) :: info
character(len=*), intent(in), optional :: prefix, head
logical, optional, intent(in) :: smoother, solver
logical, optional, intent(in) :: smoother, solver, global_num
end subroutine mld_d_base_smoother_dmp
end interface

@ -175,17 +175,17 @@ module mld_d_jac_smoother
end interface
interface
subroutine mld_d_jac_smoother_dmp(sm,ictxt,level,info,prefix,head,smoother,solver)
subroutine mld_d_jac_smoother_dmp(sm,desc,level,info,prefix,head,smoother,solver,global_num)
import :: psb_dspmat_type, psb_d_vect_type, psb_d_base_vect_type, &
& psb_dpk_, mld_d_jac_smoother_type, psb_epk_, psb_desc_type, &
& psb_ipk_
implicit none
class(mld_d_jac_smoother_type), intent(in) :: sm
integer(psb_ipk_), intent(in) :: ictxt
type(psb_desc_type), intent(in) :: desc
integer(psb_ipk_), intent(in) :: level
integer(psb_ipk_), intent(out) :: info
character(len=*), intent(in), optional :: prefix, head
logical, optional, intent(in) :: smoother, solver
logical, optional, intent(in) :: smoother, solver, global_num
end subroutine mld_d_jac_smoother_dmp
end interface

@ -291,17 +291,17 @@ module mld_s_as_smoother
end interface
interface
subroutine mld_s_as_smoother_dmp(sm,ictxt,level,info,prefix,head,smoother,solver)
subroutine mld_s_as_smoother_dmp(sm,desc,level,info,prefix,head,smoother,solver,global_num)
import :: psb_sspmat_type, psb_s_vect_type, psb_s_base_vect_type, &
& psb_spk_, mld_s_as_smoother_type, psb_epk_, psb_desc_type, &
& psb_ipk_
implicit none
class(mld_s_as_smoother_type), intent(in) :: sm
integer(psb_ipk_), intent(in) :: ictxt
type(psb_desc_type), intent(in) :: desc
integer(psb_ipk_), intent(in) :: level
integer(psb_ipk_), intent(out) :: info
character(len=*), intent(in), optional :: prefix, head
logical, optional, intent(in) :: smoother, solver
logical, optional, intent(in) :: smoother, solver, global_num
end subroutine mld_s_as_smoother_dmp
end interface

@ -285,16 +285,16 @@ module mld_s_base_smoother_mod
end interface
interface
subroutine mld_s_base_smoother_dmp(sm,ictxt,level,info,prefix,head,smoother,solver)
subroutine mld_s_base_smoother_dmp(sm,desc,level,info,prefix,head,smoother,solver,global_num)
import :: psb_desc_type, psb_sspmat_type, psb_s_base_sparse_mat, &
& psb_s_vect_type, psb_s_base_vect_type, psb_spk_, &
& mld_s_base_smoother_type, psb_ipk_
class(mld_s_base_smoother_type), intent(in) :: sm
integer(psb_ipk_), intent(in) :: ictxt
type(psb_desc_type), intent(in) :: desc
integer(psb_ipk_), intent(in) :: level
integer(psb_ipk_), intent(out) :: info
character(len=*), intent(in), optional :: prefix, head
logical, optional, intent(in) :: smoother, solver
logical, optional, intent(in) :: smoother, solver, global_num
end subroutine mld_s_base_smoother_dmp
end interface

@ -175,17 +175,17 @@ module mld_s_jac_smoother
end interface
interface
subroutine mld_s_jac_smoother_dmp(sm,ictxt,level,info,prefix,head,smoother,solver)
subroutine mld_s_jac_smoother_dmp(sm,desc,level,info,prefix,head,smoother,solver,global_num)
import :: psb_sspmat_type, psb_s_vect_type, psb_s_base_vect_type, &
& psb_spk_, mld_s_jac_smoother_type, psb_epk_, psb_desc_type, &
& psb_ipk_
implicit none
class(mld_s_jac_smoother_type), intent(in) :: sm
integer(psb_ipk_), intent(in) :: ictxt
type(psb_desc_type), intent(in) :: desc
integer(psb_ipk_), intent(in) :: level
integer(psb_ipk_), intent(out) :: info
character(len=*), intent(in), optional :: prefix, head
logical, optional, intent(in) :: smoother, solver
logical, optional, intent(in) :: smoother, solver, global_num
end subroutine mld_s_jac_smoother_dmp
end interface

@ -291,17 +291,17 @@ module mld_z_as_smoother
end interface
interface
subroutine mld_z_as_smoother_dmp(sm,ictxt,level,info,prefix,head,smoother,solver)
subroutine mld_z_as_smoother_dmp(sm,desc,level,info,prefix,head,smoother,solver,global_num)
import :: psb_zspmat_type, psb_z_vect_type, psb_z_base_vect_type, &
& psb_dpk_, mld_z_as_smoother_type, psb_epk_, psb_desc_type, &
& psb_ipk_
implicit none
class(mld_z_as_smoother_type), intent(in) :: sm
integer(psb_ipk_), intent(in) :: ictxt
type(psb_desc_type), intent(in) :: desc
integer(psb_ipk_), intent(in) :: level
integer(psb_ipk_), intent(out) :: info
character(len=*), intent(in), optional :: prefix, head
logical, optional, intent(in) :: smoother, solver
logical, optional, intent(in) :: smoother, solver, global_num
end subroutine mld_z_as_smoother_dmp
end interface

@ -285,16 +285,16 @@ module mld_z_base_smoother_mod
end interface
interface
subroutine mld_z_base_smoother_dmp(sm,ictxt,level,info,prefix,head,smoother,solver)
subroutine mld_z_base_smoother_dmp(sm,desc,level,info,prefix,head,smoother,solver,global_num)
import :: psb_desc_type, psb_zspmat_type, psb_z_base_sparse_mat, &
& psb_z_vect_type, psb_z_base_vect_type, psb_dpk_, &
& mld_z_base_smoother_type, psb_ipk_
class(mld_z_base_smoother_type), intent(in) :: sm
integer(psb_ipk_), intent(in) :: ictxt
type(psb_desc_type), intent(in) :: desc
integer(psb_ipk_), intent(in) :: level
integer(psb_ipk_), intent(out) :: info
character(len=*), intent(in), optional :: prefix, head
logical, optional, intent(in) :: smoother, solver
logical, optional, intent(in) :: smoother, solver, global_num
end subroutine mld_z_base_smoother_dmp
end interface

@ -175,17 +175,17 @@ module mld_z_jac_smoother
end interface
interface
subroutine mld_z_jac_smoother_dmp(sm,ictxt,level,info,prefix,head,smoother,solver)
subroutine mld_z_jac_smoother_dmp(sm,desc,level,info,prefix,head,smoother,solver,global_num)
import :: psb_zspmat_type, psb_z_vect_type, psb_z_base_vect_type, &
& psb_dpk_, mld_z_jac_smoother_type, psb_epk_, psb_desc_type, &
& psb_ipk_
implicit none
class(mld_z_jac_smoother_type), intent(in) :: sm
integer(psb_ipk_), intent(in) :: ictxt
type(psb_desc_type), intent(in) :: desc
integer(psb_ipk_), intent(in) :: level
integer(psb_ipk_), intent(out) :: info
character(len=*), intent(in), optional :: prefix, head
logical, optional, intent(in) :: smoother, solver
logical, optional, intent(in) :: smoother, solver, global_num
end subroutine mld_z_jac_smoother_dmp
end interface

Loading…
Cancel
Save