|
|
@ -119,8 +119,6 @@ subroutine psb_ccmp_spmatval(a,val,tol,desc_a,res,info)
|
|
|
|
integer(psb_ipk_) :: err_act
|
|
|
|
integer(psb_ipk_) :: err_act
|
|
|
|
character(len=20) :: name, ch_err
|
|
|
|
character(len=20) :: name, ch_err
|
|
|
|
integer(psb_ipk_) :: debug_level, debug_unit
|
|
|
|
integer(psb_ipk_) :: debug_level, debug_unit
|
|
|
|
integer(psb_lpk_) :: m,n,ia,ja
|
|
|
|
|
|
|
|
integer(psb_ipk_) :: iia,jja
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
name='psb_ccmp_spmatval'
|
|
|
|
name='psb_ccmp_spmatval'
|
|
|
|
info=psb_success_
|
|
|
|
info=psb_success_
|
|
|
@ -139,21 +137,13 @@ subroutine psb_ccmp_spmatval(a,val,tol,desc_a,res,info)
|
|
|
|
goto 9999
|
|
|
|
goto 9999
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
|
|
|
|
|
|
|
ia = 1
|
|
|
|
if (.not.((desc_a%get_local_rows() == a%get_nrows())&
|
|
|
|
ja = 1
|
|
|
|
.and.(desc_a%get_local_cols() == a%get_ncols()))) then
|
|
|
|
m = desc_a%get_global_rows()
|
|
|
|
res = .false.
|
|
|
|
n = desc_a%get_global_cols()
|
|
|
|
else
|
|
|
|
! checking for matrix correctness
|
|
|
|
res = a%spcmp(val,tol,info)
|
|
|
|
call psb_chkmat(m,n,ia,ja,desc_a,info,iia,jja)
|
|
|
|
|
|
|
|
if(info /= psb_success_) then
|
|
|
|
|
|
|
|
info=psb_err_from_subroutine_
|
|
|
|
|
|
|
|
ch_err='psb_chkmat'
|
|
|
|
|
|
|
|
call psb_errpush(info,name,a_err=ch_err)
|
|
|
|
|
|
|
|
goto 9999
|
|
|
|
|
|
|
|
end if
|
|
|
|
end if
|
|
|
|
|
|
|
|
|
|
|
|
res = a%spcmp(val,tol,info)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
call psb_lallreduceand(ictxt,res)
|
|
|
|
call psb_lallreduceand(ictxt,res)
|
|
|
|
|
|
|
|
|
|
|
|
call psb_erractionrestore(err_act)
|
|
|
|
call psb_erractionrestore(err_act)
|
|
|
@ -183,8 +173,6 @@ subroutine psb_ccmp_spmat(a,b,tol,desc_a,res,info)
|
|
|
|
integer(psb_ipk_) :: err_act
|
|
|
|
integer(psb_ipk_) :: err_act
|
|
|
|
character(len=20) :: name, ch_err
|
|
|
|
character(len=20) :: name, ch_err
|
|
|
|
integer(psb_ipk_) :: debug_level, debug_unit
|
|
|
|
integer(psb_ipk_) :: debug_level, debug_unit
|
|
|
|
integer(psb_lpk_) :: m,n,ia,ja,ib,jb
|
|
|
|
|
|
|
|
integer(psb_ipk_) :: iia,jja,iib,jjb
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
name='psb_ccmp_spmatval'
|
|
|
|
name='psb_ccmp_spmatval'
|
|
|
|
info=psb_success_
|
|
|
|
info=psb_success_
|
|
|
@ -203,32 +191,18 @@ subroutine psb_ccmp_spmat(a,b,tol,desc_a,res,info)
|
|
|
|
goto 9999
|
|
|
|
goto 9999
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
|
|
|
|
|
|
|
ia = 1
|
|
|
|
if (.not.((desc_a%get_local_rows() == a%get_nrows())&
|
|
|
|
ja = 1
|
|
|
|
.and.(desc_a%get_local_rows() == b%get_nrows())&
|
|
|
|
ib = 1
|
|
|
|
.and.(desc_a%get_local_cols() == a%get_ncols())&
|
|
|
|
jb = 1
|
|
|
|
.and.(desc_a%get_local_cols() == b%get_ncols()))) then
|
|
|
|
m = desc_a%get_global_rows()
|
|
|
|
res = .false.
|
|
|
|
n = desc_a%get_global_cols()
|
|
|
|
else
|
|
|
|
! checking for matrix correctness
|
|
|
|
res = a%spcmp(b,tol,info)
|
|
|
|
call psb_chkmat(m,n,ia,ja,desc_a,info,iia,jja)
|
|
|
|
|
|
|
|
if(info /= psb_success_) then
|
|
|
|
|
|
|
|
info=psb_err_from_subroutine_
|
|
|
|
|
|
|
|
ch_err='psb_chkmat_1'
|
|
|
|
|
|
|
|
call psb_errpush(info,name,a_err=ch_err)
|
|
|
|
|
|
|
|
goto 9999
|
|
|
|
|
|
|
|
end if
|
|
|
|
|
|
|
|
call psb_chkmat(m,n,ib,jb,desc_a,info,iib,jjb)
|
|
|
|
|
|
|
|
if(info /= psb_success_) then
|
|
|
|
|
|
|
|
info=psb_err_from_subroutine_
|
|
|
|
|
|
|
|
ch_err='psb_chkmat_2'
|
|
|
|
|
|
|
|
call psb_errpush(info,name,a_err=ch_err)
|
|
|
|
|
|
|
|
goto 9999
|
|
|
|
|
|
|
|
end if
|
|
|
|
end if
|
|
|
|
|
|
|
|
|
|
|
|
res = a%spcmp(b,tol,info)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
call psb_lallreduceand(ictxt,res)
|
|
|
|
call psb_lallreduceand(ictxt,res)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
call psb_erractionrestore(err_act)
|
|
|
|
call psb_erractionrestore(err_act)
|
|
|
|
if (debug_level >= psb_debug_comp_) then
|
|
|
|
if (debug_level >= psb_debug_comp_) then
|
|
|
|
call psb_barrier(ictxt)
|
|
|
|
call psb_barrier(ictxt)
|
|
|
|