Unify notation for nd_nnz_tot and fix byte size.

stopcriterion
Salvatore Filippone 5 years ago
parent d51de74a05
commit f34594df60

@ -52,7 +52,7 @@ subroutine mld_c_as_smoother_bld(a,desc_a,sm,info,amold,vmold,imold)
! Local variables
type(psb_cspmat_type) :: blck, atmp
integer(psb_ipk_) :: n_row,n_col, nrow_a, nhalo, novr, data_, nzeros
integer(psb_ipk_) :: n_row,n_col, nrow_a, nhalo, novr, data_
complex(psb_spk_), pointer :: ww(:), aux(:), tx(:),ty(:)
integer(psb_ipk_) :: ictxt,np,me,i, err_act, debug_unit, debug_level
character(len=20) :: name='c_as_smoother_bld', ch_err
@ -168,10 +168,8 @@ subroutine mld_c_as_smoother_bld(a,desc_a,sm,info,amold,vmold,imold)
call psb_errpush(psb_err_from_subroutine_,name,a_err='clip & psb_spcnv csr 4')
goto 9999
end if
nzeros = sm%nd%get_nzeros()
!!$ write(0,*) me,' ND nzeors ',nzeros
call psb_sum(ictxt,nzeros)
sm%nd_nnz_tot = nzeros
sm%nd_nnz_tot = sm%nd%get_nzeros()
call psb_sum(ictxt,sm%nd_nnz_tot)
if (debug_level >= psb_debug_outer_) &
& write(debug_unit,*) me,' ',trim(name),' end'

@ -103,7 +103,7 @@ subroutine mld_c_jac_smoother_apply(alpha,sm,x,beta,y,desc_data,&
end if
endif
if ((.not.sm%sv%is_iterative()).and.((sweeps == 1).or.(sm%nnz_nd_tot==0))) then
if ((.not.sm%sv%is_iterative()).and.((sweeps == 1).or.(sm%nd_nnz_tot==0))) then
! if .not.sv%is_iterative, there's no need to pass init
call sm%sv%apply(alpha,x,beta,y,desc_data,trans_,aux,info)

@ -105,7 +105,7 @@ subroutine mld_c_jac_smoother_apply_vect(alpha,sm,x,beta,y,desc_data,trans,&
end if
endif
if ((.not.sm%sv%is_iterative()).and.((sweeps == 1).or.(sm%nnz_nd_tot==0))) then
if ((.not.sm%sv%is_iterative()).and.((sweeps == 1).or.(sm%nd_nnz_tot==0))) then
! if .not.sv%is_iterative, there's no need to pass init
call sm%sv%apply(alpha,x,beta,y,desc_data,trans_,aux,wv,info)

@ -75,13 +75,13 @@ subroutine mld_c_jac_smoother_bld(a,desc_a,sm,info,amold,vmold,imold)
class is (mld_c_diag_solver_type)
call sm%nd%free()
sm%pa => a
sm%nnz_nd_tot = nztota
sm%nd_nnz_tot = nztota
class default
if (smsv%is_global()) then
! Do not put anything into SM%ND since the solver
! is acting globally.
sm%nnz_nd_tot = 0
sm%nd_nnz_tot = 0
else
call a%csclip(sm%nd,info,&
& jmin=nrow_a+1,rscale=.false.,cscale=.false.)
@ -94,7 +94,7 @@ subroutine mld_c_jac_smoother_bld(a,desc_a,sm,info,amold,vmold,imold)
& type='csr',dupl=psb_dupl_add_)
endif
end if
sm%nnz_nd_tot = sm%nd%get_nzeros()
sm%nd_nnz_tot = sm%nd%get_nzeros()
end if
end select
if (info /= psb_success_) then
@ -102,7 +102,7 @@ subroutine mld_c_jac_smoother_bld(a,desc_a,sm,info,amold,vmold,imold)
& a_err='clip & psb_spcnv csr 4')
goto 9999
end if
call psb_sum(ictxt,sm%nnz_nd_tot)
call psb_sum(ictxt,sm%nd_nnz_tot)
call sm%sv%build(a,desc_a,info,amold=amold,vmold=vmold)

