|
|
@ -33,7 +33,7 @@
|
|
|
|
! File: psi_zswaptran.F90
|
|
|
|
! File: psi_zswaptran.F90
|
|
|
|
!
|
|
|
|
!
|
|
|
|
! Subroutine: psi_zswaptranm
|
|
|
|
! Subroutine: psi_zswaptranm
|
|
|
|
! Does the data exchange among processes. This is similar to Xswapdata, but
|
|
|
|
! Implements the data exchange among processes. This is similar to Xswapdata, but
|
|
|
|
! the list is read "in reverse", i.e. indices that are normally SENT are used
|
|
|
|
! the list is read "in reverse", i.e. indices that are normally SENT are used
|
|
|
|
! for the RECEIVE part and vice-versa. This is the basic data exchange operation
|
|
|
|
! for the RECEIVE part and vice-versa. This is the basic data exchange operation
|
|
|
|
! for doing the product of a sparse matrix by a vector.
|
|
|
|
! for doing the product of a sparse matrix by a vector.
|
|
|
@ -53,6 +53,7 @@
|
|
|
|
! Thus: for halo data exchange, the receive section is confined in the
|
|
|
|
! Thus: for halo data exchange, the receive section is confined in the
|
|
|
|
! halo indices, and BETA=0, whereas for overlap exchange the receive section
|
|
|
|
! halo indices, and BETA=0, whereas for overlap exchange the receive section
|
|
|
|
! is scattered in the owned indices, and BETA=1.
|
|
|
|
! is scattered in the owned indices, and BETA=1.
|
|
|
|
|
|
|
|
! The first routine picks the desired exchange index list and passes it to the second.
|
|
|
|
!
|
|
|
|
!
|
|
|
|
! Arguments:
|
|
|
|
! Arguments:
|
|
|
|
! flag - integer Choose the algorithm for data exchange:
|
|
|
|
! flag - integer Choose the algorithm for data exchange:
|
|
|
@ -73,10 +74,10 @@
|
|
|
|
!
|
|
|
|
!
|
|
|
|
!
|
|
|
|
!
|
|
|
|
! n - integer Number of columns in Y
|
|
|
|
! n - integer Number of columns in Y
|
|
|
|
! beta - X Choose overwrite or sum.
|
|
|
|
! beta - complex Choose overwrite or sum.
|
|
|
|
! y(:,:) - X The data area
|
|
|
|
! y(:,:) - complex The data area
|
|
|
|
! desc_a - type(psb_desc_type). The communication descriptor.
|
|
|
|
! desc_a - type(psb_desc_type). The communication descriptor.
|
|
|
|
! work(:) - X Buffer space. If not sufficient, will do
|
|
|
|
! work(:) - complex Buffer space. If not sufficient, will do
|
|
|
|
! our own internal allocation.
|
|
|
|
! our own internal allocation.
|
|
|
|
! info - integer. return code.
|
|
|
|
! info - integer. return code.
|
|
|
|
! data - integer which list is to be used to exchange data
|
|
|
|
! data - integer which list is to be used to exchange data
|
|
|
@ -241,7 +242,7 @@ subroutine psi_ztranidxm(iictxt,iicomm,flag,n,beta,y,idx,&
|
|
|
|
proc_to_comm = idx(pnti+psb_proc_id_)
|
|
|
|
proc_to_comm = idx(pnti+psb_proc_id_)
|
|
|
|
nerv = idx(pnti+psb_n_elem_recv_)
|
|
|
|
nerv = idx(pnti+psb_n_elem_recv_)
|
|
|
|
nesd = idx(pnti+nerv+psb_n_elem_send_)
|
|
|
|
nesd = idx(pnti+nerv+psb_n_elem_send_)
|
|
|
|
call psb_get_rank(prcid(proc_to_comm),ictxt,proc_to_comm)
|
|
|
|
prcid(proc_to_comm) = psb_get_mpi_rank(ictxt,proc_to_comm)
|
|
|
|
|
|
|
|
|
|
|
|
brvidx(proc_to_comm) = rcv_pt
|
|
|
|
brvidx(proc_to_comm) = rcv_pt
|
|
|
|
rvsz(proc_to_comm) = n*nerv
|
|
|
|
rvsz(proc_to_comm) = n*nerv
|
|
|
@ -359,7 +360,7 @@ subroutine psi_ztranidxm(iictxt,iicomm,flag,n,beta,y,idx,&
|
|
|
|
proc_to_comm = idx(pnti+psb_proc_id_)
|
|
|
|
proc_to_comm = idx(pnti+psb_proc_id_)
|
|
|
|
nerv = idx(pnti+psb_n_elem_recv_)
|
|
|
|
nerv = idx(pnti+psb_n_elem_recv_)
|
|
|
|
nesd = idx(pnti+nerv+psb_n_elem_send_)
|
|
|
|
nesd = idx(pnti+nerv+psb_n_elem_send_)
|
|
|
|
call psb_get_rank(prcid(i),ictxt,proc_to_comm)
|
|
|
|
prcid(i) = psb_get_mpi_rank(ictxt,proc_to_comm)
|
|
|
|
if ((nesd>0).and.(proc_to_comm /= me)) then
|
|
|
|
if ((nesd>0).and.(proc_to_comm /= me)) then
|
|
|
|
p2ptag = psb_dcomplex_swap_tag
|
|
|
|
p2ptag = psb_dcomplex_swap_tag
|
|
|
|
call mpi_irecv(sndbuf(snd_pt),n*nesd,&
|
|
|
|
call mpi_irecv(sndbuf(snd_pt),n*nesd,&
|
|
|
@ -516,7 +517,7 @@ end subroutine psi_ztranidxm
|
|
|
|
!
|
|
|
|
!
|
|
|
|
!
|
|
|
|
!
|
|
|
|
! Subroutine: psi_zswaptranv
|
|
|
|
! Subroutine: psi_zswaptranv
|
|
|
|
! Does the data exchange among processes. This is similar to Xswapdata, but
|
|
|
|
! Implements the data exchange among processes. This is similar to Xswapdata, but
|
|
|
|
! the list is read "in reverse", i.e. indices that are normally SENT are used
|
|
|
|
! the list is read "in reverse", i.e. indices that are normally SENT are used
|
|
|
|
! for the RECEIVE part and vice-versa. This is the basic data exchange operation
|
|
|
|
! for the RECEIVE part and vice-versa. This is the basic data exchange operation
|
|
|
|
! for doing the product of a sparse matrix by a vector.
|
|
|
|
! for doing the product of a sparse matrix by a vector.
|
|
|
@ -536,6 +537,7 @@ end subroutine psi_ztranidxm
|
|
|
|
! Thus: for halo data exchange, the receive section is confined in the
|
|
|
|
! Thus: for halo data exchange, the receive section is confined in the
|
|
|
|
! halo indices, and BETA=0, whereas for overlap exchange the receive section
|
|
|
|
! halo indices, and BETA=0, whereas for overlap exchange the receive section
|
|
|
|
! is scattered in the owned indices, and BETA=1.
|
|
|
|
! is scattered in the owned indices, and BETA=1.
|
|
|
|
|
|
|
|
! The first routine picks the desired exchange index list and passes it to the second.
|
|
|
|
!
|
|
|
|
!
|
|
|
|
! Arguments:
|
|
|
|
! Arguments:
|
|
|
|
! flag - integer Choose the algorithm for data exchange:
|
|
|
|
! flag - integer Choose the algorithm for data exchange:
|
|
|
@ -556,10 +558,10 @@ end subroutine psi_ztranidxm
|
|
|
|
!
|
|
|
|
!
|
|
|
|
!
|
|
|
|
!
|
|
|
|
! n - integer Number of columns in Y
|
|
|
|
! n - integer Number of columns in Y
|
|
|
|
! beta - X Choose overwrite or sum.
|
|
|
|
! beta - complex Choose overwrite or sum.
|
|
|
|
! y(:) - X The data area
|
|
|
|
! y(:) - complex The data area
|
|
|
|
! desc_a - type(psb_desc_type). The communication descriptor.
|
|
|
|
! desc_a - type(psb_desc_type). The communication descriptor.
|
|
|
|
! work(:) - X Buffer space. If not sufficient, will do
|
|
|
|
! work(:) - complex Buffer space. If not sufficient, will do
|
|
|
|
! our own internal allocation.
|
|
|
|
! our own internal allocation.
|
|
|
|
! info - integer. return code.
|
|
|
|
! info - integer. return code.
|
|
|
|
! data - integer which list is to be used to exchange data
|
|
|
|
! data - integer which list is to be used to exchange data
|
|
|
@ -734,7 +736,7 @@ subroutine psi_ztranidxv(iictxt,iicomm,flag,beta,y,idx,&
|
|
|
|
proc_to_comm = idx(pnti+psb_proc_id_)
|
|
|
|
proc_to_comm = idx(pnti+psb_proc_id_)
|
|
|
|
nerv = idx(pnti+psb_n_elem_recv_)
|
|
|
|
nerv = idx(pnti+psb_n_elem_recv_)
|
|
|
|
nesd = idx(pnti+nerv+psb_n_elem_send_)
|
|
|
|
nesd = idx(pnti+nerv+psb_n_elem_send_)
|
|
|
|
call psb_get_rank(prcid(proc_to_comm),ictxt,proc_to_comm)
|
|
|
|
prcid(proc_to_comm) = psb_get_mpi_rank(ictxt,proc_to_comm)
|
|
|
|
|
|
|
|
|
|
|
|
brvidx(proc_to_comm) = rcv_pt
|
|
|
|
brvidx(proc_to_comm) = rcv_pt
|
|
|
|
rvsz(proc_to_comm) = nerv
|
|
|
|
rvsz(proc_to_comm) = nerv
|
|
|
@ -852,7 +854,7 @@ subroutine psi_ztranidxv(iictxt,iicomm,flag,beta,y,idx,&
|
|
|
|
proc_to_comm = idx(pnti+psb_proc_id_)
|
|
|
|
proc_to_comm = idx(pnti+psb_proc_id_)
|
|
|
|
nerv = idx(pnti+psb_n_elem_recv_)
|
|
|
|
nerv = idx(pnti+psb_n_elem_recv_)
|
|
|
|
nesd = idx(pnti+nerv+psb_n_elem_send_)
|
|
|
|
nesd = idx(pnti+nerv+psb_n_elem_send_)
|
|
|
|
call psb_get_rank(prcid(i),ictxt,proc_to_comm)
|
|
|
|
prcid(i) = psb_get_mpi_rank(ictxt,proc_to_comm)
|
|
|
|
if ((nesd>0).and.(proc_to_comm /= me)) then
|
|
|
|
if ((nesd>0).and.(proc_to_comm /= me)) then
|
|
|
|
p2ptag = psb_dcomplex_swap_tag
|
|
|
|
p2ptag = psb_dcomplex_swap_tag
|
|
|
|
call mpi_irecv(sndbuf(snd_pt),nesd,&
|
|
|
|
call mpi_irecv(sndbuf(snd_pt),nesd,&
|
|
|
|