|
|
|
@ -67,6 +67,7 @@ program pdgenspmv
|
|
|
|
integer(psb_ipk_) :: times
|
|
|
|
integer(psb_ipk_) :: times
|
|
|
|
integer(psb_ipk_), parameter :: iwarm=2
|
|
|
|
integer(psb_ipk_), parameter :: iwarm=2
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
logical :: indirect_remote_get
|
|
|
|
! other variables
|
|
|
|
! other variables
|
|
|
|
integer(psb_ipk_) :: info, i
|
|
|
|
integer(psb_ipk_) :: info, i
|
|
|
|
character(len=20) :: name,ch_err
|
|
|
|
character(len=20) :: name,ch_err
|
|
|
|
@ -154,7 +155,8 @@ program pdgenspmv
|
|
|
|
call psb_barrier(ictxt)
|
|
|
|
call psb_barrier(ictxt)
|
|
|
|
th = psb_wtime() - tt1
|
|
|
|
th = psb_wtime() - tt1
|
|
|
|
call psb_amx(ictxt,th)
|
|
|
|
call psb_amx(ictxt,th)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
indirect_remote_get = .false.
|
|
|
|
if (.true.) then
|
|
|
|
if (.true.) then
|
|
|
|
associate(xchg => desc_a%halo_xch)
|
|
|
|
associate(xchg => desc_a%halo_xch)
|
|
|
|
! FIXME: cache flush needed here
|
|
|
|
! FIXME: cache flush needed here
|
|
|
|
@ -165,19 +167,19 @@ program pdgenspmv
|
|
|
|
do i=1,iwarm
|
|
|
|
do i=1,iwarm
|
|
|
|
! Sync images
|
|
|
|
! Sync images
|
|
|
|
sync images(xchg%prcs_xch+1)
|
|
|
|
sync images(xchg%prcs_xch+1)
|
|
|
|
if (.false.) then
|
|
|
|
if (indirect_remote_get) then
|
|
|
|
do ip = 1, nxch
|
|
|
|
do ip = 1, nxch
|
|
|
|
img = xchg%prcs_xch(ip) + 1
|
|
|
|
img = xchg%prcs_xch(ip) + 1
|
|
|
|
p1 = xchg%loc_rcv_bnd(ip)
|
|
|
|
p1 = xchg%loc_rcv_bnd(ip)
|
|
|
|
p2 = xchg%loc_rcv_bnd(ip+1)-1
|
|
|
|
p2 = xchg%loc_rcv_bnd(ip+1)-1
|
|
|
|
!!$ if (this_image()==2) write(0,*) this_image(),'Boundaries ',&
|
|
|
|
!!$ if (this_image()==2) write(0,*) this_image(),'Boundaries ',&
|
|
|
|
!!$ & p1,p2,' :',xchg%loc_rcv_idx(p1:p2),':',xchg%rmt_rcv_idx(p1:p2)
|
|
|
|
!!$ & p1,p2,' :',xchg%loc_rcv_idx(p1:p2),':',xchg%rmt_rcv_idx(p1:p2)
|
|
|
|
!!$ xvc(xchg%loc_rcv_idx(p1:p2)) = xvc(xchg%rmt_rcv_idx(p1:p2))[img]
|
|
|
|
!!$ xvc(xchg%loc_rcv_idx(p1:p2)) = xvc(xchg%rmt_rcv_idx(p1:p2))[img]
|
|
|
|
|
|
|
|
|
|
|
|
temp(p1:p2) = xvc(xchg%rmt_rcv_idx(p1:p2))[img]
|
|
|
|
temp(p1:p2) = xvc(xchg%rmt_rcv_idx(p1:p2))[img]
|
|
|
|
!!$ xvc(xchg%loc_rcv_idx(p1:p2)) = temp(p1:p2)
|
|
|
|
xvc(xchg%loc_rcv_idx(p1:p2)) = temp(p1:p2)
|
|
|
|
!!$ if (this_image()==2) write(0,*) this_image(),' :x: ',ip,' : ',&
|
|
|
|
!!$ if (this_image()==2) write(0,*) this_image(),' :x: ',ip,' : ',&
|
|
|
|
!!$ &xvc(xchg%loc_rcv_idx(p1:p2)),' : ',xv%v%v(xchg%loc_rcv_idx(p1:p2))
|
|
|
|
!!$ &xvc(xchg%loc_rcv_idx(p1:p2)),' : ',xv%v%v(xchg%loc_rcv_idx(p1:p2))
|
|
|
|
end do
|
|
|
|
end do
|
|
|
|
!!$ if (this_image()==2) write(0,*) this_image(),' :x: ',&
|
|
|
|
!!$ if (this_image()==2) write(0,*) this_image(),' :x: ',&
|
|
|
|
!!$ &xvc(nrl+1:ncl),' : ',xv%v%v(nrl+1:ncl)
|
|
|
|
!!$ &xvc(nrl+1:ncl),' : ',xv%v%v(nrl+1:ncl)
|
|
|
|
@ -188,8 +190,8 @@ program pdgenspmv
|
|
|
|
p1 = xchg%loc_snd_bnd(ip)
|
|
|
|
p1 = xchg%loc_snd_bnd(ip)
|
|
|
|
p2 = xchg%loc_snd_bnd(ip+1)-1
|
|
|
|
p2 = xchg%loc_snd_bnd(ip+1)-1
|
|
|
|
!xvc(xchg%loc_rcv_idx(p1:p2)) = xvc(xchg%rmt_rcv_idx(p1:p2))[img]
|
|
|
|
!xvc(xchg%loc_rcv_idx(p1:p2)) = xvc(xchg%rmt_rcv_idx(p1:p2))[img]
|
|
|
|
write(0,*) this_image(),'Boundaries ',&
|
|
|
|
!!$ write(0,*) this_image(),'Boundaries ',&
|
|
|
|
& p1,p2,' :',xchg%loc_snd_idx(p1:p2),':',xchg%rmt_snd_idx(p1:p2)
|
|
|
|
!!$ & p1,p2,' :',xchg%loc_snd_idx(p1:p2),':',xchg%rmt_snd_idx(p1:p2)
|
|
|
|
temp(p1:p2) = xvc(xchg%loc_snd_idx(p1:p2))
|
|
|
|
temp(p1:p2) = xvc(xchg%loc_snd_idx(p1:p2))
|
|
|
|
xvc(xchg%rmt_snd_idx(p1:p2))[img] = temp(p1:p2)
|
|
|
|
xvc(xchg%rmt_snd_idx(p1:p2))[img] = temp(p1:p2)
|
|
|
|
end do
|
|
|
|
end do
|
|
|
|
@ -208,7 +210,7 @@ program pdgenspmv
|
|
|
|
!!$ event post(ready[img])
|
|
|
|
!!$ event post(ready[img])
|
|
|
|
!!$ end do
|
|
|
|
!!$ end do
|
|
|
|
!!$ event wait(ready, until_count=nxch)
|
|
|
|
!!$ event wait(ready, until_count=nxch)
|
|
|
|
if (.true.) then
|
|
|
|
if (indirect_remote_get) then
|
|
|
|
do ip = 1, nxch
|
|
|
|
do ip = 1, nxch
|
|
|
|
img = xchg%prcs_xch(ip) + 1
|
|
|
|
img = xchg%prcs_xch(ip) + 1
|
|
|
|
sync images (img)
|
|
|
|
sync images (img)
|
|
|
|
|