@ -66,7 +66,7 @@ subroutine mld_c_jac_smoother_clone(sm,smout,info)
select type(smo => smout)
type is (mld_c_jac_smoother_type)
smo%nnz_nd_tot = sm%nnz_nd_tot
smo%nd_nnz_tot = sm%nd_nnz_tot
call sm%nd%clone(smo%nd,info)
if ((info==psb_success_).and.(allocated(sm%sv))) then
allocate(smout%sv,mold=sm%sv,stat=info)

@ -52,7 +52,7 @@ subroutine mld_d_as_smoother_bld(a,desc_a,sm,info,amold,vmold,imold)
! Local variables
type(psb_dspmat_type) :: blck, atmp
integer(psb_ipk_) :: n_row,n_col, nrow_a, nhalo, novr, data_, nzeros
integer(psb_ipk_) :: n_row,n_col, nrow_a, nhalo, novr, data_
real(psb_dpk_), pointer :: ww(:), aux(:), tx(:),ty(:)
integer(psb_ipk_) :: ictxt,np,me,i, err_act, debug_unit, debug_level
character(len=20) :: name='d_as_smoother_bld', ch_err
@ -168,10 +168,8 @@ subroutine mld_d_as_smoother_bld(a,desc_a,sm,info,amold,vmold,imold)
call psb_errpush(psb_err_from_subroutine_,name,a_err='clip & psb_spcnv csr 4')
goto 9999
end if
nzeros = sm%nd%get_nzeros()
!!$ write(0,*) me,' ND nzeors ',nzeros
call psb_sum(ictxt,nzeros)
sm%nd_nnz_tot = nzeros
sm%nd_nnz_tot = sm%nd%get_nzeros()
call psb_sum(ictxt,sm%nd_nnz_tot)
if (debug_level >= psb_debug_outer_) &
& write(debug_unit,*) me,' ',trim(name),' end'

@ -103,7 +103,7 @@ subroutine mld_d_jac_smoother_apply(alpha,sm,x,beta,y,desc_data,&
end if
endif
if ((.not.sm%sv%is_iterative()).and.((sweeps == 1).or.(sm%nnz_nd_tot==0))) then
if ((.not.sm%sv%is_iterative()).and.((sweeps == 1).or.(sm%nd_nnz_tot==0))) then
! if .not.sv%is_iterative, there's no need to pass init
call sm%sv%apply(alpha,x,beta,y,desc_data,trans_,aux,info)

@ -105,7 +105,7 @@ subroutine mld_d_jac_smoother_apply_vect(alpha,sm,x,beta,y,desc_data,trans,&
end if
endif
if ((.not.sm%sv%is_iterative()).and.((sweeps == 1).or.(sm%nnz_nd_tot==0))) then
if ((.not.sm%sv%is_iterative()).and.((sweeps == 1).or.(sm%nd_nnz_tot==0))) then
! if .not.sv%is_iterative, there's no need to pass init
call sm%sv%apply(alpha,x,beta,y,desc_data,trans_,aux,wv,info)

@ -75,13 +75,13 @@ subroutine mld_d_jac_smoother_bld(a,desc_a,sm,info,amold,vmold,imold)
class is (mld_d_diag_solver_type)
call sm%nd%free()
sm%pa => a
sm%nnz_nd_tot = nztota
sm%nd_nnz_tot = nztota
class default
if (smsv%is_global()) then
! Do not put anything into SM%ND since the solver
! is acting globally.
sm%nnz_nd_tot = 0
sm%nd_nnz_tot = 0
else
call a%csclip(sm%nd,info,&
& jmin=nrow_a+1,rscale=.false.,cscale=.false.)
@ -94,7 +94,7 @@ subroutine mld_d_jac_smoother_bld(a,desc_a,sm,info,amold,vmold,imold)
& type='csr',dupl=psb_dupl_add_)
endif
end if
sm%nnz_nd_tot = sm%nd%get_nzeros()
sm%nd_nnz_tot = sm%nd%get_nzeros()
end if
end select
if (info /= psb_success_) then
@ -102,7 +102,7 @@ subroutine mld_d_jac_smoother_bld(a,desc_a,sm,info,amold,vmold,imold)
& a_err='clip & psb_spcnv csr 4')
goto 9999
end if
call psb_sum(ictxt,sm%nnz_nd_tot)
call psb_sum(ictxt,sm%nd_nnz_tot)
call sm%sv%build(a,desc_a,info,amold=amold,vmold=vmold)

