Cleanup variables etc. Fixed Makefile.

stopcriterion
Salvatore Filippone 5 years ago
parent 82bc6a7fc4
commit 8026e0ccd3

@ -14,6 +14,7 @@ mld_s_dec_aggregator_mat_bld.o \
mld_s_dec_aggregator_tprol.o \ mld_s_dec_aggregator_tprol.o \
mld_s_symdec_aggregator_tprol.o \ mld_s_symdec_aggregator_tprol.o \
mld_s_map_to_tprol.o mld_s_soc1_map_bld.o mld_s_soc2_map_bld.o\ mld_s_map_to_tprol.o mld_s_soc1_map_bld.o mld_s_soc2_map_bld.o\
mld_s_spmm_bld_inner.o \
mld_saggrmat_biz_bld.o mld_saggrmat_minnrg_bld.o\ mld_saggrmat_biz_bld.o mld_saggrmat_minnrg_bld.o\
mld_saggrmat_nosmth_bld.o mld_saggrmat_smth_bld.o \ mld_saggrmat_nosmth_bld.o mld_saggrmat_smth_bld.o \
mld_d_dec_aggregator_mat_asb.o \ mld_d_dec_aggregator_mat_asb.o \
@ -29,6 +30,7 @@ mld_c_dec_aggregator_mat_bld.o \
mld_c_dec_aggregator_tprol.o \ mld_c_dec_aggregator_tprol.o \
mld_c_symdec_aggregator_tprol.o \ mld_c_symdec_aggregator_tprol.o \
mld_c_map_to_tprol.o mld_c_soc1_map_bld.o mld_c_soc2_map_bld.o\ mld_c_map_to_tprol.o mld_c_soc1_map_bld.o mld_c_soc2_map_bld.o\
mld_c_spmm_bld_inner.o \
mld_caggrmat_biz_bld.o mld_caggrmat_minnrg_bld.o\ mld_caggrmat_biz_bld.o mld_caggrmat_minnrg_bld.o\
mld_caggrmat_nosmth_bld.o mld_caggrmat_smth_bld.o \ mld_caggrmat_nosmth_bld.o mld_caggrmat_smth_bld.o \
mld_z_dec_aggregator_mat_asb.o \ mld_z_dec_aggregator_mat_asb.o \
@ -36,6 +38,7 @@ mld_z_dec_aggregator_mat_bld.o \
mld_z_dec_aggregator_tprol.o \ mld_z_dec_aggregator_tprol.o \
mld_z_symdec_aggregator_tprol.o \ mld_z_symdec_aggregator_tprol.o \
mld_z_map_to_tprol.o mld_z_soc1_map_bld.o mld_z_soc2_map_bld.o\ mld_z_map_to_tprol.o mld_z_soc1_map_bld.o mld_z_soc2_map_bld.o\
mld_z_spmm_bld_inner.o \
mld_zaggrmat_biz_bld.o mld_zaggrmat_minnrg_bld.o\ mld_zaggrmat_biz_bld.o mld_zaggrmat_minnrg_bld.o\
mld_zaggrmat_nosmth_bld.o mld_zaggrmat_smth_bld.o mld_zaggrmat_nosmth_bld.o mld_zaggrmat_smth_bld.o

