mld2p4-2:

mlprec/impl/mld_caggrmat_asb.f90
 mlprec/impl/mld_caggrmat_biz_asb.f90
 mlprec/impl/mld_caggrmat_minnrg_asb.f90
 mlprec/impl/mld_caggrmat_nosmth_asb.f90
 mlprec/impl/mld_caggrmat_smth_asb.f90
 mlprec/impl/mld_cmlprec_aply.f90
 mlprec/impl/mld_cmlprec_bld.f90
 mlprec/impl/mld_daggrmat_asb.f90
 mlprec/impl/mld_daggrmat_biz_asb.f90
 mlprec/impl/mld_daggrmat_minnrg_asb.f90
 mlprec/impl/mld_daggrmat_nosmth_asb.f90
 mlprec/impl/mld_daggrmat_smth_asb.f90
 mlprec/impl/mld_dmlprec_aply.f90
 mlprec/impl/mld_dmlprec_bld.f90
 mlprec/impl/mld_saggrmat_asb.f90
 mlprec/impl/mld_saggrmat_biz_asb.f90
 mlprec/impl/mld_saggrmat_minnrg_asb.f90
 mlprec/impl/mld_saggrmat_nosmth_asb.f90
 mlprec/impl/mld_saggrmat_smth_asb.f90
 mlprec/impl/mld_smlprec_aply.f90
 mlprec/impl/mld_smlprec_bld.f90
 mlprec/impl/mld_zaggrmat_asb.f90
 mlprec/impl/mld_zaggrmat_biz_asb.f90
 mlprec/impl/mld_zaggrmat_minnrg_asb.f90
 mlprec/impl/mld_zaggrmat_nosmth_asb.f90
 mlprec/impl/mld_zaggrmat_smth_asb.f90
 mlprec/impl/mld_zmlprec_aply.f90
 mlprec/impl/mld_zmlprec_bld.f90

Step 3 of integer types parametrization for long integers.
stopcriterion
Salvatore Filippone 12 years ago
parent 4408e79904
commit b0843c05b9

@ -108,17 +108,17 @@ subroutine mld_caggrmat_asb(a,desc_a,ilaggr,nlaggr,p,info)
! Arguments ! Arguments
type(psb_cspmat_type), intent(in) :: a type(psb_cspmat_type), intent(in) :: a
type(psb_desc_type), intent(in) :: desc_a type(psb_desc_type), intent(in) :: desc_a
integer, intent(inout) :: ilaggr(:), nlaggr(:) integer(psb_ipk_), intent(inout) :: ilaggr(:), nlaggr(:)
type(mld_c_onelev_type), intent(inout), target :: p type(mld_c_onelev_type), intent(inout), target :: p
integer, intent(out) :: info integer(psb_ipk_), intent(out) :: info
! Local variables ! Local variables
type(psb_cspmat_type) :: ac, op_prol,op_restr type(psb_cspmat_type) :: ac, op_prol,op_restr
type(psb_c_coo_sparse_mat) :: acoo, bcoo type(psb_c_coo_sparse_mat) :: acoo, bcoo
type(psb_c_csr_sparse_mat) :: acsr1 type(psb_c_csr_sparse_mat) :: acsr1
integer :: nzl,ntaggr integer(psb_ipk_) :: nzl,ntaggr, err_act
integer :: debug_level, debug_unit integer(psb_ipk_) :: debug_level, debug_unit
integer :: ictxt,np,me, err_act integer(psb_mpik_) :: ictxt,np,me
character(len=20) :: name character(len=20) :: name
name='mld_aggrmat_asb' name='mld_aggrmat_asb'