@ -66,7 +66,7 @@ subroutine mld_d_jac_smoother_clone(sm,smout,info)
select type(smo => smout)
type is (mld_d_jac_smoother_type)
smo%nnz_nd_tot = sm%nnz_nd_tot
smo%nd_nnz_tot = sm%nd_nnz_tot
call sm%nd%clone(smo%nd,info)
if ((info==psb_success_).and.(allocated(sm%sv))) then
allocate(smout%sv,mold=sm%sv,stat=info)

@ -52,7 +52,7 @@ subroutine mld_s_as_smoother_bld(a,desc_a,sm,info,amold,vmold,imold)
! Local variables
type(psb_sspmat_type) :: blck, atmp
integer(psb_ipk_) :: n_row,n_col, nrow_a, nhalo, novr, data_, nzeros
integer(psb_ipk_) :: n_row,n_col, nrow_a, nhalo, novr, data_
real(psb_spk_), pointer :: ww(:), aux(:), tx(:),ty(:)
integer(psb_ipk_) :: ictxt,np,me,i, err_act, debug_unit, debug_level
character(len=20) :: name='s_as_smoother_bld', ch_err
@ -168,10 +168,8 @@ subroutine mld_s_as_smoother_bld(a,desc_a,sm,info,amold,vmold,imold)
call psb_errpush(psb_err_from_subroutine_,name,a_err='clip & psb_spcnv csr 4')
goto 9999
end if
nzeros = sm%nd%get_nzeros()
!!$ write(0,*) me,' ND nzeors ',nzeros
call psb_sum(ictxt,nzeros)
sm%nd_nnz_tot = nzeros
sm%nd_nnz_tot = sm%nd%get_nzeros()
call psb_sum(ictxt,sm%nd_nnz_tot)
if (debug_level >= psb_debug_outer_) &
& write(debug_unit,*) me,' ',trim(name),' end'

@ -103,7 +103,7 @@ subroutine mld_s_jac_smoother_apply(alpha,sm,x,beta,y,desc_data,&
end if
endif
if ((.not.sm%sv%is_iterative()).and.((sweeps == 1).or.(sm%nnz_nd_tot==0))) then
if ((.not.sm%sv%is_iterative()).and.((sweeps == 1).or.(sm%nd_nnz_tot==0))) then
! if .not.sv%is_iterative, there's no need to pass init
call sm%sv%apply(alpha,x,beta,y,desc_data,trans_,aux,info)

@ -105,7 +105,7 @@ subroutine mld_s_jac_smoother_apply_vect(alpha,sm,x,beta,y,desc_data,trans,&
end if
endif
if ((.not.sm%sv%is_iterative()).and.((sweeps == 1).or.(sm%nnz_nd_tot==0))) then
if ((.not.sm%sv%is_iterative()).and.((sweeps == 1).or.(sm%nd_nnz_tot==0))) then
! if .not.sv%is_iterative, there's no need to pass init
call sm%sv%apply(alpha,x,beta,y,desc_data,trans_,aux,wv,info)

@ -75,13 +75,13 @@ subroutine mld_s_jac_smoother_bld(a,desc_a,sm,info,amold,vmold,imold)
class is (mld_s_diag_solver_type)
call sm%nd%free()
sm%pa => a
sm%nnz_nd_tot = nztota
sm%nd_nnz_tot = nztota
class default
if (smsv%is_global()) then
! Do not put anything into SM%ND since the solver
! is acting globally.
sm%nnz_nd_tot = 0
sm%nd_nnz_tot = 0
else
call a%csclip(sm%nd,info,&
& jmin=nrow_a+1,rscale=.false.,cscale=.false.)
@ -94,7 +94,7 @@ subroutine mld_s_jac_smoother_bld(a,desc_a,sm,info,amold,vmold,imold)
& type='csr',dupl=psb_dupl_add_)
endif
end if
sm%nnz_nd_tot = sm%nd%get_nzeros()
sm%nd_nnz_tot = sm%nd%get_nzeros()
end if
end select
if (info /= psb_success_) then
@ -102,7 +102,7 @@ subroutine mld_s_jac_smoother_bld(a,desc_a,sm,info,amold,vmold,imold)
& a_err='clip & psb_spcnv csr 4')
goto 9999
end if
call psb_sum(ictxt,sm%nnz_nd_tot)
call psb_sum(ictxt,sm%nd_nnz_tot)
call sm%sv%build(a,desc_a,info,amold=amold,vmold=vmold)

