|
|
|
@ -111,7 +111,7 @@ subroutine psi_zswaptranm(flag,n,beta,y,desc_a,work,info,data)
|
|
|
|
|
! locals
|
|
|
|
|
integer(psb_ipk_) :: ictxt, np, me, icomm, idxs, idxr, err_act, totxch, data_
|
|
|
|
|
integer(psb_ipk_), pointer :: d_idx(:)
|
|
|
|
|
integer(psb_ipk_) :: int_err(5)
|
|
|
|
|
integer(psb_ipk_) :: ierr(5)
|
|
|
|
|
character(len=20) :: name
|
|
|
|
|
|
|
|
|
|
info=psb_success_
|
|
|
|
@ -161,7 +161,7 @@ subroutine psi_zswaptranm(flag,n,beta,y,desc_a,work,info,data)
|
|
|
|
|
return
|
|
|
|
|
end subroutine psi_zswaptranm
|
|
|
|
|
|
|
|
|
|
subroutine psi_ztranidxm(ictxt,icomm,flag,n,beta,y,idx,totxch,totsnd,totrcv,work,info)
|
|
|
|
|
subroutine psi_ztranidxm(iictxt,iicomm,flag,n,beta,y,idx,totxch,totsnd,totrcv,work,info)
|
|
|
|
|
|
|
|
|
|
use psi_mod, psb_protect_name => psi_ztranidxm
|
|
|
|
|
use psb_error_mod
|
|
|
|
@ -175,20 +175,27 @@ subroutine psi_ztranidxm(ictxt,icomm,flag,n,beta,y,idx,totxch,totsnd,totrcv,work
|
|
|
|
|
include 'mpif.h'
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
integer(psb_ipk_), intent(in) :: ictxt,icomm,flag,n
|
|
|
|
|
integer(psb_ipk_), intent(in) :: iictxt,iicomm,flag,n
|
|
|
|
|
integer(psb_ipk_), intent(out) :: info
|
|
|
|
|
complex(psb_dpk_) :: y(:,:), beta
|
|
|
|
|
complex(psb_dpk_), target :: work(:)
|
|
|
|
|
integer(psb_ipk_), intent(in) :: idx(:),totxch,totsnd, totrcv
|
|
|
|
|
|
|
|
|
|
! locals
|
|
|
|
|
integer(psb_ipk_) :: np, me, nesd, nerv,&
|
|
|
|
|
& proc_to_comm, p2ptag, p2pstat(mpi_status_size),&
|
|
|
|
|
& iret, err_act, i, idx_pt, totsnd_, totrcv_,&
|
|
|
|
|
& snd_pt, rcv_pt, pnti, data_
|
|
|
|
|
integer(psb_ipk_), allocatable, dimension(:) :: bsdidx, brvidx,&
|
|
|
|
|
integer(psb_mpik_) :: ictxt, icomm, np, me,&
|
|
|
|
|
& proc_to_comm, p2ptag, p2pstat(mpi_status_size), iret
|
|
|
|
|
integer(psb_mpik_), allocatable, dimension(:) :: bsdidx, brvidx,&
|
|
|
|
|
& sdsz, rvsz, prcid, rvhd, sdhd
|
|
|
|
|
integer(psb_ipk_) :: int_err(5)
|
|
|
|
|
integer(psb_ipk_) :: nesd, nerv,&
|
|
|
|
|
& err_act, i, idx_pt, totsnd_, totrcv_,&
|
|
|
|
|
& snd_pt, rcv_pt, pnti
|
|
|
|
|
!!$ integer(psb_ipk_) :: np, me, nesd, nerv,&
|
|
|
|
|
!!$ & proc_to_comm, p2ptag, p2pstat(mpi_status_size),&
|
|
|
|
|
!!$ & iret, err_act, i, idx_pt, totsnd_, totrcv_,&
|
|
|
|
|
!!$ & snd_pt, rcv_pt, pnti, data_
|
|
|
|
|
!!$ integer(psb_ipk_), allocatable, dimension(:) :: bsdidx, brvidx,&
|
|
|
|
|
!!$ & sdsz, rvsz, prcid, rvhd, sdhd
|
|
|
|
|
integer(psb_ipk_) :: ierr(5)
|
|
|
|
|
logical :: swap_mpi, swap_sync, swap_send, swap_recv,&
|
|
|
|
|
& albf,do_send,do_recv
|
|
|
|
|
logical, parameter :: usersend=.false.
|
|
|
|
@ -202,6 +209,8 @@ subroutine psi_ztranidxm(ictxt,icomm,flag,n,beta,y,idx,totxch,totsnd,totrcv,work
|
|
|
|
|
info=psb_success_
|
|
|
|
|
name='psi_swap_tran'
|
|
|
|
|
call psb_erractionsave(err_act)
|
|
|
|
|
ictxt = iictxt
|
|
|
|
|
icomm = iicomm
|
|
|
|
|
|
|
|
|
|
call psb_info(ictxt,me,np)
|
|
|
|
|
if (np == -1) then
|
|
|
|
@ -314,9 +323,9 @@ subroutine psi_ztranidxm(ictxt,icomm,flag,n,beta,y,idx,totxch,totsnd,totrcv,work
|
|
|
|
|
& mpi_double_complex,&
|
|
|
|
|
& sndbuf,sdsz,bsdidx,mpi_double_complex,icomm,iret)
|
|
|
|
|
if(iret /= mpi_success) then
|
|
|
|
|
int_err(1) = iret
|
|
|
|
|
ierr(1) = iret
|
|
|
|
|
info=psb_err_mpi_error_
|
|
|
|
|
call psb_errpush(info,name,i_err=int_err)
|
|
|
|
|
call psb_errpush(info,name,i_err=ierr)
|
|
|
|
|
goto 9999
|
|
|
|
|
end if
|
|
|
|
|
|
|
|
|
@ -379,7 +388,7 @@ subroutine psi_ztranidxm(ictxt,icomm,flag,n,beta,y,idx,totxch,totsnd,totrcv,work
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
! Then I post all the blocking sends
|
|
|
|
|
if (usersend) call mpi_barrier(icomm,info)
|
|
|
|
|
if (usersend) call mpi_barrier(icomm,iret)
|
|
|
|
|
|
|
|
|
|
pnti = 1
|
|
|
|
|
snd_pt = 1
|
|
|
|
@ -402,9 +411,9 @@ subroutine psi_ztranidxm(ictxt,icomm,flag,n,beta,y,idx,totxch,totsnd,totrcv,work
|
|
|
|
|
end if
|
|
|
|
|
|
|
|
|
|
if(iret /= mpi_success) then
|
|
|
|
|
int_err(1) = iret
|
|
|
|
|
ierr(1) = iret
|
|
|
|
|
info=psb_err_mpi_error_
|
|
|
|
|
call psb_errpush(info,name,i_err=int_err)
|
|
|
|
|
call psb_errpush(info,name,i_err=ierr)
|
|
|
|
|
goto 9999
|
|
|
|
|
end if
|
|
|
|
|
end if
|
|
|
|
@ -426,9 +435,9 @@ subroutine psi_ztranidxm(ictxt,icomm,flag,n,beta,y,idx,totxch,totsnd,totrcv,work
|
|
|
|
|
if ((proc_to_comm /= me).and.(nesd>0)) then
|
|
|
|
|
call mpi_wait(rvhd(i),p2pstat,iret)
|
|
|
|
|
if(iret /= mpi_success) then
|
|
|
|
|
int_err(1) = iret
|
|
|
|
|
ierr(1) = iret
|
|
|
|
|
info=psb_err_mpi_error_
|
|
|
|
|
call psb_errpush(info,name,i_err=int_err)
|
|
|
|
|
call psb_errpush(info,name,i_err=ierr)
|
|
|
|
|
goto 9999
|
|
|
|
|
end if
|
|
|
|
|
else if (proc_to_comm == me) then
|
|
|
|
@ -606,7 +615,7 @@ subroutine psi_zswaptranv(flag,beta,y,desc_a,work,info,data)
|
|
|
|
|
! locals
|
|
|
|
|
integer(psb_ipk_) :: ictxt, np, me, icomm, idxs, idxr, totxch, err_act, data_
|
|
|
|
|
integer(psb_ipk_), pointer :: d_idx(:)
|
|
|
|
|
integer(psb_ipk_) :: int_err(5)
|
|
|
|
|
integer(psb_ipk_) :: ierr(5)
|
|
|
|
|
character(len=20) :: name
|
|
|
|
|
|
|
|
|
|
info=psb_success_
|
|
|
|
@ -657,7 +666,7 @@ end subroutine psi_zswaptranv
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
subroutine psi_ztranidxv(ictxt,icomm,flag,beta,y,idx,totxch,totsnd,totrcv,work,info)
|
|
|
|
|
subroutine psi_ztranidxv(iictxt,iicomm,flag,beta,y,idx,totxch,totsnd,totrcv,work,info)
|
|
|
|
|
|
|
|
|
|
use psi_mod, psb_protect_name => psi_ztranidxv
|
|
|
|
|
use psb_error_mod
|
|
|
|
@ -671,20 +680,27 @@ subroutine psi_ztranidxv(ictxt,icomm,flag,beta,y,idx,totxch,totsnd,totrcv,work,i
|
|
|
|
|
include 'mpif.h'
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
integer(psb_ipk_), intent(in) :: ictxt,icomm,flag
|
|
|
|
|
integer(psb_ipk_), intent(in) :: iictxt,iicomm,flag
|
|
|
|
|
integer(psb_ipk_), intent(out) :: info
|
|
|
|
|
complex(psb_dpk_) :: y(:), beta
|
|
|
|
|
complex(psb_dpk_), target :: work(:)
|
|
|
|
|
integer(psb_ipk_), intent(in) :: idx(:),totxch,totsnd, totrcv
|
|
|
|
|
|
|
|
|
|
! locals
|
|
|
|
|
integer(psb_ipk_) :: np, me, nesd, nerv,&
|
|
|
|
|
& proc_to_comm, p2ptag, p2pstat(mpi_status_size),&
|
|
|
|
|
& iret, err_act, i, idx_pt, totsnd_, totrcv_,&
|
|
|
|
|
& snd_pt, rcv_pt, pnti, data_, n
|
|
|
|
|
integer(psb_ipk_), allocatable, dimension(:) :: bsdidx, brvidx,&
|
|
|
|
|
integer(psb_mpik_) :: ictxt, icomm, np, me,&
|
|
|
|
|
& proc_to_comm, p2ptag, p2pstat(mpi_status_size), iret
|
|
|
|
|
integer(psb_mpik_), allocatable, dimension(:) :: bsdidx, brvidx,&
|
|
|
|
|
& sdsz, rvsz, prcid, rvhd, sdhd
|
|
|
|
|
integer(psb_ipk_) :: int_err(5)
|
|
|
|
|
integer(psb_ipk_) :: nesd, nerv,&
|
|
|
|
|
& err_act, i, idx_pt, totsnd_, totrcv_,&
|
|
|
|
|
& snd_pt, rcv_pt, pnti, n
|
|
|
|
|
!!$ integer(psb_ipk_) :: np, me, nesd, nerv,&
|
|
|
|
|
!!$ & proc_to_comm, p2ptag, p2pstat(mpi_status_size),&
|
|
|
|
|
!!$ & iret, err_act, i, idx_pt, totsnd_, totrcv_,&
|
|
|
|
|
!!$ & snd_pt, rcv_pt, pnti, data_, n
|
|
|
|
|
!!$ integer(psb_ipk_), allocatable, dimension(:) :: bsdidx, brvidx,&
|
|
|
|
|
!!$ & sdsz, rvsz, prcid, rvhd, sdhd
|
|
|
|
|
integer(psb_ipk_) :: ierr(5)
|
|
|
|
|
logical :: swap_mpi, swap_sync, swap_send, swap_recv,&
|
|
|
|
|
& albf,do_send,do_recv
|
|
|
|
|
logical, parameter :: usersend=.false.
|
|
|
|
@ -698,6 +714,8 @@ subroutine psi_ztranidxv(ictxt,icomm,flag,beta,y,idx,totxch,totsnd,totrcv,work,i
|
|
|
|
|
info=psb_success_
|
|
|
|
|
name='psi_swap_tran'
|
|
|
|
|
call psb_erractionsave(err_act)
|
|
|
|
|
ictxt = iictxt
|
|
|
|
|
icomm = iicomm
|
|
|
|
|
|
|
|
|
|
call psb_info(ictxt,me,np)
|
|
|
|
|
if (np == -1) then
|
|
|
|
@ -809,9 +827,9 @@ subroutine psi_ztranidxv(ictxt,icomm,flag,beta,y,idx,totxch,totsnd,totrcv,work,i
|
|
|
|
|
& mpi_double_complex,&
|
|
|
|
|
& sndbuf,sdsz,bsdidx,mpi_double_complex,icomm,iret)
|
|
|
|
|
if(iret /= mpi_success) then
|
|
|
|
|
int_err(1) = iret
|
|
|
|
|
ierr(1) = iret
|
|
|
|
|
info=psb_err_mpi_error_
|
|
|
|
|
call psb_errpush(info,name,i_err=int_err)
|
|
|
|
|
call psb_errpush(info,name,i_err=ierr)
|
|
|
|
|
goto 9999
|
|
|
|
|
end if
|
|
|
|
|
|
|
|
|
@ -874,7 +892,7 @@ subroutine psi_ztranidxv(ictxt,icomm,flag,beta,y,idx,totxch,totsnd,totrcv,work,i
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
! Then I post all the blocking sends
|
|
|
|
|
if (usersend) call mpi_barrier(icomm,info)
|
|
|
|
|
if (usersend) call mpi_barrier(icomm,iret)
|
|
|
|
|
|
|
|
|
|
pnti = 1
|
|
|
|
|
snd_pt = 1
|
|
|
|
@ -897,9 +915,9 @@ subroutine psi_ztranidxv(ictxt,icomm,flag,beta,y,idx,totxch,totsnd,totrcv,work,i
|
|
|
|
|
end if
|
|
|
|
|
|
|
|
|
|
if(iret /= mpi_success) then
|
|
|
|
|
int_err(1) = iret
|
|
|
|
|
ierr(1) = iret
|
|
|
|
|
info=psb_err_mpi_error_
|
|
|
|
|
call psb_errpush(info,name,i_err=int_err)
|
|
|
|
|
call psb_errpush(info,name,i_err=ierr)
|
|
|
|
|
goto 9999
|
|
|
|
|
end if
|
|
|
|
|
end if
|
|
|
|
@ -920,9 +938,9 @@ subroutine psi_ztranidxv(ictxt,icomm,flag,beta,y,idx,totxch,totsnd,totrcv,work,i
|
|
|
|
|
if ((proc_to_comm /= me).and.(nesd>0)) then
|
|
|
|
|
call mpi_wait(rvhd(i),p2pstat,iret)
|
|
|
|
|
if(iret /= mpi_success) then
|
|
|
|
|
int_err(1) = iret
|
|
|
|
|
ierr(1) = iret
|
|
|
|
|
info=psb_err_mpi_error_
|
|
|
|
|
call psb_errpush(info,name,i_err=int_err)
|
|
|
|
|
call psb_errpush(info,name,i_err=ierr)
|
|
|
|
|
goto 9999
|
|
|
|
|
end if
|
|
|
|
|
else if (proc_to_comm == me) then
|
|
|
|
@ -1049,7 +1067,7 @@ subroutine psi_zswaptran_vect(flag,beta,y,desc_a,work,info,data)
|
|
|
|
|
! locals
|
|
|
|
|
integer(psb_ipk_) :: ictxt, np, me, icomm, idxs, idxr, totxch, err_act, data_
|
|
|
|
|
integer(psb_ipk_), pointer :: d_idx(:)
|
|
|
|
|
integer(psb_ipk_) :: int_err(5)
|
|
|
|
|
integer(psb_ipk_) :: ierr(5)
|
|
|
|
|
character(len=20) :: name
|
|
|
|
|
|
|
|
|
|
info=psb_success_
|
|
|
|
@ -1100,7 +1118,7 @@ end subroutine psi_zswaptran_vect
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
subroutine psi_ztranidx_vect(ictxt,icomm,flag,beta,y,idx,&
|
|
|
|
|
subroutine psi_ztranidx_vect(iictxt,iicomm,flag,beta,y,idx,&
|
|
|
|
|
& totxch,totsnd,totrcv,work,info)
|
|
|
|
|
|
|
|
|
|
use psi_mod, psb_protect_name => psi_ztranidx_vect
|
|
|
|
@ -1116,7 +1134,7 @@ subroutine psi_ztranidx_vect(ictxt,icomm,flag,beta,y,idx,&
|
|
|
|
|
include 'mpif.h'
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
integer(psb_ipk_), intent(in) :: ictxt,icomm,flag
|
|
|
|
|
integer(psb_ipk_), intent(in) :: iictxt,iicomm,flag
|
|
|
|
|
integer(psb_ipk_), intent(out) :: info
|
|
|
|
|
class(psb_z_base_vect_type) :: y
|
|
|
|
|
complex(psb_dpk_) :: beta
|
|
|
|
@ -1124,13 +1142,14 @@ subroutine psi_ztranidx_vect(ictxt,icomm,flag,beta,y,idx,&
|
|
|
|
|
integer(psb_ipk_), intent(in) :: idx(:),totxch,totsnd, totrcv
|
|
|
|
|
|
|
|
|
|
! locals
|
|
|
|
|
integer(psb_ipk_) :: np, me, nesd, nerv,&
|
|
|
|
|
& proc_to_comm, p2ptag, p2pstat(mpi_status_size),&
|
|
|
|
|
& iret, err_act, i, idx_pt, totsnd_, totrcv_,&
|
|
|
|
|
& snd_pt, rcv_pt, pnti, data_, n
|
|
|
|
|
integer(psb_ipk_), allocatable, dimension(:) :: bsdidx, brvidx,&
|
|
|
|
|
integer(psb_mpik_) :: ictxt, icomm, np, me,&
|
|
|
|
|
& proc_to_comm, p2ptag, p2pstat(mpi_status_size), iret
|
|
|
|
|
integer(psb_mpik_), allocatable, dimension(:) :: bsdidx, brvidx,&
|
|
|
|
|
& sdsz, rvsz, prcid, rvhd, sdhd
|
|
|
|
|
integer(psb_ipk_) :: int_err(5)
|
|
|
|
|
integer(psb_ipk_) :: nesd, nerv,&
|
|
|
|
|
& err_act, i, idx_pt, totsnd_, totrcv_,&
|
|
|
|
|
& snd_pt, rcv_pt, pnti, n
|
|
|
|
|
integer(psb_ipk_) :: ierr(5)
|
|
|
|
|
logical :: swap_mpi, swap_sync, swap_send, swap_recv,&
|
|
|
|
|
& albf,do_send,do_recv
|
|
|
|
|
logical, parameter :: usersend=.false.
|
|
|
|
@ -1144,6 +1163,8 @@ subroutine psi_ztranidx_vect(ictxt,icomm,flag,beta,y,idx,&
|
|
|
|
|
info=psb_success_
|
|
|
|
|
name='psi_swap_tran'
|
|
|
|
|
call psb_erractionsave(err_act)
|
|
|
|
|
ictxt = iictxt
|
|
|
|
|
icomm = iicomm
|
|
|
|
|
|
|
|
|
|
call psb_info(ictxt,me,np)
|
|
|
|
|
if (np == -1) then
|
|
|
|
@ -1255,9 +1276,9 @@ subroutine psi_ztranidx_vect(ictxt,icomm,flag,beta,y,idx,&
|
|
|
|
|
& mpi_double_complex,&
|
|
|
|
|
& sndbuf,sdsz,bsdidx,mpi_double_complex,icomm,iret)
|
|
|
|
|
if(iret /= mpi_success) then
|
|
|
|
|
int_err(1) = iret
|
|
|
|
|
ierr(1) = iret
|
|
|
|
|
info=psb_err_mpi_error_
|
|
|
|
|
call psb_errpush(info,name,i_err=int_err)
|
|
|
|
|
call psb_errpush(info,name,i_err=ierr)
|
|
|
|
|
goto 9999
|
|
|
|
|
end if
|
|
|
|
|
|
|
|
|
@ -1320,7 +1341,7 @@ subroutine psi_ztranidx_vect(ictxt,icomm,flag,beta,y,idx,&
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
! Then I post all the blocking sends
|
|
|
|
|
if (usersend) call mpi_barrier(icomm,info)
|
|
|
|
|
if (usersend) call mpi_barrier(icomm,iret)
|
|
|
|
|
|
|
|
|
|
pnti = 1
|
|
|
|
|
snd_pt = 1
|
|
|
|
@ -1343,9 +1364,9 @@ subroutine psi_ztranidx_vect(ictxt,icomm,flag,beta,y,idx,&
|
|
|
|
|
end if
|
|
|
|
|
|
|
|
|
|
if(iret /= mpi_success) then
|
|
|
|
|
int_err(1) = iret
|
|
|
|
|
ierr(1) = iret
|
|
|
|
|
info=psb_err_mpi_error_
|
|
|
|
|
call psb_errpush(info,name,i_err=int_err)
|
|
|
|
|
call psb_errpush(info,name,i_err=ierr)
|
|
|
|
|
goto 9999
|
|
|
|
|
end if
|
|
|
|
|
end if
|
|
|
|
@ -1366,9 +1387,9 @@ subroutine psi_ztranidx_vect(ictxt,icomm,flag,beta,y,idx,&
|
|
|
|
|
if ((proc_to_comm /= me).and.(nesd>0)) then
|
|
|
|
|
call mpi_wait(rvhd(i),p2pstat,iret)
|
|
|
|
|
if(iret /= mpi_success) then
|
|
|
|
|
int_err(1) = iret
|
|
|
|
|
ierr(1) = iret
|
|
|
|
|
info=psb_err_mpi_error_
|
|
|
|
|
call psb_errpush(info,name,i_err=int_err)
|
|
|
|
|
call psb_errpush(info,name,i_err=ierr)
|
|
|
|
|
goto 9999
|
|
|
|
|
end if
|
|
|
|
|
else if (proc_to_comm == me) then
|
|
|
|
|