mirror of
https://github.com/sfilippone/psblas3.git
synced 2026-10-20 21:02:26 +00:00
[FIX] Modified spmv test to check overlap
This commit is contained in:
@@ -176,7 +176,11 @@ subroutine psb_dspmv_vect(alpha,a,x,beta,y,desc_a,info,&
|
||||
!if (me==0) write(0,*) 'going for overlap ',a%ad%get_fmt(),' ',a%and%get_fmt()
|
||||
if (do_timings) call psb_barrier(ctxt)
|
||||
if (do_timings) call psb_tic(mv_phase1)
|
||||
if (doswap_) call psi_swapdata(psb_comm_status_start_, dzero, x%v, desc_a, info, data=psb_comm_halo_)
|
||||
if (doswap_) then
|
||||
call psi_swapdata(psb_comm_status_start_, dzero, x%v, desc_a, info, data=psb_comm_halo_)
|
||||
else
|
||||
call psi_swapdata(psb_comm_status_sync_, dzero, x%v, desc_a, info, data=psb_comm_halo_)
|
||||
end if
|
||||
if (do_timings) call psb_toc(mv_phase1)
|
||||
if (do_timings) call psb_tic(mv_phase2)
|
||||
call a%ad%spmm(alpha,x%v,beta,y%v,info)
|
||||
@@ -195,9 +199,7 @@ subroutine psb_dspmv_vect(alpha,a,x,beta,y,desc_a,info,&
|
||||
if (do_timings) call psb_barrier(ctxt)
|
||||
|
||||
if (do_timings) call psb_tic(mv_phase11)
|
||||
if (doswap_) then
|
||||
call psi_swapdata(psb_comm_status_sync_, dzero, x%v, desc_a, info, data=psb_comm_halo_)
|
||||
end if
|
||||
call psi_swapdata(psb_comm_status_sync_, dzero, x%v, desc_a, info, data=psb_comm_halo_)
|
||||
if (do_timings) call psb_toc(mv_phase11)
|
||||
if (do_timings) call psb_tic(mv_phase12)
|
||||
call psb_csmm(alpha,a,x,beta,y,info)
|
||||
|
||||
@@ -184,44 +184,7 @@ subroutine psb_dspasb(a,desc_a, info, afmt, upd, mold, dupl, bld_and)
|
||||
end if
|
||||
|
||||
if (bld_and_) then
|
||||
!!$ allocate(a%ad,mold=a%a)
|
||||
!!$ allocate(a%and,mold=a%a)o
|
||||
!!$ call a%split_nd(n_row,n_col,info)
|
||||
!!$ block
|
||||
!!$ character(len=1024) :: fname
|
||||
!!$ type(psb_d_coo_sparse_mat) :: acoo
|
||||
!!$ type(psb_d_csr_sparse_mat), allocatable :: aclip
|
||||
!!$ type(psb_d_ecsr_sparse_mat), allocatable :: andclip
|
||||
!!$ logical, parameter :: use_ecsr=.true.
|
||||
!!$ allocate(aclip)
|
||||
!!$ call a%a%csclip(acoo,info,jmax=n_row,rscale=.false.,cscale=.false.)
|
||||
!!$ allocate(a%ad,mold=a%a)
|
||||
!!$ call a%ad%mv_from_coo(acoo,info)
|
||||
!!$ call a%a%csclip(acoo,info,jmin=n_row+1,jmax=n_col,rscale=.false.,cscale=.false.)
|
||||
!!$ if (use_ecsr) then
|
||||
!!$ allocate(andclip)
|
||||
!!$ call andclip%mv_from_coo(acoo,info)
|
||||
!!$ call move_alloc(andclip,a%and)
|
||||
!!$ else
|
||||
!!$ allocate(a%and,mold=a%a)
|
||||
!!$ call a%and%mv_from_coo(acoo,info)
|
||||
!!$ end if
|
||||
!!$ if (.false.) then
|
||||
!!$ write(fname,'(a,i2.2,a)') 'adclip_',me,'.mtx'
|
||||
!!$ open(25,file=fname)
|
||||
!!$ call a%ad%print(25)
|
||||
!!$ close(25)
|
||||
!!$ write(fname,'(a,i2.2,a)') 'andclip_',me,'.mtx'
|
||||
!!$ open(25,file=fname)
|
||||
!!$ call a%and%print(25)
|
||||
!!$ close(25)
|
||||
!!$ !call andclip%set_cols(n_col)
|
||||
!!$ write(*,*) me,' ',trim(name),' ad ',&
|
||||
!!$ &a%ad%get_nrows(),a%ad%get_ncols(),n_row,n_col
|
||||
!!$ write(*,*) me,' ',trim(name),' and ',&
|
||||
!!$ &a%and%get_nrows(),a%and%get_ncols(),n_row,n_col
|
||||
!!$ end if
|
||||
!!$ end block
|
||||
call a%split_nd(n_row,n_col,info)
|
||||
else
|
||||
if (allocated(a%ad)) deallocate(a%ad)
|
||||
if (allocated(a%and)) deallocate(a%and)
|
||||
|
||||
Reference in New Issue
Block a user