@ -66,7 +66,7 @@ subroutine mld_s_jac_smoother_clone(sm,smout,info)
select type(smo => smout)
type is (mld_s_jac_smoother_type)
smo%nnz_nd_tot = sm%nnz_nd_tot
smo%nd_nnz_tot = sm%nd_nnz_tot
call sm%nd%clone(smo%nd,info)
if ((info==psb_success_).and.(allocated(sm%sv))) then
allocate(smout%sv,mold=sm%sv,stat=info)

@ -52,7 +52,7 @@ subroutine mld_z_as_smoother_bld(a,desc_a,sm,info,amold,vmold,imold)
! Local variables
type(psb_zspmat_type) :: blck, atmp
integer(psb_ipk_) :: n_row,n_col, nrow_a, nhalo, novr, data_, nzeros
integer(psb_ipk_) :: n_row,n_col, nrow_a, nhalo, novr, data_
complex(psb_dpk_), pointer :: ww(:), aux(:), tx(:),ty(:)
integer(psb_ipk_) :: ictxt,np,me,i, err_act, debug_unit, debug_level
character(len=20) :: name='z_as_smoother_bld', ch_err
@ -168,10 +168,8 @@ subroutine mld_z_as_smoother_bld(a,desc_a,sm,info,amold,vmold,imold)
call psb_errpush(psb_err_from_subroutine_,name,a_err='clip & psb_spcnv csr 4')
goto 9999
end if
nzeros = sm%nd%get_nzeros()
!!$ write(0,*) me,' ND nzeors ',nzeros
call psb_sum(ictxt,nzeros)
sm%nd_nnz_tot = nzeros
sm%nd_nnz_tot = sm%nd%get_nzeros()
call psb_sum(ictxt,sm%nd_nnz_tot)
if (debug_level >= psb_debug_outer_) &
& write(debug_unit,*) me,' ',trim(name),' end'

@ -103,7 +103,7 @@ subroutine mld_z_jac_smoother_apply(alpha,sm,x,beta,y,desc_data,&
end if
endif
if ((.not.sm%sv%is_iterative()).and.((sweeps == 1).or.(sm%nnz_nd_tot==0))) then
if ((.not.sm%sv%is_iterative()).and.((sweeps == 1).or.(sm%nd_nnz_tot==0))) then
! if .not.sv%is_iterative, there's no need to pass init
call sm%sv%apply(alpha,x,beta,y,desc_data,trans_,aux,info)

@ -105,7 +105,7 @@ subroutine mld_z_jac_smoother_apply_vect(alpha,sm,x,beta,y,desc_data,trans,&
end if
endif
if ((.not.sm%sv%is_iterative()).and.((sweeps == 1).or.(sm%nnz_nd_tot==0))) then
if ((.not.sm%sv%is_iterative()).and.((sweeps == 1).or.(sm%nd_nnz_tot==0))) then
! if .not.sv%is_iterative, there's no need to pass init
call sm%sv%apply(alpha,x,beta,y,desc_data,trans_,aux,wv,info)

@ -75,13 +75,13 @@ subroutine mld_z_jac_smoother_bld(a,desc_a,sm,info,amold,vmold,imold)
class is (mld_z_diag_solver_type)
call sm%nd%free()
sm%pa => a
sm%nnz_nd_tot = nztota
sm%nd_nnz_tot = nztota
class default
if (smsv%is_global()) then
! Do not put anything into SM%ND since the solver
! is acting globally.
sm%nnz_nd_tot = 0
sm%nd_nnz_tot = 0
else
call a%csclip(sm%nd,info,&
& jmin=nrow_a+1,rscale=.false.,cscale=.false.)
@ -94,7 +94,7 @@ subroutine mld_z_jac_smoother_bld(a,desc_a,sm,info,amold,vmold,imold)
& type='csr',dupl=psb_dupl_add_)
endif
end if
sm%nnz_nd_tot = sm%nd%get_nzeros()
sm%nd_nnz_tot = sm%nd%get_nzeros()
end if
end select
if (info /= psb_success_) then
@ -102,7 +102,7 @@ subroutine mld_z_jac_smoother_bld(a,desc_a,sm,info,amold,vmold,imold)
& a_err='clip & psb_spcnv csr 4')
goto 9999
end if
call psb_sum(ictxt,sm%nnz_nd_tot)
call psb_sum(ictxt,sm%nd_nnz_tot)
call sm%sv%build(a,desc_a,info,amold=amold,vmold=vmold)

