|
|
|
@ -87,9 +87,11 @@
|
|
|
|
|
! psb_comm_mov_ use ovr_mst_idx
|
|
|
|
|
!
|
|
|
|
|
!
|
|
|
|
|
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_desc_mod
|
|
|
|
|
use psb_penv_mod
|
|
|
|
@ -157,9 +159,8 @@ subroutine psi_iswaptranm(flag,n,beta,y,desc_a,work,info,data)
|
|
|
|
|
return
|
|
|
|
|
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_desc_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'
|
|
|
|
|
#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_) :: y(:,:), beta
|
|
|
|
|
integer(psb_ipk_), target :: work(:)
|
|
|
|
|
integer(psb_ipk_), intent(in) :: idx(:),totxch,totsnd, totrcv
|
|
|
|
|
|
|
|
|
|
! locals
|
|
|
|
|
integer(psb_mpik_) :: ictxt, icomm, np, me,&
|
|
|
|
|
integer(psb_mpik_) :: iictxt, iicomm, np, me,&
|
|
|
|
|
& proc_to_comm, p2ptag, p2pstat(mpi_status_size), iret
|
|
|
|
|
integer(psb_mpik_), allocatable, dimension(:) :: bsdidx, brvidx,&
|
|
|
|
|
& 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_
|
|
|
|
|
name='psi_swap_tran'
|
|
|
|
|
call psb_erractionsave(err_act)
|
|
|
|
|
ictxt = iictxt
|
|
|
|
|
icomm = iicomm
|
|
|
|
|
iictxt = ictxt
|
|
|
|
|
iicomm = icomm
|
|
|
|
|
|
|
|
|
|
call psb_info(ictxt,me,np)
|
|
|
|
|
call psb_info(iictxt,me,np)
|
|
|
|
|
if (np == -1) then
|
|
|
|
|
info=psb_err_context_error_
|
|
|
|
|
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_)
|
|
|
|
|
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
|
|
|
|
@ -311,7 +312,7 @@ subroutine psi_itranidxm(iictxt,iicomm,flag,n,beta,y,idx,totxch,totsnd,totrcv,wo
|
|
|
|
|
! swap elements using mpi_alltoallv
|
|
|
|
|
call mpi_alltoallv(rcvbuf,rvsz,brvidx,&
|
|
|
|
|
& 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
|
|
|
|
|
ierr(1) = iret
|
|
|
|
|
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_)
|
|
|
|
|
|
|
|
|
|
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)
|
|
|
|
|
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)
|
|
|
|
|
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)
|
|
|
|
|
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)
|
|
|
|
|
else if (proc_to_comm == me) 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_)
|
|
|
|
|
nerv = idx(pnti+psb_n_elem_recv_)
|
|
|
|
|
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
|
|
|
|
|
p2ptag = psb_int_swap_tag
|
|
|
|
|
call mpi_irecv(sndbuf(snd_pt),n*nesd,&
|
|
|
|
|
& psb_mpi_ipk_integer,prcid(i),&
|
|
|
|
|
& p2ptag,icomm,rvhd(i),iret)
|
|
|
|
|
& p2ptag,iicomm,rvhd(i),iret)
|
|
|
|
|
end if
|
|
|
|
|
rcv_pt = rcv_pt + n*nerv
|
|
|
|
|
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
|
|
|
|
|
if (usersend) call mpi_barrier(icomm,iret)
|
|
|
|
|
if (usersend) call mpi_barrier(iicomm,iret)
|
|
|
|
|
|
|
|
|
|
pnti = 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
|
|
|
|
|
call mpi_rsend(rcvbuf(rcv_pt),n*nerv,&
|
|
|
|
|
& psb_mpi_ipk_integer,prcid(i),&
|
|
|
|
|
& p2ptag,icomm,iret)
|
|
|
|
|
& p2ptag,iicomm,iret)
|
|
|
|
|
else
|
|
|
|
|
call mpi_send(rcvbuf(rcv_pt),n*nerv,&
|
|
|
|
|
& psb_mpi_ipk_integer,prcid(i),&
|
|
|
|
|
& p2ptag,icomm,iret)
|
|
|
|
|
& p2ptag,iicomm,iret)
|
|
|
|
|
end if
|
|
|
|
|
|
|
|
|
|
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_)
|
|
|
|
|
nerv = idx(pnti+psb_n_elem_recv_)
|
|
|
|
|
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)
|
|
|
|
|
rcv_pt = rcv_pt + n*nerv
|
|
|
|
|
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_)
|
|
|
|
|
nerv = idx(pnti+psb_n_elem_recv_)
|
|
|
|
|
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)
|
|
|
|
|
rcv_pt = rcv_pt + n*nerv
|
|
|
|
|
snd_pt = snd_pt + n*nesd
|
|
|
|
@ -516,7 +517,7 @@ subroutine psi_itranidxm(iictxt,iicomm,flag,n,beta,y,idx,totxch,totsnd,totrcv,wo
|
|
|
|
|
call psb_erractionrestore(err_act)
|
|
|
|
|
return
|
|
|
|
|
|
|
|
|
|
9999 call psb_error_handler(ictxt,err_act)
|
|
|
|
|
9999 call psb_error_handler(iictxt,err_act)
|
|
|
|
|
|
|
|
|
|
return
|
|
|
|
|
end subroutine psi_itranidxm
|
|
|
|
@ -579,7 +580,6 @@ end subroutine psi_itranidxm
|
|
|
|
|
!
|
|
|
|
|
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_desc_mod
|
|
|
|
|
use psb_penv_mod
|
|
|
|
@ -659,9 +659,8 @@ end subroutine psi_iswaptranv
|
|
|
|
|
!
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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_desc_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'
|
|
|
|
|
#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_) :: y(:), beta
|
|
|
|
|
integer(psb_ipk_), target :: work(:)
|
|
|
|
|
integer(psb_ipk_), intent(in) :: idx(:),totxch,totsnd, totrcv
|
|
|
|
|
|
|
|
|
|
! locals
|
|
|
|
|
integer(psb_mpik_) :: ictxt, icomm, np, me,&
|
|
|
|
|
integer(psb_mpik_) :: iictxt, iicomm, np, me,&
|
|
|
|
|
& proc_to_comm, p2ptag, p2pstat(mpi_status_size), iret
|
|
|
|
|
integer(psb_mpik_), allocatable, dimension(:) :: bsdidx, brvidx,&
|
|
|
|
|
& 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_
|
|
|
|
|
name='psi_swap_tran'
|
|
|
|
|
call psb_erractionsave(err_act)
|
|
|
|
|
ictxt = iictxt
|
|
|
|
|
icomm = iicomm
|
|
|
|
|
iictxt = ictxt
|
|
|
|
|
iicomm = icomm
|
|
|
|
|
|
|
|
|
|
call psb_info(ictxt,me,np)
|
|
|
|
|
call psb_info(iictxt,me,np)
|
|
|
|
|
if (np == -1) then
|
|
|
|
|
info=psb_err_context_error_
|
|
|
|
|
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_)
|
|
|
|
|
nerv = idx(pnti+psb_n_elem_recv_)
|
|
|
|
|
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
|
|
|
|
|
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
|
|
|
|
|
call mpi_alltoallv(rcvbuf,rvsz,brvidx,&
|
|
|
|
|
& 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
|
|
|
|
|
ierr(1) = iret
|
|
|
|
|
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_)
|
|
|
|
|
|
|
|
|
|
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)
|
|
|
|
|
if (nesd>0) call psb_rcv(ictxt,&
|
|
|
|
|
if (nesd>0) call psb_rcv(iictxt,&
|
|
|
|
|
& sndbuf(snd_pt:snd_pt+nesd-1), proc_to_comm)
|
|
|
|
|
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)
|
|
|
|
|
if (nerv>0) call psb_snd(ictxt,&
|
|
|
|
|
if (nerv>0) call psb_snd(iictxt,&
|
|
|
|
|
& rcvbuf(rcv_pt:rcv_pt+nerv-1), proc_to_comm)
|
|
|
|
|
else if (proc_to_comm == me) 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_)
|
|
|
|
|
nerv = idx(pnti+psb_n_elem_recv_)
|
|
|
|
|
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
|
|
|
|
|
p2ptag = psb_int_swap_tag
|
|
|
|
|
call mpi_irecv(sndbuf(snd_pt),nesd,&
|
|
|
|
|
& psb_mpi_ipk_integer,prcid(i),&
|
|
|
|
|
& p2ptag,icomm,rvhd(i),iret)
|
|
|
|
|
& p2ptag,iicomm,rvhd(i),iret)
|
|
|
|
|
end if
|
|
|
|
|
rcv_pt = rcv_pt + nerv
|
|
|
|
|
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
|
|
|
|
|
if (usersend) call mpi_barrier(icomm,iret)
|
|
|
|
|
if (usersend) call mpi_barrier(iicomm,iret)
|
|
|
|
|
|
|
|
|
|
pnti = 1
|
|
|
|
|
snd_pt = 1
|
|
|
|
@ -900,11 +899,11 @@ subroutine psi_itranidxv(iictxt,iicomm,flag,beta,y,idx,totxch,totsnd,totrcv,work
|
|
|
|
|
if (usersend) then
|
|
|
|
|
call mpi_rsend(rcvbuf(rcv_pt),nerv,&
|
|
|
|
|
& psb_mpi_ipk_integer,prcid(i),&
|
|
|
|
|
& p2ptag, icomm,iret)
|
|
|
|
|
& p2ptag, iicomm,iret)
|
|
|
|
|
else
|
|
|
|
|
call mpi_send(rcvbuf(rcv_pt),nerv,&
|
|
|
|
|
& psb_mpi_ipk_integer,prcid(i),&
|
|
|
|
|
& p2ptag, icomm,iret)
|
|
|
|
|
& p2ptag, iicomm,iret)
|
|
|
|
|
end if
|
|
|
|
|
|
|
|
|
|
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_)
|
|
|
|
|
nerv = idx(pnti+psb_n_elem_recv_)
|
|
|
|
|
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)
|
|
|
|
|
rcv_pt = rcv_pt + nerv
|
|
|
|
|
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_)
|
|
|
|
|
nerv = idx(pnti+psb_n_elem_recv_)
|
|
|
|
|
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)
|
|
|
|
|
rcv_pt = rcv_pt + nerv
|
|
|
|
|
snd_pt = snd_pt + nesd
|
|
|
|
@ -1024,7 +1023,7 @@ subroutine psi_itranidxv(iictxt,iicomm,flag,beta,y,idx,totxch,totsnd,totrcv,work
|
|
|
|
|
call psb_erractionrestore(err_act)
|
|
|
|
|
return
|
|
|
|
|
|
|
|
|
|
9999 call psb_error_handler(ictxt,err_act)
|
|
|
|
|
9999 call psb_error_handler(iictxt,err_act)
|
|
|
|
|
|
|
|
|
|
return
|
|
|
|
|
end subroutine psi_itranidxv
|
|
|
|
@ -1042,7 +1041,6 @@ end subroutine psi_itranidxv
|
|
|
|
|
!
|
|
|
|
|
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_error_mod
|
|
|
|
|
use psb_desc_mod
|
|
|
|
@ -1126,10 +1124,9 @@ end subroutine psi_iswaptran_vect
|
|
|
|
|
!
|
|
|
|
|
!
|
|
|
|
|
!
|
|
|
|
|
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)
|
|
|
|
|
|
|
|
|
|
use psi_mod, psb_protect_name => psi_itran_vidx_vect
|
|
|
|
|
use psb_error_mod
|
|
|
|
|
use psb_desc_mod
|
|
|
|
|
use psb_penv_mod
|
|
|
|
@ -1142,7 +1139,7 @@ subroutine psi_itran_vidx_vect(iictxt,iicomm,flag,beta,y,idx,&
|
|
|
|
|
include 'mpif.h'
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
integer(psb_ipk_), intent(in) :: iictxt,iicomm,flag
|
|
|
|
|
integer(psb_ipk_), intent(in) :: ictxt,icomm,flag
|
|
|
|
|
integer(psb_ipk_), intent(out) :: info
|
|
|
|
|
class(psb_i_base_vect_type) :: y
|
|
|
|
|
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
|
|
|
|
|
|
|
|
|
|
! locals
|
|
|
|
|
integer(psb_mpik_) :: ictxt, icomm, np, me,&
|
|
|
|
|
integer(psb_mpik_) :: iictxt, iicomm, np, me,&
|
|
|
|
|
& proc_to_comm, p2ptag, p2pstat(mpi_status_size), iret
|
|
|
|
|
integer(psb_mpik_), allocatable :: prcid(:)
|
|
|
|
|
integer(psb_ipk_) :: nesd, nerv,&
|
|
|
|
@ -1166,10 +1163,10 @@ subroutine psi_itran_vidx_vect(iictxt,iicomm,flag,beta,y,idx,&
|
|
|
|
|
info=psb_success_
|
|
|
|
|
name='psi_swap_tran'
|
|
|
|
|
call psb_erractionsave(err_act)
|
|
|
|
|
ictxt = iictxt
|
|
|
|
|
icomm = iicomm
|
|
|
|
|
iictxt = ictxt
|
|
|
|
|
iicomm = icomm
|
|
|
|
|
|
|
|
|
|
call psb_info(ictxt,me,np)
|
|
|
|
|
call psb_info(iictxt,me,np)
|
|
|
|
|
if (np == -1) then
|
|
|
|
|
info=psb_err_context_error_
|
|
|
|
|
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_
|
|
|
|
|
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 (debug) write(*,*) me,'Posting receive from',prcid(i),rcv_pt
|
|
|
|
|
call mpi_irecv(y%combuf(snd_pt),nesd,&
|
|
|
|
|
& psb_mpi_ipk_integer,prcid(i),&
|
|
|
|
|
& p2ptag, icomm,y%comid(i,2),iret)
|
|
|
|
|
& p2ptag, iicomm,y%comid(i,2),iret)
|
|
|
|
|
end if
|
|
|
|
|
pnti = pnti + nerv + nesd + 3
|
|
|
|
|
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
|
|
|
|
|
call mpi_isend(y%combuf(rcv_pt),nerv,&
|
|
|
|
|
& psb_mpi_ipk_integer,prcid(i),&
|
|
|
|
|
& p2ptag,icomm,y%comid(i,1),iret)
|
|
|
|
|
& p2ptag,iicomm,y%comid(i,1),iret)
|
|
|
|
|
end if
|
|
|
|
|
|
|
|
|
|
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)
|
|
|
|
|
return
|
|
|
|
|
|
|
|
|
|
9999 call psb_error_handler(ictxt,err_act)
|
|
|
|
|
9999 call psb_error_handler(iictxt,err_act)
|
|
|
|
|
|
|
|
|
|
return
|
|
|
|
|
|
|
|
|
|
end subroutine psi_itran_vidx_vect
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
end submodule psi_iswaptran_mod
|
|
|
|
|