|
|
@ -74,7 +74,7 @@
|
|
|
|
! info - integer, output.
|
|
|
|
! info - integer, output.
|
|
|
|
! Error code.
|
|
|
|
! Error code.
|
|
|
|
!
|
|
|
|
!
|
|
|
|
subroutine mld_caggrmap_bld(aggr_type,a,desc_a,nlaggr,ilaggr,info)
|
|
|
|
subroutine mld_caggrmap_bld(aggr_type,theta,a,desc_a,nlaggr,ilaggr,info)
|
|
|
|
|
|
|
|
|
|
|
|
use psb_base_mod
|
|
|
|
use psb_base_mod
|
|
|
|
use mld_inner_mod, mld_protect_name => mld_caggrmap_bld
|
|
|
|
use mld_inner_mod, mld_protect_name => mld_caggrmap_bld
|
|
|
@ -83,7 +83,8 @@ subroutine mld_caggrmap_bld(aggr_type,a,desc_a,nlaggr,ilaggr,info)
|
|
|
|
|
|
|
|
|
|
|
|
! Arguments
|
|
|
|
! Arguments
|
|
|
|
integer, intent(in) :: aggr_type
|
|
|
|
integer, intent(in) :: aggr_type
|
|
|
|
type(psb_cspmat_type), intent(in), target :: a
|
|
|
|
real(psb_spk_), intent(in) :: theta
|
|
|
|
|
|
|
|
type(psb_cspmat_type), intent(in) :: a
|
|
|
|
type(psb_desc_type), intent(in) :: desc_a
|
|
|
|
type(psb_desc_type), intent(in) :: desc_a
|
|
|
|
integer, allocatable, intent(out) :: ilaggr(:),nlaggr(:)
|
|
|
|
integer, allocatable, intent(out) :: ilaggr(:),nlaggr(:)
|
|
|
|
integer, intent(out) :: info
|
|
|
|
integer, intent(out) :: info
|
|
|
@ -91,9 +92,7 @@ subroutine mld_caggrmap_bld(aggr_type,a,desc_a,nlaggr,ilaggr,info)
|
|
|
|
! Local variables
|
|
|
|
! Local variables
|
|
|
|
integer, allocatable :: ils(:), neigh(:)
|
|
|
|
integer, allocatable :: ils(:), neigh(:)
|
|
|
|
integer :: icnt,nlp,k,n,ia,isz,nr, naggr,i,j,m
|
|
|
|
integer :: icnt,nlp,k,n,ia,isz,nr, naggr,i,j,m
|
|
|
|
type(psb_cspmat_type), target :: atmp, atrans
|
|
|
|
type(psb_cspmat_type) :: atmp, atrans
|
|
|
|
type(psb_cspmat_type), pointer :: apnt
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
logical :: recovery
|
|
|
|
logical :: recovery
|
|
|
|
integer :: debug_level, debug_unit
|
|
|
|
integer :: debug_level, debug_unit
|
|
|
|
integer :: ictxt,np,me,err_act
|
|
|
|
integer :: ictxt,np,me,err_act
|
|
|
@ -117,8 +116,93 @@ subroutine mld_caggrmap_bld(aggr_type,a,desc_a,nlaggr,ilaggr,info)
|
|
|
|
ncol = psb_cd_get_local_cols(desc_a)
|
|
|
|
ncol = psb_cd_get_local_cols(desc_a)
|
|
|
|
|
|
|
|
|
|
|
|
select case (aggr_type)
|
|
|
|
select case (aggr_type)
|
|
|
|
case (mld_dec_aggr_,mld_sym_dec_aggr_)
|
|
|
|
case (mld_dec_aggr_)
|
|
|
|
|
|
|
|
call mld_dec_map_bld(theta,a,desc_a,nlaggr,ilaggr,info)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
case (mld_sym_dec_aggr_)
|
|
|
|
|
|
|
|
nr = psb_sp_get_nrows(a)
|
|
|
|
|
|
|
|
call psb_sp_clip(a,atmp,info,imax=nr,jmax=nr,&
|
|
|
|
|
|
|
|
& rscale=.false.,cscale=.false.)
|
|
|
|
|
|
|
|
atmp%m=nr
|
|
|
|
|
|
|
|
atmp%k=nr
|
|
|
|
|
|
|
|
if (info == 0) call psb_transp(atmp,atrans,fmt='COO')
|
|
|
|
|
|
|
|
if (info == 0) call psb_rwextd(nr,atmp,info,b=atrans,rowscale=.false.)
|
|
|
|
|
|
|
|
atmp%m=nr
|
|
|
|
|
|
|
|
atmp%k=nr
|
|
|
|
|
|
|
|
if (info == 0) call psb_sp_free(atrans,info)
|
|
|
|
|
|
|
|
if (info == 0) call psb_ipcoo2csr(atmp,info)
|
|
|
|
|
|
|
|
if (info == 0) call mld_dec_map_bld(theta,atmp,desc_a,nlaggr,ilaggr,info)
|
|
|
|
|
|
|
|
if (info == 0) call psb_sp_free(atmp,info)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
case default
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
info = -1
|
|
|
|
|
|
|
|
call psb_errpush(30,name,i_err=(/1,aggr_type,0,0,0/))
|
|
|
|
|
|
|
|
goto 9999
|
|
|
|
|
|
|
|
end select
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (info/=0) then
|
|
|
|
|
|
|
|
info=4001
|
|
|
|
|
|
|
|
call psb_errpush(info,name,a_err='dec_map_bld')
|
|
|
|
|
|
|
|
goto 9999
|
|
|
|
|
|
|
|
end if
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
call psb_erractionrestore(err_act)
|
|
|
|
|
|
|
|
return
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9999 continue
|
|
|
|
|
|
|
|
call psb_erractionrestore(err_act)
|
|
|
|
|
|
|
|
if (err_act.eq.psb_act_abort_) then
|
|
|
|
|
|
|
|
call psb_error()
|
|
|
|
|
|
|
|
return
|
|
|
|
|
|
|
|
end if
|
|
|
|
|
|
|
|
return
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
contains
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
subroutine mld_dec_map_bld(theta,a,desc_a,nlaggr,ilaggr,info)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
use psb_base_mod
|
|
|
|
|
|
|
|
use mld_inner_mod !, mld_protect_name => mld_daggrmap_bld
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
implicit none
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
! Arguments
|
|
|
|
|
|
|
|
type(psb_cspmat_type), intent(in) :: a
|
|
|
|
|
|
|
|
type(psb_desc_type), intent(in) :: desc_a
|
|
|
|
|
|
|
|
real(psb_spk_), intent(in) :: theta
|
|
|
|
|
|
|
|
integer, allocatable, intent(out) :: ilaggr(:),nlaggr(:)
|
|
|
|
|
|
|
|
integer, intent(out) :: info
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
! Local variables
|
|
|
|
|
|
|
|
integer, allocatable :: ils(:), neigh(:), irow(:), icol(:)
|
|
|
|
|
|
|
|
complex(psb_spk_), allocatable :: val(:), diag(:)
|
|
|
|
|
|
|
|
integer :: icnt,nlp,k,n,ia,isz,nr, naggr,i,j,m, nz
|
|
|
|
|
|
|
|
real(psb_spk_) :: cpling, tcl
|
|
|
|
|
|
|
|
logical :: recovery
|
|
|
|
|
|
|
|
integer :: debug_level, debug_unit
|
|
|
|
|
|
|
|
integer :: ictxt,np,me,err_act
|
|
|
|
|
|
|
|
integer :: nrow, ncol, n_ne
|
|
|
|
|
|
|
|
character(len=20) :: name, ch_err
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if(psb_get_errstatus() /= 0) return
|
|
|
|
|
|
|
|
info=0
|
|
|
|
|
|
|
|
name = 'mld_dec_map_bld'
|
|
|
|
|
|
|
|
call psb_erractionsave(err_act)
|
|
|
|
|
|
|
|
debug_unit = psb_get_debug_unit()
|
|
|
|
|
|
|
|
debug_level = psb_get_debug_level()
|
|
|
|
|
|
|
|
!
|
|
|
|
|
|
|
|
! Note. At the time being we are ignoring aggr_type so
|
|
|
|
|
|
|
|
! that we only have decoupled aggregation. This might
|
|
|
|
|
|
|
|
! change in the future.
|
|
|
|
|
|
|
|
!
|
|
|
|
|
|
|
|
ictxt=psb_cd_get_context(desc_a)
|
|
|
|
|
|
|
|
call psb_info(ictxt,me,np)
|
|
|
|
|
|
|
|
nrow = psb_cd_get_local_rows(desc_a)
|
|
|
|
|
|
|
|
ncol = psb_cd_get_local_cols(desc_a)
|
|
|
|
|
|
|
|
|
|
|
|
nr = a%m
|
|
|
|
nr = a%m
|
|
|
|
allocate(ilaggr(nr),neigh(nr),stat=info)
|
|
|
|
allocate(ilaggr(nr),neigh(nr),stat=info)
|
|
|
|
if(info /= 0) then
|
|
|
|
if(info /= 0) then
|
|
|
@ -128,36 +212,28 @@ subroutine mld_caggrmap_bld(aggr_type,a,desc_a,nlaggr,ilaggr,info)
|
|
|
|
goto 9999
|
|
|
|
goto 9999
|
|
|
|
end if
|
|
|
|
end if
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
allocate(diag(nr),stat=info)
|
|
|
|
|
|
|
|
if(info /= 0) then
|
|
|
|
|
|
|
|
info=4025
|
|
|
|
|
|
|
|
call psb_errpush(info,name,i_err=(/nr,0,0,0,0/),&
|
|
|
|
|
|
|
|
& a_err='complex(psb_spk_)')
|
|
|
|
|
|
|
|
goto 9999
|
|
|
|
|
|
|
|
end if
|
|
|
|
|
|
|
|
call psb_sp_getdiag(a,diag,info)
|
|
|
|
|
|
|
|
if(info /= 0) then
|
|
|
|
|
|
|
|
info=4010
|
|
|
|
|
|
|
|
call psb_errpush(info,name,a_err='psb_sp_getdiag')
|
|
|
|
|
|
|
|
goto 9999
|
|
|
|
|
|
|
|
end if
|
|
|
|
|
|
|
|
|
|
|
|
do i=1, nr
|
|
|
|
do i=1, nr
|
|
|
|
ilaggr(i) = -(nr+1)
|
|
|
|
ilaggr(i) = -(nr+1)
|
|
|
|
end do
|
|
|
|
end do
|
|
|
|
if (aggr_type == mld_dec_aggr_) then
|
|
|
|
|
|
|
|
apnt => a
|
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
call psb_sp_clip(a,atmp,info,imax=nr,jmax=nr,&
|
|
|
|
|
|
|
|
& rscale=.false.,cscale=.false.)
|
|
|
|
|
|
|
|
atmp%m=nr
|
|
|
|
|
|
|
|
atmp%k=nr
|
|
|
|
|
|
|
|
if (info == 0) call psb_transp(atmp,atrans,fmt='COO')
|
|
|
|
|
|
|
|
if (info == 0) call psb_rwextd(nr,atmp,info,b=atrans,rowscale=.false.)
|
|
|
|
|
|
|
|
atmp%m=nr
|
|
|
|
|
|
|
|
atmp%k=nr
|
|
|
|
|
|
|
|
if (info == 0) call psb_sp_free(atrans,info)
|
|
|
|
|
|
|
|
if (info == 0) call psb_ipcoo2csr(atmp,info)
|
|
|
|
|
|
|
|
apnt => atmp
|
|
|
|
|
|
|
|
if (info/=0) then
|
|
|
|
|
|
|
|
info=4001
|
|
|
|
|
|
|
|
call psb_errpush(info,name,a_err='init apnt')
|
|
|
|
|
|
|
|
goto 9999
|
|
|
|
|
|
|
|
end if
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
end if
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
! Note: -(nr+1) Untouched as yet
|
|
|
|
! Note: -(nr+1) Untouched as yet
|
|
|
|
! -i 1<=i<=nr Adjacent to aggregate i
|
|
|
|
! -i 1<=i<=nr Adjacent to aggregate i
|
|
|
|
! i 1<=i<=nr Belonging to aggregate i
|
|
|
|
! i 1<=i<=nr Belonging to aggregate i
|
|
|
|
|
|
|
|
|
|
|
|
!
|
|
|
|
!
|
|
|
|
! Phase one: group nodes together.
|
|
|
|
! Phase one: group nodes together.
|
|
|
|
! Very simple minded strategy.
|
|
|
|
! Very simple minded strategy.
|
|
|
@ -172,26 +248,32 @@ subroutine mld_caggrmap_bld(aggr_type,a,desc_a,nlaggr,ilaggr,info)
|
|
|
|
! 1. Untouched nodes are marked >0 together
|
|
|
|
! 1. Untouched nodes are marked >0 together
|
|
|
|
! with their neighbours
|
|
|
|
! with their neighbours
|
|
|
|
!
|
|
|
|
!
|
|
|
|
icnt = icnt + 1
|
|
|
|
icnt = icnt + 1
|
|
|
|
naggr = naggr + 1
|
|
|
|
naggr = naggr + 1
|
|
|
|
ilaggr(i) = naggr
|
|
|
|
ilaggr(i) = naggr
|
|
|
|
|
|
|
|
|
|
|
|
call psb_neigh(apnt,i,neigh,n_ne,info,lev=1)
|
|
|
|
call psb_sp_getrow(i,a,nz,irow,icol,val,info)
|
|
|
|
if (info/=0) then
|
|
|
|
if (info/=0) then
|
|
|
|
info=4010
|
|
|
|
info=4010
|
|
|
|
call psb_errpush(info,name,a_err='psb_neigh')
|
|
|
|
call psb_errpush(info,name,a_err='psb_sp_getrow')
|
|
|
|
goto 9999
|
|
|
|
goto 9999
|
|
|
|
end if
|
|
|
|
end if
|
|
|
|
do k=1, n_ne
|
|
|
|
|
|
|
|
j = neigh(k)
|
|
|
|
do k=1, nz
|
|
|
|
if ((1<=j).and.(j<=nr)) then
|
|
|
|
j = icol(k)
|
|
|
|
ilaggr(j) = naggr
|
|
|
|
if ((1<=j).and.(j<=nr).and.(i/=j)) then
|
|
|
|
endif
|
|
|
|
if (abs(val(k)) > theta*sqrt(abs(diag(i)*diag(j)))) then
|
|
|
|
|
|
|
|
ilaggr(j) = naggr
|
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
ilaggr(j) = -naggr
|
|
|
|
|
|
|
|
endif
|
|
|
|
|
|
|
|
end if
|
|
|
|
enddo
|
|
|
|
enddo
|
|
|
|
|
|
|
|
|
|
|
|
!
|
|
|
|
!
|
|
|
|
! 2. Untouched neighbours of these nodes are marked <0.
|
|
|
|
! 2. Untouched neighbours of these nodes are marked <0.
|
|
|
|
!
|
|
|
|
!
|
|
|
|
call psb_neigh(apnt,i,neigh,n_ne,info,lev=2)
|
|
|
|
call psb_neigh(a,i,neigh,n_ne,info,lev=2)
|
|
|
|
if (info/=0) then
|
|
|
|
if (info/=0) then
|
|
|
|
info=4010
|
|
|
|
info=4010
|
|
|
|
call psb_errpush(info,name,a_err='psb_neigh')
|
|
|
|
call psb_errpush(info,name,a_err='psb_neigh')
|
|
|
@ -218,7 +300,7 @@ subroutine mld_caggrmap_bld(aggr_type,a,desc_a,nlaggr,ilaggr,info)
|
|
|
|
!
|
|
|
|
!
|
|
|
|
! Phase two: sweep over leftovers.
|
|
|
|
! Phase two: sweep over leftovers.
|
|
|
|
!
|
|
|
|
!
|
|
|
|
allocate(ils(naggr+10),stat=info)
|
|
|
|
allocate(ils(nr),stat=info)
|
|
|
|
if(info /= 0) then
|
|
|
|
if(info /= 0) then
|
|
|
|
info=4025
|
|
|
|
info=4025
|
|
|
|
call psb_errpush(info,name,i_err=(/naggr+10,0,0,0,0/),&
|
|
|
|
call psb_errpush(info,name,i_err=(/naggr+10,0,0,0,0/),&
|
|
|
@ -254,57 +336,55 @@ subroutine mld_caggrmap_bld(aggr_type,a,desc_a,nlaggr,ilaggr,info)
|
|
|
|
if (ilaggr(i) < 0) then
|
|
|
|
if (ilaggr(i) < 0) then
|
|
|
|
!
|
|
|
|
!
|
|
|
|
! Now some silly rule to break ties:
|
|
|
|
! Now some silly rule to break ties:
|
|
|
|
! Group with smallest adjacent aggregate.
|
|
|
|
! Group with adjacent aggregate.
|
|
|
|
!
|
|
|
|
!
|
|
|
|
isz = nr+1
|
|
|
|
isz = nr+1
|
|
|
|
ia = -1
|
|
|
|
ia = -1
|
|
|
|
|
|
|
|
cpling = 0.0
|
|
|
|
call psb_neigh(apnt,i,neigh,n_ne,info,lev=1)
|
|
|
|
call psb_sp_getrow(i,a,nz,irow,icol,val,info)
|
|
|
|
if (info/=0) then
|
|
|
|
if (info/=0) then
|
|
|
|
info=4010
|
|
|
|
info=4010
|
|
|
|
call psb_errpush(info,name,a_err='psb_neigh')
|
|
|
|
call psb_errpush(info,name,a_err='psb_sp_getrow')
|
|
|
|
goto 9999
|
|
|
|
goto 9999
|
|
|
|
end if
|
|
|
|
end if
|
|
|
|
|
|
|
|
|
|
|
|
do j=1, n_ne
|
|
|
|
do j=1, nz
|
|
|
|
k = neigh(j)
|
|
|
|
k = icol(j)
|
|
|
|
if ((1<=k).and.(k<=nr)) then
|
|
|
|
if ((1<=k).and.(k<=nr).and.(k/=i)) then
|
|
|
|
n = ilaggr(k)
|
|
|
|
tcl = abs(val(j)) / sqrt(abs(diag(i)*diag(k)))
|
|
|
|
if (n>0) then
|
|
|
|
if (abs(val(j)) > theta*sqrt(abs(diag(i)*diag(k)))) then
|
|
|
|
if (n>naggr) then
|
|
|
|
!!$ if (tcl > theta) then
|
|
|
|
info=4001
|
|
|
|
n = ilaggr(k)
|
|
|
|
call psb_errpush(info,name,a_err='loc_Aggregate: n > naggr 2 ?')
|
|
|
|
if (n>0) then
|
|
|
|
goto 9999
|
|
|
|
if (n>naggr) then
|
|
|
|
end if
|
|
|
|
info=4001
|
|
|
|
|
|
|
|
call psb_errpush(info,name,a_err='loc_Aggregate: n > naggr 2 ?')
|
|
|
|
if (ils(n) < isz) then
|
|
|
|
goto 9999
|
|
|
|
ia = n
|
|
|
|
end if
|
|
|
|
isz = ils(n)
|
|
|
|
|
|
|
|
|
|
|
|
if ((abs(val(j))>cpling) .or. &
|
|
|
|
|
|
|
|
& ((abs(val(j)) == cpling).and. (ils(n) < isz))) then
|
|
|
|
|
|
|
|
!!$ if ((tcl > cpling) .or. ((tcl == cpling).and. (ils(n) < isz))) then
|
|
|
|
|
|
|
|
ia = n
|
|
|
|
|
|
|
|
isz = ils(n)
|
|
|
|
|
|
|
|
cpling = abs(val(j))
|
|
|
|
|
|
|
|
!!$ cpling = tcl
|
|
|
|
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
end if
|
|
|
|
enddo
|
|
|
|
enddo
|
|
|
|
|
|
|
|
|
|
|
|
if (ia == -1) then
|
|
|
|
if (ia == -1) then
|
|
|
|
if (ilaggr(i) > -(nr+1)) then
|
|
|
|
! At this point, the easiest thing is to start a new aggregate
|
|
|
|
ilaggr(i) = abs(ilaggr(i))
|
|
|
|
naggr = naggr + 1
|
|
|
|
if (ilaggr(I)>naggr) then
|
|
|
|
ilaggr(i) = naggr
|
|
|
|
info=4001
|
|
|
|
ils(ilaggr(i)) = 1
|
|
|
|
call psb_errpush(info,name,a_err='loc_Aggregate: n > naggr 3 ?')
|
|
|
|
|
|
|
|
goto 9999
|
|
|
|
|
|
|
|
end if
|
|
|
|
|
|
|
|
ils(ilaggr(i)) = ils(ilaggr(i)) + 1
|
|
|
|
|
|
|
|
!
|
|
|
|
|
|
|
|
! This might happen if the pattern is non symmetric.
|
|
|
|
|
|
|
|
! Need a better handling.
|
|
|
|
|
|
|
|
!
|
|
|
|
|
|
|
|
recovery = .true.
|
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
info=4001
|
|
|
|
|
|
|
|
call psb_errpush(info,name,a_err='Unrecoverable error !!')
|
|
|
|
|
|
|
|
goto 9999
|
|
|
|
|
|
|
|
endif
|
|
|
|
|
|
|
|
else
|
|
|
|
else
|
|
|
|
|
|
|
|
|
|
|
|
ilaggr(i) = ia
|
|
|
|
ilaggr(i) = ia
|
|
|
|
|
|
|
|
|
|
|
|
if (ia>naggr) then
|
|
|
|
if (ia>naggr) then
|
|
|
|
info=4001
|
|
|
|
info=4001
|
|
|
|
call psb_errpush(info,name,a_err='loc_Aggregate: n > naggr 4? ')
|
|
|
|
call psb_errpush(info,name,a_err='loc_Aggregate: n > naggr 4? ')
|
|
|
@ -312,8 +392,9 @@ subroutine mld_caggrmap_bld(aggr_type,a,desc_a,nlaggr,ilaggr,info)
|
|
|
|
end if
|
|
|
|
end if
|
|
|
|
ils(ia) = ils(ia) + 1
|
|
|
|
ils(ia) = ils(ia) + 1
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
|
|
|
|
|
|
|
end if
|
|
|
|
end if
|
|
|
|
enddo
|
|
|
|
end do
|
|
|
|
if (debug_level >= psb_debug_outer_) then
|
|
|
|
if (debug_level >= psb_debug_outer_) then
|
|
|
|
if (recovery) then
|
|
|
|
if (recovery) then
|
|
|
|
write(debug_unit,*) me,' ',trim(name),&
|
|
|
|
write(debug_unit,*) me,' ',trim(name),&
|
|
|
@ -345,6 +426,12 @@ subroutine mld_caggrmap_bld(aggr_type,a,desc_a,nlaggr,ilaggr,info)
|
|
|
|
call psb_errpush(info,name)
|
|
|
|
call psb_errpush(info,name)
|
|
|
|
goto 9999
|
|
|
|
goto 9999
|
|
|
|
end if
|
|
|
|
end if
|
|
|
|
|
|
|
|
if (naggr > ncol) then
|
|
|
|
|
|
|
|
write(0,*) name,'Error : naggr > ncol',naggr,ncol
|
|
|
|
|
|
|
|
info=4001
|
|
|
|
|
|
|
|
call psb_errpush(info,name,a_err='Fatal error: naggr>ncol')
|
|
|
|
|
|
|
|
goto 9999
|
|
|
|
|
|
|
|
end if
|
|
|
|
|
|
|
|
|
|
|
|
call psb_realloc(ncol,ilaggr,info)
|
|
|
|
call psb_realloc(ncol,ilaggr,info)
|
|
|
|
if (info/=0) then
|
|
|
|
if (info/=0) then
|
|
|
@ -366,26 +453,17 @@ subroutine mld_caggrmap_bld(aggr_type,a,desc_a,nlaggr,ilaggr,info)
|
|
|
|
nlaggr(me+1) = naggr
|
|
|
|
nlaggr(me+1) = naggr
|
|
|
|
call psb_sum(ictxt,nlaggr(1:np))
|
|
|
|
call psb_sum(ictxt,nlaggr(1:np))
|
|
|
|
|
|
|
|
|
|
|
|
if (aggr_type == mld_sym_dec_aggr_) then
|
|
|
|
call psb_erractionrestore(err_act)
|
|
|
|
call psb_sp_free(atmp,info)
|
|
|
|
return
|
|
|
|
end if
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
case default
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
info = -1
|
|
|
|
|
|
|
|
call psb_errpush(30,name,i_err=(/1,aggr_type,0,0,0/))
|
|
|
|
|
|
|
|
goto 9999
|
|
|
|
|
|
|
|
end select
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
call psb_erractionrestore(err_act)
|
|
|
|
|
|
|
|
return
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9999 continue
|
|
|
|
9999 continue
|
|
|
|
call psb_erractionrestore(err_act)
|
|
|
|
call psb_erractionrestore(err_act)
|
|
|
|
if (err_act.eq.psb_act_abort_) then
|
|
|
|
if (err_act.eq.psb_act_abort_) then
|
|
|
|
call psb_error()
|
|
|
|
call psb_error()
|
|
|
|
|
|
|
|
return
|
|
|
|
|
|
|
|
end if
|
|
|
|
return
|
|
|
|
return
|
|
|
|
end if
|
|
|
|
|
|
|
|
return
|
|
|
|
end subroutine mld_dec_map_bld
|
|
|
|
|
|
|
|
|
|
|
|
end subroutine mld_caggrmap_bld
|
|
|
|
end subroutine mld_caggrmap_bld
|
|
|
|