@ -66,7 +66,7 @@ subroutine mld_z_jac_smoother_clone(sm,smout,info)
select type(smo => smout)
type is (mld_z_jac_smoother_type)
smo%nnz_nd_tot = sm%nnz_nd_tot
smo%nd_nnz_tot = sm%nd_nnz_tot
call sm%nd%clone(smo%nd,info)
if ((info==psb_success_).and.(allocated(sm%sv))) then
allocate(smout%sv,mold=sm%sv,stat=info)

@ -67,7 +67,8 @@ module mld_c_as_smoother
!
type(psb_cspmat_type) :: nd
type(psb_desc_type) :: desc_data
integer(psb_ipk_) :: novr, restr, prol, nd_nnz_tot
integer(psb_ipk_) :: novr, restr, prol
integer(psb_lpk_) :: nd_nnz_tot
contains
procedure, pass(sm) :: check => mld_c_as_smoother_check
procedure, pass(sm) :: dump => mld_c_as_smoother_dmp

@ -60,7 +60,7 @@ module mld_c_jac_smoother
!
type(psb_cspmat_type), pointer :: pa => null()
type(psb_cspmat_type) :: nd
integer(psb_ipk_) :: nnz_nd_tot
integer(psb_lpk_) :: nd_nnz_tot
contains
procedure, pass(sm) :: dump => mld_c_jac_smoother_dmp
procedure, pass(sm) :: build => mld_c_jac_smoother_bld

@ -67,7 +67,8 @@ module mld_d_as_smoother
!
type(psb_dspmat_type) :: nd
type(psb_desc_type) :: desc_data
integer(psb_ipk_) :: novr, restr, prol, nd_nnz_tot
integer(psb_ipk_) :: novr, restr, prol
integer(psb_lpk_) :: nd_nnz_tot
contains
procedure, pass(sm) :: check => mld_d_as_smoother_check
procedure, pass(sm) :: dump => mld_d_as_smoother_dmp

@ -60,7 +60,7 @@ module mld_d_jac_smoother
!
type(psb_dspmat_type), pointer :: pa => null()
type(psb_dspmat_type) :: nd
integer(psb_ipk_) :: nnz_nd_tot
integer(psb_lpk_) :: nd_nnz_tot
contains
procedure, pass(sm) :: dump => mld_d_jac_smoother_dmp
procedure, pass(sm) :: build => mld_d_jac_smoother_bld

@ -67,7 +67,8 @@ module mld_s_as_smoother
!
type(psb_sspmat_type) :: nd
type(psb_desc_type) :: desc_data
integer(psb_ipk_) :: novr, restr, prol, nd_nnz_tot
integer(psb_ipk_) :: novr, restr, prol
integer(psb_lpk_) :: nd_nnz_tot
contains
procedure, pass(sm) :: check => mld_s_as_smoother_check
procedure, pass(sm) :: dump => mld_s_as_smoother_dmp

@ -60,7 +60,7 @@ module mld_s_jac_smoother
!
type(psb_sspmat_type), pointer :: pa => null()
type(psb_sspmat_type) :: nd
integer(psb_ipk_) :: nnz_nd_tot
integer(psb_lpk_) :: nd_nnz_tot
contains
procedure, pass(sm) :: dump => mld_s_jac_smoother_dmp
procedure, pass(sm) :: build => mld_s_jac_smoother_bld

@ -67,7 +67,8 @@ module mld_z_as_smoother
!
type(psb_zspmat_type) :: nd
type(psb_desc_type) :: desc_data
integer(psb_ipk_) :: novr, restr, prol, nd_nnz_tot
integer(psb_ipk_) :: novr, restr, prol
integer(psb_lpk_) :: nd_nnz_tot
contains
procedure, pass(sm) :: check => mld_z_as_smoother_check
procedure, pass(sm) :: dump => mld_z_as_smoother_dmp

@ -60,7 +60,7 @@ module mld_z_jac_smoother
!
type(psb_zspmat_type), pointer :: pa => null()
type(psb_zspmat_type) :: nd
integer(psb_ipk_) :: nnz_nd_tot
integer(psb_lpk_) :: nd_nnz_tot
contains
procedure, pass(sm) :: dump => mld_z_jac_smoother_dmp
procedure, pass(sm) :: build => mld_z_jac_smoother_bld

Loading…
Cancel
Save