@ -87,15 +87,15 @@ subroutine mld_caggrmat_biz_asb(a,desc_a,ilaggr,nlaggr,parms,ac,op_prol,op_restr
! Arguments ! Arguments
type(psb_cspmat_type), intent(in) :: a type(psb_cspmat_type), intent(in) :: a
type(psb_desc_type), intent(in) :: desc_a type(psb_desc_type), intent(in) :: desc_a
integer, intent(inout) :: ilaggr(:), nlaggr(:) integer(psb_ipk_), intent(inout) :: ilaggr(:), nlaggr(:)
type(mld_sml_parms), intent(inout) :: parms type(mld_sml_parms), intent(inout) :: parms
type(psb_cspmat_type), intent(out) :: ac,op_prol,op_restr type(psb_cspmat_type), intent(out) :: ac,op_prol,op_restr
integer, intent(out) :: info integer(psb_ipk_), intent(out) :: info
! Local variables ! Local variables
integer :: nrow, nglob, ncol, ntaggr, ip, ndx,& integer(psb_ipk_) :: nrow, nglob, ncol, ntaggr, ip, ndx,&
& naggr, nzl,naggrm1,naggrp1, i, j, k, jd, icolF, nrw & naggr, nzl,naggrm1,naggrp1, i, j, k, jd, icolF, nrw, err_act
integer ::ictxt, np, me, err_act integer(psb_mpik_) ::ictxt, np, me
character(len=20) :: name character(len=20) :: name
type(psb_cspmat_type) :: am3, am4 type(psb_cspmat_type) :: am3, am4
type(psb_c_coo_sparse_mat) :: tmpcoo type(psb_c_coo_sparse_mat) :: tmpcoo
@ -103,8 +103,8 @@ subroutine mld_caggrmat_biz_asb(a,desc_a,ilaggr,nlaggr,parms,ac,op_prol,op_restr
complex(psb_spk_), allocatable :: adiag(:) complex(psb_spk_), allocatable :: adiag(:)
integer(psb_ipk_) :: ierr(5) integer(psb_ipk_) :: ierr(5)
logical :: filter_mat logical :: filter_mat
integer :: debug_level, debug_unit integer(psb_ipk_) :: debug_level, debug_unit
integer, parameter :: ncmax=16 integer(psb_ipk_), parameter :: ncmax=16
real(psb_spk_) :: anorm, omega, tmp, dg, theta real(psb_spk_) :: anorm, omega, tmp, dg, theta
name='mld_aggrmat_biz_asb' name='mld_aggrmat_biz_asb'

@ -107,16 +107,16 @@ subroutine mld_caggrmat_minnrg_asb(a,desc_a,ilaggr,nlaggr,parms,ac,op_prol,op_re
! Arguments ! Arguments
type(psb_cspmat_type), intent(in) :: a type(psb_cspmat_type), intent(in) :: a
type(psb_desc_type), intent(in) :: desc_a type(psb_desc_type), intent(in) :: desc_a
integer, intent(inout) :: ilaggr(:), nlaggr(:) integer(psb_ipk_), intent(inout) :: ilaggr(:), nlaggr(:)
type(mld_sml_parms), intent(inout) :: parms type(mld_sml_parms), intent(inout) :: parms
type(psb_cspmat_type), intent(out) :: ac,op_prol,op_restr type(psb_cspmat_type), intent(out) :: ac,op_prol,op_restr
integer, intent(out) :: info integer(psb_ipk_), intent(out) :: info
! Local variables ! Local variables
integer(psb_mpik_), allocatable :: nzbr(:), idisp(:) integer(psb_ipk_), allocatable :: nzbr(:), idisp(:)
integer :: nrow, nglob, ncol, ntaggr, nzac, ip, ndx,& integer(psb_ipk_) :: nrow, nglob, ncol, ntaggr, nzac, ip, ndx,&
& naggr, nzl,naggrm1,naggrp1, i, j, k, jd, icolF, nrt & naggr, nzl,naggrm1,naggrp1, i, j, k, jd, icolF, nrt, err_act
integer :: ictxt,np,me, err_act, icomm integer(psb_mpik_) :: ictxt,np,me, icomm
character(len=20) :: name character(len=20) :: name
type(psb_cspmat_type) :: af, ptilde, rtilde, atran, atp, atdatp type(psb_cspmat_type) :: af, ptilde, rtilde, atran, atp, atdatp
type(psb_cspmat_type) :: am3,am4, ap, adap,atmp,rada, ra, atmp2, dap, dadap, da type(psb_cspmat_type) :: am3,am4, ap, adap,atmp,rada, ra, atmp2, dap, dadap, da
@ -128,8 +128,8 @@ subroutine mld_caggrmat_minnrg_asb(a,desc_a,ilaggr,nlaggr,parms,ac,op_prol,op_re
complex(psb_spk_), allocatable :: omf(:), omp(:), omi(:), oden(:) complex(psb_spk_), allocatable :: omf(:), omp(:), omi(:), oden(:)
logical :: filter_mat logical :: filter_mat
integer(psb_ipk_) :: ierr(5) integer(psb_ipk_) :: ierr(5)
integer :: debug_level, debug_unit integer(psb_ipk_) :: debug_level, debug_unit
integer, parameter :: ncmax=16 integer(psb_ipk_), parameter :: ncmax=16
real(psb_spk_) :: anorm, theta real(psb_spk_) :: anorm, theta
complex(psb_spk_) :: tmp, alpha, beta, ommx complex(psb_spk_) :: tmp, alpha, beta, ommx
@ -602,11 +602,12 @@ subroutine mld_caggrmat_minnrg_asb(a,desc_a,ilaggr,nlaggr,parms,ac,op_prol,op_re
contains contains
subroutine csc_mat_col_prod(a,b,v,info) subroutine csc_mat_col_prod(a,b,v,info)
implicit none
type(psb_c_csc_sparse_mat), intent(in) :: a, b type(psb_c_csc_sparse_mat), intent(in) :: a, b
complex(psb_spk_), intent(out) :: v(:) complex(psb_spk_), intent(out) :: v(:)
integer, intent(out) :: info integer(psb_ipk_), intent(out) :: info
integer :: i,j,k, nr, nc,iap,nra,ibp,nrb integer(psb_ipk_) :: i,j,k, nr, nc,iap,nra,ibp,nrb
info = psb_success_ info = psb_success_
nc = a%get_ncols() nc = a%get_ncols()
@ -629,11 +630,12 @@ contains
subroutine csr_mat_row_prod(a,b,v,info) subroutine csr_mat_row_prod(a,b,v,info)
implicit none
type(psb_c_csr_sparse_mat), intent(in) :: a, b type(psb_c_csr_sparse_mat), intent(in) :: a, b
complex(psb_spk_), intent(out) :: v(:) complex(psb_spk_), intent(out) :: v(:)
integer, intent(out) :: info integer(psb_ipk_), intent(out) :: info
integer :: i,j,k, nr, nc,iap,nca,ibp,ncb integer(psb_ipk_) :: i,j,k, nr, nc,iap,nca,ibp,ncb
info = psb_success_ info = psb_success_
nr = a%get_nrows() nr = a%get_nrows()
@ -656,12 +658,13 @@ contains
function sparse_srtd_dot(nv1,iv1,v1,nv2,iv2,v2) result(dot) function sparse_srtd_dot(nv1,iv1,v1,nv2,iv2,v2) result(dot)
integer, intent(in) :: nv1,nv2 implicit none
integer, intent(in) :: iv1(:), iv2(:) integer(psb_ipk_), intent(in) :: nv1,nv2
integer(psb_ipk_), intent(in) :: iv1(:), iv2(:)
complex(psb_spk_), intent(in) :: v1(:),v2(:) complex(psb_spk_), intent(in) :: v1(:),v2(:)
complex(psb_spk_) :: dot complex(psb_spk_) :: dot
integer :: i,j,k, ip1, ip2 integer(psb_ipk_) :: i,j,k, ip1, ip2
dot = czero dot = czero
ip1 = 1 ip1 = 1
@ -685,7 +688,7 @@ contains
subroutine local_dump(me,mat,name,header) subroutine local_dump(me,mat,name,header)
type(psb_cspmat_type), intent(in) :: mat type(psb_cspmat_type), intent(in) :: mat
integer, intent(in) :: me integer(psb_mpik_), intent(in) :: me
character(len=*), intent(in) :: name character(len=*), intent(in) :: name
character(len=*), intent(in) :: header character(len=*), intent(in) :: header
character(len=80) :: filename character(len=80) :: filename

@ -90,20 +90,20 @@ subroutine mld_caggrmat_nosmth_asb(a,desc_a,ilaggr,nlaggr,parms,ac,op_prol,op_re
! Arguments ! Arguments
type(psb_cspmat_type), intent(in) :: a type(psb_cspmat_type), intent(in) :: a
type(psb_desc_type), intent(in) :: desc_a type(psb_desc_type), intent(in) :: desc_a
integer, intent(inout) :: ilaggr(:), nlaggr(:) integer(psb_ipk_), intent(inout) :: ilaggr(:), nlaggr(:)
type(mld_sml_parms), intent(inout) :: parms type(mld_sml_parms), intent(inout) :: parms
type(psb_cspmat_type), intent(out) :: ac,op_prol,op_restr type(psb_cspmat_type), intent(out) :: ac,op_prol,op_restr
integer, intent(out) :: info integer(psb_ipk_), intent(out) :: info
! Local variables ! Local variables
integer :: ictxt,np,me, err_act integer(psb_ipk_) :: err_act
integer(psb_mpik_) :: icomm, ndx, minfo integer(psb_mpik_) :: ictxt,np,me, icomm, ndx, minfo
character(len=20) :: name character(len=20) :: name
integer(psb_ipk_) :: ierr(5) integer(psb_ipk_) :: ierr(5)
type(psb_c_coo_sparse_mat) :: ac_coo, acoo type(psb_c_coo_sparse_mat) :: ac_coo, acoo
type(psb_c_csr_sparse_mat) :: acsr1, acsr2 type(psb_c_csr_sparse_mat) :: acsr1, acsr2
integer :: debug_level, debug_unit integer(psb_ipk_) :: debug_level, debug_unit
integer :: nrow, nglob, ncol, ntaggr, nzl, ip, & integer(psb_ipk_) :: nrow, nglob, ncol, ntaggr, nzl, ip, &
& naggr, nzt, naggrm1, i & naggr, nzt, naggrm1, i
name='mld_aggrmat_nosmth_asb' name='mld_aggrmat_nosmth_asb'

@ -102,15 +102,15 @@ subroutine mld_caggrmat_smth_asb(a,desc_a,ilaggr,nlaggr,parms,ac,op_prol,op_rest
! Arguments ! Arguments
type(psb_cspmat_type), intent(in) :: a type(psb_cspmat_type), intent(in) :: a
type(psb_desc_type), intent(in) :: desc_a type(psb_desc_type), intent(in) :: desc_a
integer, intent(inout) :: ilaggr(:), nlaggr(:) integer(psb_ipk_), intent(inout) :: ilaggr(:), nlaggr(:)
type(mld_sml_parms), intent(inout) :: parms type(mld_sml_parms), intent(inout) :: parms
type(psb_cspmat_type), intent(out) :: ac,op_prol,op_restr type(psb_cspmat_type), intent(out) :: ac,op_prol,op_restr
integer, intent(out) :: info integer(psb_ipk_), intent(out) :: info
! Local variables ! Local variables
integer :: nrow, nglob, ncol, ntaggr, ip, ndx,& integer(psb_ipk_) :: nrow, nglob, ncol, ntaggr, ip, ndx,&
& naggr, nzl,naggrm1,naggrp1, i, j, k, jd, icolF, nrw & naggr, nzl,naggrm1,naggrp1, i, j, k, jd, icolF, nrw, err_act
integer ::ictxt, np, me, err_act integer(psb_mpik_) ::ictxt, np, me
character(len=20) :: name character(len=20) :: name
type(psb_cspmat_type) :: am3, am4 type(psb_cspmat_type) :: am3, am4
type(psb_c_coo_sparse_mat) :: tmpcoo type(psb_c_coo_sparse_mat) :: tmpcoo
@ -118,8 +118,8 @@ subroutine mld_caggrmat_smth_asb(a,desc_a,ilaggr,nlaggr,parms,ac,op_prol,op_rest
complex(psb_spk_), allocatable :: adiag(:) complex(psb_spk_), allocatable :: adiag(:)
integer(psb_ipk_) :: ierr(5) integer(psb_ipk_) :: ierr(5)
logical :: filter_mat logical :: filter_mat
integer :: debug_level, debug_unit integer(psb_ipk_) :: debug_level, debug_unit
integer, parameter :: ncmax=16 integer(psb_ipk_), parameter :: ncmax=16
real(psb_spk_) :: anorm, omega, tmp, dg, theta real(psb_spk_) :: anorm, omega, tmp, dg, theta
name='mld_aggrmat_smth_asb' name='mld_aggrmat_smth_asb'

@ -322,11 +322,12 @@ subroutine mld_cmlprec_aply(alpha,p,x,beta,y,desc_data,trans,work,info)
complex(psb_spk_),intent(inout) :: y(:) complex(psb_spk_),intent(inout) :: y(:)
character, intent(in) :: trans character, intent(in) :: trans
complex(psb_spk_),target :: work(:) complex(psb_spk_),target :: work(:)
integer, intent(out) :: info integer(psb_ipk_), intent(out) :: info
! Local variables ! Local variables
integer :: ictxt, np, me, err_act integer(psb_mpik_) :: ictxt, np, me
integer :: debug_level, debug_unit, nlev,nc2l,nr2l,level integer(psb_ipk_) :: err_act
integer(psb_ipk_) :: debug_level, debug_unit, nlev,nc2l,nr2l,level
character(len=20) :: name character(len=20) :: name
character :: trans_ character :: trans_
type mld_mlprec_wrk_type type mld_mlprec_wrk_type
@ -407,18 +408,18 @@ contains
implicit none implicit none
! Arguments ! Arguments
integer :: level integer(psb_ipk_) :: level
type(mld_cprec_type), intent(in) :: p type(mld_cprec_type), intent(in) :: p
type(mld_mlprec_wrk_type), intent(inout) :: mlprec_wrk(:) type(mld_mlprec_wrk_type), intent(inout) :: mlprec_wrk(:)
character, intent(in) :: trans character, intent(in) :: trans
complex(psb_spk_),target :: work(:) complex(psb_spk_),target :: work(:)
integer, intent(out) :: info integer(psb_ipk_), intent(out) :: info
! Local variables ! Local variables
integer :: ictxt,np,me,i, nr2l,nc2l,err_act integer(psb_mpik_) :: ictxt,np,me
integer :: debug_level, debug_unit integer(psb_ipk_) :: i, nr2l,nc2l,err_act
integer :: nlev, ilev, sweeps integer(psb_ipk_) :: debug_level, debug_unit
integer(psb_ipk_) :: nlev, ilev, sweeps
character(len=20) :: name character(len=20) :: name
name = 'inner_ml_aply' name = 'inner_ml_aply'
@ -873,11 +874,11 @@ subroutine mld_cmlprec_aply_vect(alpha,p,x,beta,y,desc_data,trans,work,info)
type(psb_c_vect_type),intent(inout) :: y type(psb_c_vect_type),intent(inout) :: y
character, intent(in) :: trans character, intent(in) :: trans
complex(psb_spk_),target :: work(:) complex(psb_spk_),target :: work(:)
integer, intent(out) :: info integer(psb_ipk_), intent(out) :: info
! Local variables ! Local variables
integer :: ictxt, np, me, err_act integer(psb_mpik_) :: ictxt, np, me
integer :: debug_level, debug_unit, nlev,nc2l,nr2l,level integer(psb_ipk_) :: debug_level, debug_unit, nlev,nc2l,nr2l,level, err_act
character(len=20) :: name character(len=20) :: name
character :: trans_ character :: trans_
type mld_mlprec_wrk_type type mld_mlprec_wrk_type
@ -984,17 +985,18 @@ contains
implicit none implicit none
! Arguments ! Arguments
integer :: level integer(psb_ipk_) :: level
type(mld_cprec_type), intent(inout) :: p type(mld_cprec_type), intent(inout) :: p
type(mld_mlprec_wrk_type), intent(inout) :: mlprec_wrk(:) type(mld_mlprec_wrk_type), intent(inout) :: mlprec_wrk(:)
character, intent(in) :: trans character, intent(in) :: trans
complex(psb_spk_),target :: work(:) complex(psb_spk_),target :: work(:)
integer, intent(out) :: info integer(psb_ipk_), intent(out) :: info
! Local variables ! Local variables
integer :: ictxt,np,me,i, nr2l,nc2l,err_act integer(psb_mpik_) :: ictxt,np,me
integer :: debug_level, debug_unit integer(psb_ipk_) :: i, nr2l,nc2l,err_act
integer :: nlev, ilev, sweeps integer(psb_ipk_) :: debug_level, debug_unit
integer(psb_ipk_) :: nlev, ilev, sweeps
character(len=20) :: name character(len=20) :: name

@ -86,21 +86,22 @@ subroutine mld_cmlprec_bld(a,desc_a,p,info,amold,vmold)
type(psb_cspmat_type),intent(in), target :: a type(psb_cspmat_type),intent(in), target :: a
type(psb_desc_type), intent(in), target :: desc_a type(psb_desc_type), intent(in), target :: desc_a
type(mld_cprec_type),intent(inout),target :: p type(mld_cprec_type),intent(inout),target :: p
integer, intent(out) :: info integer(psb_ipk_), intent(out) :: info
class(psb_c_base_sparse_mat), intent(in), optional :: amold class(psb_c_base_sparse_mat), intent(in), optional :: amold
class(psb_c_base_vect_type), intent(in), optional :: vmold class(psb_c_base_vect_type), intent(in), optional :: vmold
!!$ character, intent(in), optional :: upd !!$ character, intent(in), optional :: upd
! Local Variables ! Local Variables
type(mld_cprec_type) :: t_prec type(mld_cprec_type) :: t_prec
Integer :: err,i,k,ictxt, me,np, err_act, iszv, newsz, casize integer(psb_mpik_) :: ictxt, me,np
integer :: ipv(mld_ifpsz_), val integer(psb_ipk_) :: err,i,k, err_act, iszv, newsz, casize
integer :: int_err(5) integer(psb_ipk_) :: ipv(mld_ifpsz_), val
integer(psb_ipk_) :: int_err(5)
character :: upd_ character :: upd_
class(mld_c_base_smoother_type), allocatable :: coarse_sm, base_sm, med_sm class(mld_c_base_smoother_type), allocatable :: coarse_sm, base_sm, med_sm
type(mld_sml_parms) :: baseparms, medparms, coarseparms type(mld_sml_parms) :: baseparms, medparms, coarseparms
type(mld_c_onelev_node), pointer :: head, tail, newnode, current type(mld_c_onelev_node), pointer :: head, tail, newnode, current
integer :: debug_level, debug_unit integer(psb_ipk_) :: debug_level, debug_unit
character(len=20) :: name, ch_err character(len=20) :: name, ch_err
if (psb_get_errstatus().ne.0) return if (psb_get_errstatus().ne.0) return
@ -461,11 +462,11 @@ subroutine mld_cmlprec_bld(a,desc_a,p,info,amold,vmold)
& write(debug_unit,*) me,' ',trim(name),& & write(debug_unit,*) me,' ',trim(name),&
& 'Calling mlprcbld at level ',i & 'Calling mlprcbld at level ',i
call mld_check_def(p%precv(i)%parms%sweeps,& call mld_check_def(p%precv(i)%parms%sweeps,&
& 'Jacobi sweeps',1,is_legal_jac_sweeps) & 'Jacobi sweeps',ione,is_legal_jac_sweeps)
call mld_check_def(p%precv(i)%parms%sweeps_pre,& call mld_check_def(p%precv(i)%parms%sweeps_pre,&
& 'Jacobi sweeps',1,is_legal_jac_sweeps) & 'Jacobi sweeps',ione,is_legal_jac_sweeps)
call mld_check_def(p%precv(i)%parms%sweeps_post,& call mld_check_def(p%precv(i)%parms%sweeps_post,&
& 'Jacobi sweeps',1,is_legal_jac_sweeps) & 'Jacobi sweeps',ione,is_legal_jac_sweeps)
if (.not.allocated(p%precv(i)%sm)) then if (.not.allocated(p%precv(i)%sm)) then
!! Error: should have called mld_dprecinit !! Error: should have called mld_dprecinit
@ -517,7 +518,7 @@ contains
type(mld_c_onelev_type), intent(inout) :: v(:) type(mld_c_onelev_type), intent(inout) :: v(:)
integer(psb_ipk_), intent(in) :: i integer(psb_ipk_), intent(in) :: i
class(mld_c_base_smoother_type), intent(in) :: src class(mld_c_base_smoother_type), intent(in) :: src
integer, intent(out) :: info integer(psb_ipk_), intent(out) :: info
if ((lbound(v,1)<=i).and.(i<=ubound(v,1))) then if ((lbound(v,1)<=i).and.(i<=ubound(v,1))) then
allocate(v(i)%sm,source=src,stat=info) allocate(v(i)%sm,source=src,stat=info)

@ -108,17 +108,17 @@ subroutine mld_daggrmat_asb(a,desc_a,ilaggr,nlaggr,p,info)
! Arguments ! Arguments
type(psb_dspmat_type), intent(in) :: a type(psb_dspmat_type), intent(in) :: a
type(psb_desc_type), intent(in) :: desc_a type(psb_desc_type), intent(in) :: desc_a
integer, intent(inout) :: ilaggr(:), nlaggr(:) integer(psb_ipk_), intent(inout) :: ilaggr(:), nlaggr(:)
type(mld_d_onelev_type), intent(inout), target :: p type(mld_d_onelev_type), intent(inout), target :: p
integer, intent(out) :: info integer(psb_ipk_), intent(out) :: info
! Local variables ! Local variables
type(psb_dspmat_type) :: ac, op_prol,op_restr type(psb_dspmat_type) :: ac, op_prol,op_restr
type(psb_d_coo_sparse_mat) :: acoo, bcoo type(psb_d_coo_sparse_mat) :: acoo, bcoo
type(psb_d_csr_sparse_mat) :: acsr1 type(psb_d_csr_sparse_mat) :: acsr1
integer :: nzl,ntaggr integer(psb_ipk_) :: nzl,ntaggr, err_act
integer :: debug_level, debug_unit integer(psb_ipk_) :: debug_level, debug_unit
integer :: ictxt,np,me, err_act integer(psb_mpik_) :: ictxt,np,me
character(len=20) :: name character(len=20) :: name
name='mld_aggrmat_asb' name='mld_aggrmat_asb'

@ -87,15 +87,15 @@ subroutine mld_daggrmat_biz_asb(a,desc_a,ilaggr,nlaggr,parms,ac,op_prol,op_restr
! Arguments ! Arguments
type(psb_dspmat_type), intent(in) :: a type(psb_dspmat_type), intent(in) :: a
type(psb_desc_type), intent(in) :: desc_a type(psb_desc_type), intent(in) :: desc_a
integer, intent(inout) :: ilaggr(:), nlaggr(:) integer(psb_ipk_), intent(inout) :: ilaggr(:), nlaggr(:)
type(mld_dml_parms), intent(inout) :: parms type(mld_dml_parms), intent(inout) :: parms
type(psb_dspmat_type), intent(out) :: ac,op_prol,op_restr type(psb_dspmat_type), intent(out) :: ac,op_prol,op_restr
integer, intent(out) :: info integer(psb_ipk_), intent(out) :: info
! Local variables ! Local variables
integer :: nrow, nglob, ncol, ntaggr, ip, ndx,& integer(psb_ipk_) :: nrow, nglob, ncol, ntaggr, ip, ndx,&
& naggr, nzl,naggrm1,naggrp1, i, j, k, jd, icolF, nrw & naggr, nzl,naggrm1,naggrp1, i, j, k, jd, icolF, nrw, err_act
integer ::ictxt, np, me, err_act integer(psb_mpik_) ::ictxt, np, me
character(len=20) :: name character(len=20) :: name
type(psb_dspmat_type) :: am3, am4 type(psb_dspmat_type) :: am3, am4
type(psb_d_coo_sparse_mat) :: tmpcoo type(psb_d_coo_sparse_mat) :: tmpcoo
@ -103,8 +103,8 @@ subroutine mld_daggrmat_biz_asb(a,desc_a,ilaggr,nlaggr,parms,ac,op_prol,op_restr
real(psb_dpk_), allocatable :: adiag(:) real(psb_dpk_), allocatable :: adiag(:)
integer(psb_ipk_) :: ierr(5) integer(psb_ipk_) :: ierr(5)
logical :: filter_mat logical :: filter_mat
integer :: debug_level, debug_unit integer(psb_ipk_) :: debug_level, debug_unit
integer, parameter :: ncmax=16 integer(psb_ipk_), parameter :: ncmax=16
real(psb_dpk_) :: anorm, omega, tmp, dg, theta real(psb_dpk_) :: anorm, omega, tmp, dg, theta
name='mld_aggrmat_biz_asb' name='mld_aggrmat_biz_asb'

@ -107,16 +107,16 @@ subroutine mld_daggrmat_minnrg_asb(a,desc_a,ilaggr,nlaggr,parms,ac,op_prol,op_re
! Arguments ! Arguments
type(psb_dspmat_type), intent(in) :: a type(psb_dspmat_type), intent(in) :: a
type(psb_desc_type), intent(in) :: desc_a type(psb_desc_type), intent(in) :: desc_a
integer, intent(inout) :: ilaggr(:), nlaggr(:) integer(psb_ipk_), intent(inout) :: ilaggr(:), nlaggr(:)
type(mld_dml_parms), intent(inout) :: parms type(mld_dml_parms), intent(inout) :: parms
type(psb_dspmat_type), intent(out) :: ac,op_prol,op_restr type(psb_dspmat_type), intent(out) :: ac,op_prol,op_restr
integer, intent(out) :: info integer(psb_ipk_), intent(out) :: info
! Local variables ! Local variables
integer(psb_mpik_), allocatable :: nzbr(:), idisp(:) integer(psb_ipk_), allocatable :: nzbr(:), idisp(:)
integer :: nrow, nglob, ncol, ntaggr, nzac, ip, ndx,& integer(psb_ipk_) :: nrow, nglob, ncol, ntaggr, nzac, ip, ndx,&
& naggr, nzl,naggrm1,naggrp1, i, j, k, jd, icolF, nrt & naggr, nzl,naggrm1,naggrp1, i, j, k, jd, icolF, nrt, err_act
integer :: ictxt,np,me, err_act, icomm integer(psb_mpik_) :: ictxt,np,me, icomm
character(len=20) :: name character(len=20) :: name
type(psb_dspmat_type) :: af, ptilde, rtilde, atran, atp, atdatp type(psb_dspmat_type) :: af, ptilde, rtilde, atran, atp, atdatp
type(psb_dspmat_type) :: am3,am4, ap, adap,atmp,rada, ra, atmp2, dap, dadap, da type(psb_dspmat_type) :: am3,am4, ap, adap,atmp,rada, ra, atmp2, dap, dadap, da
@ -128,8 +128,8 @@ subroutine mld_daggrmat_minnrg_asb(a,desc_a,ilaggr,nlaggr,parms,ac,op_prol,op_re
real(psb_dpk_), allocatable :: omf(:), omp(:), omi(:), oden(:) real(psb_dpk_), allocatable :: omf(:), omp(:), omi(:), oden(:)
logical :: filter_mat logical :: filter_mat
integer(psb_ipk_) :: ierr(5) integer(psb_ipk_) :: ierr(5)
integer :: debug_level, debug_unit integer(psb_ipk_) :: debug_level, debug_unit
integer, parameter :: ncmax=16 integer(psb_ipk_), parameter :: ncmax=16
real(psb_dpk_) :: anorm, theta real(psb_dpk_) :: anorm, theta
real(psb_dpk_) :: tmp, alpha, beta, ommx real(psb_dpk_) :: tmp, alpha, beta, ommx
@ -602,11 +602,12 @@ subroutine mld_daggrmat_minnrg_asb(a,desc_a,ilaggr,nlaggr,parms,ac,op_prol,op_re
contains contains
subroutine csc_mat_col_prod(a,b,v,info) subroutine csc_mat_col_prod(a,b,v,info)
implicit none
type(psb_d_csc_sparse_mat), intent(in) :: a, b type(psb_d_csc_sparse_mat), intent(in) :: a, b
real(psb_dpk_), intent(out) :: v(:) real(psb_dpk_), intent(out) :: v(:)
integer, intent(out) :: info integer(psb_ipk_), intent(out) :: info
integer :: i,j,k, nr, nc,iap,nra,ibp,nrb integer(psb_ipk_) :: i,j,k, nr, nc,iap,nra,ibp,nrb
info = psb_success_ info = psb_success_
nc = a%get_ncols() nc = a%get_ncols()
@ -629,11 +630,12 @@ contains
subroutine csr_mat_row_prod(a,b,v,info) subroutine csr_mat_row_prod(a,b,v,info)
implicit none
type(psb_d_csr_sparse_mat), intent(in) :: a, b type(psb_d_csr_sparse_mat), intent(in) :: a, b
real(psb_dpk_), intent(out) :: v(:) real(psb_dpk_), intent(out) :: v(:)
integer, intent(out) :: info integer(psb_ipk_), intent(out) :: info
integer :: i,j,k, nr, nc,iap,nca,ibp,ncb integer(psb_ipk_) :: i,j,k, nr, nc,iap,nca,ibp,ncb
info = psb_success_ info = psb_success_
nr = a%get_nrows() nr = a%get_nrows()
@ -656,12 +658,13 @@ contains
function sparse_srtd_dot(nv1,iv1,v1,nv2,iv2,v2) result(dot) function sparse_srtd_dot(nv1,iv1,v1,nv2,iv2,v2) result(dot)
integer, intent(in) :: nv1,nv2 implicit none
integer, intent(in) :: iv1(:), iv2(:) integer(psb_ipk_), intent(in) :: nv1,nv2
integer(psb_ipk_), intent(in) :: iv1(:), iv2(:)
real(psb_dpk_), intent(in) :: v1(:),v2(:) real(psb_dpk_), intent(in) :: v1(:),v2(:)
real(psb_dpk_) :: dot real(psb_dpk_) :: dot
integer :: i,j,k, ip1, ip2 integer(psb_ipk_) :: i,j,k, ip1, ip2
dot = dzero dot = dzero
ip1 = 1 ip1 = 1
@ -685,7 +688,7 @@ contains
subroutine local_dump(me,mat,name,header) subroutine local_dump(me,mat,name,header)
type(psb_dspmat_type), intent(in) :: mat type(psb_dspmat_type), intent(in) :: mat
integer, intent(in) :: me integer(psb_mpik_), intent(in) :: me
character(len=*), intent(in) :: name character(len=*), intent(in) :: name
character(len=*), intent(in) :: header character(len=*), intent(in) :: header
character(len=80) :: filename character(len=80) :: filename

@ -90,20 +90,20 @@ subroutine mld_daggrmat_nosmth_asb(a,desc_a,ilaggr,nlaggr,parms,ac,op_prol,op_re
! Arguments ! Arguments
type(psb_dspmat_type), intent(in) :: a type(psb_dspmat_type), intent(in) :: a
type(psb_desc_type), intent(in) :: desc_a type(psb_desc_type), intent(in) :: desc_a
integer, intent(inout) :: ilaggr(:), nlaggr(:) integer(psb_ipk_), intent(inout) :: ilaggr(:), nlaggr(:)
type(mld_dml_parms), intent(inout) :: parms type(mld_dml_parms), intent(inout) :: parms
type(psb_dspmat_type), intent(out) :: ac,op_prol,op_restr type(psb_dspmat_type), intent(out) :: ac,op_prol,op_restr
integer, intent(out) :: info integer(psb_ipk_), intent(out) :: info
! Local variables ! Local variables
integer :: ictxt,np,me, err_act integer(psb_ipk_) :: err_act
integer(psb_mpik_) :: icomm, ndx, minfo integer(psb_mpik_) :: ictxt,np,me, icomm, ndx, minfo
character(len=20) :: name character(len=20) :: name
integer(psb_ipk_) :: ierr(5) integer(psb_ipk_) :: ierr(5)
type(psb_d_coo_sparse_mat) :: ac_coo, acoo type(psb_d_coo_sparse_mat) :: ac_coo, acoo
type(psb_d_csr_sparse_mat) :: acsr1, acsr2 type(psb_d_csr_sparse_mat) :: acsr1, acsr2
integer :: debug_level, debug_unit integer(psb_ipk_) :: debug_level, debug_unit
integer :: nrow, nglob, ncol, ntaggr, nzl, ip, & integer(psb_ipk_) :: nrow, nglob, ncol, ntaggr, nzl, ip, &
& naggr, nzt, naggrm1, i & naggr, nzt, naggrm1, i
name='mld_aggrmat_nosmth_asb' name='mld_aggrmat_nosmth_asb'

@ -102,15 +102,15 @@ subroutine mld_daggrmat_smth_asb(a,desc_a,ilaggr,nlaggr,parms,ac,op_prol,op_rest
! Arguments ! Arguments
type(psb_dspmat_type), intent(in) :: a type(psb_dspmat_type), intent(in) :: a
type(psb_desc_type), intent(in) :: desc_a type(psb_desc_type), intent(in) :: desc_a
integer, intent(inout) :: ilaggr(:), nlaggr(:) integer(psb_ipk_), intent(inout) :: ilaggr(:), nlaggr(:)
type(mld_dml_parms), intent(inout) :: parms type(mld_dml_parms), intent(inout) :: parms
type(psb_dspmat_type), intent(out) :: ac,op_prol,op_restr type(psb_dspmat_type), intent(out) :: ac,op_prol,op_restr
integer, intent(out) :: info integer(psb_ipk_), intent(out) :: info
! Local variables ! Local variables
integer :: nrow, nglob, ncol, ntaggr, ip, ndx,& integer(psb_ipk_) :: nrow, nglob, ncol, ntaggr, ip, ndx,&
& naggr, nzl,naggrm1,naggrp1, i, j, k, jd, icolF, nrw & naggr, nzl,naggrm1,naggrp1, i, j, k, jd, icolF, nrw, err_act
integer ::ictxt, np, me, err_act integer(psb_mpik_) ::ictxt, np, me
character(len=20) :: name character(len=20) :: name
type(psb_dspmat_type) :: am3, am4 type(psb_dspmat_type) :: am3, am4
type(psb_d_coo_sparse_mat) :: tmpcoo type(psb_d_coo_sparse_mat) :: tmpcoo
@ -118,8 +118,8 @@ subroutine mld_daggrmat_smth_asb(a,desc_a,ilaggr,nlaggr,parms,ac,op_prol,op_rest
real(psb_dpk_), allocatable :: adiag(:) real(psb_dpk_), allocatable :: adiag(:)
integer(psb_ipk_) :: ierr(5) integer(psb_ipk_) :: ierr(5)
logical :: filter_mat logical :: filter_mat
integer :: debug_level, debug_unit integer(psb_ipk_) :: debug_level, debug_unit
integer, parameter :: ncmax=16 integer(psb_ipk_), parameter :: ncmax=16
real(psb_dpk_) :: anorm, omega, tmp, dg, theta real(psb_dpk_) :: anorm, omega, tmp, dg, theta
name='mld_aggrmat_smth_asb' name='mld_aggrmat_smth_asb'

@ -322,11 +322,12 @@ subroutine mld_dmlprec_aply(alpha,p,x,beta,y,desc_data,trans,work,info)
real(psb_dpk_),intent(inout) :: y(:) real(psb_dpk_),intent(inout) :: y(:)
character, intent(in) :: trans character, intent(in) :: trans
real(psb_dpk_),target :: work(:) real(psb_dpk_),target :: work(:)
integer, intent(out) :: info integer(psb_ipk_), intent(out) :: info
! Local variables ! Local variables
integer :: ictxt, np, me, err_act integer(psb_mpik_) :: ictxt, np, me
integer :: debug_level, debug_unit, nlev,nc2l,nr2l,level integer(psb_ipk_) :: err_act
integer(psb_ipk_) :: debug_level, debug_unit, nlev,nc2l,nr2l,level
character(len=20) :: name character(len=20) :: name
character :: trans_ character :: trans_
type mld_mlprec_wrk_type type mld_mlprec_wrk_type
@ -407,18 +408,18 @@ contains
implicit none implicit none
! Arguments ! Arguments
integer :: level integer(psb_ipk_) :: level
type(mld_dprec_type), intent(in) :: p type(mld_dprec_type), intent(in) :: p
type(mld_mlprec_wrk_type), intent(inout) :: mlprec_wrk(:) type(mld_mlprec_wrk_type), intent(inout) :: mlprec_wrk(:)
character, intent(in) :: trans character, intent(in) :: trans
real(psb_dpk_),target :: work(:) real(psb_dpk_),target :: work(:)
integer, intent(out) :: info integer(psb_ipk_), intent(out) :: info
! Local variables ! Local variables
integer :: ictxt,np,me,i, nr2l,nc2l,err_act integer(psb_mpik_) :: ictxt,np,me
integer :: debug_level, debug_unit integer(psb_ipk_) :: i, nr2l,nc2l,err_act
integer :: nlev, ilev, sweeps integer(psb_ipk_) :: debug_level, debug_unit
integer(psb_ipk_) :: nlev, ilev, sweeps
character(len=20) :: name character(len=20) :: name
name = 'inner_ml_aply' name = 'inner_ml_aply'
@ -873,11 +874,11 @@ subroutine mld_dmlprec_aply_vect(alpha,p,x,beta,y,desc_data,trans,work,info)
type(psb_d_vect_type),intent(inout) :: y type(psb_d_vect_type),intent(inout) :: y
character, intent(in) :: trans character, intent(in) :: trans
real(psb_dpk_),target :: work(:) real(psb_dpk_),target :: work(:)
integer, intent(out) :: info integer(psb_ipk_), intent(out) :: info
! Local variables ! Local variables
integer :: ictxt, np, me, err_act integer(psb_mpik_) :: ictxt, np, me
integer :: debug_level, debug_unit, nlev,nc2l,nr2l,level integer(psb_ipk_) :: debug_level, debug_unit, nlev,nc2l,nr2l,level, err_act
character(len=20) :: name character(len=20) :: name
character :: trans_ character :: trans_
type mld_mlprec_wrk_type type mld_mlprec_wrk_type
@ -984,17 +985,18 @@ contains
implicit none implicit none
! Arguments ! Arguments
integer :: level integer(psb_ipk_) :: level
type(mld_dprec_type), intent(inout) :: p type(mld_dprec_type), intent(inout) :: p
type(mld_mlprec_wrk_type), intent(inout) :: mlprec_wrk(:) type(mld_mlprec_wrk_type), intent(inout) :: mlprec_wrk(:)
character, intent(in) :: trans character, intent(in) :: trans
real(psb_dpk_),target :: work(:) real(psb_dpk_),target :: work(:)
integer, intent(out) :: info integer(psb_ipk_), intent(out) :: info
! Local variables ! Local variables
integer :: ictxt,np,me,i, nr2l,nc2l,err_act integer(psb_mpik_) :: ictxt,np,me
integer :: debug_level, debug_unit integer(psb_ipk_) :: i, nr2l,nc2l,err_act
integer :: nlev, ilev, sweeps integer(psb_ipk_) :: debug_level, debug_unit
integer(psb_ipk_) :: nlev, ilev, sweeps
character(len=20) :: name character(len=20) :: name

@ -86,21 +86,22 @@ subroutine mld_dmlprec_bld(a,desc_a,p,info,amold,vmold)
type(psb_dspmat_type),intent(in), target :: a type(psb_dspmat_type),intent(in), target :: a
type(psb_desc_type), intent(in), target :: desc_a type(psb_desc_type), intent(in), target :: desc_a
type(mld_dprec_type),intent(inout),target :: p type(mld_dprec_type),intent(inout),target :: p
integer, intent(out) :: info integer(psb_ipk_), intent(out) :: info
class(psb_d_base_sparse_mat), intent(in), optional :: amold class(psb_d_base_sparse_mat), intent(in), optional :: amold
class(psb_d_base_vect_type), intent(in), optional :: vmold class(psb_d_base_vect_type), intent(in), optional :: vmold
!!$ character, intent(in), optional :: upd !!$ character, intent(in), optional :: upd
! Local Variables ! Local Variables
type(mld_dprec_type) :: t_prec type(mld_dprec_type) :: t_prec
Integer :: err,i,k,ictxt, me,np, err_act, iszv, newsz, casize integer(psb_mpik_) :: ictxt, me,np
integer :: ipv(mld_ifpsz_), val integer(psb_ipk_) :: err,i,k, err_act, iszv, newsz, casize
integer :: int_err(5) integer(psb_ipk_) :: ipv(mld_ifpsz_), val
integer(psb_ipk_) :: int_err(5)
character :: upd_ character :: upd_
class(mld_d_base_smoother_type), allocatable :: coarse_sm, base_sm, med_sm class(mld_d_base_smoother_type), allocatable :: coarse_sm, base_sm, med_sm
type(mld_dml_parms) :: baseparms, medparms, coarseparms type(mld_dml_parms) :: baseparms, medparms, coarseparms
type(mld_d_onelev_node), pointer :: head, tail, newnode, current type(mld_d_onelev_node), pointer :: head, tail, newnode, current
integer :: debug_level, debug_unit integer(psb_ipk_) :: debug_level, debug_unit
character(len=20) :: name, ch_err character(len=20) :: name, ch_err
if (psb_get_errstatus().ne.0) return if (psb_get_errstatus().ne.0) return
@ -461,11 +462,11 @@ subroutine mld_dmlprec_bld(a,desc_a,p,info,amold,vmold)
& write(debug_unit,*) me,' ',trim(name),& & write(debug_unit,*) me,' ',trim(name),&
& 'Calling mlprcbld at level ',i & 'Calling mlprcbld at level ',i
call mld_check_def(p%precv(i)%parms%sweeps,& call mld_check_def(p%precv(i)%parms%sweeps,&
& 'Jacobi sweeps',1,is_legal_jac_sweeps) & 'Jacobi sweeps',ione,is_legal_jac_sweeps)
call mld_check_def(p%precv(i)%parms%sweeps_pre,& call mld_check_def(p%precv(i)%parms%sweeps_pre,&
& 'Jacobi sweeps',1,is_legal_jac_sweeps) & 'Jacobi sweeps',ione,is_legal_jac_sweeps)
call mld_check_def(p%precv(i)%parms%sweeps_post,& call mld_check_def(p%precv(i)%parms%sweeps_post,&
& 'Jacobi sweeps',1,is_legal_jac_sweeps) & 'Jacobi sweeps',ione,is_legal_jac_sweeps)
if (.not.allocated(p%precv(i)%sm)) then if (.not.allocated(p%precv(i)%sm)) then
!! Error: should have called mld_dprecinit !! Error: should have called mld_dprecinit
@ -517,7 +518,7 @@ contains
type(mld_d_onelev_type), intent(inout) :: v(:) type(mld_d_onelev_type), intent(inout) :: v(:)
integer(psb_ipk_), intent(in) :: i integer(psb_ipk_), intent(in) :: i
class(mld_d_base_smoother_type), intent(in) :: src class(mld_d_base_smoother_type), intent(in) :: src
integer, intent(out) :: info integer(psb_ipk_), intent(out) :: info
if ((lbound(v,1)<=i).and.(i<=ubound(v,1))) then if ((lbound(v,1)<=i).and.(i<=ubound(v,1))) then
allocate(v(i)%sm,source=src,stat=info) allocate(v(i)%sm,source=src,stat=info)

@ -108,17 +108,17 @@ subroutine mld_saggrmat_asb(a,desc_a,ilaggr,nlaggr,p,info)
! Arguments ! Arguments
type(psb_sspmat_type), intent(in) :: a type(psb_sspmat_type), intent(in) :: a
type(psb_desc_type), intent(in) :: desc_a type(psb_desc_type), intent(in) :: desc_a
integer, intent(inout) :: ilaggr(:), nlaggr(:) integer(psb_ipk_), intent(inout) :: ilaggr(:), nlaggr(:)
type(mld_s_onelev_type), intent(inout), target :: p type(mld_s_onelev_type), intent(inout), target :: p
integer, intent(out) :: info integer(psb_ipk_), intent(out) :: info
! Local variables ! Local variables
type(psb_sspmat_type) :: ac, op_prol,op_restr type(psb_sspmat_type) :: ac, op_prol,op_restr
type(psb_s_coo_sparse_mat) :: acoo, bcoo type(psb_s_coo_sparse_mat) :: acoo, bcoo
type(psb_s_csr_sparse_mat) :: acsr1 type(psb_s_csr_sparse_mat) :: acsr1
integer :: nzl,ntaggr integer(psb_ipk_) :: nzl,ntaggr, err_act
integer :: debug_level, debug_unit integer(psb_ipk_) :: debug_level, debug_unit
integer :: ictxt,np,me, err_act integer(psb_mpik_) :: ictxt,np,me
character(len=20) :: name character(len=20) :: name
name='mld_aggrmat_asb' name='mld_aggrmat_asb'

@ -87,15 +87,15 @@ subroutine mld_saggrmat_biz_asb(a,desc_a,ilaggr,nlaggr,parms,ac,op_prol,op_restr
! Arguments ! Arguments
type(psb_sspmat_type), intent(in) :: a type(psb_sspmat_type), intent(in) :: a
type(psb_desc_type), intent(in) :: desc_a type(psb_desc_type), intent(in) :: desc_a
integer, intent(inout) :: ilaggr(:), nlaggr(:) integer(psb_ipk_), intent(inout) :: ilaggr(:), nlaggr(:)
type(mld_sml_parms), intent(inout) :: parms type(mld_sml_parms), intent(inout) :: parms
type(psb_sspmat_type), intent(out) :: ac,op_prol,op_restr type(psb_sspmat_type), intent(out) :: ac,op_prol,op_restr
integer, intent(out) :: info integer(psb_ipk_), intent(out) :: info
! Local variables ! Local variables
integer :: nrow, nglob, ncol, ntaggr, ip, ndx,& integer(psb_ipk_) :: nrow, nglob, ncol, ntaggr, ip, ndx,&
& naggr, nzl,naggrm1,naggrp1, i, j, k, jd, icolF, nrw & naggr, nzl,naggrm1,naggrp1, i, j, k, jd, icolF, nrw, err_act
integer ::ictxt, np, me, err_act integer(psb_mpik_) ::ictxt, np, me
character(len=20) :: name character(len=20) :: name
type(psb_sspmat_type) :: am3, am4 type(psb_sspmat_type) :: am3, am4
type(psb_s_coo_sparse_mat) :: tmpcoo type(psb_s_coo_sparse_mat) :: tmpcoo
@ -103,8 +103,8 @@ subroutine mld_saggrmat_biz_asb(a,desc_a,ilaggr,nlaggr,parms,ac,op_prol,op_restr
real(psb_spk_), allocatable :: adiag(:) real(psb_spk_), allocatable :: adiag(:)
integer(psb_ipk_) :: ierr(5) integer(psb_ipk_) :: ierr(5)
logical :: filter_mat logical :: filter_mat
integer :: debug_level, debug_unit integer(psb_ipk_) :: debug_level, debug_unit
integer, parameter :: ncmax=16 integer(psb_ipk_), parameter :: ncmax=16
real(psb_spk_) :: anorm, omega, tmp, dg, theta real(psb_spk_) :: anorm, omega, tmp, dg, theta
name='mld_aggrmat_biz_asb' name='mld_aggrmat_biz_asb'

@ -107,16 +107,16 @@ subroutine mld_saggrmat_minnrg_asb(a,desc_a,ilaggr,nlaggr,parms,ac,op_prol,op_re
! Arguments ! Arguments
type(psb_sspmat_type), intent(in) :: a type(psb_sspmat_type), intent(in) :: a
type(psb_desc_type), intent(in) :: desc_a type(psb_desc_type), intent(in) :: desc_a
integer, intent(inout) :: ilaggr(:), nlaggr(:) integer(psb_ipk_), intent(inout) :: ilaggr(:), nlaggr(:)
type(mld_sml_parms), intent(inout) :: parms type(mld_sml_parms), intent(inout) :: parms
type(psb_sspmat_type), intent(out) :: ac,op_prol,op_restr type(psb_sspmat_type), intent(out) :: ac,op_prol,op_restr
integer, intent(out) :: info integer(psb_ipk_), intent(out) :: info
! Local variables ! Local variables
integer(psb_mpik_), allocatable :: nzbr(:), idisp(:) integer(psb_ipk_), allocatable :: nzbr(:), idisp(:)
integer :: nrow, nglob, ncol, ntaggr, nzac, ip, ndx,& integer(psb_ipk_) :: nrow, nglob, ncol, ntaggr, nzac, ip, ndx,&
& naggr, nzl,naggrm1,naggrp1, i, j, k, jd, icolF, nrt & naggr, nzl,naggrm1,naggrp1, i, j, k, jd, icolF, nrt, err_act
integer :: ictxt,np,me, err_act, icomm integer(psb_mpik_) :: ictxt,np,me, icomm
character(len=20) :: name character(len=20) :: name
type(psb_sspmat_type) :: af, ptilde, rtilde, atran, atp, atdatp type(psb_sspmat_type) :: af, ptilde, rtilde, atran, atp, atdatp
type(psb_sspmat_type) :: am3,am4, ap, adap,atmp,rada, ra, atmp2, dap, dadap, da type(psb_sspmat_type) :: am3,am4, ap, adap,atmp,rada, ra, atmp2, dap, dadap, da
@ -128,8 +128,8 @@ subroutine mld_saggrmat_minnrg_asb(a,desc_a,ilaggr,nlaggr,parms,ac,op_prol,op_re
real(psb_spk_), allocatable :: omf(:), omp(:), omi(:), oden(:) real(psb_spk_), allocatable :: omf(:), omp(:), omi(:), oden(:)
logical :: filter_mat logical :: filter_mat
integer(psb_ipk_) :: ierr(5) integer(psb_ipk_) :: ierr(5)
integer :: debug_level, debug_unit integer(psb_ipk_) :: debug_level, debug_unit
integer, parameter :: ncmax=16 integer(psb_ipk_), parameter :: ncmax=16
real(psb_spk_) :: anorm, theta real(psb_spk_) :: anorm, theta
real(psb_spk_) :: tmp, alpha, beta, ommx real(psb_spk_) :: tmp, alpha, beta, ommx
@ -602,11 +602,12 @@ subroutine mld_saggrmat_minnrg_asb(a,desc_a,ilaggr,nlaggr,parms,ac,op_prol,op_re
contains contains
subroutine csc_mat_col_prod(a,b,v,info) subroutine csc_mat_col_prod(a,b,v,info)
implicit none
type(psb_s_csc_sparse_mat), intent(in) :: a, b type(psb_s_csc_sparse_mat), intent(in) :: a, b
real(psb_spk_), intent(out) :: v(:) real(psb_spk_), intent(out) :: v(:)
integer, intent(out) :: info integer(psb_ipk_), intent(out) :: info
integer :: i,j,k, nr, nc,iap,nra,ibp,nrb integer(psb_ipk_) :: i,j,k, nr, nc,iap,nra,ibp,nrb
info = psb_success_ info = psb_success_
nc = a%get_ncols() nc = a%get_ncols()
@ -629,11 +630,12 @@ contains
subroutine csr_mat_row_prod(a,b,v,info) subroutine csr_mat_row_prod(a,b,v,info)
implicit none
type(psb_s_csr_sparse_mat), intent(in) :: a, b type(psb_s_csr_sparse_mat), intent(in) :: a, b
real(psb_spk_), intent(out) :: v(:) real(psb_spk_), intent(out) :: v(:)
integer, intent(out) :: info integer(psb_ipk_), intent(out) :: info
integer :: i,j,k, nr, nc,iap,nca,ibp,ncb integer(psb_ipk_) :: i,j,k, nr, nc,iap,nca,ibp,ncb
info = psb_success_ info = psb_success_
nr = a%get_nrows() nr = a%get_nrows()
@ -656,12 +658,13 @@ contains
function sparse_srtd_dot(nv1,iv1,v1,nv2,iv2,v2) result(dot) function sparse_srtd_dot(nv1,iv1,v1,nv2,iv2,v2) result(dot)
integer, intent(in) :: nv1,nv2 implicit none
integer, intent(in) :: iv1(:), iv2(:) integer(psb_ipk_), intent(in) :: nv1,nv2
integer(psb_ipk_), intent(in) :: iv1(:), iv2(:)
real(psb_spk_), intent(in) :: v1(:),v2(:) real(psb_spk_), intent(in) :: v1(:),v2(:)
real(psb_spk_) :: dot real(psb_spk_) :: dot
integer :: i,j,k, ip1, ip2 integer(psb_ipk_) :: i,j,k, ip1, ip2
dot = szero dot = szero
ip1 = 1 ip1 = 1
@ -685,7 +688,7 @@ contains
subroutine local_dump(me,mat,name,header) subroutine local_dump(me,mat,name,header)
type(psb_sspmat_type), intent(in) :: mat type(psb_sspmat_type), intent(in) :: mat
integer, intent(in) :: me integer(psb_mpik_), intent(in) :: me
character(len=*), intent(in) :: name character(len=*), intent(in) :: name
character(len=*), intent(in) :: header character(len=*), intent(in) :: header
character(len=80) :: filename character(len=80) :: filename

@ -90,20 +90,20 @@ subroutine mld_saggrmat_nosmth_asb(a,desc_a,ilaggr,nlaggr,parms,ac,op_prol,op_re
! Arguments ! Arguments
type(psb_sspmat_type), intent(in) :: a type(psb_sspmat_type), intent(in) :: a
type(psb_desc_type), intent(in) :: desc_a type(psb_desc_type), intent(in) :: desc_a
integer, intent(inout) :: ilaggr(:), nlaggr(:) integer(psb_ipk_), intent(inout) :: ilaggr(:), nlaggr(:)
type(mld_sml_parms), intent(inout) :: parms type(mld_sml_parms), intent(inout) :: parms
type(psb_sspmat_type), intent(out) :: ac,op_prol,op_restr type(psb_sspmat_type), intent(out) :: ac,op_prol,op_restr
integer, intent(out) :: info integer(psb_ipk_), intent(out) :: info
! Local variables ! Local variables
integer :: ictxt,np,me, err_act integer(psb_ipk_) :: err_act
integer(psb_mpik_) :: icomm, ndx, minfo integer(psb_mpik_) :: ictxt,np,me, icomm, ndx, minfo
character(len=20) :: name character(len=20) :: name
integer(psb_ipk_) :: ierr(5) integer(psb_ipk_) :: ierr(5)
type(psb_s_coo_sparse_mat) :: ac_coo, acoo type(psb_s_coo_sparse_mat) :: ac_coo, acoo
type(psb_s_csr_sparse_mat) :: acsr1, acsr2 type(psb_s_csr_sparse_mat) :: acsr1, acsr2
integer :: debug_level, debug_unit integer(psb_ipk_) :: debug_level, debug_unit
integer :: nrow, nglob, ncol, ntaggr, nzl, ip, & integer(psb_ipk_) :: nrow, nglob, ncol, ntaggr, nzl, ip, &
& naggr, nzt, naggrm1, i & naggr, nzt, naggrm1, i
name='mld_aggrmat_nosmth_asb' name='mld_aggrmat_nosmth_asb'

@ -102,15 +102,15 @@ subroutine mld_saggrmat_smth_asb(a,desc_a,ilaggr,nlaggr,parms,ac,op_prol,op_rest
! Arguments ! Arguments
type(psb_sspmat_type), intent(in) :: a type(psb_sspmat_type), intent(in) :: a
type(psb_desc_type), intent(in) :: desc_a type(psb_desc_type), intent(in) :: desc_a
integer, intent(inout) :: ilaggr(:), nlaggr(:) integer(psb_ipk_), intent(inout) :: ilaggr(:), nlaggr(:)
type(mld_sml_parms), intent(inout) :: parms type(mld_sml_parms), intent(inout) :: parms
type(psb_sspmat_type), intent(out) :: ac,op_prol,op_restr type(psb_sspmat_type), intent(out) :: ac,op_prol,op_restr
integer, intent(out) :: info integer(psb_ipk_), intent(out) :: info
! Local variables ! Local variables
integer :: nrow, nglob, ncol, ntaggr, ip, ndx,& integer(psb_ipk_) :: nrow, nglob, ncol, ntaggr, ip, ndx,&
& naggr, nzl,naggrm1,naggrp1, i, j, k, jd, icolF, nrw & naggr, nzl,naggrm1,naggrp1, i, j, k, jd, icolF, nrw, err_act
integer ::ictxt, np, me, err_act integer(psb_mpik_) ::ictxt, np, me
character(len=20) :: name character(len=20) :: name
type(psb_sspmat_type) :: am3, am4 type(psb_sspmat_type) :: am3, am4
type(psb_s_coo_sparse_mat) :: tmpcoo type(psb_s_coo_sparse_mat) :: tmpcoo
@ -118,8 +118,8 @@ subroutine mld_saggrmat_smth_asb(a,desc_a,ilaggr,nlaggr,parms,ac,op_prol,op_rest
real(psb_spk_), allocatable :: adiag(:) real(psb_spk_), allocatable :: adiag(:)
integer(psb_ipk_) :: ierr(5) integer(psb_ipk_) :: ierr(5)
logical :: filter_mat logical :: filter_mat
integer :: debug_level, debug_unit integer(psb_ipk_) :: debug_level, debug_unit
integer, parameter :: ncmax=16 integer(psb_ipk_), parameter :: ncmax=16
real(psb_spk_) :: anorm, omega, tmp, dg, theta real(psb_spk_) :: anorm, omega, tmp, dg, theta
name='mld_aggrmat_smth_asb' name='mld_aggrmat_smth_asb'

@ -322,11 +322,12 @@ subroutine mld_smlprec_aply(alpha,p,x,beta,y,desc_data,trans,work,info)
real(psb_spk_),intent(inout) :: y(:) real(psb_spk_),intent(inout) :: y(:)
character, intent(in) :: trans character, intent(in) :: trans
real(psb_spk_),target :: work(:) real(psb_spk_),target :: work(:)
integer, intent(out) :: info integer(psb_ipk_), intent(out) :: info
! Local variables ! Local variables
integer :: ictxt, np, me, err_act integer(psb_mpik_) :: ictxt, np, me
integer :: debug_level, debug_unit, nlev,nc2l,nr2l,level integer(psb_ipk_) :: err_act
integer(psb_ipk_) :: debug_level, debug_unit, nlev,nc2l,nr2l,level
character(len=20) :: name character(len=20) :: name
character :: trans_ character :: trans_
type mld_mlprec_wrk_type type mld_mlprec_wrk_type
@ -407,18 +408,18 @@ contains
implicit none implicit none
! Arguments ! Arguments
integer :: level integer(psb_ipk_) :: level
type(mld_sprec_type), intent(in) :: p type(mld_sprec_type), intent(in) :: p
type(mld_mlprec_wrk_type), intent(inout) :: mlprec_wrk(:) type(mld_mlprec_wrk_type), intent(inout) :: mlprec_wrk(:)
character, intent(in) :: trans character, intent(in) :: trans
real(psb_spk_),target :: work(:) real(psb_spk_),target :: work(:)
integer, intent(out) :: info integer(psb_ipk_), intent(out) :: info
! Local variables ! Local variables
integer :: ictxt,np,me,i, nr2l,nc2l,err_act integer(psb_mpik_) :: ictxt,np,me
integer :: debug_level, debug_unit integer(psb_ipk_) :: i, nr2l,nc2l,err_act
integer :: nlev, ilev, sweeps integer(psb_ipk_) :: debug_level, debug_unit
integer(psb_ipk_) :: nlev, ilev, sweeps
character(len=20) :: name character(len=20) :: name
name = 'inner_ml_aply' name = 'inner_ml_aply'
@ -873,11 +874,11 @@ subroutine mld_smlprec_aply_vect(alpha,p,x,beta,y,desc_data,trans,work,info)
type(psb_s_vect_type),intent(inout) :: y type(psb_s_vect_type),intent(inout) :: y
character, intent(in) :: trans character, intent(in) :: trans
real(psb_spk_),target :: work(:) real(psb_spk_),target :: work(:)
integer, intent(out) :: info integer(psb_ipk_), intent(out) :: info
! Local variables ! Local variables
integer :: ictxt, np, me, err_act integer(psb_mpik_) :: ictxt, np, me
integer :: debug_level, debug_unit, nlev,nc2l,nr2l,level integer(psb_ipk_) :: debug_level, debug_unit, nlev,nc2l,nr2l,level, err_act
character(len=20) :: name character(len=20) :: name
character :: trans_ character :: trans_
type mld_mlprec_wrk_type type mld_mlprec_wrk_type
@ -984,17 +985,18 @@ contains
implicit none implicit none
! Arguments ! Arguments
integer :: level integer(psb_ipk_) :: level
type(mld_sprec_type), intent(inout) :: p type(mld_sprec_type), intent(inout) :: p
type(mld_mlprec_wrk_type), intent(inout) :: mlprec_wrk(:) type(mld_mlprec_wrk_type), intent(inout) :: mlprec_wrk(:)
character, intent(in) :: trans character, intent(in) :: trans
real(psb_spk_),target :: work(:) real(psb_spk_),target :: work(:)
integer, intent(out) :: info integer(psb_ipk_), intent(out) :: info
! Local variables ! Local variables
integer :: ictxt,np,me,i, nr2l,nc2l,err_act integer(psb_mpik_) :: ictxt,np,me
integer :: debug_level, debug_unit integer(psb_ipk_) :: i, nr2l,nc2l,err_act
integer :: nlev, ilev, sweeps integer(psb_ipk_) :: debug_level, debug_unit
integer(psb_ipk_) :: nlev, ilev, sweeps
character(len=20) :: name character(len=20) :: name

@ -86,21 +86,22 @@ subroutine mld_smlprec_bld(a,desc_a,p,info,amold,vmold)
type(psb_sspmat_type),intent(in), target :: a type(psb_sspmat_type),intent(in), target :: a
type(psb_desc_type), intent(in), target :: desc_a type(psb_desc_type), intent(in), target :: desc_a
type(mld_sprec_type),intent(inout),target :: p type(mld_sprec_type),intent(inout),target :: p
integer, intent(out) :: info integer(psb_ipk_), intent(out) :: info
class(psb_s_base_sparse_mat), intent(in), optional :: amold class(psb_s_base_sparse_mat), intent(in), optional :: amold
class(psb_s_base_vect_type), intent(in), optional :: vmold class(psb_s_base_vect_type), intent(in), optional :: vmold
!!$ character, intent(in), optional :: upd !!$ character, intent(in), optional :: upd
! Local Variables ! Local Variables
type(mld_sprec_type) :: t_prec type(mld_sprec_type) :: t_prec
Integer :: err,i,k,ictxt, me,np, err_act, iszv, newsz, casize integer(psb_mpik_) :: ictxt, me,np
integer :: ipv(mld_ifpsz_), val integer(psb_ipk_) :: err,i,k, err_act, iszv, newsz, casize
integer :: int_err(5) integer(psb_ipk_) :: ipv(mld_ifpsz_), val
integer(psb_ipk_) :: int_err(5)
character :: upd_ character :: upd_
class(mld_s_base_smoother_type), allocatable :: coarse_sm, base_sm, med_sm class(mld_s_base_smoother_type), allocatable :: coarse_sm, base_sm, med_sm
type(mld_sml_parms) :: baseparms, medparms, coarseparms type(mld_sml_parms) :: baseparms, medparms, coarseparms
type(mld_s_onelev_node), pointer :: head, tail, newnode, current type(mld_s_onelev_node), pointer :: head, tail, newnode, current
integer :: debug_level, debug_unit integer(psb_ipk_) :: debug_level, debug_unit
character(len=20) :: name, ch_err character(len=20) :: name, ch_err
if (psb_get_errstatus().ne.0) return if (psb_get_errstatus().ne.0) return
@ -461,11 +462,11 @@ subroutine mld_smlprec_bld(a,desc_a,p,info,amold,vmold)
& write(debug_unit,*) me,' ',trim(name),& & write(debug_unit,*) me,' ',trim(name),&
& 'Calling mlprcbld at level ',i & 'Calling mlprcbld at level ',i
call mld_check_def(p%precv(i)%parms%sweeps,& call mld_check_def(p%precv(i)%parms%sweeps,&
& 'Jacobi sweeps',1,is_legal_jac_sweeps) & 'Jacobi sweeps',ione,is_legal_jac_sweeps)
call mld_check_def(p%precv(i)%parms%sweeps_pre,& call mld_check_def(p%precv(i)%parms%sweeps_pre,&
& 'Jacobi sweeps',1,is_legal_jac_sweeps) & 'Jacobi sweeps',ione,is_legal_jac_sweeps)
call mld_check_def(p%precv(i)%parms%sweeps_post,& call mld_check_def(p%precv(i)%parms%sweeps_post,&
& 'Jacobi sweeps',1,is_legal_jac_sweeps) & 'Jacobi sweeps',ione,is_legal_jac_sweeps)
if (.not.allocated(p%precv(i)%sm)) then if (.not.allocated(p%precv(i)%sm)) then
!! Error: should have called mld_dprecinit !! Error: should have called mld_dprecinit
@ -517,7 +518,7 @@ contains
type(mld_s_onelev_type), intent(inout) :: v(:) type(mld_s_onelev_type), intent(inout) :: v(:)
integer(psb_ipk_), intent(in) :: i integer(psb_ipk_), intent(in) :: i
class(mld_s_base_smoother_type), intent(in) :: src class(mld_s_base_smoother_type), intent(in) :: src
integer, intent(out) :: info integer(psb_ipk_), intent(out) :: info
if ((lbound(v,1)<=i).and.(i<=ubound(v,1))) then if ((lbound(v,1)<=i).and.(i<=ubound(v,1))) then
allocate(v(i)%sm,source=src,stat=info) allocate(v(i)%sm,source=src,stat=info)

@ -108,17 +108,17 @@ subroutine mld_zaggrmat_asb(a,desc_a,ilaggr,nlaggr,p,info)
! Arguments ! Arguments
type(psb_zspmat_type), intent(in) :: a type(psb_zspmat_type), intent(in) :: a
type(psb_desc_type), intent(in) :: desc_a type(psb_desc_type), intent(in) :: desc_a
integer, intent(inout) :: ilaggr(:), nlaggr(:) integer(psb_ipk_), intent(inout) :: ilaggr(:), nlaggr(:)
type(mld_z_onelev_type), intent(inout), target :: p type(mld_z_onelev_type), intent(inout), target :: p
integer, intent(out) :: info integer(psb_ipk_), intent(out) :: info
! Local variables ! Local variables
type(psb_zspmat_type) :: ac, op_prol,op_restr type(psb_zspmat_type) :: ac, op_prol,op_restr
type(psb_z_coo_sparse_mat) :: acoo, bcoo type(psb_z_coo_sparse_mat) :: acoo, bcoo
type(psb_z_csr_sparse_mat) :: acsr1 type(psb_z_csr_sparse_mat) :: acsr1
integer :: nzl,ntaggr integer(psb_ipk_) :: nzl,ntaggr, err_act
integer :: debug_level, debug_unit integer(psb_ipk_) :: debug_level, debug_unit
integer :: ictxt,np,me, err_act integer(psb_mpik_) :: ictxt,np,me
character(len=20) :: name character(len=20) :: name
name='mld_aggrmat_asb' name='mld_aggrmat_asb'

@ -87,15 +87,15 @@ subroutine mld_zaggrmat_biz_asb(a,desc_a,ilaggr,nlaggr,parms,ac,op_prol,op_restr
! Arguments ! Arguments
type(psb_zspmat_type), intent(in) :: a type(psb_zspmat_type), intent(in) :: a
type(psb_desc_type), intent(in) :: desc_a type(psb_desc_type), intent(in) :: desc_a
integer, intent(inout) :: ilaggr(:), nlaggr(:) integer(psb_ipk_), intent(inout) :: ilaggr(:), nlaggr(:)
type(mld_dml_parms), intent(inout) :: parms type(mld_dml_parms), intent(inout) :: parms
type(psb_zspmat_type), intent(out) :: ac,op_prol,op_restr type(psb_zspmat_type), intent(out) :: ac,op_prol,op_restr
integer, intent(out) :: info integer(psb_ipk_), intent(out) :: info
! Local variables ! Local variables
integer :: nrow, nglob, ncol, ntaggr, ip, ndx,& integer(psb_ipk_) :: nrow, nglob, ncol, ntaggr, ip, ndx,&
& naggr, nzl,naggrm1,naggrp1, i, j, k, jd, icolF, nrw & naggr, nzl,naggrm1,naggrp1, i, j, k, jd, icolF, nrw, err_act
integer ::ictxt, np, me, err_act integer(psb_mpik_) ::ictxt, np, me
character(len=20) :: name character(len=20) :: name
type(psb_zspmat_type) :: am3, am4 type(psb_zspmat_type) :: am3, am4
type(psb_z_coo_sparse_mat) :: tmpcoo type(psb_z_coo_sparse_mat) :: tmpcoo
@ -103,8 +103,8 @@ subroutine mld_zaggrmat_biz_asb(a,desc_a,ilaggr,nlaggr,parms,ac,op_prol,op_restr
complex(psb_dpk_), allocatable :: adiag(:) complex(psb_dpk_), allocatable :: adiag(:)
integer(psb_ipk_) :: ierr(5) integer(psb_ipk_) :: ierr(5)
logical :: filter_mat logical :: filter_mat
integer :: debug_level, debug_unit integer(psb_ipk_) :: debug_level, debug_unit
integer, parameter :: ncmax=16 integer(psb_ipk_), parameter :: ncmax=16
real(psb_dpk_) :: anorm, omega, tmp, dg, theta real(psb_dpk_) :: anorm, omega, tmp, dg, theta
name='mld_aggrmat_biz_asb' name='mld_aggrmat_biz_asb'

@ -107,16 +107,16 @@ subroutine mld_zaggrmat_minnrg_asb(a,desc_a,ilaggr,nlaggr,parms,ac,op_prol,op_re
! Arguments ! Arguments
type(psb_zspmat_type), intent(in) :: a type(psb_zspmat_type), intent(in) :: a
type(psb_desc_type), intent(in) :: desc_a type(psb_desc_type), intent(in) :: desc_a
integer, intent(inout) :: ilaggr(:), nlaggr(:) integer(psb_ipk_), intent(inout) :: ilaggr(:), nlaggr(:)
type(mld_dml_parms), intent(inout) :: parms type(mld_dml_parms), intent(inout) :: parms
type(psb_zspmat_type), intent(out) :: ac,op_prol,op_restr type(psb_zspmat_type), intent(out) :: ac,op_prol,op_restr
integer, intent(out) :: info integer(psb_ipk_), intent(out) :: info
! Local variables ! Local variables
integer(psb_mpik_), allocatable :: nzbr(:), idisp(:) integer(psb_ipk_), allocatable :: nzbr(:), idisp(:)
integer :: nrow, nglob, ncol, ntaggr, nzac, ip, ndx,& integer(psb_ipk_) :: nrow, nglob, ncol, ntaggr, nzac, ip, ndx,&
& naggr, nzl,naggrm1,naggrp1, i, j, k, jd, icolF, nrt & naggr, nzl,naggrm1,naggrp1, i, j, k, jd, icolF, nrt, err_act
integer :: ictxt,np,me, err_act, icomm integer(psb_mpik_) :: ictxt,np,me, icomm
character(len=20) :: name character(len=20) :: name
type(psb_zspmat_type) :: af, ptilde, rtilde, atran, atp, atdatp type(psb_zspmat_type) :: af, ptilde, rtilde, atran, atp, atdatp
type(psb_zspmat_type) :: am3,am4, ap, adap,atmp,rada, ra, atmp2, dap, dadap, da type(psb_zspmat_type) :: am3,am4, ap, adap,atmp,rada, ra, atmp2, dap, dadap, da
@ -128,8 +128,8 @@ subroutine mld_zaggrmat_minnrg_asb(a,desc_a,ilaggr,nlaggr,parms,ac,op_prol,op_re
complex(psb_dpk_), allocatable :: omf(:), omp(:), omi(:), oden(:) complex(psb_dpk_), allocatable :: omf(:), omp(:), omi(:), oden(:)
logical :: filter_mat logical :: filter_mat
integer(psb_ipk_) :: ierr(5) integer(psb_ipk_) :: ierr(5)
integer :: debug_level, debug_unit integer(psb_ipk_) :: debug_level, debug_unit
integer, parameter :: ncmax=16 integer(psb_ipk_), parameter :: ncmax=16
real(psb_dpk_) :: anorm, theta real(psb_dpk_) :: anorm, theta
complex(psb_dpk_) :: tmp, alpha, beta, ommx complex(psb_dpk_) :: tmp, alpha, beta, ommx
@ -602,11 +602,12 @@ subroutine mld_zaggrmat_minnrg_asb(a,desc_a,ilaggr,nlaggr,parms,ac,op_prol,op_re
contains contains
subroutine csc_mat_col_prod(a,b,v,info) subroutine csc_mat_col_prod(a,b,v,info)
implicit none
type(psb_z_csc_sparse_mat), intent(in) :: a, b type(psb_z_csc_sparse_mat), intent(in) :: a, b
complex(psb_dpk_), intent(out) :: v(:) complex(psb_dpk_), intent(out) :: v(:)
integer, intent(out) :: info integer(psb_ipk_), intent(out) :: info
integer :: i,j,k, nr, nc,iap,nra,ibp,nrb integer(psb_ipk_) :: i,j,k, nr, nc,iap,nra,ibp,nrb
info = psb_success_ info = psb_success_
nc = a%get_ncols() nc = a%get_ncols()
@ -629,11 +630,12 @@ contains
subroutine csr_mat_row_prod(a,b,v,info) subroutine csr_mat_row_prod(a,b,v,info)
implicit none
type(psb_z_csr_sparse_mat), intent(in) :: a, b type(psb_z_csr_sparse_mat), intent(in) :: a, b
complex(psb_dpk_), intent(out) :: v(:) complex(psb_dpk_), intent(out) :: v(:)
integer, intent(out) :: info integer(psb_ipk_), intent(out) :: info
integer :: i,j,k, nr, nc,iap,nca,ibp,ncb integer(psb_ipk_) :: i,j,k, nr, nc,iap,nca,ibp,ncb
info = psb_success_ info = psb_success_
nr = a%get_nrows() nr = a%get_nrows()
@ -656,12 +658,13 @@ contains
function sparse_srtd_dot(nv1,iv1,v1,nv2,iv2,v2) result(dot) function sparse_srtd_dot(nv1,iv1,v1,nv2,iv2,v2) result(dot)
integer, intent(in) :: nv1,nv2 implicit none
integer, intent(in) :: iv1(:), iv2(:) integer(psb_ipk_), intent(in) :: nv1,nv2
integer(psb_ipk_), intent(in) :: iv1(:), iv2(:)
complex(psb_dpk_), intent(in) :: v1(:),v2(:) complex(psb_dpk_), intent(in) :: v1(:),v2(:)
complex(psb_dpk_) :: dot complex(psb_dpk_) :: dot
integer :: i,j,k, ip1, ip2 integer(psb_ipk_) :: i,j,k, ip1, ip2
dot = zzero dot = zzero
ip1 = 1 ip1 = 1
@ -685,7 +688,7 @@ contains
subroutine local_dump(me,mat,name,header) subroutine local_dump(me,mat,name,header)
type(psb_zspmat_type), intent(in) :: mat type(psb_zspmat_type), intent(in) :: mat
integer, intent(in) :: me integer(psb_mpik_), intent(in) :: me
character(len=*), intent(in) :: name character(len=*), intent(in) :: name
character(len=*), intent(in) :: header character(len=*), intent(in) :: header
character(len=80) :: filename character(len=80) :: filename

@ -90,20 +90,20 @@ subroutine mld_zaggrmat_nosmth_asb(a,desc_a,ilaggr,nlaggr,parms,ac,op_prol,op_re
! Arguments ! Arguments
type(psb_zspmat_type), intent(in) :: a type(psb_zspmat_type), intent(in) :: a
type(psb_desc_type), intent(in) :: desc_a type(psb_desc_type), intent(in) :: desc_a
integer, intent(inout) :: ilaggr(:), nlaggr(:) integer(psb_ipk_), intent(inout) :: ilaggr(:), nlaggr(:)
type(mld_dml_parms), intent(inout) :: parms type(mld_dml_parms), intent(inout) :: parms
type(psb_zspmat_type), intent(out) :: ac,op_prol,op_restr type(psb_zspmat_type), intent(out) :: ac,op_prol,op_restr
integer, intent(out) :: info integer(psb_ipk_), intent(out) :: info
! Local variables ! Local variables
integer :: ictxt,np,me, err_act integer(psb_ipk_) :: err_act
integer(psb_mpik_) :: icomm, ndx, minfo integer(psb_mpik_) :: ictxt,np,me, icomm, ndx, minfo
character(len=20) :: name character(len=20) :: name
integer(psb_ipk_) :: ierr(5) integer(psb_ipk_) :: ierr(5)
type(psb_z_coo_sparse_mat) :: ac_coo, acoo type(psb_z_coo_sparse_mat) :: ac_coo, acoo
type(psb_z_csr_sparse_mat) :: acsr1, acsr2 type(psb_z_csr_sparse_mat) :: acsr1, acsr2
integer :: debug_level, debug_unit integer(psb_ipk_) :: debug_level, debug_unit
integer :: nrow, nglob, ncol, ntaggr, nzl, ip, & integer(psb_ipk_) :: nrow, nglob, ncol, ntaggr, nzl, ip, &
& naggr, nzt, naggrm1, i & naggr, nzt, naggrm1, i
name='mld_aggrmat_nosmth_asb' name='mld_aggrmat_nosmth_asb'

@ -102,15 +102,15 @@ subroutine mld_zaggrmat_smth_asb(a,desc_a,ilaggr,nlaggr,parms,ac,op_prol,op_rest
! Arguments ! Arguments
type(psb_zspmat_type), intent(in) :: a type(psb_zspmat_type), intent(in) :: a
type(psb_desc_type), intent(in) :: desc_a type(psb_desc_type), intent(in) :: desc_a
integer, intent(inout) :: ilaggr(:), nlaggr(:) integer(psb_ipk_), intent(inout) :: ilaggr(:), nlaggr(:)
type(mld_dml_parms), intent(inout) :: parms type(mld_dml_parms), intent(inout) :: parms
type(psb_zspmat_type), intent(out) :: ac,op_prol,op_restr type(psb_zspmat_type), intent(out) :: ac,op_prol,op_restr
integer, intent(out) :: info integer(psb_ipk_), intent(out) :: info
! Local variables ! Local variables
integer :: nrow, nglob, ncol, ntaggr, ip, ndx,& integer(psb_ipk_) :: nrow, nglob, ncol, ntaggr, ip, ndx,&
& naggr, nzl,naggrm1,naggrp1, i, j, k, jd, icolF, nrw & naggr, nzl,naggrm1,naggrp1, i, j, k, jd, icolF, nrw, err_act
integer ::ictxt, np, me, err_act integer(psb_mpik_) ::ictxt, np, me
character(len=20) :: name character(len=20) :: name
type(psb_zspmat_type) :: am3, am4 type(psb_zspmat_type) :: am3, am4
type(psb_z_coo_sparse_mat) :: tmpcoo type(psb_z_coo_sparse_mat) :: tmpcoo
@ -118,8 +118,8 @@ subroutine mld_zaggrmat_smth_asb(a,desc_a,ilaggr,nlaggr,parms,ac,op_prol,op_rest
complex(psb_dpk_), allocatable :: adiag(:) complex(psb_dpk_), allocatable :: adiag(:)
integer(psb_ipk_) :: ierr(5) integer(psb_ipk_) :: ierr(5)
logical :: filter_mat logical :: filter_mat
integer :: debug_level, debug_unit integer(psb_ipk_) :: debug_level, debug_unit
integer, parameter :: ncmax=16 integer(psb_ipk_), parameter :: ncmax=16
real(psb_dpk_) :: anorm, omega, tmp, dg, theta real(psb_dpk_) :: anorm, omega, tmp, dg, theta
name='mld_aggrmat_smth_asb' name='mld_aggrmat_smth_asb'

@ -322,11 +322,12 @@ subroutine mld_zmlprec_aply(alpha,p,x,beta,y,desc_data,trans,work,info)
complex(psb_dpk_),intent(inout) :: y(:) complex(psb_dpk_),intent(inout) :: y(:)
character, intent(in) :: trans character, intent(in) :: trans
complex(psb_dpk_),target :: work(:) complex(psb_dpk_),target :: work(:)
integer, intent(out) :: info integer(psb_ipk_), intent(out) :: info
! Local variables ! Local variables
integer :: ictxt, np, me, err_act integer(psb_mpik_) :: ictxt, np, me
integer :: debug_level, debug_unit, nlev,nc2l,nr2l,level integer(psb_ipk_) :: err_act
integer(psb_ipk_) :: debug_level, debug_unit, nlev,nc2l,nr2l,level
character(len=20) :: name character(len=20) :: name
character :: trans_ character :: trans_
type mld_mlprec_wrk_type type mld_mlprec_wrk_type
@ -407,18 +408,18 @@ contains
implicit none implicit none
! Arguments ! Arguments
integer :: level integer(psb_ipk_) :: level
type(mld_zprec_type), intent(in) :: p type(mld_zprec_type), intent(in) :: p
type(mld_mlprec_wrk_type), intent(inout) :: mlprec_wrk(:) type(mld_mlprec_wrk_type), intent(inout) :: mlprec_wrk(:)
character, intent(in) :: trans character, intent(in) :: trans
complex(psb_dpk_),target :: work(:) complex(psb_dpk_),target :: work(:)
integer, intent(out) :: info integer(psb_ipk_), intent(out) :: info
! Local variables ! Local variables
integer :: ictxt,np,me,i, nr2l,nc2l,err_act integer(psb_mpik_) :: ictxt,np,me
integer :: debug_level, debug_unit integer(psb_ipk_) :: i, nr2l,nc2l,err_act
integer :: nlev, ilev, sweeps integer(psb_ipk_) :: debug_level, debug_unit
integer(psb_ipk_) :: nlev, ilev, sweeps
character(len=20) :: name character(len=20) :: name
name = 'inner_ml_aply' name = 'inner_ml_aply'
@ -873,11 +874,11 @@ subroutine mld_zmlprec_aply_vect(alpha,p,x,beta,y,desc_data,trans,work,info)
type(psb_z_vect_type),intent(inout) :: y type(psb_z_vect_type),intent(inout) :: y
character, intent(in) :: trans character, intent(in) :: trans
complex(psb_dpk_),target :: work(:) complex(psb_dpk_),target :: work(:)
integer, intent(out) :: info integer(psb_ipk_), intent(out) :: info
! Local variables ! Local variables
integer :: ictxt, np, me, err_act integer(psb_mpik_) :: ictxt, np, me
integer :: debug_level, debug_unit, nlev,nc2l,nr2l,level integer(psb_ipk_) :: debug_level, debug_unit, nlev,nc2l,nr2l,level, err_act
character(len=20) :: name character(len=20) :: name
character :: trans_ character :: trans_
type mld_mlprec_wrk_type type mld_mlprec_wrk_type
@ -984,17 +985,18 @@ contains
implicit none implicit none
! Arguments ! Arguments
integer :: level integer(psb_ipk_) :: level
type(mld_zprec_type), intent(inout) :: p type(mld_zprec_type), intent(inout) :: p
type(mld_mlprec_wrk_type), intent(inout) :: mlprec_wrk(:) type(mld_mlprec_wrk_type), intent(inout) :: mlprec_wrk(:)
character, intent(in) :: trans character, intent(in) :: trans
complex(psb_dpk_),target :: work(:) complex(psb_dpk_),target :: work(:)
integer, intent(out) :: info integer(psb_ipk_), intent(out) :: info
! Local variables ! Local variables
integer :: ictxt,np,me,i, nr2l,nc2l,err_act integer(psb_mpik_) :: ictxt,np,me
integer :: debug_level, debug_unit integer(psb_ipk_) :: i, nr2l,nc2l,err_act
integer :: nlev, ilev, sweeps integer(psb_ipk_) :: debug_level, debug_unit
integer(psb_ipk_) :: nlev, ilev, sweeps
character(len=20) :: name character(len=20) :: name

@ -86,21 +86,22 @@ subroutine mld_zmlprec_bld(a,desc_a,p,info,amold,vmold)
type(psb_zspmat_type),intent(in), target :: a type(psb_zspmat_type),intent(in), target :: a
type(psb_desc_type), intent(in), target :: desc_a type(psb_desc_type), intent(in), target :: desc_a
type(mld_zprec_type),intent(inout),target :: p type(mld_zprec_type),intent(inout),target :: p
integer, intent(out) :: info integer(psb_ipk_), intent(out) :: info
class(psb_z_base_sparse_mat), intent(in), optional :: amold class(psb_z_base_sparse_mat), intent(in), optional :: amold
class(psb_z_base_vect_type), intent(in), optional :: vmold class(psb_z_base_vect_type), intent(in), optional :: vmold
!!$ character, intent(in), optional :: upd !!$ character, intent(in), optional :: upd
! Local Variables ! Local Variables
type(mld_zprec_type) :: t_prec type(mld_zprec_type) :: t_prec
Integer :: err,i,k,ictxt, me,np, err_act, iszv, newsz, casize integer(psb_mpik_) :: ictxt, me,np
integer :: ipv(mld_ifpsz_), val integer(psb_ipk_) :: err,i,k, err_act, iszv, newsz, casize
integer :: int_err(5) integer(psb_ipk_) :: ipv(mld_ifpsz_), val
integer(psb_ipk_) :: int_err(5)
character :: upd_ character :: upd_
class(mld_z_base_smoother_type), allocatable :: coarse_sm, base_sm, med_sm class(mld_z_base_smoother_type), allocatable :: coarse_sm, base_sm, med_sm
type(mld_dml_parms) :: baseparms, medparms, coarseparms type(mld_dml_parms) :: baseparms, medparms, coarseparms
type(mld_z_onelev_node), pointer :: head, tail, newnode, current type(mld_z_onelev_node), pointer :: head, tail, newnode, current
integer :: debug_level, debug_unit integer(psb_ipk_) :: debug_level, debug_unit
character(len=20) :: name, ch_err character(len=20) :: name, ch_err
if (psb_get_errstatus().ne.0) return if (psb_get_errstatus().ne.0) return
@ -461,11 +462,11 @@ subroutine mld_zmlprec_bld(a,desc_a,p,info,amold,vmold)
& write(debug_unit,*) me,' ',trim(name),& & write(debug_unit,*) me,' ',trim(name),&
& 'Calling mlprcbld at level ',i & 'Calling mlprcbld at level ',i
call mld_check_def(p%precv(i)%parms%sweeps,& call mld_check_def(p%precv(i)%parms%sweeps,&
& 'Jacobi sweeps',1,is_legal_jac_sweeps) & 'Jacobi sweeps',ione,is_legal_jac_sweeps)
call mld_check_def(p%precv(i)%parms%sweeps_pre,& call mld_check_def(p%precv(i)%parms%sweeps_pre,&
& 'Jacobi sweeps',1,is_legal_jac_sweeps) & 'Jacobi sweeps',ione,is_legal_jac_sweeps)
call mld_check_def(p%precv(i)%parms%sweeps_post,& call mld_check_def(p%precv(i)%parms%sweeps_post,&
& 'Jacobi sweeps',1,is_legal_jac_sweeps) & 'Jacobi sweeps',ione,is_legal_jac_sweeps)
if (.not.allocated(p%precv(i)%sm)) then if (.not.allocated(p%precv(i)%sm)) then
!! Error: should have called mld_dprecinit !! Error: should have called mld_dprecinit
@ -517,7 +518,7 @@ contains
type(mld_z_onelev_type), intent(inout) :: v(:) type(mld_z_onelev_type), intent(inout) :: v(:)
integer(psb_ipk_), intent(in) :: i integer(psb_ipk_), intent(in) :: i
class(mld_z_base_smoother_type), intent(in) :: src class(mld_z_base_smoother_type), intent(in) :: src
integer, intent(out) :: info integer(psb_ipk_), intent(out) :: info
if ((lbound(v,1)<=i).and.(i<=ubound(v,1))) then if ((lbound(v,1)<=i).and.(i<=ubound(v,1))) then
allocate(v(i)%sm,source=src,stat=info) allocate(v(i)%sm,source=src,stat=info)

Loading…
Cancel
Save