|
|
|
@ -87,9 +87,11 @@
|
|
|
|
! psb_comm_mov_ use ovr_mst_idx
|
|
|
|
! psb_comm_mov_ use ovr_mst_idx
|
|
|
|
!
|
|
|
|
!
|
|
|
|
!
|
|
|
|
!
|
|
|
|
subroutine psi_iswaptranm(flag,n,beta,y,desc_a,work,info,data)
|
|
|
|
submodule (psi_i_mod) psi_iswaptran_mod
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
contains
|
|
|
|
|
|
|
|
subroutine psi_iswaptranm(flag,n,beta,y,desc_a,work,info,data)
|
|
|
|
|
|
|
|
|
|
|
|
use psi_mod, psb_protect_name => psi_iswaptranm
|
|
|
|
|
|
|
|
use psb_error_mod
|
|
|
|
use psb_error_mod
|
|
|
|
use psb_desc_mod
|
|
|
|
use psb_desc_mod
|
|
|
|
use psb_penv_mod
|
|
|
|
use psb_penv_mod
|
|
|
|
@ -155,11 +157,10 @@ subroutine psi_iswaptranm(flag,n,beta,y,desc_a,work,info,data)
|
|
|
|
9999 call psb_error_handler(ictxt,err_act)
|
|
|
|
9999 call psb_error_handler(ictxt,err_act)
|
|
|
|
|
|
|
|
|
|
|
|
return
|
|
|
|
return
|
|
|
|
end subroutine psi_iswaptranm
|
|
|
|
end subroutine psi_iswaptranm
|
|
|
|
|
|
|
|
|
|
|
|
subroutine psi_itranidxm(iictxt,iicomm,flag,n,beta,y,idx,totxch,totsnd,totrcv,work,info)
|
|
|
|
subroutine psi_itranidxm(ictxt,icomm,flag,n,beta,y,idx,totxch,totsnd,totrcv,work,info)
|
|
|
|
|
|
|
|
|
|
|
|
use psi_mod, psb_protect_name => psi_itranidxm
|
|
|
|
|
|
|
|
use psb_error_mod
|
|
|
|
use psb_error_mod
|
|
|
|
use psb_desc_mod
|
|
|
|
use psb_desc_mod
|
|
|
|
use psb_penv_mod
|
|
|
|
use psb_penv_mod
|
|
|
|
@ -171,14 +172,14 @@ subroutine psi_itranidxm(iictxt,iicomm,flag,n,beta,y,idx,totxch,totsnd,totrcv,wo
|
|
|
|
include 'mpif.h'
|
|
|
|
include 'mpif.h'
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
integer(psb_ipk_), intent(in) :: iictxt,iicomm,flag,n
|
|
|
|
integer(psb_ipk_), intent(in) :: ictxt,icomm,flag,n
|
|
|
|
integer(psb_ipk_), intent(out) :: info
|
|
|
|
integer(psb_ipk_), intent(out) :: info
|
|
|
|
integer(psb_ipk_) :: y(:,:), beta
|
|
|
|
integer(psb_ipk_) :: y(:,:), beta
|
|
|
|
integer(psb_ipk_), target :: work(:)
|
|
|
|
integer(psb_ipk_), target :: work(:)
|
|
|
|
integer(psb_ipk_), intent(in) :: idx(:),totxch,totsnd, totrcv
|
|
|
|
integer(psb_ipk_), intent(in) :: idx(:),totxch,totsnd, totrcv
|
|
|
|
|
|
|
|
|
|
|
|
! locals
|
|
|
|
! locals
|
|
|
|
integer(psb_mpik_) :: ictxt, icomm, np, me,&
|
|
|
|
integer(psb_mpik_) :: iictxt, iicomm, np, me,&
|
|
|
|
& proc_to_comm, p2ptag, p2pstat(mpi_status_size), iret
|
|
|
|
& proc_to_comm, p2ptag, p2pstat(mpi_status_size), iret
|
|
|
|
integer(psb_mpik_), allocatable, dimension(:) :: bsdidx, brvidx,&
|
|
|
|
integer(psb_mpik_), allocatable, dimension(:) :: bsdidx, brvidx,&
|
|
|
|
& sdsz, rvsz, prcid, rvhd, sdhd
|
|
|
|
& sdsz, rvsz, prcid, rvhd, sdhd
|
|
|
|
@ -199,10 +200,10 @@ subroutine psi_itranidxm(iictxt,iicomm,flag,n,beta,y,idx,totxch,totsnd,totrcv,wo
|
|
|
|
info=psb_success_
|
|
|
|
info=psb_success_
|
|
|
|
name='psi_swap_tran'
|
|
|
|
name='psi_swap_tran'
|
|
|
|
call psb_erractionsave(err_act)
|
|
|
|
call psb_erractionsave(err_act)
|
|
|
|
ictxt = iictxt
|
|
|
|
iictxt = ictxt
|
|
|
|
icomm = iicomm
|
|
|
|
iicomm = icomm
|
|
|
|
|
|
|
|
|
|
|
|
call psb_info(ictxt,me,np)
|
|
|
|
call psb_info(iictxt,me,np)
|
|
|
|
if (np == -1) then
|
|
|
|
if (np == -1) then
|
|
|
|
info=psb_err_context_error_
|
|
|
|
info=psb_err_context_error_
|
|
|
|
call psb_errpush(info,name)
|
|
|
|
call psb_errpush(info,name)
|
|
|
|
@ -243,7 +244,7 @@ subroutine psi_itranidxm(iictxt,iicomm,flag,n,beta,y,idx,totxch,totsnd,totrcv,wo
|
|
|
|
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)
|
|
|
|
call psb_get_rank(prcid(proc_to_comm),iictxt,proc_to_comm)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
brvidx(proc_to_comm) = rcv_pt
|
|
|
|
brvidx(proc_to_comm) = rcv_pt
|
|
|
|
@ -311,7 +312,7 @@ subroutine psi_itranidxm(iictxt,iicomm,flag,n,beta,y,idx,totxch,totsnd,totrcv,wo
|
|
|
|
! swap elements using mpi_alltoallv
|
|
|
|
! swap elements using mpi_alltoallv
|
|
|
|
call mpi_alltoallv(rcvbuf,rvsz,brvidx,&
|
|
|
|
call mpi_alltoallv(rcvbuf,rvsz,brvidx,&
|
|
|
|
& psb_mpi_ipk_integer,&
|
|
|
|
& psb_mpi_ipk_integer,&
|
|
|
|
& sndbuf,sdsz,bsdidx,psb_mpi_ipk_integer,icomm,iret)
|
|
|
|
& sndbuf,sdsz,bsdidx,psb_mpi_ipk_integer,iicomm,iret)
|
|
|
|
if(iret /= mpi_success) then
|
|
|
|
if(iret /= mpi_success) then
|
|
|
|
ierr(1) = iret
|
|
|
|
ierr(1) = iret
|
|
|
|
info=psb_err_mpi_error_
|
|
|
|
info=psb_err_mpi_error_
|
|
|
|
@ -330,14 +331,14 @@ subroutine psi_itranidxm(iictxt,iicomm,flag,n,beta,y,idx,totxch,totsnd,totrcv,wo
|
|
|
|
nesd = idx(pnti+nerv+psb_n_elem_send_)
|
|
|
|
nesd = idx(pnti+nerv+psb_n_elem_send_)
|
|
|
|
|
|
|
|
|
|
|
|
if (proc_to_comm < me) then
|
|
|
|
if (proc_to_comm < me) then
|
|
|
|
if (nerv>0) call psb_snd(ictxt,&
|
|
|
|
if (nerv>0) call psb_snd(iictxt,&
|
|
|
|
& rcvbuf(rcv_pt:rcv_pt+n*nerv-1), proc_to_comm)
|
|
|
|
& rcvbuf(rcv_pt:rcv_pt+n*nerv-1), proc_to_comm)
|
|
|
|
if (nesd>0) call psb_rcv(ictxt,&
|
|
|
|
if (nesd>0) call psb_rcv(iictxt,&
|
|
|
|
& sndbuf(snd_pt:snd_pt+n*nesd-1), proc_to_comm)
|
|
|
|
& sndbuf(snd_pt:snd_pt+n*nesd-1), proc_to_comm)
|
|
|
|
else if (proc_to_comm > me) then
|
|
|
|
else if (proc_to_comm > me) then
|
|
|
|
if (nesd>0) call psb_rcv(ictxt,&
|
|
|
|
if (nesd>0) call psb_rcv(iictxt,&
|
|
|
|
& sndbuf(snd_pt:snd_pt+n*nesd-1), proc_to_comm)
|
|
|
|
& sndbuf(snd_pt:snd_pt+n*nesd-1), proc_to_comm)
|
|
|
|
if (nerv>0) call psb_snd(ictxt,&
|
|
|
|
if (nerv>0) call psb_snd(iictxt,&
|
|
|
|
& rcvbuf(rcv_pt:rcv_pt+n*nerv-1), proc_to_comm)
|
|
|
|
& rcvbuf(rcv_pt:rcv_pt+n*nerv-1), proc_to_comm)
|
|
|
|
else if (proc_to_comm == me) then
|
|
|
|
else if (proc_to_comm == me) then
|
|
|
|
if (nesd /= nerv) then
|
|
|
|
if (nesd /= nerv) then
|
|
|
|
@ -364,12 +365,12 @@ subroutine psi_itranidxm(iictxt,iicomm,flag,n,beta,y,idx,totxch,totsnd,totrcv,wo
|
|
|
|
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)
|
|
|
|
call psb_get_rank(prcid(i),iictxt,proc_to_comm)
|
|
|
|
if ((nesd>0).and.(proc_to_comm /= me)) then
|
|
|
|
if ((nesd>0).and.(proc_to_comm /= me)) then
|
|
|
|
p2ptag = psb_int_swap_tag
|
|
|
|
p2ptag = psb_int_swap_tag
|
|
|
|
call mpi_irecv(sndbuf(snd_pt),n*nesd,&
|
|
|
|
call mpi_irecv(sndbuf(snd_pt),n*nesd,&
|
|
|
|
& psb_mpi_ipk_integer,prcid(i),&
|
|
|
|
& psb_mpi_ipk_integer,prcid(i),&
|
|
|
|
& p2ptag,icomm,rvhd(i),iret)
|
|
|
|
& p2ptag,iicomm,rvhd(i),iret)
|
|
|
|
end if
|
|
|
|
end if
|
|
|
|
rcv_pt = rcv_pt + n*nerv
|
|
|
|
rcv_pt = rcv_pt + n*nerv
|
|
|
|
snd_pt = snd_pt + n*nesd
|
|
|
|
snd_pt = snd_pt + n*nesd
|
|
|
|
@ -378,7 +379,7 @@ subroutine psi_itranidxm(iictxt,iicomm,flag,n,beta,y,idx,totxch,totsnd,totrcv,wo
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
! Then I post all the blocking sends
|
|
|
|
! Then I post all the blocking sends
|
|
|
|
if (usersend) call mpi_barrier(icomm,iret)
|
|
|
|
if (usersend) call mpi_barrier(iicomm,iret)
|
|
|
|
|
|
|
|
|
|
|
|
pnti = 1
|
|
|
|
pnti = 1
|
|
|
|
snd_pt = 1
|
|
|
|
snd_pt = 1
|
|
|
|
@ -393,11 +394,11 @@ subroutine psi_itranidxm(iictxt,iicomm,flag,n,beta,y,idx,totxch,totsnd,totrcv,wo
|
|
|
|
if (usersend) then
|
|
|
|
if (usersend) then
|
|
|
|
call mpi_rsend(rcvbuf(rcv_pt),n*nerv,&
|
|
|
|
call mpi_rsend(rcvbuf(rcv_pt),n*nerv,&
|
|
|
|
& psb_mpi_ipk_integer,prcid(i),&
|
|
|
|
& psb_mpi_ipk_integer,prcid(i),&
|
|
|
|
& p2ptag,icomm,iret)
|
|
|
|
& p2ptag,iicomm,iret)
|
|
|
|
else
|
|
|
|
else
|
|
|
|
call mpi_send(rcvbuf(rcv_pt),n*nerv,&
|
|
|
|
call mpi_send(rcvbuf(rcv_pt),n*nerv,&
|
|
|
|
& psb_mpi_ipk_integer,prcid(i),&
|
|
|
|
& psb_mpi_ipk_integer,prcid(i),&
|
|
|
|
& p2ptag,icomm,iret)
|
|
|
|
& p2ptag,iicomm,iret)
|
|
|
|
end if
|
|
|
|
end if
|
|
|
|
|
|
|
|
|
|
|
|
if(iret /= mpi_success) then
|
|
|
|
if(iret /= mpi_success) then
|
|
|
|
@ -451,7 +452,7 @@ subroutine psi_itranidxm(iictxt,iicomm,flag,n,beta,y,idx,totxch,totsnd,totrcv,wo
|
|
|
|
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_)
|
|
|
|
if (nerv>0) call psb_snd(ictxt,&
|
|
|
|
if (nerv>0) call psb_snd(iictxt,&
|
|
|
|
& rcvbuf(rcv_pt:rcv_pt+n*nerv-1), proc_to_comm)
|
|
|
|
& rcvbuf(rcv_pt:rcv_pt+n*nerv-1), proc_to_comm)
|
|
|
|
rcv_pt = rcv_pt + n*nerv
|
|
|
|
rcv_pt = rcv_pt + n*nerv
|
|
|
|
snd_pt = snd_pt + n*nesd
|
|
|
|
snd_pt = snd_pt + n*nesd
|
|
|
|
@ -468,7 +469,7 @@ subroutine psi_itranidxm(iictxt,iicomm,flag,n,beta,y,idx,totxch,totsnd,totrcv,wo
|
|
|
|
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_)
|
|
|
|
if (nesd>0) call psb_rcv(ictxt,&
|
|
|
|
if (nesd>0) call psb_rcv(iictxt,&
|
|
|
|
& sndbuf(snd_pt:snd_pt+n*nesd-1), proc_to_comm)
|
|
|
|
& sndbuf(snd_pt:snd_pt+n*nesd-1), proc_to_comm)
|
|
|
|
rcv_pt = rcv_pt + n*nerv
|
|
|
|
rcv_pt = rcv_pt + n*nerv
|
|
|
|
snd_pt = snd_pt + n*nesd
|
|
|
|
snd_pt = snd_pt + n*nesd
|
|
|
|
@ -516,70 +517,69 @@ subroutine psi_itranidxm(iictxt,iicomm,flag,n,beta,y,idx,totxch,totsnd,totrcv,wo
|
|
|
|
call psb_erractionrestore(err_act)
|
|
|
|
call psb_erractionrestore(err_act)
|
|
|
|
return
|
|
|
|
return
|
|
|
|
|
|
|
|
|
|
|
|
9999 call psb_error_handler(ictxt,err_act)
|
|
|
|
9999 call psb_error_handler(iictxt,err_act)
|
|
|
|
|
|
|
|
|
|
|
|
return
|
|
|
|
return
|
|
|
|
end subroutine psi_itranidxm
|
|
|
|
end subroutine psi_itranidxm
|
|
|
|
!
|
|
|
|
!
|
|
|
|
!
|
|
|
|
!
|
|
|
|
! Subroutine: psi_iswaptranv
|
|
|
|
! Subroutine: psi_iswaptranv
|
|
|
|
! Does the data exchange among processes. This is similar to Xswapdata, but
|
|
|
|
! Does 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.
|
|
|
|
! Essentially this is doing a variable all-to-all data exchange
|
|
|
|
! Essentially this is doing a variable all-to-all data exchange
|
|
|
|
! (ALLTOALLV in MPI parlance), but
|
|
|
|
! (ALLTOALLV in MPI parlance), but
|
|
|
|
! it is capable of pruning empty exchanges, which are very likely in out
|
|
|
|
! it is capable of pruning empty exchanges, which are very likely in out
|
|
|
|
! application environment. All the variants have the same structure
|
|
|
|
! application environment. All the variants have the same structure
|
|
|
|
! In all these subroutines X may be: I Integer
|
|
|
|
! In all these subroutines X may be: I Integer
|
|
|
|
! S real(psb_spk_)
|
|
|
|
! S real(psb_spk_)
|
|
|
|
! D real(psb_dpk_)
|
|
|
|
! D real(psb_dpk_)
|
|
|
|
! C complex(psb_spk_)
|
|
|
|
! C complex(psb_spk_)
|
|
|
|
! Z complex(psb_dpk_)
|
|
|
|
! Z complex(psb_dpk_)
|
|
|
|
! Basically the operation is as follows: on each process, we identify
|
|
|
|
! Basically the operation is as follows: on each process, we identify
|
|
|
|
! sections SND(Y) and RCV(Y); then we do a SEND(PACK(SND(Y)));
|
|
|
|
! sections SND(Y) and RCV(Y); then we do a SEND(PACK(SND(Y)));
|
|
|
|
! then we receive, and we do an update with Y = UNPACK(RCV(Y)) + BETA * Y
|
|
|
|
! then we receive, and we do an update with Y = UNPACK(RCV(Y)) + BETA * Y
|
|
|
|
! but only on the elements involved in the UNPACK operation.
|
|
|
|
! but only on the elements involved in the UNPACK operation.
|
|
|
|
! 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.
|
|
|
|
!
|
|
|
|
!
|
|
|
|
! Arguments:
|
|
|
|
! Arguments:
|
|
|
|
! flag - integer Choose the algorithm for data exchange:
|
|
|
|
! flag - integer Choose the algorithm for data exchange:
|
|
|
|
! this is chosen through bit fields.
|
|
|
|
! this is chosen through bit fields.
|
|
|
|
! swap_mpi = iand(flag,psb_swap_mpi_) /= 0
|
|
|
|
! swap_mpi = iand(flag,psb_swap_mpi_) /= 0
|
|
|
|
! swap_sync = iand(flag,psb_swap_sync_) /= 0
|
|
|
|
! swap_sync = iand(flag,psb_swap_sync_) /= 0
|
|
|
|
! swap_send = iand(flag,psb_swap_send_) /= 0
|
|
|
|
! swap_send = iand(flag,psb_swap_send_) /= 0
|
|
|
|
! swap_recv = iand(flag,psb_swap_recv_) /= 0
|
|
|
|
! swap_recv = iand(flag,psb_swap_recv_) /= 0
|
|
|
|
! if (swap_mpi): use underlying MPI_ALLTOALLV.
|
|
|
|
! if (swap_mpi): use underlying MPI_ALLTOALLV.
|
|
|
|
! if (swap_sync): use PSB_SND and PSB_RCV in
|
|
|
|
! if (swap_sync): use PSB_SND and PSB_RCV in
|
|
|
|
! synchronized pairs
|
|
|
|
! synchronized pairs
|
|
|
|
! if (swap_send .and. swap_recv): use mpi_irecv
|
|
|
|
! if (swap_send .and. swap_recv): use mpi_irecv
|
|
|
|
! and mpi_send
|
|
|
|
! and mpi_send
|
|
|
|
! if (swap_send): use psb_snd (but need another
|
|
|
|
! if (swap_send): use psb_snd (but need another
|
|
|
|
! call with swap_recv to complete)
|
|
|
|
! call with swap_recv to complete)
|
|
|
|
! if (swap_recv): use psb_rcv (completing a
|
|
|
|
! if (swap_recv): use psb_rcv (completing a
|
|
|
|
! previous call with swap_send)
|
|
|
|
! previous call with swap_send)
|
|
|
|
!
|
|
|
|
!
|
|
|
|
!
|
|
|
|
!
|
|
|
|
! n - integer Number of columns in Y
|
|
|
|
! n - integer Number of columns in Y
|
|
|
|
! beta - X Choose overwrite or sum.
|
|
|
|
! beta - X Choose overwrite or sum.
|
|
|
|
! y(:) - X The data area
|
|
|
|
! y(:) - X 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(:) - X 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
|
|
|
|
! default psb_comm_halo_
|
|
|
|
! default psb_comm_halo_
|
|
|
|
! psb_comm_halo_ use halo_index
|
|
|
|
! psb_comm_halo_ use halo_index
|
|
|
|
! psb_comm_ext_ use ext_index
|
|
|
|
! psb_comm_ext_ use ext_index
|
|
|
|
! psb_comm_ovrl_ use ovrl_index
|
|
|
|
! psb_comm_ovrl_ use ovrl_index
|
|
|
|
! psb_comm_mov_ use ovr_mst_idx
|
|
|
|
! psb_comm_mov_ use ovr_mst_idx
|
|
|
|
!
|
|
|
|
!
|
|
|
|
!
|
|
|
|
!
|
|
|
|
subroutine psi_iswaptranv(flag,beta,y,desc_a,work,info,data)
|
|
|
|
subroutine psi_iswaptranv(flag,beta,y,desc_a,work,info,data)
|
|
|
|
|
|
|
|
|
|
|
|
use psi_mod, psb_protect_name => psi_iswaptranv
|
|
|
|
|
|
|
|
use psb_error_mod
|
|
|
|
use psb_error_mod
|
|
|
|
use psb_desc_mod
|
|
|
|
use psb_desc_mod
|
|
|
|
use psb_penv_mod
|
|
|
|
use psb_penv_mod
|
|
|
|
@ -644,24 +644,23 @@ subroutine psi_iswaptranv(flag,beta,y,desc_a,work,info,data)
|
|
|
|
9999 call psb_error_handler(ictxt,err_act)
|
|
|
|
9999 call psb_error_handler(ictxt,err_act)
|
|
|
|
|
|
|
|
|
|
|
|
return
|
|
|
|
return
|
|
|
|
end subroutine psi_iswaptranv
|
|
|
|
end subroutine psi_iswaptranv
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
!
|
|
|
|
!
|
|
|
|
!
|
|
|
|
!
|
|
|
|
! Subroutine: psi_itranidxv
|
|
|
|
! Subroutine: psi_itranidxv
|
|
|
|
! Does the data exchange among processes.
|
|
|
|
! Does the data exchange among processes.
|
|
|
|
!
|
|
|
|
!
|
|
|
|
! The real workhorse: the outer routines will only choose the index list
|
|
|
|
! The real workhorse: the outer routines will only choose the index list
|
|
|
|
! this one takes the index list and does the actual exchange.
|
|
|
|
! this one takes the index list and does the actual exchange.
|
|
|
|
!
|
|
|
|
!
|
|
|
|
!
|
|
|
|
!
|
|
|
|
!
|
|
|
|
!
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
subroutine psi_itranidxv(iictxt,iicomm,flag,beta,y,idx,totxch,totsnd,totrcv,work,info)
|
|
|
|
subroutine psi_itranidxv(ictxt,icomm,flag,beta,y,idx,totxch,totsnd,totrcv,work,info)
|
|
|
|
|
|
|
|
|
|
|
|
use psi_mod, psb_protect_name => psi_itranidxv
|
|
|
|
|
|
|
|
use psb_error_mod
|
|
|
|
use psb_error_mod
|
|
|
|
use psb_desc_mod
|
|
|
|
use psb_desc_mod
|
|
|
|
use psb_penv_mod
|
|
|
|
use psb_penv_mod
|
|
|
|
@ -673,14 +672,14 @@ subroutine psi_itranidxv(iictxt,iicomm,flag,beta,y,idx,totxch,totsnd,totrcv,work
|
|
|
|
include 'mpif.h'
|
|
|
|
include 'mpif.h'
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
integer(psb_ipk_), intent(in) :: iictxt,iicomm,flag
|
|
|
|
integer(psb_ipk_), intent(in) :: ictxt,icomm,flag
|
|
|
|
integer(psb_ipk_), intent(out) :: info
|
|
|
|
integer(psb_ipk_), intent(out) :: info
|
|
|
|
integer(psb_ipk_) :: y(:), beta
|
|
|
|
integer(psb_ipk_) :: y(:), beta
|
|
|
|
integer(psb_ipk_), target :: work(:)
|
|
|
|
integer(psb_ipk_), target :: work(:)
|
|
|
|
integer(psb_ipk_), intent(in) :: idx(:),totxch,totsnd, totrcv
|
|
|
|
integer(psb_ipk_), intent(in) :: idx(:),totxch,totsnd, totrcv
|
|
|
|
|
|
|
|
|
|
|
|
! locals
|
|
|
|
! locals
|
|
|
|
integer(psb_mpik_) :: ictxt, icomm, np, me,&
|
|
|
|
integer(psb_mpik_) :: iictxt, iicomm, np, me,&
|
|
|
|
& proc_to_comm, p2ptag, p2pstat(mpi_status_size), iret
|
|
|
|
& proc_to_comm, p2ptag, p2pstat(mpi_status_size), iret
|
|
|
|
integer(psb_mpik_), allocatable, dimension(:) :: bsdidx, brvidx,&
|
|
|
|
integer(psb_mpik_), allocatable, dimension(:) :: bsdidx, brvidx,&
|
|
|
|
& sdsz, rvsz, prcid, rvhd, sdhd
|
|
|
|
& sdsz, rvsz, prcid, rvhd, sdhd
|
|
|
|
@ -707,10 +706,10 @@ subroutine psi_itranidxv(iictxt,iicomm,flag,beta,y,idx,totxch,totsnd,totrcv,work
|
|
|
|
info=psb_success_
|
|
|
|
info=psb_success_
|
|
|
|
name='psi_swap_tran'
|
|
|
|
name='psi_swap_tran'
|
|
|
|
call psb_erractionsave(err_act)
|
|
|
|
call psb_erractionsave(err_act)
|
|
|
|
ictxt = iictxt
|
|
|
|
iictxt = ictxt
|
|
|
|
icomm = iicomm
|
|
|
|
iicomm = icomm
|
|
|
|
|
|
|
|
|
|
|
|
call psb_info(ictxt,me,np)
|
|
|
|
call psb_info(iictxt,me,np)
|
|
|
|
if (np == -1) then
|
|
|
|
if (np == -1) then
|
|
|
|
info=psb_err_context_error_
|
|
|
|
info=psb_err_context_error_
|
|
|
|
call psb_errpush(info,name)
|
|
|
|
call psb_errpush(info,name)
|
|
|
|
@ -751,7 +750,7 @@ subroutine psi_itranidxv(iictxt,iicomm,flag,beta,y,idx,totxch,totsnd,totrcv,work
|
|
|
|
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)
|
|
|
|
call psb_get_rank(prcid(proc_to_comm),iictxt,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
|
|
|
|
@ -818,7 +817,7 @@ subroutine psi_itranidxv(iictxt,iicomm,flag,beta,y,idx,totxch,totsnd,totrcv,work
|
|
|
|
! swap elements using mpi_alltoallv
|
|
|
|
! swap elements using mpi_alltoallv
|
|
|
|
call mpi_alltoallv(rcvbuf,rvsz,brvidx,&
|
|
|
|
call mpi_alltoallv(rcvbuf,rvsz,brvidx,&
|
|
|
|
& psb_mpi_ipk_integer,&
|
|
|
|
& psb_mpi_ipk_integer,&
|
|
|
|
& sndbuf,sdsz,bsdidx,psb_mpi_ipk_integer,icomm,iret)
|
|
|
|
& sndbuf,sdsz,bsdidx,psb_mpi_ipk_integer,iicomm,iret)
|
|
|
|
if(iret /= mpi_success) then
|
|
|
|
if(iret /= mpi_success) then
|
|
|
|
ierr(1) = iret
|
|
|
|
ierr(1) = iret
|
|
|
|
info=psb_err_mpi_error_
|
|
|
|
info=psb_err_mpi_error_
|
|
|
|
@ -837,14 +836,14 @@ subroutine psi_itranidxv(iictxt,iicomm,flag,beta,y,idx,totxch,totsnd,totrcv,work
|
|
|
|
nesd = idx(pnti+nerv+psb_n_elem_send_)
|
|
|
|
nesd = idx(pnti+nerv+psb_n_elem_send_)
|
|
|
|
|
|
|
|
|
|
|
|
if (proc_to_comm < me) then
|
|
|
|
if (proc_to_comm < me) then
|
|
|
|
if (nerv>0) call psb_snd(ictxt,&
|
|
|
|
if (nerv>0) call psb_snd(iictxt,&
|
|
|
|
& rcvbuf(rcv_pt:rcv_pt+nerv-1), proc_to_comm)
|
|
|
|
& rcvbuf(rcv_pt:rcv_pt+nerv-1), proc_to_comm)
|
|
|
|
if (nesd>0) call psb_rcv(ictxt,&
|
|
|
|
if (nesd>0) call psb_rcv(iictxt,&
|
|
|
|
& sndbuf(snd_pt:snd_pt+nesd-1), proc_to_comm)
|
|
|
|
& sndbuf(snd_pt:snd_pt+nesd-1), proc_to_comm)
|
|
|
|
else if (proc_to_comm > me) then
|
|
|
|
else if (proc_to_comm > me) then
|
|
|
|
if (nesd>0) call psb_rcv(ictxt,&
|
|
|
|
if (nesd>0) call psb_rcv(iictxt,&
|
|
|
|
& sndbuf(snd_pt:snd_pt+nesd-1), proc_to_comm)
|
|
|
|
& sndbuf(snd_pt:snd_pt+nesd-1), proc_to_comm)
|
|
|
|
if (nerv>0) call psb_snd(ictxt,&
|
|
|
|
if (nerv>0) call psb_snd(iictxt,&
|
|
|
|
& rcvbuf(rcv_pt:rcv_pt+nerv-1), proc_to_comm)
|
|
|
|
& rcvbuf(rcv_pt:rcv_pt+nerv-1), proc_to_comm)
|
|
|
|
else if (proc_to_comm == me) then
|
|
|
|
else if (proc_to_comm == me) then
|
|
|
|
if (nesd /= nerv) then
|
|
|
|
if (nesd /= nerv) then
|
|
|
|
@ -871,12 +870,12 @@ subroutine psi_itranidxv(iictxt,iicomm,flag,beta,y,idx,totxch,totsnd,totrcv,work
|
|
|
|
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)
|
|
|
|
call psb_get_rank(prcid(i),iictxt,proc_to_comm)
|
|
|
|
if ((nesd>0).and.(proc_to_comm /= me)) then
|
|
|
|
if ((nesd>0).and.(proc_to_comm /= me)) then
|
|
|
|
p2ptag = psb_int_swap_tag
|
|
|
|
p2ptag = psb_int_swap_tag
|
|
|
|
call mpi_irecv(sndbuf(snd_pt),nesd,&
|
|
|
|
call mpi_irecv(sndbuf(snd_pt),nesd,&
|
|
|
|
& psb_mpi_ipk_integer,prcid(i),&
|
|
|
|
& psb_mpi_ipk_integer,prcid(i),&
|
|
|
|
& p2ptag,icomm,rvhd(i),iret)
|
|
|
|
& p2ptag,iicomm,rvhd(i),iret)
|
|
|
|
end if
|
|
|
|
end if
|
|
|
|
rcv_pt = rcv_pt + nerv
|
|
|
|
rcv_pt = rcv_pt + nerv
|
|
|
|
snd_pt = snd_pt + nesd
|
|
|
|
snd_pt = snd_pt + nesd
|
|
|
|
@ -885,7 +884,7 @@ subroutine psi_itranidxv(iictxt,iicomm,flag,beta,y,idx,totxch,totsnd,totrcv,work
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
! Then I post all the blocking sends
|
|
|
|
! Then I post all the blocking sends
|
|
|
|
if (usersend) call mpi_barrier(icomm,iret)
|
|
|
|
if (usersend) call mpi_barrier(iicomm,iret)
|
|
|
|
|
|
|
|
|
|
|
|
pnti = 1
|
|
|
|
pnti = 1
|
|
|
|
snd_pt = 1
|
|
|
|
snd_pt = 1
|
|
|
|
@ -900,11 +899,11 @@ subroutine psi_itranidxv(iictxt,iicomm,flag,beta,y,idx,totxch,totsnd,totrcv,work
|
|
|
|
if (usersend) then
|
|
|
|
if (usersend) then
|
|
|
|
call mpi_rsend(rcvbuf(rcv_pt),nerv,&
|
|
|
|
call mpi_rsend(rcvbuf(rcv_pt),nerv,&
|
|
|
|
& psb_mpi_ipk_integer,prcid(i),&
|
|
|
|
& psb_mpi_ipk_integer,prcid(i),&
|
|
|
|
& p2ptag, icomm,iret)
|
|
|
|
& p2ptag, iicomm,iret)
|
|
|
|
else
|
|
|
|
else
|
|
|
|
call mpi_send(rcvbuf(rcv_pt),nerv,&
|
|
|
|
call mpi_send(rcvbuf(rcv_pt),nerv,&
|
|
|
|
& psb_mpi_ipk_integer,prcid(i),&
|
|
|
|
& psb_mpi_ipk_integer,prcid(i),&
|
|
|
|
& p2ptag, icomm,iret)
|
|
|
|
& p2ptag, iicomm,iret)
|
|
|
|
end if
|
|
|
|
end if
|
|
|
|
|
|
|
|
|
|
|
|
if(iret /= mpi_success) then
|
|
|
|
if(iret /= mpi_success) then
|
|
|
|
@ -957,7 +956,7 @@ subroutine psi_itranidxv(iictxt,iicomm,flag,beta,y,idx,totxch,totsnd,totrcv,work
|
|
|
|
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_)
|
|
|
|
if (nerv>0) call psb_snd(ictxt,&
|
|
|
|
if (nerv>0) call psb_snd(iictxt,&
|
|
|
|
& rcvbuf(rcv_pt:rcv_pt+nerv-1), proc_to_comm)
|
|
|
|
& rcvbuf(rcv_pt:rcv_pt+nerv-1), proc_to_comm)
|
|
|
|
rcv_pt = rcv_pt + nerv
|
|
|
|
rcv_pt = rcv_pt + nerv
|
|
|
|
snd_pt = snd_pt + nesd
|
|
|
|
snd_pt = snd_pt + nesd
|
|
|
|
@ -974,7 +973,7 @@ subroutine psi_itranidxv(iictxt,iicomm,flag,beta,y,idx,totxch,totsnd,totrcv,work
|
|
|
|
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_)
|
|
|
|
if (nesd>0) call psb_rcv(ictxt,&
|
|
|
|
if (nesd>0) call psb_rcv(iictxt,&
|
|
|
|
& sndbuf(snd_pt:snd_pt+nesd-1), proc_to_comm)
|
|
|
|
& sndbuf(snd_pt:snd_pt+nesd-1), proc_to_comm)
|
|
|
|
rcv_pt = rcv_pt + nerv
|
|
|
|
rcv_pt = rcv_pt + nerv
|
|
|
|
snd_pt = snd_pt + nesd
|
|
|
|
snd_pt = snd_pt + nesd
|
|
|
|
@ -1024,25 +1023,24 @@ subroutine psi_itranidxv(iictxt,iicomm,flag,beta,y,idx,totxch,totsnd,totrcv,work
|
|
|
|
call psb_erractionrestore(err_act)
|
|
|
|
call psb_erractionrestore(err_act)
|
|
|
|
return
|
|
|
|
return
|
|
|
|
|
|
|
|
|
|
|
|
9999 call psb_error_handler(ictxt,err_act)
|
|
|
|
9999 call psb_error_handler(iictxt,err_act)
|
|
|
|
|
|
|
|
|
|
|
|
return
|
|
|
|
return
|
|
|
|
end subroutine psi_itranidxv
|
|
|
|
end subroutine psi_itranidxv
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
!
|
|
|
|
!
|
|
|
|
!
|
|
|
|
!
|
|
|
|
!
|
|
|
|
!
|
|
|
|
!
|
|
|
|
!
|
|
|
|
! Subroutine: psi_iswaptran_vect
|
|
|
|
! Subroutine: psi_iswaptran_vect
|
|
|
|
! Data exchange among processes.
|
|
|
|
! Data exchange among processes.
|
|
|
|
!
|
|
|
|
!
|
|
|
|
! Takes care of Y an exanspulated vector.
|
|
|
|
! Takes care of Y an exanspulated vector.
|
|
|
|
!
|
|
|
|
!
|
|
|
|
!
|
|
|
|
!
|
|
|
|
subroutine psi_iswaptran_vect(flag,beta,y,desc_a,work,info,data)
|
|
|
|
subroutine psi_iswaptran_vect(flag,beta,y,desc_a,work,info,data)
|
|
|
|
|
|
|
|
|
|
|
|
use psi_mod, psb_protect_name => psi_iswaptran_vect
|
|
|
|
|
|
|
|
use psb_i_base_vect_mod
|
|
|
|
use psb_i_base_vect_mod
|
|
|
|
use psb_error_mod
|
|
|
|
use psb_error_mod
|
|
|
|
use psb_desc_mod
|
|
|
|
use psb_desc_mod
|
|
|
|
@ -1109,27 +1107,26 @@ subroutine psi_iswaptran_vect(flag,beta,y,desc_a,work,info,data)
|
|
|
|
9999 call psb_error_handler(ictxt,err_act)
|
|
|
|
9999 call psb_error_handler(ictxt,err_act)
|
|
|
|
|
|
|
|
|
|
|
|
return
|
|
|
|
return
|
|
|
|
end subroutine psi_iswaptran_vect
|
|
|
|
end subroutine psi_iswaptran_vect
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
!
|
|
|
|
!
|
|
|
|
!
|
|
|
|
!
|
|
|
|
! Subroutine: psi_itran_vidx_vect
|
|
|
|
! Subroutine: psi_itran_vidx_vect
|
|
|
|
! Data exchange among processes.
|
|
|
|
! Data exchange among processes.
|
|
|
|
!
|
|
|
|
!
|
|
|
|
! Takes care of Y an exanspulated vector. Relies on the gather/scatter methods
|
|
|
|
! Takes care of Y an exanspulated vector. Relies on the gather/scatter methods
|
|
|
|
! of vectors.
|
|
|
|
! of vectors.
|
|
|
|
!
|
|
|
|
!
|
|
|
|
! The real workhorse: the outer routine will only choose the index list
|
|
|
|
! The real workhorse: the outer routine will only choose the index list
|
|
|
|
! this one takes the index list and does the actual exchange.
|
|
|
|
! this one takes the index list and does the actual exchange.
|
|
|
|
!
|
|
|
|
!
|
|
|
|
!
|
|
|
|
!
|
|
|
|
!
|
|
|
|
!
|
|
|
|
subroutine psi_itran_vidx_vect(iictxt,iicomm,flag,beta,y,idx,&
|
|
|
|
subroutine psi_itran_vidx_vect(ictxt,icomm,flag,beta,y,idx,&
|
|
|
|
& totxch,totsnd,totrcv,work,info)
|
|
|
|
& totxch,totsnd,totrcv,work,info)
|
|
|
|
|
|
|
|
|
|
|
|
use psi_mod, psb_protect_name => psi_itran_vidx_vect
|
|
|
|
|
|
|
|
use psb_error_mod
|
|
|
|
use psb_error_mod
|
|
|
|
use psb_desc_mod
|
|
|
|
use psb_desc_mod
|
|
|
|
use psb_penv_mod
|
|
|
|
use psb_penv_mod
|
|
|
|
@ -1142,7 +1139,7 @@ subroutine psi_itran_vidx_vect(iictxt,iicomm,flag,beta,y,idx,&
|
|
|
|
include 'mpif.h'
|
|
|
|
include 'mpif.h'
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
integer(psb_ipk_), intent(in) :: iictxt,iicomm,flag
|
|
|
|
integer(psb_ipk_), intent(in) :: ictxt,icomm,flag
|
|
|
|
integer(psb_ipk_), intent(out) :: info
|
|
|
|
integer(psb_ipk_), intent(out) :: info
|
|
|
|
class(psb_i_base_vect_type) :: y
|
|
|
|
class(psb_i_base_vect_type) :: y
|
|
|
|
integer(psb_ipk_) :: beta
|
|
|
|
integer(psb_ipk_) :: beta
|
|
|
|
@ -1151,7 +1148,7 @@ subroutine psi_itran_vidx_vect(iictxt,iicomm,flag,beta,y,idx,&
|
|
|
|
integer(psb_ipk_), intent(in) :: totxch,totsnd, totrcv
|
|
|
|
integer(psb_ipk_), intent(in) :: totxch,totsnd, totrcv
|
|
|
|
|
|
|
|
|
|
|
|
! locals
|
|
|
|
! locals
|
|
|
|
integer(psb_mpik_) :: ictxt, icomm, np, me,&
|
|
|
|
integer(psb_mpik_) :: iictxt, iicomm, np, me,&
|
|
|
|
& proc_to_comm, p2ptag, p2pstat(mpi_status_size), iret
|
|
|
|
& proc_to_comm, p2ptag, p2pstat(mpi_status_size), iret
|
|
|
|
integer(psb_mpik_), allocatable :: prcid(:)
|
|
|
|
integer(psb_mpik_), allocatable :: prcid(:)
|
|
|
|
integer(psb_ipk_) :: nesd, nerv,&
|
|
|
|
integer(psb_ipk_) :: nesd, nerv,&
|
|
|
|
@ -1166,10 +1163,10 @@ subroutine psi_itran_vidx_vect(iictxt,iicomm,flag,beta,y,idx,&
|
|
|
|
info=psb_success_
|
|
|
|
info=psb_success_
|
|
|
|
name='psi_swap_tran'
|
|
|
|
name='psi_swap_tran'
|
|
|
|
call psb_erractionsave(err_act)
|
|
|
|
call psb_erractionsave(err_act)
|
|
|
|
ictxt = iictxt
|
|
|
|
iictxt = ictxt
|
|
|
|
icomm = iicomm
|
|
|
|
iicomm = icomm
|
|
|
|
|
|
|
|
|
|
|
|
call psb_info(ictxt,me,np)
|
|
|
|
call psb_info(iictxt,me,np)
|
|
|
|
if (np == -1) then
|
|
|
|
if (np == -1) then
|
|
|
|
info=psb_err_context_error_
|
|
|
|
info=psb_err_context_error_
|
|
|
|
call psb_errpush(info,name)
|
|
|
|
call psb_errpush(info,name)
|
|
|
|
@ -1214,12 +1211,12 @@ subroutine psi_itran_vidx_vect(iictxt,iicomm,flag,beta,y,idx,&
|
|
|
|
|
|
|
|
|
|
|
|
snd_pt = 1+pnti+nerv+psb_n_elem_send_
|
|
|
|
snd_pt = 1+pnti+nerv+psb_n_elem_send_
|
|
|
|
rcv_pt = 1+pnti+psb_n_elem_recv_
|
|
|
|
rcv_pt = 1+pnti+psb_n_elem_recv_
|
|
|
|
call psb_get_rank(prcid(i),ictxt,proc_to_comm)
|
|
|
|
call psb_get_rank(prcid(i),iictxt,proc_to_comm)
|
|
|
|
if ((nesd>0).and.(proc_to_comm /= me)) then
|
|
|
|
if ((nesd>0).and.(proc_to_comm /= me)) then
|
|
|
|
if (debug) write(*,*) me,'Posting receive from',prcid(i),rcv_pt
|
|
|
|
if (debug) write(*,*) me,'Posting receive from',prcid(i),rcv_pt
|
|
|
|
call mpi_irecv(y%combuf(snd_pt),nesd,&
|
|
|
|
call mpi_irecv(y%combuf(snd_pt),nesd,&
|
|
|
|
& psb_mpi_ipk_integer,prcid(i),&
|
|
|
|
& psb_mpi_ipk_integer,prcid(i),&
|
|
|
|
& p2ptag, icomm,y%comid(i,2),iret)
|
|
|
|
& p2ptag, iicomm,y%comid(i,2),iret)
|
|
|
|
end if
|
|
|
|
end if
|
|
|
|
pnti = pnti + nerv + nesd + 3
|
|
|
|
pnti = pnti + nerv + nesd + 3
|
|
|
|
end do
|
|
|
|
end do
|
|
|
|
@ -1267,7 +1264,7 @@ subroutine psi_itran_vidx_vect(iictxt,iicomm,flag,beta,y,idx,&
|
|
|
|
if ((nerv>0).and.(proc_to_comm /= me)) then
|
|
|
|
if ((nerv>0).and.(proc_to_comm /= me)) then
|
|
|
|
call mpi_isend(y%combuf(rcv_pt),nerv,&
|
|
|
|
call mpi_isend(y%combuf(rcv_pt),nerv,&
|
|
|
|
& psb_mpi_ipk_integer,prcid(i),&
|
|
|
|
& psb_mpi_ipk_integer,prcid(i),&
|
|
|
|
& p2ptag,icomm,y%comid(i,1),iret)
|
|
|
|
& p2ptag,iicomm,y%comid(i,1),iret)
|
|
|
|
end if
|
|
|
|
end if
|
|
|
|
|
|
|
|
|
|
|
|
if(iret /= mpi_success) then
|
|
|
|
if(iret /= mpi_success) then
|
|
|
|
@ -1372,11 +1369,10 @@ subroutine psi_itran_vidx_vect(iictxt,iicomm,flag,beta,y,idx,&
|
|
|
|
call psb_erractionrestore(err_act)
|
|
|
|
call psb_erractionrestore(err_act)
|
|
|
|
return
|
|
|
|
return
|
|
|
|
|
|
|
|
|
|
|
|
9999 call psb_error_handler(ictxt,err_act)
|
|
|
|
9999 call psb_error_handler(iictxt,err_act)
|
|
|
|
|
|
|
|
|
|
|
|
return
|
|
|
|
return
|
|
|
|
|
|
|
|
|
|
|
|
end subroutine psi_itran_vidx_vect
|
|
|
|
end subroutine psi_itran_vidx_vect
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
end submodule psi_iswaptran_mod
|
|
|
|
|