@ -56,9 +56,8 @@ subroutine mld_c_spmm_bld_inner(a_csr,desc_a,ilaggr,nlaggr,parms,ac,&
integer(psb_ipk_) :: ictxt,np,me, icomm, ndx, minfo integer(psb_ipk_) :: ictxt,np,me, icomm, ndx, minfo
character(len=40) :: name character(len=40) :: name
integer(psb_ipk_) :: ierr(5) integer(psb_ipk_) :: ierr(5)
type(psb_lc_coo_sparse_mat) :: ac_coo, tmpcoo, coo_prol type(psb_lc_coo_sparse_mat) :: ac_coo, tmpcoo
type(psb_lc_csr_sparse_mat) :: acsr2, acsr3, acsr4, csr_prol, ac_csr, csr_restr type(psb_lc_csr_sparse_mat) :: acsr3, csr_prol, ac_csr, csr_restr
type(psb_lcspmat_type) :: am3, am4, tmp_prol
type(psb_desc_type), target :: tmp_desc type(psb_desc_type), target :: tmp_desc
integer(psb_ipk_) :: debug_level, debug_unit, naggr integer(psb_ipk_) :: debug_level, debug_unit, naggr
integer(psb_lpk_) :: nrow, nglob, ncol, ntaggr, nzl, ip, & integer(psb_lpk_) :: nrow, nglob, ncol, ntaggr, nzl, ip, &
@ -103,14 +102,14 @@ subroutine mld_c_spmm_bld_inner(a_csr,desc_a,ilaggr,nlaggr,parms,ac,&
& op_prol%get_fmt(),op_prol%get_nrows(),op_prol%get_ncols(),op_prol%get_nzeros(),& & op_prol%get_fmt(),op_prol%get_nrows(),op_prol%get_ncols(),op_prol%get_nzeros(),&
& nrow,ntaggr,naggr & nrow,ntaggr,naggr
call op_prol%cp_to(coo_prol) call op_prol%cp_to(tmpcoo)
if (debug) write(0,*) me,' ',trim(name),' coo_prol: ',& if (debug) write(0,*) me,' ',trim(name),' tmpcoo: ',&
& coo_prol%ia(1:min(10,nzpsave)),' :',coo_prol%ja(1:min(10,nzpsave)) & tmpcoo%ia(1:min(10,nzpsave)),' :',tmpcoo%ja(1:min(10,nzpsave))
call psb_cdall(ictxt,tmp_desc,info,nl=naggr) call psb_cdall(ictxt,tmp_desc,info,nl=naggr)
call tmp_desc%indxmap%g2lip_ins(coo_prol%ja(1:nzpsave),info) call tmp_desc%indxmap%g2lip_ins(tmpcoo%ja(1:nzpsave),info)
call coo_prol%set_ncols(tmp_desc%get_local_cols()) call tmpcoo%set_ncols(tmp_desc%get_local_cols())
call coo_prol%mv_to_fmt(csr_prol,info) call tmpcoo%mv_to_fmt(csr_prol,info)
if (debug) write(0,*) me,trim(name),' Product AxPROL ',& if (debug) write(0,*) me,trim(name),' Product AxPROL ',&
& a_csr%get_nrows(),a_csr%get_ncols(), csr_prol%get_nrows(), & & a_csr%get_nrows(),a_csr%get_ncols(), csr_prol%get_nrows(), &

@ -126,9 +126,8 @@ subroutine mld_caggrmat_smth_bld(a,desc_a,ilaggr,nlaggr,parms,ac,op_prol,op_rest
integer(psb_ipk_) :: ictxt, np, me integer(psb_ipk_) :: ictxt, np, me
character(len=20) :: name character(len=20) :: name
type(psb_desc_type) :: tmp_desc type(psb_desc_type) :: tmp_desc
type(psb_lcspmat_type) :: la, am3, am4, tmp_prol
type(psb_lc_coo_sparse_mat) :: tmpcoo type(psb_lc_coo_sparse_mat) :: tmpcoo
type(psb_lc_csr_sparse_mat) :: acsr1, acsr2, acsr3, acsrf, ptilde, csr_prol, acsr type(psb_lc_csr_sparse_mat) :: acsr1, acsrf, csr_prol, acsr
complex(psb_spk_), allocatable :: adiag(:) complex(psb_spk_), allocatable :: adiag(:)
real(psb_spk_), allocatable :: arwsum(:) real(psb_spk_), allocatable :: arwsum(:)
integer(psb_ipk_) :: ierr(5) integer(psb_ipk_) :: ierr(5)
@ -264,7 +263,7 @@ subroutine mld_caggrmat_smth_bld(a,desc_a,ilaggr,nlaggr,parms,ac,op_prol,op_rest
call tmpcoo%mv_to_fmt(csr_prol,info) call tmpcoo%mv_to_fmt(csr_prol,info)
! !
! Build the smoothed prolongator using either A or Af ! Build the smoothed prolongator using either A or Af
! acsr1 = (I-w*D*A)Ptilde acsr1 = (I-w*D*Af)Ptilde ! acsr1 = (I-w*D*A) Prol acsr1 = (I-w*D*Af) Prol
! This is always done through the variable acsrf which ! This is always done through the variable acsrf which
! is a bit less readable, butsaves space and one extra matrix copy ! is a bit less readable, butsaves space and one extra matrix copy
! !

@ -77,7 +77,6 @@
subroutine mld_d_dec_aggregator_build_tprol(ag,parms,ag_data,& subroutine mld_d_dec_aggregator_build_tprol(ag,parms,ag_data,&
& a,desc_a,ilaggr,nlaggr,op_prol,info) & a,desc_a,ilaggr,nlaggr,op_prol,info)
use psb_base_mod use psb_base_mod
use psb_util_mod
use mld_d_prec_type, mld_protect_name => mld_d_dec_aggregator_build_tprol use mld_d_prec_type, mld_protect_name => mld_d_dec_aggregator_build_tprol
use mld_d_inner_mod use mld_d_inner_mod
implicit none implicit none
@ -97,8 +96,6 @@ subroutine mld_d_dec_aggregator_build_tprol(ag,parms,ag_data,&
integer(psb_lpk_) :: ntaggr integer(psb_lpk_) :: ntaggr
integer(psb_ipk_) :: debug_level, debug_unit integer(psb_ipk_) :: debug_level, debug_unit
logical :: clean_zeros logical :: clean_zeros
logical, parameter :: debug_new=.false.
character(len=80) :: filename
name='mld_d_dec_aggregator_tprol' name='mld_d_dec_aggregator_tprol'
call psb_erractionsave(err_act) call psb_erractionsave(err_act)
@ -124,21 +121,9 @@ subroutine mld_d_dec_aggregator_build_tprol(ag,parms,ag_data,&
! ag_data except for clean_zeros; soc_map_bld is a procedure pointer. ! ag_data except for clean_zeros; soc_map_bld is a procedure pointer.
! !
clean_zeros = ag%do_clean_zeros clean_zeros = ag%do_clean_zeros
if (debug_new) then
write(filename,'(a,i3.3,a)') 'pre-a-',me,'.mtx'
call a%print(filename,head='Test')
end if
call ag%soc_map_bld(parms%aggr_ord,parms%aggr_thresh,clean_zeros,a,desc_a,nlaggr,ilaggr,info) call ag%soc_map_bld(parms%aggr_ord,parms%aggr_thresh,clean_zeros,a,desc_a,nlaggr,ilaggr,info)
if (info==psb_success_) call mld_map_to_tprol(desc_a,ilaggr,nlaggr,op_prol,info) if (info==psb_success_) call mld_map_to_tprol(desc_a,ilaggr,nlaggr,op_prol,info)
if (debug_new) then
write(filename,'(a,i3.3,a)') 'ilaggr-',me,'.mtx'
call mm_array_write(ilaggr,' Aggregation vector ',info,filename=filename)
write(filename,'(a,i3.3,a)') 'pre-op-prol-',me,'.mtx'
call op_prol%print(filename,head='Test')
end if
if (info /= psb_success_) then if (info /= psb_success_) then
info=psb_err_from_subroutine_ info=psb_err_from_subroutine_
call psb_errpush(info,name,a_err='soc_map_bld/map_to_tprol') call psb_errpush(info,name,a_err='soc_map_bld/map_to_tprol')

@ -56,9 +56,8 @@ subroutine mld_d_spmm_bld_inner(a_csr,desc_a,ilaggr,nlaggr,parms,ac,&
integer(psb_ipk_) :: ictxt,np,me, icomm, ndx, minfo integer(psb_ipk_) :: ictxt,np,me, icomm, ndx, minfo
character(len=40) :: name character(len=40) :: name
integer(psb_ipk_) :: ierr(5) integer(psb_ipk_) :: ierr(5)
type(psb_ld_coo_sparse_mat) :: ac_coo, tmpcoo, coo_prol type(psb_ld_coo_sparse_mat) :: ac_coo, tmpcoo
type(psb_ld_csr_sparse_mat) :: acsr2, acsr3, acsr4, csr_prol, ac_csr, csr_restr type(psb_ld_csr_sparse_mat) :: acsr3, csr_prol, ac_csr, csr_restr
type(psb_ldspmat_type) :: am3, am4, tmp_prol
type(psb_desc_type), target :: tmp_desc type(psb_desc_type), target :: tmp_desc
integer(psb_ipk_) :: debug_level, debug_unit, naggr integer(psb_ipk_) :: debug_level, debug_unit, naggr
integer(psb_lpk_) :: nrow, nglob, ncol, ntaggr, nzl, ip, & integer(psb_lpk_) :: nrow, nglob, ncol, ntaggr, nzl, ip, &
@ -103,14 +102,14 @@ subroutine mld_d_spmm_bld_inner(a_csr,desc_a,ilaggr,nlaggr,parms,ac,&
& op_prol%get_fmt(),op_prol%get_nrows(),op_prol%get_ncols(),op_prol%get_nzeros(),& & op_prol%get_fmt(),op_prol%get_nrows(),op_prol%get_ncols(),op_prol%get_nzeros(),&
& nrow,ntaggr,naggr & nrow,ntaggr,naggr
call op_prol%cp_to(coo_prol) call op_prol%cp_to(tmpcoo)
if (debug) write(0,*) me,' ',trim(name),' coo_prol: ',& if (debug) write(0,*) me,' ',trim(name),' tmpcoo: ',&
& coo_prol%ia(1:min(10,nzpsave)),' :',coo_prol%ja(1:min(10,nzpsave)) & tmpcoo%ia(1:min(10,nzpsave)),' :',tmpcoo%ja(1:min(10,nzpsave))
call psb_cdall(ictxt,tmp_desc,info,nl=naggr) call psb_cdall(ictxt,tmp_desc,info,nl=naggr)
call tmp_desc%indxmap%g2lip_ins(coo_prol%ja(1:nzpsave),info) call tmp_desc%indxmap%g2lip_ins(tmpcoo%ja(1:nzpsave),info)
call coo_prol%set_ncols(tmp_desc%get_local_cols()) call tmpcoo%set_ncols(tmp_desc%get_local_cols())
call coo_prol%mv_to_fmt(csr_prol,info) call tmpcoo%mv_to_fmt(csr_prol,info)
if (debug) write(0,*) me,trim(name),' Product AxPROL ',& if (debug) write(0,*) me,trim(name),' Product AxPROL ',&
& a_csr%get_nrows(),a_csr%get_ncols(), csr_prol%get_nrows(), & & a_csr%get_nrows(),a_csr%get_ncols(), csr_prol%get_nrows(), &

@ -126,9 +126,8 @@ subroutine mld_daggrmat_smth_bld(a,desc_a,ilaggr,nlaggr,parms,ac,op_prol,op_rest
integer(psb_ipk_) :: ictxt, np, me integer(psb_ipk_) :: ictxt, np, me
character(len=20) :: name character(len=20) :: name
type(psb_desc_type) :: tmp_desc type(psb_desc_type) :: tmp_desc
type(psb_ldspmat_type) :: la, am3, am4, tmp_prol
type(psb_ld_coo_sparse_mat) :: tmpcoo type(psb_ld_coo_sparse_mat) :: tmpcoo
type(psb_ld_csr_sparse_mat) :: acsr1, acsr2, acsr3, acsrf, ptilde, csr_prol, acsr type(psb_ld_csr_sparse_mat) :: acsr1, acsrf, csr_prol, acsr
real(psb_dpk_), allocatable :: adiag(:) real(psb_dpk_), allocatable :: adiag(:)
real(psb_dpk_), allocatable :: arwsum(:) real(psb_dpk_), allocatable :: arwsum(:)
integer(psb_ipk_) :: ierr(5) integer(psb_ipk_) :: ierr(5)
@ -264,7 +263,7 @@ subroutine mld_daggrmat_smth_bld(a,desc_a,ilaggr,nlaggr,parms,ac,op_prol,op_rest
call tmpcoo%mv_to_fmt(csr_prol,info) call tmpcoo%mv_to_fmt(csr_prol,info)
! !
! Build the smoothed prolongator using either A or Af ! Build the smoothed prolongator using either A or Af
! acsr1 = (I-w*D*A)Ptilde acsr1 = (I-w*D*Af)Ptilde ! acsr1 = (I-w*D*A) Prol acsr1 = (I-w*D*Af) Prol
! This is always done through the variable acsrf which ! This is always done through the variable acsrf which
! is a bit less readable, butsaves space and one extra matrix copy ! is a bit less readable, butsaves space and one extra matrix copy
! !

@ -56,9 +56,8 @@ subroutine mld_s_spmm_bld_inner(a_csr,desc_a,ilaggr,nlaggr,parms,ac,&
integer(psb_ipk_) :: ictxt,np,me, icomm, ndx, minfo integer(psb_ipk_) :: ictxt,np,me, icomm, ndx, minfo
character(len=40) :: name character(len=40) :: name
integer(psb_ipk_) :: ierr(5) integer(psb_ipk_) :: ierr(5)
type(psb_ls_coo_sparse_mat) :: ac_coo, tmpcoo, coo_prol type(psb_ls_coo_sparse_mat) :: ac_coo, tmpcoo
type(psb_ls_csr_sparse_mat) :: acsr2, acsr3, acsr4, csr_prol, ac_csr, csr_restr type(psb_ls_csr_sparse_mat) :: acsr3, csr_prol, ac_csr, csr_restr
type(psb_lsspmat_type) :: am3, am4, tmp_prol
type(psb_desc_type), target :: tmp_desc type(psb_desc_type), target :: tmp_desc
integer(psb_ipk_) :: debug_level, debug_unit, naggr integer(psb_ipk_) :: debug_level, debug_unit, naggr
integer(psb_lpk_) :: nrow, nglob, ncol, ntaggr, nzl, ip, & integer(psb_lpk_) :: nrow, nglob, ncol, ntaggr, nzl, ip, &
@ -103,14 +102,14 @@ subroutine mld_s_spmm_bld_inner(a_csr,desc_a,ilaggr,nlaggr,parms,ac,&
& op_prol%get_fmt(),op_prol%get_nrows(),op_prol%get_ncols(),op_prol%get_nzeros(),& & op_prol%get_fmt(),op_prol%get_nrows(),op_prol%get_ncols(),op_prol%get_nzeros(),&
& nrow,ntaggr,naggr & nrow,ntaggr,naggr
call op_prol%cp_to(coo_prol) call op_prol%cp_to(tmpcoo)
if (debug) write(0,*) me,' ',trim(name),' coo_prol: ',& if (debug) write(0,*) me,' ',trim(name),' tmpcoo: ',&
& coo_prol%ia(1:min(10,nzpsave)),' :',coo_prol%ja(1:min(10,nzpsave)) & tmpcoo%ia(1:min(10,nzpsave)),' :',tmpcoo%ja(1:min(10,nzpsave))
call psb_cdall(ictxt,tmp_desc,info,nl=naggr) call psb_cdall(ictxt,tmp_desc,info,nl=naggr)
call tmp_desc%indxmap%g2lip_ins(coo_prol%ja(1:nzpsave),info) call tmp_desc%indxmap%g2lip_ins(tmpcoo%ja(1:nzpsave),info)
call coo_prol%set_ncols(tmp_desc%get_local_cols()) call tmpcoo%set_ncols(tmp_desc%get_local_cols())
call coo_prol%mv_to_fmt(csr_prol,info) call tmpcoo%mv_to_fmt(csr_prol,info)
if (debug) write(0,*) me,trim(name),' Product AxPROL ',& if (debug) write(0,*) me,trim(name),' Product AxPROL ',&
& a_csr%get_nrows(),a_csr%get_ncols(), csr_prol%get_nrows(), & & a_csr%get_nrows(),a_csr%get_ncols(), csr_prol%get_nrows(), &

@ -126,9 +126,8 @@ subroutine mld_saggrmat_smth_bld(a,desc_a,ilaggr,nlaggr,parms,ac,op_prol,op_rest
integer(psb_ipk_) :: ictxt, np, me integer(psb_ipk_) :: ictxt, np, me
character(len=20) :: name character(len=20) :: name
type(psb_desc_type) :: tmp_desc type(psb_desc_type) :: tmp_desc
type(psb_lsspmat_type) :: la, am3, am4, tmp_prol
type(psb_ls_coo_sparse_mat) :: tmpcoo type(psb_ls_coo_sparse_mat) :: tmpcoo
type(psb_ls_csr_sparse_mat) :: acsr1, acsr2, acsr3, acsrf, ptilde, csr_prol, acsr type(psb_ls_csr_sparse_mat) :: acsr1, acsrf, csr_prol, acsr
real(psb_spk_), allocatable :: adiag(:) real(psb_spk_), allocatable :: adiag(:)
real(psb_spk_), allocatable :: arwsum(:) real(psb_spk_), allocatable :: arwsum(:)
integer(psb_ipk_) :: ierr(5) integer(psb_ipk_) :: ierr(5)
@ -264,7 +263,7 @@ subroutine mld_saggrmat_smth_bld(a,desc_a,ilaggr,nlaggr,parms,ac,op_prol,op_rest
call tmpcoo%mv_to_fmt(csr_prol,info) call tmpcoo%mv_to_fmt(csr_prol,info)
! !
! Build the smoothed prolongator using either A or Af ! Build the smoothed prolongator using either A or Af
! acsr1 = (I-w*D*A)Ptilde acsr1 = (I-w*D*Af)Ptilde ! acsr1 = (I-w*D*A) Prol acsr1 = (I-w*D*Af) Prol
! This is always done through the variable acsrf which ! This is always done through the variable acsrf which
! is a bit less readable, butsaves space and one extra matrix copy ! is a bit less readable, butsaves space and one extra matrix copy
! !

@ -56,9 +56,8 @@ subroutine mld_z_spmm_bld_inner(a_csr,desc_a,ilaggr,nlaggr,parms,ac,&
integer(psb_ipk_) :: ictxt,np,me, icomm, ndx, minfo integer(psb_ipk_) :: ictxt,np,me, icomm, ndx, minfo
character(len=40) :: name character(len=40) :: name
integer(psb_ipk_) :: ierr(5) integer(psb_ipk_) :: ierr(5)
type(psb_lz_coo_sparse_mat) :: ac_coo, tmpcoo, coo_prol type(psb_lz_coo_sparse_mat) :: ac_coo, tmpcoo
type(psb_lz_csr_sparse_mat) :: acsr2, acsr3, acsr4, csr_prol, ac_csr, csr_restr type(psb_lz_csr_sparse_mat) :: acsr3, csr_prol, ac_csr, csr_restr
type(psb_lzspmat_type) :: am3, am4, tmp_prol
type(psb_desc_type), target :: tmp_desc type(psb_desc_type), target :: tmp_desc
integer(psb_ipk_) :: debug_level, debug_unit, naggr integer(psb_ipk_) :: debug_level, debug_unit, naggr
integer(psb_lpk_) :: nrow, nglob, ncol, ntaggr, nzl, ip, & integer(psb_lpk_) :: nrow, nglob, ncol, ntaggr, nzl, ip, &
@ -103,14 +102,14 @@ subroutine mld_z_spmm_bld_inner(a_csr,desc_a,ilaggr,nlaggr,parms,ac,&
& op_prol%get_fmt(),op_prol%get_nrows(),op_prol%get_ncols(),op_prol%get_nzeros(),& & op_prol%get_fmt(),op_prol%get_nrows(),op_prol%get_ncols(),op_prol%get_nzeros(),&
& nrow,ntaggr,naggr & nrow,ntaggr,naggr
call op_prol%cp_to(coo_prol) call op_prol%cp_to(tmpcoo)
if (debug) write(0,*) me,' ',trim(name),' coo_prol: ',& if (debug) write(0,*) me,' ',trim(name),' tmpcoo: ',&
& coo_prol%ia(1:min(10,nzpsave)),' :',coo_prol%ja(1:min(10,nzpsave)) & tmpcoo%ia(1:min(10,nzpsave)),' :',tmpcoo%ja(1:min(10,nzpsave))
call psb_cdall(ictxt,tmp_desc,info,nl=naggr) call psb_cdall(ictxt,tmp_desc,info,nl=naggr)
call tmp_desc%indxmap%g2lip_ins(coo_prol%ja(1:nzpsave),info) call tmp_desc%indxmap%g2lip_ins(tmpcoo%ja(1:nzpsave),info)
call coo_prol%set_ncols(tmp_desc%get_local_cols()) call tmpcoo%set_ncols(tmp_desc%get_local_cols())
call coo_prol%mv_to_fmt(csr_prol,info) call tmpcoo%mv_to_fmt(csr_prol,info)
if (debug) write(0,*) me,trim(name),' Product AxPROL ',& if (debug) write(0,*) me,trim(name),' Product AxPROL ',&
& a_csr%get_nrows(),a_csr%get_ncols(), csr_prol%get_nrows(), & & a_csr%get_nrows(),a_csr%get_ncols(), csr_prol%get_nrows(), &

@ -126,9 +126,8 @@ subroutine mld_zaggrmat_smth_bld(a,desc_a,ilaggr,nlaggr,parms,ac,op_prol,op_rest
integer(psb_ipk_) :: ictxt, np, me integer(psb_ipk_) :: ictxt, np, me
character(len=20) :: name character(len=20) :: name
type(psb_desc_type) :: tmp_desc type(psb_desc_type) :: tmp_desc
type(psb_lzspmat_type) :: la, am3, am4, tmp_prol
type(psb_lz_coo_sparse_mat) :: tmpcoo type(psb_lz_coo_sparse_mat) :: tmpcoo
type(psb_lz_csr_sparse_mat) :: acsr1, acsr2, acsr3, acsrf, ptilde, csr_prol, acsr type(psb_lz_csr_sparse_mat) :: acsr1, acsrf, csr_prol, acsr
complex(psb_dpk_), allocatable :: adiag(:) complex(psb_dpk_), allocatable :: adiag(:)
real(psb_dpk_), allocatable :: arwsum(:) real(psb_dpk_), allocatable :: arwsum(:)
integer(psb_ipk_) :: ierr(5) integer(psb_ipk_) :: ierr(5)
@ -264,7 +263,7 @@ subroutine mld_zaggrmat_smth_bld(a,desc_a,ilaggr,nlaggr,parms,ac,op_prol,op_rest
call tmpcoo%mv_to_fmt(csr_prol,info) call tmpcoo%mv_to_fmt(csr_prol,info)
! !
! Build the smoothed prolongator using either A or Af ! Build the smoothed prolongator using either A or Af
! acsr1 = (I-w*D*A)Ptilde acsr1 = (I-w*D*Af)Ptilde ! acsr1 = (I-w*D*A) Prol acsr1 = (I-w*D*Af) Prol
! This is always done through the variable acsrf which ! This is always done through the variable acsrf which
! is a bit less readable, butsaves space and one extra matrix copy ! is a bit less readable, butsaves space and one extra matrix copy
! !

@ -43,7 +43,7 @@ module mld_c_base_aggregator_mod
use mld_base_prec_type, only : mld_sml_parms, mld_saggr_data use mld_base_prec_type, only : mld_sml_parms, mld_saggr_data
use psb_base_mod, only : psb_cspmat_type, psb_lcspmat_type, psb_c_vect_type, & use psb_base_mod, only : psb_cspmat_type, psb_lcspmat_type, psb_c_vect_type, &
& psb_c_base_vect_type, psb_clinmap_type, psb_spk_, & & psb_c_base_vect_type, psb_clinmap_type, psb_spk_, psb_lc_csr_sparse_mat, &
& psb_ipk_, psb_epk_, psb_lpk_, psb_desc_type, psb_i_base_vect_type, & & psb_ipk_, psb_epk_, psb_lpk_, psb_desc_type, psb_i_base_vect_type, &
& psb_erractionsave, psb_error_handler, psb_success_, psb_toupper & psb_erractionsave, psb_error_handler, psb_success_, psb_toupper
! !
@ -118,6 +118,24 @@ module mld_c_base_aggregator_mod
end subroutine mld_c_soc_map_bld end subroutine mld_c_soc_map_bld
end interface end interface
interface mld_spmm_bld_inner
subroutine mld_c_spmm_bld_inner(a_csr,desc_a,ilaggr,nlaggr,parms,ac,&
& op_prol,op_restr,info)
import :: psb_lc_csr_sparse_mat, psb_lcspmat_type, psb_desc_type, &
& mld_sml_parms, psb_spk_, psb_ipk_, psb_lpk_
implicit none
! Arguments
type(psb_lc_csr_sparse_mat), intent(inout) :: a_csr
type(psb_desc_type), intent(in) :: desc_a
integer(psb_lpk_), intent(inout) :: ilaggr(:), nlaggr(:)
type(mld_sml_parms), intent(inout) :: parms
type(psb_lcspmat_type), intent(inout) :: op_prol, op_restr
type(psb_lcspmat_type), intent(out) :: ac
integer(psb_ipk_), intent(out) :: info
end subroutine mld_c_spmm_bld_inner
end interface mld_spmm_bld_inner
contains contains
subroutine mld_c_base_aggregator_cseti(ag,what,val,info,idx) subroutine mld_c_base_aggregator_cseti(ag,what,val,info,idx)

@ -122,7 +122,7 @@ module mld_d_base_aggregator_mod
subroutine mld_d_spmm_bld_inner(a_csr,desc_a,ilaggr,nlaggr,parms,ac,& subroutine mld_d_spmm_bld_inner(a_csr,desc_a,ilaggr,nlaggr,parms,ac,&
& op_prol,op_restr,info) & op_prol,op_restr,info)
import :: psb_ld_csr_sparse_mat, psb_ldspmat_type, psb_desc_type, & import :: psb_ld_csr_sparse_mat, psb_ldspmat_type, psb_desc_type, &
& mld_dml_parms,psb_dpk_, psb_ipk_, psb_lpk_ & mld_dml_parms, psb_dpk_, psb_ipk_, psb_lpk_
implicit none implicit none
! Arguments ! Arguments

@ -43,7 +43,7 @@ module mld_s_base_aggregator_mod
use mld_base_prec_type, only : mld_sml_parms, mld_saggr_data use mld_base_prec_type, only : mld_sml_parms, mld_saggr_data
use psb_base_mod, only : psb_sspmat_type, psb_lsspmat_type, psb_s_vect_type, & use psb_base_mod, only : psb_sspmat_type, psb_lsspmat_type, psb_s_vect_type, &
& psb_s_base_vect_type, psb_slinmap_type, psb_spk_, & & psb_s_base_vect_type, psb_slinmap_type, psb_spk_, psb_ls_csr_sparse_mat, &
& psb_ipk_, psb_epk_, psb_lpk_, psb_desc_type, psb_i_base_vect_type, & & psb_ipk_, psb_epk_, psb_lpk_, psb_desc_type, psb_i_base_vect_type, &
& psb_erractionsave, psb_error_handler, psb_success_, psb_toupper & psb_erractionsave, psb_error_handler, psb_success_, psb_toupper
! !
@ -118,6 +118,24 @@ module mld_s_base_aggregator_mod
end subroutine mld_s_soc_map_bld end subroutine mld_s_soc_map_bld
end interface end interface
interface mld_spmm_bld_inner
subroutine mld_s_spmm_bld_inner(a_csr,desc_a,ilaggr,nlaggr,parms,ac,&
& op_prol,op_restr,info)
import :: psb_ls_csr_sparse_mat, psb_lsspmat_type, psb_desc_type, &
& mld_sml_parms, psb_spk_, psb_ipk_, psb_lpk_
implicit none
! Arguments
type(psb_ls_csr_sparse_mat), intent(inout) :: a_csr
type(psb_desc_type), intent(in) :: desc_a
integer(psb_lpk_), intent(inout) :: ilaggr(:), nlaggr(:)
type(mld_sml_parms), intent(inout) :: parms
type(psb_lsspmat_type), intent(inout) :: op_prol, op_restr
type(psb_lsspmat_type), intent(out) :: ac
integer(psb_ipk_), intent(out) :: info
end subroutine mld_s_spmm_bld_inner
end interface mld_spmm_bld_inner
contains contains
subroutine mld_s_base_aggregator_cseti(ag,what,val,info,idx) subroutine mld_s_base_aggregator_cseti(ag,what,val,info,idx)

@ -43,7 +43,7 @@ module mld_z_base_aggregator_mod
use mld_base_prec_type, only : mld_dml_parms, mld_daggr_data use mld_base_prec_type, only : mld_dml_parms, mld_daggr_data
use psb_base_mod, only : psb_zspmat_type, psb_lzspmat_type, psb_z_vect_type, & use psb_base_mod, only : psb_zspmat_type, psb_lzspmat_type, psb_z_vect_type, &
& psb_z_base_vect_type, psb_zlinmap_type, psb_dpk_, & & psb_z_base_vect_type, psb_zlinmap_type, psb_dpk_, psb_lz_csr_sparse_mat, &
& psb_ipk_, psb_epk_, psb_lpk_, psb_desc_type, psb_i_base_vect_type, & & psb_ipk_, psb_epk_, psb_lpk_, psb_desc_type, psb_i_base_vect_type, &
& psb_erractionsave, psb_error_handler, psb_success_, psb_toupper & psb_erractionsave, psb_error_handler, psb_success_, psb_toupper
! !
@ -118,6 +118,24 @@ module mld_z_base_aggregator_mod
end subroutine mld_z_soc_map_bld end subroutine mld_z_soc_map_bld
end interface end interface
interface mld_spmm_bld_inner
subroutine mld_z_spmm_bld_inner(a_csr,desc_a,ilaggr,nlaggr,parms,ac,&
& op_prol,op_restr,info)
import :: psb_lz_csr_sparse_mat, psb_lzspmat_type, psb_desc_type, &
& mld_dml_parms, psb_dpk_, psb_ipk_, psb_lpk_
implicit none
! Arguments
type(psb_lz_csr_sparse_mat), intent(inout) :: a_csr
type(psb_desc_type), intent(in) :: desc_a
integer(psb_lpk_), intent(inout) :: ilaggr(:), nlaggr(:)
type(mld_dml_parms), intent(inout) :: parms
type(psb_lzspmat_type), intent(inout) :: op_prol, op_restr
type(psb_lzspmat_type), intent(out) :: ac
integer(psb_ipk_), intent(out) :: info
end subroutine mld_z_spmm_bld_inner
end interface mld_spmm_bld_inner
contains contains
subroutine mld_z_base_aggregator_cseti(ag,what,val,info,idx) subroutine mld_z_base_aggregator_cseti(ag,what,val,info,idx)

Loading…
Cancel
Save