Merge branch 'new-context' into implement-ainv

# Conflicts:
#	prec/impl/psb_c_bjacprec_impl.f90
#	prec/impl/psb_c_prec_type_impl.f90
#	prec/impl/psb_d_bjacprec_impl.f90
#	prec/impl/psb_d_prec_type_impl.f90
#	prec/impl/psb_s_bjacprec_impl.f90
#	prec/impl/psb_s_prec_type_impl.f90
#	prec/impl/psb_z_bjacprec_impl.f90
#	prec/impl/psb_z_prec_type_impl.f90
#	prec/psb_c_prec_type.f90
#	prec/psb_d_prec_type.f90
#	prec/psb_s_prec_type.f90
#	prec/psb_z_prec_type.f90
#	test/pargen/psb_d_pde2d.f90
#	test/pargen/psb_d_pde3d.f90
#	test/pargen/psb_s_pde2d.f90
#	test/pargen/psb_s_pde3d.f90
implement-ainv
Salvatore Filippone 4 years ago
commit 6866558372

@ -47,7 +47,8 @@ subroutine psi_covrl_restr_vect(x,xs,desc_a,info)
integer(psb_ipk_), intent(out) :: info
! locals
integer(psb_ipk_) :: ictxt, np, me, err_act, i, idx, isz
type(psb_ctxt_type) :: ctxt
integer(psb_ipk_) :: np, me, err_act, i, idx, isz
character(len=20) :: name, ch_err
name='psi_covrl_restr_vect'
@ -56,8 +57,8 @@ subroutine psi_covrl_restr_vect(x,xs,desc_a,info)
if (psb_errstatus_fatal()) then
info = psb_err_internal_error_ ; goto 9999
end if
ictxt = desc_a%get_context()
call psb_info(ictxt, me, np)
ctxt = desc_a%get_context()
call psb_info(ctxt, me, np)
if (np == -1) then
info = psb_err_context_error_
call psb_errpush(info,name)
@ -71,7 +72,7 @@ subroutine psi_covrl_restr_vect(x,xs,desc_a,info)
call psb_erractionrestore(err_act)
return
9999 call psb_error_handler(ictxt,err_act)
9999 call psb_error_handler(ctxt,err_act)
return
end subroutine psi_covrl_restr_vect
@ -89,7 +90,8 @@ subroutine psi_covrl_restr_multivect(x,xs,desc_a,info)
integer(psb_ipk_), intent(out) :: info
! locals
integer(psb_ipk_) :: ictxt, np, me, err_act, i, idx, isz, nc
type(psb_ctxt_type) :: ctxt
integer(psb_ipk_) :: np, me, err_act, i, idx, isz, nc
character(len=20) :: name, ch_err
name='psi_covrl_restr_mv'
@ -98,8 +100,8 @@ subroutine psi_covrl_restr_multivect(x,xs,desc_a,info)
if (psb_errstatus_fatal()) then
info = psb_err_internal_error_ ; goto 9999
end if
ictxt = desc_a%get_context()
call psb_info(ictxt, me, np)
ctxt = desc_a%get_context()
call psb_info(ctxt, me, np)
if (np == -1) then
info = psb_err_context_error_
call psb_errpush(info,name)
@ -112,7 +114,7 @@ subroutine psi_covrl_restr_multivect(x,xs,desc_a,info)
call psb_erractionrestore(err_act)
return
9999 call psb_error_handler(ictxt,err_act)
9999 call psb_error_handler(ctxt,err_act)
return
end subroutine psi_covrl_restr_multivect

@ -45,7 +45,8 @@ subroutine psi_covrl_restrr1(x,xs,desc_a,info)
integer(psb_ipk_), intent(out) :: info
! locals
integer(psb_ipk_) :: ictxt, np, me, err_act, i, idx, isz
type(psb_ctxt_type) :: ctxt
integer(psb_ipk_) :: np, me, err_act, i, idx, isz
character(len=20) :: name, ch_err
name='psi_covrl_restrr1'
@ -54,8 +55,8 @@ subroutine psi_covrl_restrr1(x,xs,desc_a,info)
if (psb_errstatus_fatal()) then
info = psb_err_internal_error_ ; goto 9999
end if
ictxt = desc_a%get_context()
call psb_info(ictxt, me, np)
ctxt = desc_a%get_context()
call psb_info(ctxt, me, np)
if (np == -1) then
info = psb_err_context_error_
call psb_errpush(info,name)
@ -72,7 +73,7 @@ subroutine psi_covrl_restrr1(x,xs,desc_a,info)
call psb_erractionrestore(err_act)
return
9999 call psb_error_handler(ictxt,err_act)
9999 call psb_error_handler(ctxt,err_act)
return
end subroutine psi_covrl_restrr1
@ -88,7 +89,8 @@ subroutine psi_covrl_restrr2(x,xs,desc_a,info)
integer(psb_ipk_), intent(out) :: info
! locals
integer(psb_ipk_) :: ictxt, np, me, err_act, i, idx, isz
type(psb_ctxt_type) :: ctxt
integer(psb_ipk_) :: np, me, err_act, i, idx, isz
character(len=20) :: name, ch_err
name='psi_covrl_restrr2'
@ -97,8 +99,8 @@ subroutine psi_covrl_restrr2(x,xs,desc_a,info)
if (psb_errstatus_fatal()) then
info = psb_err_internal_error_ ; goto 9999
end if
ictxt = desc_a%get_context()
call psb_info(ictxt, me, np)
ctxt = desc_a%get_context()
call psb_info(ctxt, me, np)
if (np == -1) then
info = psb_err_context_error_
call psb_errpush(info,name)
@ -122,7 +124,7 @@ subroutine psi_covrl_restrr2(x,xs,desc_a,info)
call psb_erractionrestore(err_act)
return
9999 call psb_error_handler(ictxt,err_act)
9999 call psb_error_handler(ctxt,err_act)
return
end subroutine psi_covrl_restrr2

@ -47,7 +47,8 @@ subroutine psi_covrl_save_vect(x,xs,desc_a,info)
integer(psb_ipk_), intent(out) :: info
! locals
integer(psb_ipk_) :: ictxt, np, me, err_act, i, idx, isz
type(psb_ctxt_type) :: ctxt
integer(psb_ipk_) :: np, me, err_act, i, idx, isz
character(len=20) :: name, ch_err
name='psi_dovrl_saver1'
@ -56,8 +57,8 @@ subroutine psi_covrl_save_vect(x,xs,desc_a,info)
if (psb_errstatus_fatal()) then
info = psb_err_internal_error_ ; goto 9999
end if
ictxt = desc_a%get_context()
call psb_info(ictxt, me, np)
ctxt = desc_a%get_context()
call psb_info(ctxt, me, np)
if (np == -1) then
info = psb_err_context_error_
call psb_errpush(info,name)
@ -77,13 +78,11 @@ subroutine psi_covrl_save_vect(x,xs,desc_a,info)
call psb_erractionrestore(err_act)
return
9999 call psb_error_handler(ictxt,err_act)
9999 call psb_error_handler(ctxt,err_act)
return
end subroutine psi_covrl_save_vect
subroutine psi_covrl_save_multivect(x,xs,desc_a,info)
use psi_mod, psi_protect_name => psi_covrl_save_multivect
use psb_realloc_mod
@ -97,7 +96,8 @@ subroutine psi_covrl_save_multivect(x,xs,desc_a,info)
integer(psb_ipk_), intent(out) :: info
! locals
integer(psb_ipk_) :: ictxt, np, me, err_act, i, idx, isz, nc
type(psb_ctxt_type) :: ctxt
integer(psb_ipk_) :: np, me, err_act, i, idx, isz, nc
character(len=20) :: name, ch_err
name='psi_dovrl_saver1'
@ -106,8 +106,8 @@ subroutine psi_covrl_save_multivect(x,xs,desc_a,info)
if (psb_errstatus_fatal()) then
info = psb_err_internal_error_ ; goto 9999
end if
ictxt = desc_a%get_context()
call psb_info(ictxt, me, np)
ctxt = desc_a%get_context()
call psb_info(ctxt, me, np)
if (np == -1) then
info = psb_err_context_error_
call psb_errpush(info,name)
@ -128,7 +128,7 @@ subroutine psi_covrl_save_multivect(x,xs,desc_a,info)
call psb_erractionrestore(err_act)
return
9999 call psb_error_handler(ictxt,err_act)
9999 call psb_error_handler(ctxt,err_act)
return
end subroutine psi_covrl_save_multivect

@ -47,7 +47,8 @@ subroutine psi_covrl_saver1(x,xs,desc_a,info)
integer(psb_ipk_), intent(out) :: info
! locals
integer(psb_ipk_) :: ictxt, np, me, err_act, i, idx, isz
type(psb_ctxt_type) :: ctxt
integer(psb_ipk_) :: np, me, err_act, i, idx, isz
character(len=20) :: name, ch_err
name='psi_covrl_saver1'
@ -56,8 +57,8 @@ subroutine psi_covrl_saver1(x,xs,desc_a,info)
if (psb_errstatus_fatal()) then
info = psb_err_internal_error_ ; goto 9999
end if
ictxt = desc_a%get_context()
call psb_info(ictxt, me, np)
ctxt = desc_a%get_context()
call psb_info(ctxt, me, np)
if (np == -1) then
info = psb_err_context_error_
call psb_errpush(info,name)
@ -80,7 +81,7 @@ subroutine psi_covrl_saver1(x,xs,desc_a,info)
call psb_erractionrestore(err_act)
return
9999 call psb_error_handler(ictxt,err_act)
9999 call psb_error_handler(ctxt,err_act)
return
end subroutine psi_covrl_saver1
@ -99,7 +100,8 @@ subroutine psi_covrl_saver2(x,xs,desc_a,info)
integer(psb_ipk_), intent(out) :: info
! locals
integer(psb_ipk_) :: ictxt, np, me, err_act, i, idx, isz, nc
type(psb_ctxt_type) :: ctxt
integer(psb_ipk_) :: np, me, err_act, i, idx, isz, nc
character(len=20) :: name, ch_err
name='psi_covrl_saver2'
@ -108,8 +110,8 @@ subroutine psi_covrl_saver2(x,xs,desc_a,info)
if (psb_errstatus_fatal()) then
info = psb_err_internal_error_ ; goto 9999
end if
ictxt = desc_a%get_context()
call psb_info(ictxt, me, np)
ctxt = desc_a%get_context()
call psb_info(ctxt, me, np)
if (np == -1) then
info = psb_err_context_error_
call psb_errpush(info,name)
@ -133,7 +135,7 @@ subroutine psi_covrl_saver2(x,xs,desc_a,info)
call psb_erractionrestore(err_act)
return
9999 call psb_error_handler(ictxt,err_act)
9999 call psb_error_handler(ctxt,err_act)
return
end subroutine psi_covrl_saver2

@ -32,7 +32,7 @@
! Subroutine: psi_covrl_update
! These subroutines update the overlap region of a vector; they are used
! for the transpose matrix-vector product when there is a nonempty overlap,
! or for the application of Additive Schwarz preconditioners.
! or for the application of Additive Schwarz preconditioners.
!
!
!
@ -50,7 +50,8 @@ subroutine psi_covrl_upd_vect(x,desc_a,update,info)
! locals
complex(psb_spk_), allocatable :: xs(:)
integer(psb_ipk_) :: ictxt, np, me, err_act, i, idx, ndm, nx
type(psb_ctxt_type) :: ctxt
integer(psb_ipk_) :: np, me, err_act, i, idx, ndm, nx
integer(psb_ipk_) :: ierr(5)
character(len=20) :: name, ch_err
@ -61,8 +62,8 @@ subroutine psi_covrl_upd_vect(x,desc_a,update,info)
if (psb_errstatus_fatal()) then
info = psb_err_internal_error_ ; goto 9999
end if
ictxt = desc_a%get_context()
call psb_info(ictxt, me, np)
ctxt = desc_a%get_context()
call psb_info(ctxt, me, np)
if (np == -1) then
info = psb_err_context_error_
call psb_errpush(info,name)
@ -112,7 +113,7 @@ subroutine psi_covrl_upd_vect(x,desc_a,update,info)
call psb_erractionrestore(err_act)
return
9999 call psb_error_handler(ictxt,err_act)
9999 call psb_error_handler(ctxt,err_act)
return
end subroutine psi_covrl_upd_vect
@ -131,7 +132,8 @@ subroutine psi_covrl_upd_multivect(x,desc_a,update,info)
! locals
complex(psb_spk_), allocatable :: xs(:,:)
integer(psb_ipk_) :: ictxt, np, me, err_act, i, idx, ndm, nx, nc
type(psb_ctxt_type) :: ctxt
integer(psb_ipk_) :: np, me, err_act, i, idx, ndm, nx, nc
integer(psb_ipk_) :: ierr(5)
character(len=20) :: name, ch_err
@ -142,8 +144,8 @@ subroutine psi_covrl_upd_multivect(x,desc_a,update,info)
if (psb_errstatus_fatal()) then
info = psb_err_internal_error_ ; goto 9999
end if
ictxt = desc_a%get_context()
call psb_info(ictxt, me, np)
ctxt = desc_a%get_context()
call psb_info(ctxt, me, np)
if (np == -1) then
info = psb_err_context_error_
call psb_errpush(info,name)
@ -194,7 +196,7 @@ subroutine psi_covrl_upd_multivect(x,desc_a,update,info)
call psb_erractionrestore(err_act)
return
9999 call psb_error_handler(ictxt,err_act)
9999 call psb_error_handler(ctxt,err_act)
return
end subroutine psi_covrl_upd_multivect

@ -46,7 +46,8 @@ subroutine psi_covrl_updr1(x,desc_a,update,info)
integer(psb_ipk_), intent(out) :: info
! locals
integer(psb_ipk_) :: ictxt, np, me, err_act, i, idx, ndm
type(psb_ctxt_type) :: ctxt
integer(psb_ipk_) :: np, me, err_act, i, idx, ndm
integer(psb_ipk_) :: ierr(5)
character(len=20) :: name, ch_err
@ -56,8 +57,8 @@ subroutine psi_covrl_updr1(x,desc_a,update,info)
if (psb_errstatus_fatal()) then
info = psb_err_internal_error_ ; goto 9999
end if
ictxt = desc_a%get_context()
call psb_info(ictxt, me, np)
ctxt = desc_a%get_context()
call psb_info(ctxt, me, np)
if (np == -1) then
info = psb_err_context_error_
call psb_errpush(info,name)
@ -98,12 +99,11 @@ subroutine psi_covrl_updr1(x,desc_a,update,info)
call psb_erractionrestore(err_act)
return
9999 call psb_error_handler(ictxt,err_act)
9999 call psb_error_handler(ctxt,err_act)
return
end subroutine psi_covrl_updr1
subroutine psi_covrl_updr2(x,desc_a,update,info)
use psi_mod, psi_protect_name => psi_covrl_updr2
@ -115,7 +115,8 @@ subroutine psi_covrl_updr2(x,desc_a,update,info)
integer(psb_ipk_), intent(out) :: info
! locals
integer(psb_ipk_) :: ictxt, np, me, err_act, i, idx, ndm
type(psb_ctxt_type) :: ctxt
integer(psb_ipk_) :: np, me, err_act, i, idx, ndm
integer(psb_ipk_) :: ierr(5)
character(len=20) :: name, ch_err
@ -125,8 +126,8 @@ subroutine psi_covrl_updr2(x,desc_a,update,info)
if (psb_errstatus_fatal()) then
info = psb_err_internal_error_ ; goto 9999
end if
ictxt = desc_a%get_context()
call psb_info(ictxt, me, np)
ctxt = desc_a%get_context()
call psb_info(ctxt, me, np)
if (np == -1) then
info = psb_err_context_error_
call psb_errpush(info,name)
@ -167,7 +168,7 @@ subroutine psi_covrl_updr2(x,desc_a,update,info)
call psb_erractionrestore(err_act)
return
9999 call psb_error_handler(ictxt,err_act)
9999 call psb_error_handler(ctxt,err_act)
return
end subroutine psi_covrl_updr2

@ -113,7 +113,9 @@ subroutine psi_cswapdata_vect(flag,beta,y,desc_a,work,info,data)
integer(psb_ipk_), optional :: data
! locals
integer(psb_ipk_) :: ictxt, np, me, icomm, idxs, idxr, totxch, data_, err_act
type(psb_ctxt_type) :: ctxt
integer(psb_mpk_) :: icomm
integer(psb_ipk_) :: np, me, idxs, idxr, totxch, data_, err_act
class(psb_i_base_vect_type), pointer :: d_vidx
character(len=20) :: name
@ -121,9 +123,9 @@ subroutine psi_cswapdata_vect(flag,beta,y,desc_a,work,info,data)
name='psi_swap_datav'
call psb_erractionsave(err_act)
ictxt = desc_a%get_context()
ctxt = desc_a%get_context()
icomm = desc_a%get_mpic()
call psb_info(ictxt,me,np)
call psb_info(ctxt,me,np)
if (np == -1) then
info=psb_err_context_error_
call psb_errpush(info,name)
@ -148,13 +150,13 @@ subroutine psi_cswapdata_vect(flag,beta,y,desc_a,work,info,data)
goto 9999
end if
call psi_swapdata(ictxt,icomm,flag,beta,y,d_vidx,totxch,idxs,idxr,work,info)
call psi_swapdata(ctxt,icomm,flag,beta,y,d_vidx,totxch,idxs,idxr,work,info)
if (info /= psb_success_) goto 9999
call psb_erractionrestore(err_act)
return
9999 call psb_error_handler(ictxt,err_act)
9999 call psb_error_handler(ctxt,err_act)
return
end subroutine psi_cswapdata_vect
@ -173,7 +175,7 @@ end subroutine psi_cswapdata_vect
!
!
!
subroutine psi_cswap_vidx_vect(iictxt,iicomm,flag,beta,y,idx, &
subroutine psi_cswap_vidx_vect(ctxt,icomm,flag,beta,y,idx, &
& totxch,totsnd,totrcv,work,info)
use psi_mod, psb_protect_name => psi_cswap_vidx_vect
@ -190,8 +192,10 @@ subroutine psi_cswap_vidx_vect(iictxt,iicomm,flag,beta,y,idx, &
include 'mpif.h'
#endif
integer(psb_ipk_), intent(in) :: iictxt,iicomm,flag
integer(psb_ipk_), intent(out) :: info
type(psb_ctxt_type), intent(in) :: ctxt
integer(psb_mpk_), intent(in) :: icomm
integer(psb_ipk_), intent(in) :: flag
integer(psb_ipk_), intent(out) :: info
class(psb_c_base_vect_type) :: y
complex(psb_spk_) :: beta
complex(psb_spk_), target :: work(:)
@ -199,8 +203,8 @@ subroutine psi_cswap_vidx_vect(iictxt,iicomm,flag,beta,y,idx, &
integer(psb_ipk_), intent(in) :: totxch,totsnd, totrcv
! locals
integer(psb_mpk_) :: ictxt, icomm, np, me,&
& proc_to_comm, p2ptag, p2pstat(mpi_status_size), iret
integer(psb_ipk_) :: np, me
integer(psb_mpk_) :: proc_to_comm, p2ptag, p2pstat(mpi_status_size), iret
integer(psb_mpk_), allocatable :: prcid(:)
integer(psb_ipk_) :: nesd, nerv,&
& err_act, i, idx_pt, totsnd_, totrcv_,&
@ -213,10 +217,7 @@ subroutine psi_cswap_vidx_vect(iictxt,iicomm,flag,beta,y,idx, &
info=psb_success_
name='psi_swap_datav'
call psb_erractionsave(err_act)
ictxt = iictxt
icomm = iicomm
call psb_info(ictxt,me,np)
call psb_info(ctxt,me,np)
if (np == -1) then
info=psb_err_context_error_
call psb_errpush(info,name)
@ -260,7 +261,7 @@ subroutine psi_cswap_vidx_vect(iictxt,iicomm,flag,beta,y,idx, &
nesd = idx%v(pnti+nerv+psb_n_elem_send_)
rcv_pt = 1+pnti+psb_n_elem_recv_
prcid(i) = psb_get_mpi_rank(ictxt,proc_to_comm)
prcid(i) = psb_get_mpi_rank(ctxt,proc_to_comm)
if ((nerv>0).and.(proc_to_comm /= me)) then
if (debug) write(*,*) me,'Posting receive from',prcid(i),rcv_pt
p2ptag = psb_complex_swap_tag
@ -413,7 +414,7 @@ subroutine psi_cswap_vidx_vect(iictxt,iicomm,flag,beta,y,idx, &
call psb_erractionrestore(err_act)
return
9999 call psb_error_handler(iictxt,err_act)
9999 call psb_error_handler(ctxt,err_act)
return
end subroutine psi_cswap_vidx_vect
@ -450,7 +451,9 @@ subroutine psi_cswapdata_multivect(flag,beta,y,desc_a,work,info,data)
integer(psb_ipk_), optional :: data
! locals
integer(psb_ipk_) :: ictxt, np, me, icomm, idxs, idxr, totxch, data_, err_act
type(psb_ctxt_type) :: ctxt
integer(psb_mpk_) :: icomm
integer(psb_ipk_) :: np, me, idxs, idxr, totxch, data_, err_act
class(psb_i_base_vect_type), pointer :: d_vidx
character(len=20) :: name
@ -458,9 +461,9 @@ subroutine psi_cswapdata_multivect(flag,beta,y,desc_a,work,info,data)
name='psi_swap_datav'
call psb_erractionsave(err_act)
ictxt = desc_a%get_context()
ctxt = desc_a%get_context()
icomm = desc_a%get_mpic()
call psb_info(ictxt,me,np)
call psb_info(ctxt,me,np)
if (np == -1) then
info=psb_err_context_error_
call psb_errpush(info,name)
@ -485,13 +488,13 @@ subroutine psi_cswapdata_multivect(flag,beta,y,desc_a,work,info,data)
goto 9999
end if
call psi_swapdata(ictxt,icomm,flag,beta,y,d_vidx,totxch,idxs,idxr,work,info)
call psi_swapdata(ctxt,icomm,flag,beta,y,d_vidx,totxch,idxs,idxr,work,info)
if (info /= psb_success_) goto 9999
call psb_erractionrestore(err_act)
return
9999 call psb_error_handler(ictxt,err_act)
9999 call psb_error_handler(ctxt,err_act)
return
end subroutine psi_cswapdata_multivect
@ -510,7 +513,7 @@ end subroutine psi_cswapdata_multivect
!
!
!
subroutine psi_cswap_vidx_multivect(iictxt,iicomm,flag,beta,y,idx, &
subroutine psi_cswap_vidx_multivect(ctxt,icomm,flag,beta,y,idx, &
& totxch,totsnd,totrcv,work,info)
use psi_mod, psb_protect_name => psi_cswap_vidx_multivect
@ -527,8 +530,10 @@ subroutine psi_cswap_vidx_multivect(iictxt,iicomm,flag,beta,y,idx, &
include 'mpif.h'
#endif
integer(psb_ipk_), intent(in) :: iictxt,iicomm,flag
integer(psb_ipk_), intent(out) :: info
type(psb_ctxt_type), intent(in) :: ctxt
integer(psb_mpk_), intent(in) :: icomm
integer(psb_ipk_), intent(in) :: flag
integer(psb_ipk_), intent(out) :: info
class(psb_c_base_multivect_type) :: y
complex(psb_spk_) :: beta
complex(psb_spk_), target :: work(:)
@ -536,8 +541,8 @@ subroutine psi_cswap_vidx_multivect(iictxt,iicomm,flag,beta,y,idx, &
integer(psb_ipk_), intent(in) :: totxch,totsnd, totrcv
! locals
integer(psb_mpk_) :: ictxt, icomm, np, me,&
& proc_to_comm, p2ptag, p2pstat(mpi_status_size), iret
integer(psb_ipk_) :: np, me
integer(psb_mpk_) :: proc_to_comm, p2ptag, p2pstat(mpi_status_size), iret
integer(psb_mpk_), allocatable :: prcid(:)
integer(psb_ipk_) :: nesd, nerv,&
& err_act, i, idx_pt, totsnd_, totrcv_,&
@ -550,10 +555,7 @@ subroutine psi_cswap_vidx_multivect(iictxt,iicomm,flag,beta,y,idx, &
info=psb_success_
name='psi_swap_datav'
call psb_erractionsave(err_act)
ictxt = iictxt
icomm = iicomm
call psb_info(ictxt,me,np)
call psb_info(ctxt,me,np)
if (np == -1) then
info=psb_err_context_error_
call psb_errpush(info,name)
@ -599,7 +601,7 @@ subroutine psi_cswap_vidx_multivect(iictxt,iicomm,flag,beta,y,idx, &
proc_to_comm = idx%v(pnti+psb_proc_id_)
nerv = idx%v(pnti+psb_n_elem_recv_)
nesd = idx%v(pnti+nerv+psb_n_elem_send_)
prcid(i) = psb_get_mpi_rank(ictxt,proc_to_comm)
prcid(i) = psb_get_mpi_rank(ctxt,proc_to_comm)
if ((nerv>0).and.(proc_to_comm /= me)) then
if (debug) write(*,*) me,'Posting receive from',prcid(i),rcv_pt
p2ptag = psb_complex_swap_tag
@ -756,7 +758,7 @@ subroutine psi_cswap_vidx_multivect(iictxt,iicomm,flag,beta,y,idx, &
call psb_erractionrestore(err_act)
return
9999 call psb_error_handler(iictxt,err_act)
9999 call psb_error_handler(ctxt,err_act)
return
end subroutine psi_cswap_vidx_multivect

@ -106,7 +106,9 @@ subroutine psi_cswapdatam(flag,n,beta,y,desc_a,work,info,data)
integer(psb_ipk_), optional :: data
! locals
integer(psb_ipk_) :: ictxt, np, me, icomm, idxs, idxr, totxch, data_, err_act
type(psb_ctxt_type) :: ctxt
integer(psb_mpk_) :: icomm
integer(psb_ipk_) :: np, me, idxs, idxr, totxch, data_, err_act
integer(psb_ipk_), pointer :: d_idx(:)
character(len=20) :: name
@ -114,9 +116,9 @@ subroutine psi_cswapdatam(flag,n,beta,y,desc_a,work,info,data)
name='psi_swap_data'
call psb_erractionsave(err_act)
ictxt = desc_a%get_context()
ctxt = desc_a%get_context()
icomm = desc_a%get_mpic()
call psb_info(ictxt,me,np)
call psb_info(ctxt,me,np)
if (np == -1) then
info=psb_err_context_error_
call psb_errpush(info,name)
@ -141,18 +143,18 @@ subroutine psi_cswapdatam(flag,n,beta,y,desc_a,work,info,data)
goto 9999
end if
call psi_swapdata(ictxt,icomm,flag,n,beta,y,d_idx,totxch,idxs,idxr,work,info)
call psi_swapdata(ctxt,icomm,flag,n,beta,y,d_idx,totxch,idxs,idxr,work,info)
if (info /= psb_success_) goto 9999
call psb_erractionrestore(err_act)
return
9999 call psb_error_handler(ictxt,err_act)
9999 call psb_error_handler(ctxt,err_act)
return
end subroutine psi_cswapdatam
subroutine psi_cswapidxm(iictxt,iicomm,flag,n,beta,y,idx, &
subroutine psi_cswapidxm(ctxt,icomm,flag,n,beta,y,idx, &
& totxch,totsnd,totrcv,work,info)
use psi_mod, psb_protect_name => psi_cswapidxm
@ -167,15 +169,18 @@ subroutine psi_cswapidxm(iictxt,iicomm,flag,n,beta,y,idx, &
include 'mpif.h'
#endif
integer(psb_ipk_), intent(in) :: iictxt,iicomm,flag,n
integer(psb_ipk_), intent(out) :: info
type(psb_ctxt_type), intent(in) :: ctxt
integer(psb_mpk_), intent(in) :: icomm
integer(psb_ipk_), intent(in) :: flag,n
integer(psb_ipk_), intent(out) :: info
complex(psb_spk_) :: y(:,:), beta
complex(psb_spk_), target :: work(:)
integer(psb_ipk_), intent(in) :: idx(:),totxch,totsnd, totrcv
! locals
integer(psb_mpk_) :: ictxt, icomm, np, me,&
& proc_to_comm, p2ptag, p2pstat(mpi_status_size), iret
integer(psb_ipk_) :: np, me
integer(psb_mpk_) :: proc_to_comm, p2ptag, p2pstat(mpi_status_size), iret
integer(psb_mpk_), allocatable, dimension(:) :: bsdidx, brvidx,&
& sdsz, rvsz, prcid, rvhd, sdhd
integer(psb_ipk_) :: nesd, nerv,&
@ -192,10 +197,7 @@ subroutine psi_cswapidxm(iictxt,iicomm,flag,n,beta,y,idx, &
info=psb_success_
name='psi_swap_data'
call psb_erractionsave(err_act)
ictxt = iictxt
icomm = iicomm
call psb_info(ictxt,me,np)
call psb_info(ctxt,me,np)
if (np == -1) then
info=psb_err_context_error_
call psb_errpush(info,name)
@ -235,7 +237,7 @@ subroutine psi_cswapidxm(iictxt,iicomm,flag,n,beta,y,idx, &
proc_to_comm = idx(pnti+psb_proc_id_)
nerv = idx(pnti+psb_n_elem_recv_)
nesd = idx(pnti+nerv+psb_n_elem_send_)
prcid(proc_to_comm) = psb_get_mpi_rank(ictxt,proc_to_comm)
prcid(proc_to_comm) = psb_get_mpi_rank(ctxt,proc_to_comm)
brvidx(proc_to_comm) = rcv_pt
rvsz(proc_to_comm) = n*nerv
@ -314,14 +316,14 @@ subroutine psi_cswapidxm(iictxt,iicomm,flag,n,beta,y,idx, &
nesd = idx(pnti+nerv+psb_n_elem_send_)
if (proc_to_comm < me) then
if (nesd>0) call psb_snd(ictxt,&
if (nesd>0) call psb_snd(ctxt,&
& sndbuf(snd_pt:snd_pt+n*nesd-1), proc_to_comm)
if (nerv>0) call psb_rcv(ictxt,&
if (nerv>0) call psb_rcv(ctxt,&
& rcvbuf(rcv_pt:rcv_pt+n*nerv-1), proc_to_comm)
else if (proc_to_comm > me) then
if (nerv>0) call psb_rcv(ictxt,&
if (nerv>0) call psb_rcv(ctxt,&
& rcvbuf(rcv_pt:rcv_pt+n*nerv-1), proc_to_comm)
if (nesd>0) call psb_snd(ictxt,&
if (nesd>0) call psb_snd(ctxt,&
& sndbuf(snd_pt:snd_pt+n*nesd-1), proc_to_comm)
else if (proc_to_comm == me) then
if (nesd /= nerv) then
@ -348,7 +350,7 @@ subroutine psi_cswapidxm(iictxt,iicomm,flag,n,beta,y,idx, &
proc_to_comm = idx(pnti+psb_proc_id_)
nerv = idx(pnti+psb_n_elem_recv_)
nesd = idx(pnti+nerv+psb_n_elem_send_)
prcid(i) = psb_get_mpi_rank(ictxt,proc_to_comm)
prcid(i) = psb_get_mpi_rank(ctxt,proc_to_comm)
if ((nerv>0).and.(proc_to_comm /= me)) then
p2ptag = psb_complex_swap_tag
call mpi_irecv(rcvbuf(rcv_pt),n*nerv,&
@ -433,7 +435,7 @@ subroutine psi_cswapidxm(iictxt,iicomm,flag,n,beta,y,idx, &
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_snd(ictxt,&
if (nesd>0) call psb_snd(ctxt,&
& sndbuf(snd_pt:snd_pt+n*nesd-1), proc_to_comm)
rcv_pt = rcv_pt + n*nerv
snd_pt = snd_pt + n*nesd
@ -450,7 +452,7 @@ subroutine psi_cswapidxm(iictxt,iicomm,flag,n,beta,y,idx, &
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_rcv(ictxt,&
if (nerv>0) call psb_rcv(ctxt,&
& rcvbuf(rcv_pt:rcv_pt+n*nerv-1), proc_to_comm)
rcv_pt = rcv_pt + n*nerv
snd_pt = snd_pt + n*nesd
@ -498,7 +500,7 @@ subroutine psi_cswapidxm(iictxt,iicomm,flag,n,beta,y,idx, &
call psb_erractionrestore(err_act)
return
9999 call psb_error_handler(iictxt,err_act)
9999 call psb_error_handler(ctxt,err_act)
return
end subroutine psi_cswapidxm
@ -579,7 +581,9 @@ subroutine psi_cswapdatav(flag,beta,y,desc_a,work,info,data)
integer(psb_ipk_), optional :: data
! locals
integer(psb_ipk_) :: ictxt, np, me, icomm, idxs, idxr, totxch, data_, err_act
type(psb_ctxt_type) :: ctxt
integer(psb_mpk_) :: icomm
integer(psb_ipk_) :: np, me, idxs, idxr, totxch, data_, err_act
integer(psb_ipk_), pointer :: d_idx(:)
character(len=20) :: name
@ -587,9 +591,9 @@ subroutine psi_cswapdatav(flag,beta,y,desc_a,work,info,data)
name='psi_swap_datav'
call psb_erractionsave(err_act)
ictxt = desc_a%get_context()
ctxt = desc_a%get_context()
icomm = desc_a%get_mpic()
call psb_info(ictxt,me,np)
call psb_info(ctxt,me,np)
if (np == -1) then
info=psb_err_context_error_
call psb_errpush(info,name)
@ -614,13 +618,13 @@ subroutine psi_cswapdatav(flag,beta,y,desc_a,work,info,data)
goto 9999
end if
call psi_swapdata(ictxt,icomm,flag,beta,y,d_idx,totxch,idxs,idxr,work,info)
call psi_swapdata(ctxt,icomm,flag,beta,y,d_idx,totxch,idxs,idxr,work,info)
if (info /= psb_success_) goto 9999
call psb_erractionrestore(err_act)
return
9999 call psb_error_handler(ictxt,err_act)
9999 call psb_error_handler(ctxt,err_act)
return
end subroutine psi_cswapdatav
@ -636,7 +640,7 @@ end subroutine psi_cswapdatav
!
!
!
subroutine psi_cswapidxv(iictxt,iicomm,flag,beta,y,idx, &
subroutine psi_cswapidxv(ctxt,icomm,flag,beta,y,idx, &
& totxch,totsnd,totrcv,work,info)
use psi_mod, psb_protect_name => psi_cswapidxv
@ -651,15 +655,17 @@ subroutine psi_cswapidxv(iictxt,iicomm,flag,beta,y,idx, &
include 'mpif.h'
#endif
integer(psb_ipk_), intent(in) :: iictxt,iicomm,flag
integer(psb_ipk_), intent(out) :: info
type(psb_ctxt_type), intent(in) :: ctxt
integer(psb_mpk_), intent(in) :: icomm
integer(psb_ipk_), intent(in) :: flag
integer(psb_ipk_), intent(out) :: info
complex(psb_spk_) :: y(:), beta
complex(psb_spk_), target :: work(:)
integer(psb_ipk_), intent(in) :: idx(:),totxch,totsnd, totrcv
! locals
integer(psb_mpk_) :: ictxt, icomm, np, me,&
& proc_to_comm, p2ptag, p2pstat(mpi_status_size), iret
integer(psb_ipk_) :: np, me
integer(psb_mpk_) :: proc_to_comm, p2ptag, p2pstat(mpi_status_size), iret
integer(psb_mpk_), allocatable, dimension(:) :: bsdidx, brvidx,&
& sdsz, rvsz, prcid, rvhd, sdhd
integer(psb_ipk_) :: nesd, nerv,&
@ -676,10 +682,7 @@ subroutine psi_cswapidxv(iictxt,iicomm,flag,beta,y,idx, &
info=psb_success_
name='psi_swap_datav'
call psb_erractionsave(err_act)
ictxt = iictxt
icomm = iicomm
call psb_info(ictxt,me,np)
call psb_info(ctxt,me,np)
if (np == -1) then
info=psb_err_context_error_
call psb_errpush(info,name)
@ -719,7 +722,7 @@ subroutine psi_cswapidxv(iictxt,iicomm,flag,beta,y,idx, &
proc_to_comm = idx(pnti+psb_proc_id_)
nerv = idx(pnti+psb_n_elem_recv_)
nesd = idx(pnti+nerv+psb_n_elem_send_)
prcid(proc_to_comm) = psb_get_mpi_rank(ictxt,proc_to_comm)
prcid(proc_to_comm) = psb_get_mpi_rank(ctxt,proc_to_comm)
brvidx(proc_to_comm) = rcv_pt
rvsz(proc_to_comm) = nerv
@ -799,14 +802,14 @@ subroutine psi_cswapidxv(iictxt,iicomm,flag,beta,y,idx, &
nesd = idx(pnti+nerv+psb_n_elem_send_)
if (proc_to_comm < me) then
if (nesd>0) call psb_snd(ictxt,&
if (nesd>0) call psb_snd(ctxt,&
& sndbuf(snd_pt:snd_pt+nesd-1), proc_to_comm)
if (nerv>0) call psb_rcv(ictxt,&
if (nerv>0) call psb_rcv(ctxt,&
& rcvbuf(rcv_pt:rcv_pt+nerv-1), proc_to_comm)
else if (proc_to_comm > me) then
if (nerv>0) call psb_rcv(ictxt,&
if (nerv>0) call psb_rcv(ctxt,&
& rcvbuf(rcv_pt:rcv_pt+nerv-1), proc_to_comm)
if (nesd>0) call psb_snd(ictxt,&
if (nesd>0) call psb_snd(ctxt,&
& sndbuf(snd_pt:snd_pt+nesd-1), proc_to_comm)
else if (proc_to_comm == me) then
if (nesd /= nerv) then
@ -833,7 +836,7 @@ subroutine psi_cswapidxv(iictxt,iicomm,flag,beta,y,idx, &
nerv = idx(pnti+psb_n_elem_recv_)
nesd = idx(pnti+nerv+psb_n_elem_send_)
prcid(i) = psb_get_mpi_rank(ictxt,proc_to_comm)
prcid(i) = psb_get_mpi_rank(ctxt,proc_to_comm)
if ((nerv>0).and.(proc_to_comm /= me)) then
p2ptag = psb_complex_swap_tag
call mpi_irecv(rcvbuf(rcv_pt),nerv,&
@ -917,7 +920,7 @@ subroutine psi_cswapidxv(iictxt,iicomm,flag,beta,y,idx, &
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_snd(ictxt,&
if (nesd>0) call psb_snd(ctxt,&
& sndbuf(snd_pt:snd_pt+nesd-1), proc_to_comm)
rcv_pt = rcv_pt + nerv
snd_pt = snd_pt + nesd
@ -933,7 +936,7 @@ subroutine psi_cswapidxv(iictxt,iicomm,flag,beta,y,idx, &
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_rcv(ictxt,&
if (nerv>0) call psb_rcv(ctxt,&
& rcvbuf(rcv_pt:rcv_pt+nerv-1), proc_to_comm)
rcv_pt = rcv_pt + nerv
snd_pt = snd_pt + nesd
@ -980,7 +983,7 @@ subroutine psi_cswapidxv(iictxt,iicomm,flag,beta,y,idx, &
call psb_erractionrestore(err_act)
return
9999 call psb_error_handler(iictxt,err_act)
9999 call psb_error_handler(ctxt,err_act)
return
end subroutine psi_cswapidxv

@ -115,7 +115,9 @@ subroutine psi_cswaptran_vect(flag,beta,y,desc_a,work,info,data)
integer(psb_ipk_), optional :: data
! locals
integer(psb_ipk_) :: ictxt, np, me, icomm, idxs, idxr, totxch, err_act, data_
type(psb_ctxt_type) :: ctxt
integer(psb_mpk_) :: icomm
integer(psb_ipk_) :: np, me, idxs, idxr, totxch, err_act, data_
class(psb_i_base_vect_type), pointer :: d_vidx
character(len=20) :: name
@ -123,9 +125,9 @@ subroutine psi_cswaptran_vect(flag,beta,y,desc_a,work,info,data)
name='psi_swap_tranv'
call psb_erractionsave(err_act)
ictxt = desc_a%get_context()
ctxt = desc_a%get_context()
icomm = desc_a%get_mpic()
call psb_info(ictxt,me,np)
call psb_info(ctxt,me,np)
if (np == -1) then
info=psb_err_context_error_
call psb_errpush(info,name)
@ -150,19 +152,17 @@ subroutine psi_cswaptran_vect(flag,beta,y,desc_a,work,info,data)
goto 9999
end if
call psi_swaptran(ictxt,icomm,flag,beta,y,d_vidx,totxch,idxs,idxr,work,info)
call psi_swaptran(ctxt,icomm,flag,beta,y,d_vidx,totxch,idxs,idxr,work,info)
if (info /= psb_success_) goto 9999
call psb_erractionrestore(err_act)
return
9999 call psb_error_handler(ictxt,err_act)
9999 call psb_error_handler(ctxt,err_act)
return
end subroutine psi_cswaptran_vect
!
!
! Subroutine: psi_ctran_vidx_vect
@ -176,7 +176,7 @@ end subroutine psi_cswaptran_vect
!
!
!
subroutine psi_ctran_vidx_vect(iictxt,iicomm,flag,beta,y,idx,&
subroutine psi_ctran_vidx_vect(ctxt,icomm,flag,beta,y,idx,&
& totxch,totsnd,totrcv,work,info)
use psi_mod, psb_protect_name => psi_ctran_vidx_vect
@ -193,7 +193,9 @@ subroutine psi_ctran_vidx_vect(iictxt,iicomm,flag,beta,y,idx,&
include 'mpif.h'
#endif
integer(psb_ipk_), intent(in) :: iictxt,iicomm,flag
type(psb_ctxt_type), intent(in) :: ctxt
integer(psb_mpk_), intent(in) :: icomm
integer(psb_ipk_), intent(in) :: flag
integer(psb_ipk_), intent(out) :: info
class(psb_c_base_vect_type) :: y
complex(psb_spk_) :: beta
@ -202,8 +204,8 @@ subroutine psi_ctran_vidx_vect(iictxt,iicomm,flag,beta,y,idx,&
integer(psb_ipk_), intent(in) :: totxch,totsnd, totrcv
! locals
integer(psb_mpk_) :: ictxt, icomm, np, me,&
& proc_to_comm, p2ptag, p2pstat(mpi_status_size), iret
integer(psb_ipk_) :: np, me
integer(psb_mpk_) :: proc_to_comm, p2ptag, p2pstat(mpi_status_size), iret
integer(psb_mpk_), allocatable :: prcid(:)
integer(psb_ipk_) :: nesd, nerv,&
& err_act, i, idx_pt, totsnd_, totrcv_,&
@ -216,10 +218,7 @@ subroutine psi_ctran_vidx_vect(iictxt,iicomm,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)
call psb_info(ctxt,me,np)
if (np == -1) then
info=psb_err_context_error_
call psb_errpush(info,name)
@ -266,7 +265,7 @@ subroutine psi_ctran_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_
prcid(i) = psb_get_mpi_rank(ictxt,proc_to_comm)
prcid(i) = psb_get_mpi_rank(ctxt,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,&
@ -422,7 +421,7 @@ subroutine psi_ctran_vidx_vect(iictxt,iicomm,flag,beta,y,idx,&
call psb_erractionrestore(err_act)
return
9999 call psb_error_handler(iictxt,err_act)
9999 call psb_error_handler(ctxt,err_act)
return
@ -463,7 +462,9 @@ subroutine psi_cswaptran_multivect(flag,beta,y,desc_a,work,info,data)
integer(psb_ipk_), optional :: data
! locals
integer(psb_ipk_) :: ictxt, np, me, icomm, idxs, idxr, totxch, err_act, data_
type(psb_ctxt_type) :: ctxt
integer(psb_mpk_) :: icomm
integer(psb_ipk_) :: np, me, idxs, idxr, totxch, err_act, data_
class(psb_i_base_vect_type), pointer :: d_vidx
character(len=20) :: name
@ -471,9 +472,9 @@ subroutine psi_cswaptran_multivect(flag,beta,y,desc_a,work,info,data)
name='psi_swap_tranv'
call psb_erractionsave(err_act)
ictxt = desc_a%get_context()
ctxt = desc_a%get_context()
icomm = desc_a%get_mpic()
call psb_info(ictxt,me,np)
call psb_info(ctxt,me,np)
if (np == -1) then
info=psb_err_context_error_
call psb_errpush(info,name)
@ -498,13 +499,13 @@ subroutine psi_cswaptran_multivect(flag,beta,y,desc_a,work,info,data)
goto 9999
end if
call psi_swaptran(ictxt,icomm,flag,beta,y,d_vidx,totxch,idxs,idxr,work,info)
call psi_swaptran(ctxt,icomm,flag,beta,y,d_vidx,totxch,idxs,idxr,work,info)
if (info /= psb_success_) goto 9999
call psb_erractionrestore(err_act)
return
9999 call psb_error_handler(ictxt,err_act)
9999 call psb_error_handler(ctxt,err_act)
return
end subroutine psi_cswaptran_multivect
@ -523,7 +524,7 @@ subroutine psi_cswaptran_multivect(flag,beta,y,desc_a,work,info,data)
!
!
!
subroutine psi_ctran_vidx_multivect(iictxt,iicomm,flag,beta,y,idx,&
subroutine psi_ctran_vidx_multivect(ctxt,icomm,flag,beta,y,idx,&
& totxch,totsnd,totrcv,work,info)
use psi_mod, psb_protect_name => psi_ctran_vidx_multivect
@ -540,7 +541,9 @@ subroutine psi_ctran_vidx_multivect(iictxt,iicomm,flag,beta,y,idx,&
include 'mpif.h'
#endif
integer(psb_ipk_), intent(in) :: iictxt,iicomm,flag
type(psb_ctxt_type), intent(in) :: ctxt
integer(psb_mpk_), intent(in) :: icomm
integer(psb_ipk_), intent(in) :: flag
integer(psb_ipk_), intent(out) :: info
class(psb_c_base_multivect_type) :: y
complex(psb_spk_) :: beta
@ -549,8 +552,8 @@ subroutine psi_ctran_vidx_multivect(iictxt,iicomm,flag,beta,y,idx,&
integer(psb_ipk_), intent(in) :: totxch,totsnd, totrcv
! locals
integer(psb_mpk_) :: ictxt, icomm, np, me,&
& proc_to_comm, p2ptag, p2pstat(mpi_status_size), iret
integer(psb_ipk_) :: np, me
integer(psb_mpk_) :: proc_to_comm, p2ptag, p2pstat(mpi_status_size), iret
integer(psb_mpk_), allocatable :: prcid(:)
integer(psb_ipk_) :: nesd, nerv,&
& err_act, i, idx_pt, totsnd_, totrcv_,&
@ -563,10 +566,7 @@ subroutine psi_ctran_vidx_multivect(iictxt,iicomm,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)
call psb_info(ctxt,me,np)
if (np == -1) then
info=psb_err_context_error_
call psb_errpush(info,name)
@ -613,7 +613,7 @@ subroutine psi_ctran_vidx_multivect(iictxt,iicomm,flag,beta,y,idx,&
proc_to_comm = idx%v(pnti+psb_proc_id_)
nerv = idx%v(pnti+psb_n_elem_recv_)
nesd = idx%v(pnti+nerv+psb_n_elem_send_)
prcid(i) = psb_get_mpi_rank(ictxt,proc_to_comm)
prcid(i) = psb_get_mpi_rank(ctxt,proc_to_comm)
if ((nesd>0).and.(proc_to_comm /= me)) then
if (debug) write(*,*) me,'Posting receive from',prcid(i),snd_pt
call mpi_irecv(y%combuf(snd_pt),n*nesd,&
@ -773,7 +773,7 @@ subroutine psi_ctran_vidx_multivect(iictxt,iicomm,flag,beta,y,idx,&
call psb_erractionrestore(err_act)
return
9999 call psb_error_handler(iictxt,err_act)
9999 call psb_error_handler(ctxt,err_act)
return

@ -110,7 +110,9 @@ subroutine psi_cswaptranm(flag,n,beta,y,desc_a,work,info,data)
integer(psb_ipk_), optional :: data
! locals
integer(psb_ipk_) :: ictxt, np, me, icomm, idxs, idxr, err_act, totxch, data_
type(psb_ctxt_type) :: ctxt
integer(psb_mpk_) :: icomm
integer(psb_ipk_) :: np, me, idxs, idxr, err_act, totxch, data_
integer(psb_ipk_), pointer :: d_idx(:)
character(len=20) :: name
@ -118,10 +120,10 @@ subroutine psi_cswaptranm(flag,n,beta,y,desc_a,work,info,data)
name='psi_swap_tran'
call psb_erractionsave(err_act)
ictxt = desc_a%get_context()
ctxt = desc_a%get_context()
icomm = desc_a%get_mpic()
call psb_info(ictxt,me,np)
call psb_info(ctxt,me,np)
if (np == -1) then
info=psb_err_context_error_
call psb_errpush(info,name)
@ -146,18 +148,18 @@ subroutine psi_cswaptranm(flag,n,beta,y,desc_a,work,info,data)
goto 9999
end if
call psi_swaptran(ictxt,icomm,flag,n,beta,y,d_idx,totxch,idxs,idxr,work,info)
call psi_swaptran(ctxt,icomm,flag,n,beta,y,d_idx,totxch,idxs,idxr,work,info)
if (info /= psb_success_) goto 9999
call psb_erractionrestore(err_act)
return
9999 call psb_error_handler(ictxt,err_act)
9999 call psb_error_handler(ctxt,err_act)
return
end subroutine psi_cswaptranm
subroutine psi_ctranidxm(iictxt,iicomm,flag,n,beta,y,idx,&
subroutine psi_ctranidxm(ctxt,icomm,flag,n,beta,y,idx,&
& totxch,totsnd,totrcv,work,info)
use psi_mod, psb_protect_name => psi_ctranidxm
@ -172,15 +174,17 @@ subroutine psi_ctranidxm(iictxt,iicomm,flag,n,beta,y,idx,&
include 'mpif.h'
#endif
integer(psb_ipk_), intent(in) :: iictxt,iicomm,flag,n
integer(psb_ipk_), intent(out) :: info
type(psb_ctxt_type), intent(in) :: ctxt
integer(psb_mpk_), intent(in) :: icomm
integer(psb_ipk_), intent(in) :: flag,n
integer(psb_ipk_), intent(out) :: info
complex(psb_spk_) :: y(:,:), beta
complex(psb_spk_), target :: work(:)
integer(psb_ipk_), intent(in) :: idx(:),totxch,totsnd, totrcv
! locals
integer(psb_mpk_) :: ictxt, icomm, np, me,&
& proc_to_comm, p2ptag, p2pstat(mpi_status_size), iret
integer(psb_ipk_) :: np, me
integer(psb_mpk_) :: proc_to_comm, p2ptag, p2pstat(mpi_status_size), iret
integer(psb_mpk_), allocatable, dimension(:) :: bsdidx, brvidx,&
& sdsz, rvsz, prcid, rvhd, sdhd
integer(psb_ipk_) :: nesd, nerv,&
@ -197,10 +201,7 @@ subroutine psi_ctranidxm(iictxt,iicomm,flag,n,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)
call psb_info(ctxt,me,np)
if (np == -1) then
info=psb_err_context_error_
call psb_errpush(info,name)
@ -240,7 +241,7 @@ subroutine psi_ctranidxm(iictxt,iicomm,flag,n,beta,y,idx,&
proc_to_comm = idx(pnti+psb_proc_id_)
nerv = idx(pnti+psb_n_elem_recv_)
nesd = idx(pnti+nerv+psb_n_elem_send_)
prcid(proc_to_comm) = psb_get_mpi_rank(ictxt,proc_to_comm)
prcid(proc_to_comm) = psb_get_mpi_rank(ctxt,proc_to_comm)
brvidx(proc_to_comm) = rcv_pt
rvsz(proc_to_comm) = n*nerv
@ -324,14 +325,14 @@ subroutine psi_ctranidxm(iictxt,iicomm,flag,n,beta,y,idx,&
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(ctxt,&
& rcvbuf(rcv_pt:rcv_pt+n*nerv-1), proc_to_comm)
if (nesd>0) call psb_rcv(ictxt,&
if (nesd>0) call psb_rcv(ctxt,&
& 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(ctxt,&
& sndbuf(snd_pt:snd_pt+n*nesd-1), proc_to_comm)
if (nerv>0) call psb_snd(ictxt,&
if (nerv>0) call psb_snd(ctxt,&
& rcvbuf(rcv_pt:rcv_pt+n*nerv-1), proc_to_comm)
else if (proc_to_comm == me) then
if (nesd /= nerv) then
@ -358,7 +359,7 @@ subroutine psi_ctranidxm(iictxt,iicomm,flag,n,beta,y,idx,&
proc_to_comm = idx(pnti+psb_proc_id_)
nerv = idx(pnti+psb_n_elem_recv_)
nesd = idx(pnti+nerv+psb_n_elem_send_)
prcid(i) = psb_get_mpi_rank(ictxt,proc_to_comm)
prcid(i) = psb_get_mpi_rank(ctxt,proc_to_comm)
if ((nesd>0).and.(proc_to_comm /= me)) then
p2ptag = psb_complex_swap_tag
call mpi_irecv(sndbuf(snd_pt),n*nesd,&
@ -443,7 +444,7 @@ subroutine psi_ctranidxm(iictxt,iicomm,flag,n,beta,y,idx,&
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(ctxt,&
& rcvbuf(rcv_pt:rcv_pt+n*nerv-1), proc_to_comm)
rcv_pt = rcv_pt + n*nerv
snd_pt = snd_pt + n*nesd
@ -460,7 +461,7 @@ subroutine psi_ctranidxm(iictxt,iicomm,flag,n,beta,y,idx,&
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(ctxt,&
& sndbuf(snd_pt:snd_pt+n*nesd-1), proc_to_comm)
rcv_pt = rcv_pt + n*nerv
snd_pt = snd_pt + n*nesd
@ -508,7 +509,7 @@ subroutine psi_ctranidxm(iictxt,iicomm,flag,n,beta,y,idx,&
call psb_erractionrestore(err_act)
return
9999 call psb_error_handler(iictxt,err_act)
9999 call psb_error_handler(ctxt,err_act)
return
end subroutine psi_ctranidxm
@ -592,7 +593,9 @@ subroutine psi_cswaptranv(flag,beta,y,desc_a,work,info,data)
integer(psb_ipk_), optional :: data
! locals
integer(psb_ipk_) :: ictxt, np, me, icomm, idxs, idxr, totxch, err_act, data_
type(psb_ctxt_type) :: ctxt
integer(psb_mpk_) :: icomm
integer(psb_ipk_) :: np, me, idxs, idxr, totxch, err_act, data_
integer(psb_ipk_), pointer :: d_idx(:)
character(len=20) :: name
@ -600,9 +603,9 @@ subroutine psi_cswaptranv(flag,beta,y,desc_a,work,info,data)
name='psi_swap_tranv'
call psb_erractionsave(err_act)
ictxt = desc_a%get_context()
ctxt = desc_a%get_context()
icomm = desc_a%get_mpic()
call psb_info(ictxt,me,np)
call psb_info(ctxt,me,np)
if (np == -1) then
info=psb_err_context_error_
call psb_errpush(info,name)
@ -627,13 +630,13 @@ subroutine psi_cswaptranv(flag,beta,y,desc_a,work,info,data)
goto 9999
end if
call psi_swaptran(ictxt,icomm,flag,beta,y,d_idx,totxch,idxs,idxr,work,info)
call psi_swaptran(ctxt,icomm,flag,beta,y,d_idx,totxch,idxs,idxr,work,info)
if (info /= psb_success_) goto 9999
call psb_erractionrestore(err_act)
return
9999 call psb_error_handler(ictxt,err_act)
9999 call psb_error_handler(ctxt,err_act)
return
end subroutine psi_cswaptranv
@ -649,7 +652,7 @@ end subroutine psi_cswaptranv
!
!
!
subroutine psi_ctranidxv(iictxt,iicomm,flag,beta,y,idx,&
subroutine psi_ctranidxv(ctxt,icomm,flag,beta,y,idx,&
& totxch,totsnd,totrcv,work,info)
use psi_mod, psb_protect_name => psi_ctranidxv
@ -664,15 +667,17 @@ subroutine psi_ctranidxv(iictxt,iicomm,flag,beta,y,idx,&
include 'mpif.h'
#endif
integer(psb_ipk_), intent(in) :: iictxt,iicomm,flag
integer(psb_ipk_), intent(out) :: info
type(psb_ctxt_type), intent(in) :: ctxt
integer(psb_mpk_), intent(in) :: icomm
integer(psb_ipk_), intent(in) :: flag
integer(psb_ipk_), intent(out) :: info
complex(psb_spk_) :: y(:), beta
complex(psb_spk_), target :: work(:)
integer(psb_ipk_), intent(in) :: idx(:),totxch,totsnd, totrcv
! locals
integer(psb_mpk_) :: ictxt, icomm, np, me,&
& proc_to_comm, p2ptag, p2pstat(mpi_status_size), iret
integer(psb_ipk_) :: np, me
integer(psb_mpk_) :: proc_to_comm, p2ptag, p2pstat(mpi_status_size), iret
integer(psb_mpk_), allocatable, dimension(:) :: bsdidx, brvidx,&
& sdsz, rvsz, prcid, rvhd, sdhd
integer(psb_ipk_) :: nesd, nerv,&
@ -689,10 +694,7 @@ subroutine psi_ctranidxv(iictxt,iicomm,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)
call psb_info(ctxt,me,np)
if (np == -1) then
info=psb_err_context_error_
call psb_errpush(info,name)
@ -732,7 +734,7 @@ subroutine psi_ctranidxv(iictxt,iicomm,flag,beta,y,idx,&
proc_to_comm = idx(pnti+psb_proc_id_)
nerv = idx(pnti+psb_n_elem_recv_)
nesd = idx(pnti+nerv+psb_n_elem_send_)
prcid(proc_to_comm) = psb_get_mpi_rank(ictxt,proc_to_comm)
prcid(proc_to_comm) = psb_get_mpi_rank(ctxt,proc_to_comm)
brvidx(proc_to_comm) = rcv_pt
rvsz(proc_to_comm) = nerv
@ -817,14 +819,14 @@ subroutine psi_ctranidxv(iictxt,iicomm,flag,beta,y,idx,&
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(ctxt,&
& rcvbuf(rcv_pt:rcv_pt+nerv-1), proc_to_comm)
if (nesd>0) call psb_rcv(ictxt,&
if (nesd>0) call psb_rcv(ctxt,&
& 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(ctxt,&
& sndbuf(snd_pt:snd_pt+nesd-1), proc_to_comm)
if (nerv>0) call psb_snd(ictxt,&
if (nerv>0) call psb_snd(ctxt,&
& rcvbuf(rcv_pt:rcv_pt+nerv-1), proc_to_comm)
else if (proc_to_comm == me) then
if (nesd /= nerv) then
@ -850,7 +852,7 @@ subroutine psi_ctranidxv(iictxt,iicomm,flag,beta,y,idx,&
proc_to_comm = idx(pnti+psb_proc_id_)
nerv = idx(pnti+psb_n_elem_recv_)
nesd = idx(pnti+nerv+psb_n_elem_send_)
prcid(i) = psb_get_mpi_rank(ictxt,proc_to_comm)
prcid(i) = psb_get_mpi_rank(ctxt,proc_to_comm)
if ((nesd>0).and.(proc_to_comm /= me)) then
p2ptag = psb_complex_swap_tag
call mpi_irecv(sndbuf(snd_pt),nesd,&
@ -933,7 +935,7 @@ subroutine psi_ctranidxv(iictxt,iicomm,flag,beta,y,idx,&
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(ctxt,&
& rcvbuf(rcv_pt:rcv_pt+nerv-1), proc_to_comm)
rcv_pt = rcv_pt + nerv
snd_pt = snd_pt + nesd
@ -949,7 +951,7 @@ subroutine psi_ctranidxv(iictxt,iicomm,flag,beta,y,idx,&
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(ctxt,&
& sndbuf(snd_pt:snd_pt+nesd-1), proc_to_comm)
rcv_pt = rcv_pt + nerv
snd_pt = snd_pt + nesd
@ -996,7 +998,7 @@ subroutine psi_ctranidxv(iictxt,iicomm,flag,beta,y,idx,&
call psb_erractionrestore(err_act)
return
9999 call psb_error_handler(iictxt,err_act)
9999 call psb_error_handler(ctxt,err_act)
return
end subroutine psi_ctranidxv

@ -47,7 +47,8 @@ subroutine psi_dovrl_restr_vect(x,xs,desc_a,info)
integer(psb_ipk_), intent(out) :: info
! locals
integer(psb_ipk_) :: ictxt, np, me, err_act, i, idx, isz
type(psb_ctxt_type) :: ctxt
integer(psb_ipk_) :: np, me, err_act, i, idx, isz
character(len=20) :: name, ch_err
name='psi_dovrl_restr_vect'
@ -56,8 +57,8 @@ subroutine psi_dovrl_restr_vect(x,xs,desc_a,info)
if (psb_errstatus_fatal()) then
info = psb_err_internal_error_ ; goto 9999
end if
ictxt = desc_a%get_context()
call psb_info(ictxt, me, np)
ctxt = desc_a%get_context()
call psb_info(ctxt, me, np)
if (np == -1) then
info = psb_err_context_error_
call psb_errpush(info,name)
@ -71,7 +72,7 @@ subroutine psi_dovrl_restr_vect(x,xs,desc_a,info)
call psb_erractionrestore(err_act)
return
9999 call psb_error_handler(ictxt,err_act)
9999 call psb_error_handler(ctxt,err_act)
return
end subroutine psi_dovrl_restr_vect
@ -89,7 +90,8 @@ subroutine psi_dovrl_restr_multivect(x,xs,desc_a,info)
integer(psb_ipk_), intent(out) :: info
! locals
integer(psb_ipk_) :: ictxt, np, me, err_act, i, idx, isz, nc
type(psb_ctxt_type) :: ctxt
integer(psb_ipk_) :: np, me, err_act, i, idx, isz, nc
character(len=20) :: name, ch_err
name='psi_dovrl_restr_mv'
@ -98,8 +100,8 @@ subroutine psi_dovrl_restr_multivect(x,xs,desc_a,info)
if (psb_errstatus_fatal()) then
info = psb_err_internal_error_ ; goto 9999
end if
ictxt = desc_a%get_context()
call psb_info(ictxt, me, np)
ctxt = desc_a%get_context()
call psb_info(ctxt, me, np)
if (np == -1) then
info = psb_err_context_error_
call psb_errpush(info,name)
@ -112,7 +114,7 @@ subroutine psi_dovrl_restr_multivect(x,xs,desc_a,info)
call psb_erractionrestore(err_act)
return
9999 call psb_error_handler(ictxt,err_act)
9999 call psb_error_handler(ctxt,err_act)
return
end subroutine psi_dovrl_restr_multivect

@ -45,7 +45,8 @@ subroutine psi_dovrl_restrr1(x,xs,desc_a,info)
integer(psb_ipk_), intent(out) :: info
! locals
integer(psb_ipk_) :: ictxt, np, me, err_act, i, idx, isz
type(psb_ctxt_type) :: ctxt
integer(psb_ipk_) :: np, me, err_act, i, idx, isz
character(len=20) :: name, ch_err
name='psi_dovrl_restrr1'
@ -54,8 +55,8 @@ subroutine psi_dovrl_restrr1(x,xs,desc_a,info)
if (psb_errstatus_fatal()) then
info = psb_err_internal_error_ ; goto 9999
end if
ictxt = desc_a%get_context()
call psb_info(ictxt, me, np)
ctxt = desc_a%get_context()
call psb_info(ctxt, me, np)
if (np == -1) then
info = psb_err_context_error_
call psb_errpush(info,name)
@ -72,7 +73,7 @@ subroutine psi_dovrl_restrr1(x,xs,desc_a,info)
call psb_erractionrestore(err_act)
return
9999 call psb_error_handler(ictxt,err_act)
9999 call psb_error_handler(ctxt,err_act)
return
end subroutine psi_dovrl_restrr1
@ -88,7 +89,8 @@ subroutine psi_dovrl_restrr2(x,xs,desc_a,info)
integer(psb_ipk_), intent(out) :: info
! locals
integer(psb_ipk_) :: ictxt, np, me, err_act, i, idx, isz
type(psb_ctxt_type) :: ctxt
integer(psb_ipk_) :: np, me, err_act, i, idx, isz
character(len=20) :: name, ch_err
name='psi_dovrl_restrr2'
@ -97,8 +99,8 @@ subroutine psi_dovrl_restrr2(x,xs,desc_a,info)
if (psb_errstatus_fatal()) then
info = psb_err_internal_error_ ; goto 9999
end if
ictxt = desc_a%get_context()
call psb_info(ictxt, me, np)
ctxt = desc_a%get_context()
call psb_info(ctxt, me, np)
if (np == -1) then
info = psb_err_context_error_
call psb_errpush(info,name)
@ -122,7 +124,7 @@ subroutine psi_dovrl_restrr2(x,xs,desc_a,info)
call psb_erractionrestore(err_act)
return
9999 call psb_error_handler(ictxt,err_act)
9999 call psb_error_handler(ctxt,err_act)
return
end subroutine psi_dovrl_restrr2

@ -47,7 +47,8 @@ subroutine psi_dovrl_save_vect(x,xs,desc_a,info)
integer(psb_ipk_), intent(out) :: info
! locals
integer(psb_ipk_) :: ictxt, np, me, err_act, i, idx, isz
type(psb_ctxt_type) :: ctxt
integer(psb_ipk_) :: np, me, err_act, i, idx, isz
character(len=20) :: name, ch_err
name='psi_dovrl_saver1'
@ -56,8 +57,8 @@ subroutine psi_dovrl_save_vect(x,xs,desc_a,info)
if (psb_errstatus_fatal()) then
info = psb_err_internal_error_ ; goto 9999
end if
ictxt = desc_a%get_context()
call psb_info(ictxt, me, np)
ctxt = desc_a%get_context()
call psb_info(ctxt, me, np)
if (np == -1) then
info = psb_err_context_error_
call psb_errpush(info,name)
@ -77,13 +78,11 @@ subroutine psi_dovrl_save_vect(x,xs,desc_a,info)
call psb_erractionrestore(err_act)
return
9999 call psb_error_handler(ictxt,err_act)
9999 call psb_error_handler(ctxt,err_act)
return
end subroutine psi_dovrl_save_vect
subroutine psi_dovrl_save_multivect(x,xs,desc_a,info)
use psi_mod, psi_protect_name => psi_dovrl_save_multivect
use psb_realloc_mod
@ -97,7 +96,8 @@ subroutine psi_dovrl_save_multivect(x,xs,desc_a,info)
integer(psb_ipk_), intent(out) :: info
! locals
integer(psb_ipk_) :: ictxt, np, me, err_act, i, idx, isz, nc
type(psb_ctxt_type) :: ctxt
integer(psb_ipk_) :: np, me, err_act, i, idx, isz, nc
character(len=20) :: name, ch_err
name='psi_dovrl_saver1'
@ -106,8 +106,8 @@ subroutine psi_dovrl_save_multivect(x,xs,desc_a,info)
if (psb_errstatus_fatal()) then
info = psb_err_internal_error_ ; goto 9999
end if
ictxt = desc_a%get_context()
call psb_info(ictxt, me, np)
ctxt = desc_a%get_context()
call psb_info(ctxt, me, np)
if (np == -1) then
info = psb_err_context_error_
call psb_errpush(info,name)
@ -128,7 +128,7 @@ subroutine psi_dovrl_save_multivect(x,xs,desc_a,info)
call psb_erractionrestore(err_act)
return
9999 call psb_error_handler(ictxt,err_act)
9999 call psb_error_handler(ctxt,err_act)
return
end subroutine psi_dovrl_save_multivect

@ -47,7 +47,8 @@ subroutine psi_dovrl_saver1(x,xs,desc_a,info)
integer(psb_ipk_), intent(out) :: info
! locals
integer(psb_ipk_) :: ictxt, np, me, err_act, i, idx, isz
type(psb_ctxt_type) :: ctxt
integer(psb_ipk_) :: np, me, err_act, i, idx, isz
character(len=20) :: name, ch_err
name='psi_dovrl_saver1'
@ -56,8 +57,8 @@ subroutine psi_dovrl_saver1(x,xs,desc_a,info)
if (psb_errstatus_fatal()) then
info = psb_err_internal_error_ ; goto 9999
end if
ictxt = desc_a%get_context()
call psb_info(ictxt, me, np)
ctxt = desc_a%get_context()
call psb_info(ctxt, me, np)
if (np == -1) then
info = psb_err_context_error_
call psb_errpush(info,name)
@ -80,7 +81,7 @@ subroutine psi_dovrl_saver1(x,xs,desc_a,info)
call psb_erractionrestore(err_act)
return
9999 call psb_error_handler(ictxt,err_act)
9999 call psb_error_handler(ctxt,err_act)
return
end subroutine psi_dovrl_saver1
@ -99,7 +100,8 @@ subroutine psi_dovrl_saver2(x,xs,desc_a,info)
integer(psb_ipk_), intent(out) :: info
! locals
integer(psb_ipk_) :: ictxt, np, me, err_act, i, idx, isz, nc
type(psb_ctxt_type) :: ctxt
integer(psb_ipk_) :: np, me, err_act, i, idx, isz, nc
character(len=20) :: name, ch_err
name='psi_dovrl_saver2'
@ -108,8 +110,8 @@ subroutine psi_dovrl_saver2(x,xs,desc_a,info)
if (psb_errstatus_fatal()) then
info = psb_err_internal_error_ ; goto 9999
end if
ictxt = desc_a%get_context()
call psb_info(ictxt, me, np)
ctxt = desc_a%get_context()
call psb_info(ctxt, me, np)
if (np == -1) then
info = psb_err_context_error_
call psb_errpush(info,name)
@ -133,7 +135,7 @@ subroutine psi_dovrl_saver2(x,xs,desc_a,info)
call psb_erractionrestore(err_act)
return
9999 call psb_error_handler(ictxt,err_act)
9999 call psb_error_handler(ctxt,err_act)
return
end subroutine psi_dovrl_saver2

@ -32,7 +32,7 @@
! Subroutine: psi_dovrl_update
! These subroutines update the overlap region of a vector; they are used
! for the transpose matrix-vector product when there is a nonempty overlap,
! or for the application of Additive Schwarz preconditioners.
! or for the application of Additive Schwarz preconditioners.
!
!
!
@ -50,7 +50,8 @@ subroutine psi_dovrl_upd_vect(x,desc_a,update,info)
! locals
real(psb_dpk_), allocatable :: xs(:)
integer(psb_ipk_) :: ictxt, np, me, err_act, i, idx, ndm, nx
type(psb_ctxt_type) :: ctxt
integer(psb_ipk_) :: np, me, err_act, i, idx, ndm, nx
integer(psb_ipk_) :: ierr(5)
character(len=20) :: name, ch_err
@ -61,8 +62,8 @@ subroutine psi_dovrl_upd_vect(x,desc_a,update,info)
if (psb_errstatus_fatal()) then
info = psb_err_internal_error_ ; goto 9999
end if
ictxt = desc_a%get_context()
call psb_info(ictxt, me, np)
ctxt = desc_a%get_context()
call psb_info(ctxt, me, np)
if (np == -1) then
info = psb_err_context_error_
call psb_errpush(info,name)
@ -112,7 +113,7 @@ subroutine psi_dovrl_upd_vect(x,desc_a,update,info)
call psb_erractionrestore(err_act)
return
9999 call psb_error_handler(ictxt,err_act)
9999 call psb_error_handler(ctxt,err_act)
return
end subroutine psi_dovrl_upd_vect
@ -131,7 +132,8 @@ subroutine psi_dovrl_upd_multivect(x,desc_a,update,info)
! locals
real(psb_dpk_), allocatable :: xs(:,:)
integer(psb_ipk_) :: ictxt, np, me, err_act, i, idx, ndm, nx, nc
type(psb_ctxt_type) :: ctxt
integer(psb_ipk_) :: np, me, err_act, i, idx, ndm, nx, nc
integer(psb_ipk_) :: ierr(5)
character(len=20) :: name, ch_err
@ -142,8 +144,8 @@ subroutine psi_dovrl_upd_multivect(x,desc_a,update,info)
if (psb_errstatus_fatal()) then
info = psb_err_internal_error_ ; goto 9999
end if
ictxt = desc_a%get_context()
call psb_info(ictxt, me, np)
ctxt = desc_a%get_context()
call psb_info(ctxt, me, np)
if (np == -1) then
info = psb_err_context_error_
call psb_errpush(info,name)
@ -194,7 +196,7 @@ subroutine psi_dovrl_upd_multivect(x,desc_a,update,info)
call psb_erractionrestore(err_act)
return
9999 call psb_error_handler(ictxt,err_act)
9999 call psb_error_handler(ctxt,err_act)
return
end subroutine psi_dovrl_upd_multivect

@ -46,7 +46,8 @@ subroutine psi_dovrl_updr1(x,desc_a,update,info)
integer(psb_ipk_), intent(out) :: info
! locals
integer(psb_ipk_) :: ictxt, np, me, err_act, i, idx, ndm
type(psb_ctxt_type) :: ctxt
integer(psb_ipk_) :: np, me, err_act, i, idx, ndm
integer(psb_ipk_) :: ierr(5)
character(len=20) :: name, ch_err
@ -56,8 +57,8 @@ subroutine psi_dovrl_updr1(x,desc_a,update,info)
if (psb_errstatus_fatal()) then
info = psb_err_internal_error_ ; goto 9999
end if
ictxt = desc_a%get_context()
call psb_info(ictxt, me, np)
ctxt = desc_a%get_context()
call psb_info(ctxt, me, np)
if (np == -1) then
info = psb_err_context_error_
call psb_errpush(info,name)
@ -98,12 +99,11 @@ subroutine psi_dovrl_updr1(x,desc_a,update,info)
call psb_erractionrestore(err_act)
return
9999 call psb_error_handler(ictxt,err_act)
9999 call psb_error_handler(ctxt,err_act)
return
end subroutine psi_dovrl_updr1
subroutine psi_dovrl_updr2(x,desc_a,update,info)
use psi_mod, psi_protect_name => psi_dovrl_updr2
@ -115,7 +115,8 @@ subroutine psi_dovrl_updr2(x,desc_a,update,info)
integer(psb_ipk_), intent(out) :: info
! locals
integer(psb_ipk_) :: ictxt, np, me, err_act, i, idx, ndm
type(psb_ctxt_type) :: ctxt
integer(psb_ipk_) :: np, me, err_act, i, idx, ndm
integer(psb_ipk_) :: ierr(5)
character(len=20) :: name, ch_err
@ -125,8 +126,8 @@ subroutine psi_dovrl_updr2(x,desc_a,update,info)
if (psb_errstatus_fatal()) then
info = psb_err_internal_error_ ; goto 9999
end if
ictxt = desc_a%get_context()
call psb_info(ictxt, me, np)
ctxt = desc_a%get_context()
call psb_info(ctxt, me, np)
if (np == -1) then
info = psb_err_context_error_
call psb_errpush(info,name)
@ -167,7 +168,7 @@ subroutine psi_dovrl_updr2(x,desc_a,update,info)
call psb_erractionrestore(err_act)
return
9999 call psb_error_handler(ictxt,err_act)
9999 call psb_error_handler(ctxt,err_act)
return
end subroutine psi_dovrl_updr2

@ -113,7 +113,9 @@ subroutine psi_dswapdata_vect(flag,beta,y,desc_a,work,info,data)
integer(psb_ipk_), optional :: data
! locals
integer(psb_ipk_) :: ictxt, np, me, icomm, idxs, idxr, totxch, data_, err_act
type(psb_ctxt_type) :: ctxt
integer(psb_mpk_) :: icomm
integer(psb_ipk_) :: np, me, idxs, idxr, totxch, data_, err_act
class(psb_i_base_vect_type), pointer :: d_vidx
character(len=20) :: name
@ -121,9 +123,9 @@ subroutine psi_dswapdata_vect(flag,beta,y,desc_a,work,info,data)
name='psi_swap_datav'
call psb_erractionsave(err_act)
ictxt = desc_a%get_context()
ctxt = desc_a%get_context()
icomm = desc_a%get_mpic()
call psb_info(ictxt,me,np)
call psb_info(ctxt,me,np)
if (np == -1) then
info=psb_err_context_error_
call psb_errpush(info,name)
@ -148,13 +150,13 @@ subroutine psi_dswapdata_vect(flag,beta,y,desc_a,work,info,data)
goto 9999
end if
call psi_swapdata(ictxt,icomm,flag,beta,y,d_vidx,totxch,idxs,idxr,work,info)
call psi_swapdata(ctxt,icomm,flag,beta,y,d_vidx,totxch,idxs,idxr,work,info)
if (info /= psb_success_) goto 9999
call psb_erractionrestore(err_act)
return
9999 call psb_error_handler(ictxt,err_act)
9999 call psb_error_handler(ctxt,err_act)
return
end subroutine psi_dswapdata_vect
@ -173,7 +175,7 @@ end subroutine psi_dswapdata_vect
!
!
!
subroutine psi_dswap_vidx_vect(iictxt,iicomm,flag,beta,y,idx, &
subroutine psi_dswap_vidx_vect(ctxt,icomm,flag,beta,y,idx, &
& totxch,totsnd,totrcv,work,info)
use psi_mod, psb_protect_name => psi_dswap_vidx_vect
@ -190,8 +192,10 @@ subroutine psi_dswap_vidx_vect(iictxt,iicomm,flag,beta,y,idx, &
include 'mpif.h'
#endif
integer(psb_ipk_), intent(in) :: iictxt,iicomm,flag
integer(psb_ipk_), intent(out) :: info
type(psb_ctxt_type), intent(in) :: ctxt
integer(psb_mpk_), intent(in) :: icomm
integer(psb_ipk_), intent(in) :: flag
integer(psb_ipk_), intent(out) :: info
class(psb_d_base_vect_type) :: y
real(psb_dpk_) :: beta
real(psb_dpk_), target :: work(:)
@ -199,8 +203,8 @@ subroutine psi_dswap_vidx_vect(iictxt,iicomm,flag,beta,y,idx, &
integer(psb_ipk_), intent(in) :: totxch,totsnd, totrcv
! locals
integer(psb_mpk_) :: ictxt, icomm, np, me,&
& proc_to_comm, p2ptag, p2pstat(mpi_status_size), iret
integer(psb_ipk_) :: np, me
integer(psb_mpk_) :: proc_to_comm, p2ptag, p2pstat(mpi_status_size), iret
integer(psb_mpk_), allocatable :: prcid(:)
integer(psb_ipk_) :: nesd, nerv,&
& err_act, i, idx_pt, totsnd_, totrcv_,&
@ -213,10 +217,7 @@ subroutine psi_dswap_vidx_vect(iictxt,iicomm,flag,beta,y,idx, &
info=psb_success_
name='psi_swap_datav'
call psb_erractionsave(err_act)
ictxt = iictxt
icomm = iicomm
call psb_info(ictxt,me,np)
call psb_info(ctxt,me,np)
if (np == -1) then
info=psb_err_context_error_
call psb_errpush(info,name)
@ -260,7 +261,7 @@ subroutine psi_dswap_vidx_vect(iictxt,iicomm,flag,beta,y,idx, &
nesd = idx%v(pnti+nerv+psb_n_elem_send_)
rcv_pt = 1+pnti+psb_n_elem_recv_
prcid(i) = psb_get_mpi_rank(ictxt,proc_to_comm)
prcid(i) = psb_get_mpi_rank(ctxt,proc_to_comm)
if ((nerv>0).and.(proc_to_comm /= me)) then
if (debug) write(*,*) me,'Posting receive from',prcid(i),rcv_pt
p2ptag = psb_double_swap_tag
@ -413,7 +414,7 @@ subroutine psi_dswap_vidx_vect(iictxt,iicomm,flag,beta,y,idx, &
call psb_erractionrestore(err_act)
return
9999 call psb_error_handler(iictxt,err_act)
9999 call psb_error_handler(ctxt,err_act)
return
end subroutine psi_dswap_vidx_vect
@ -450,7 +451,9 @@ subroutine psi_dswapdata_multivect(flag,beta,y,desc_a,work,info,data)
integer(psb_ipk_), optional :: data
! locals
integer(psb_ipk_) :: ictxt, np, me, icomm, idxs, idxr, totxch, data_, err_act
type(psb_ctxt_type) :: ctxt
integer(psb_mpk_) :: icomm
integer(psb_ipk_) :: np, me, idxs, idxr, totxch, data_, err_act
class(psb_i_base_vect_type), pointer :: d_vidx
character(len=20) :: name
@ -458,9 +461,9 @@ subroutine psi_dswapdata_multivect(flag,beta,y,desc_a,work,info,data)
name='psi_swap_datav'
call psb_erractionsave(err_act)
ictxt = desc_a%get_context()
ctxt = desc_a%get_context()
icomm = desc_a%get_mpic()
call psb_info(ictxt,me,np)
call psb_info(ctxt,me,np)
if (np == -1) then
info=psb_err_context_error_
call psb_errpush(info,name)
@ -485,13 +488,13 @@ subroutine psi_dswapdata_multivect(flag,beta,y,desc_a,work,info,data)
goto 9999
end if
call psi_swapdata(ictxt,icomm,flag,beta,y,d_vidx,totxch,idxs,idxr,work,info)
call psi_swapdata(ctxt,icomm,flag,beta,y,d_vidx,totxch,idxs,idxr,work,info)
if (info /= psb_success_) goto 9999
call psb_erractionrestore(err_act)
return
9999 call psb_error_handler(ictxt,err_act)
9999 call psb_error_handler(ctxt,err_act)
return
end subroutine psi_dswapdata_multivect
@ -510,7 +513,7 @@ end subroutine psi_dswapdata_multivect
!
!
!
subroutine psi_dswap_vidx_multivect(iictxt,iicomm,flag,beta,y,idx, &
subroutine psi_dswap_vidx_multivect(ctxt,icomm,flag,beta,y,idx, &
& totxch,totsnd,totrcv,work,info)
use psi_mod, psb_protect_name => psi_dswap_vidx_multivect
@ -527,8 +530,10 @@ subroutine psi_dswap_vidx_multivect(iictxt,iicomm,flag,beta,y,idx, &
include 'mpif.h'
#endif
integer(psb_ipk_), intent(in) :: iictxt,iicomm,flag
integer(psb_ipk_), intent(out) :: info
type(psb_ctxt_type), intent(in) :: ctxt
integer(psb_mpk_), intent(in) :: icomm
integer(psb_ipk_), intent(in) :: flag
integer(psb_ipk_), intent(out) :: info
class(psb_d_base_multivect_type) :: y
real(psb_dpk_) :: beta
real(psb_dpk_), target :: work(:)
@ -536,8 +541,8 @@ subroutine psi_dswap_vidx_multivect(iictxt,iicomm,flag,beta,y,idx, &
integer(psb_ipk_), intent(in) :: totxch,totsnd, totrcv
! locals
integer(psb_mpk_) :: ictxt, icomm, np, me,&
& proc_to_comm, p2ptag, p2pstat(mpi_status_size), iret
integer(psb_ipk_) :: np, me
integer(psb_mpk_) :: proc_to_comm, p2ptag, p2pstat(mpi_status_size), iret
integer(psb_mpk_), allocatable :: prcid(:)
integer(psb_ipk_) :: nesd, nerv,&
& err_act, i, idx_pt, totsnd_, totrcv_,&
@ -550,10 +555,7 @@ subroutine psi_dswap_vidx_multivect(iictxt,iicomm,flag,beta,y,idx, &
info=psb_success_
name='psi_swap_datav'
call psb_erractionsave(err_act)
ictxt = iictxt
icomm = iicomm
call psb_info(ictxt,me,np)
call psb_info(ctxt,me,np)
if (np == -1) then
info=psb_err_context_error_
call psb_errpush(info,name)
@ -599,7 +601,7 @@ subroutine psi_dswap_vidx_multivect(iictxt,iicomm,flag,beta,y,idx, &
proc_to_comm = idx%v(pnti+psb_proc_id_)
nerv = idx%v(pnti+psb_n_elem_recv_)
nesd = idx%v(pnti+nerv+psb_n_elem_send_)
prcid(i) = psb_get_mpi_rank(ictxt,proc_to_comm)
prcid(i) = psb_get_mpi_rank(ctxt,proc_to_comm)
if ((nerv>0).and.(proc_to_comm /= me)) then
if (debug) write(*,*) me,'Posting receive from',prcid(i),rcv_pt
p2ptag = psb_double_swap_tag
@ -756,7 +758,7 @@ subroutine psi_dswap_vidx_multivect(iictxt,iicomm,flag,beta,y,idx, &
call psb_erractionrestore(err_act)
return
9999 call psb_error_handler(iictxt,err_act)
9999 call psb_error_handler(ctxt,err_act)
return
end subroutine psi_dswap_vidx_multivect

@ -106,7 +106,9 @@ subroutine psi_dswapdatam(flag,n,beta,y,desc_a,work,info,data)
integer(psb_ipk_), optional :: data
! locals
integer(psb_ipk_) :: ictxt, np, me, icomm, idxs, idxr, totxch, data_, err_act
type(psb_ctxt_type) :: ctxt
integer(psb_mpk_) :: icomm
integer(psb_ipk_) :: np, me, idxs, idxr, totxch, data_, err_act
integer(psb_ipk_), pointer :: d_idx(:)
character(len=20) :: name
@ -114,9 +116,9 @@ subroutine psi_dswapdatam(flag,n,beta,y,desc_a,work,info,data)
name='psi_swap_data'
call psb_erractionsave(err_act)
ictxt = desc_a%get_context()
ctxt = desc_a%get_context()
icomm = desc_a%get_mpic()
call psb_info(ictxt,me,np)
call psb_info(ctxt,me,np)
if (np == -1) then
info=psb_err_context_error_
call psb_errpush(info,name)
@ -141,18 +143,18 @@ subroutine psi_dswapdatam(flag,n,beta,y,desc_a,work,info,data)
goto 9999
end if
call psi_swapdata(ictxt,icomm,flag,n,beta,y,d_idx,totxch,idxs,idxr,work,info)
call psi_swapdata(ctxt,icomm,flag,n,beta,y,d_idx,totxch,idxs,idxr,work,info)
if (info /= psb_success_) goto 9999
call psb_erractionrestore(err_act)
return
9999 call psb_error_handler(ictxt,err_act)
9999 call psb_error_handler(ctxt,err_act)
return
end subroutine psi_dswapdatam
subroutine psi_dswapidxm(iictxt,iicomm,flag,n,beta,y,idx, &
subroutine psi_dswapidxm(ctxt,icomm,flag,n,beta,y,idx, &
& totxch,totsnd,totrcv,work,info)
use psi_mod, psb_protect_name => psi_dswapidxm
@ -167,15 +169,18 @@ subroutine psi_dswapidxm(iictxt,iicomm,flag,n,beta,y,idx, &
include 'mpif.h'
#endif
integer(psb_ipk_), intent(in) :: iictxt,iicomm,flag,n
integer(psb_ipk_), intent(out) :: info
type(psb_ctxt_type), intent(in) :: ctxt
integer(psb_mpk_), intent(in) :: icomm
integer(psb_ipk_), intent(in) :: flag,n
integer(psb_ipk_), intent(out) :: info
real(psb_dpk_) :: y(:,:), beta
real(psb_dpk_), target :: work(:)
integer(psb_ipk_), intent(in) :: idx(:),totxch,totsnd, totrcv
! locals
integer(psb_mpk_) :: ictxt, icomm, np, me,&
& proc_to_comm, p2ptag, p2pstat(mpi_status_size), iret
integer(psb_ipk_) :: np, me
integer(psb_mpk_) :: proc_to_comm, p2ptag, p2pstat(mpi_status_size), iret
integer(psb_mpk_), allocatable, dimension(:) :: bsdidx, brvidx,&
& sdsz, rvsz, prcid, rvhd, sdhd
integer(psb_ipk_) :: nesd, nerv,&
@ -192,10 +197,7 @@ subroutine psi_dswapidxm(iictxt,iicomm,flag,n,beta,y,idx, &
info=psb_success_
name='psi_swap_data'
call psb_erractionsave(err_act)
ictxt = iictxt
icomm = iicomm
call psb_info(ictxt,me,np)
call psb_info(ctxt,me,np)
if (np == -1) then
info=psb_err_context_error_
call psb_errpush(info,name)
@ -235,7 +237,7 @@ subroutine psi_dswapidxm(iictxt,iicomm,flag,n,beta,y,idx, &
proc_to_comm = idx(pnti+psb_proc_id_)
nerv = idx(pnti+psb_n_elem_recv_)
nesd = idx(pnti+nerv+psb_n_elem_send_)
prcid(proc_to_comm) = psb_get_mpi_rank(ictxt,proc_to_comm)
prcid(proc_to_comm) = psb_get_mpi_rank(ctxt,proc_to_comm)
brvidx(proc_to_comm) = rcv_pt
rvsz(proc_to_comm) = n*nerv
@ -314,14 +316,14 @@ subroutine psi_dswapidxm(iictxt,iicomm,flag,n,beta,y,idx, &
nesd = idx(pnti+nerv+psb_n_elem_send_)
if (proc_to_comm < me) then
if (nesd>0) call psb_snd(ictxt,&
if (nesd>0) call psb_snd(ctxt,&
& sndbuf(snd_pt:snd_pt+n*nesd-1), proc_to_comm)
if (nerv>0) call psb_rcv(ictxt,&
if (nerv>0) call psb_rcv(ctxt,&
& rcvbuf(rcv_pt:rcv_pt+n*nerv-1), proc_to_comm)
else if (proc_to_comm > me) then
if (nerv>0) call psb_rcv(ictxt,&
if (nerv>0) call psb_rcv(ctxt,&
& rcvbuf(rcv_pt:rcv_pt+n*nerv-1), proc_to_comm)
if (nesd>0) call psb_snd(ictxt,&
if (nesd>0) call psb_snd(ctxt,&
& sndbuf(snd_pt:snd_pt+n*nesd-1), proc_to_comm)
else if (proc_to_comm == me) then
if (nesd /= nerv) then
@ -348,7 +350,7 @@ subroutine psi_dswapidxm(iictxt,iicomm,flag,n,beta,y,idx, &
proc_to_comm = idx(pnti+psb_proc_id_)
nerv = idx(pnti+psb_n_elem_recv_)
nesd = idx(pnti+nerv+psb_n_elem_send_)
prcid(i) = psb_get_mpi_rank(ictxt,proc_to_comm)
prcid(i) = psb_get_mpi_rank(ctxt,proc_to_comm)
if ((nerv>0).and.(proc_to_comm /= me)) then
p2ptag = psb_double_swap_tag
call mpi_irecv(rcvbuf(rcv_pt),n*nerv,&
@ -433,7 +435,7 @@ subroutine psi_dswapidxm(iictxt,iicomm,flag,n,beta,y,idx, &
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_snd(ictxt,&
if (nesd>0) call psb_snd(ctxt,&
& sndbuf(snd_pt:snd_pt+n*nesd-1), proc_to_comm)
rcv_pt = rcv_pt + n*nerv
snd_pt = snd_pt + n*nesd
@ -450,7 +452,7 @@ subroutine psi_dswapidxm(iictxt,iicomm,flag,n,beta,y,idx, &
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_rcv(ictxt,&
if (nerv>0) call psb_rcv(ctxt,&
& rcvbuf(rcv_pt:rcv_pt+n*nerv-1), proc_to_comm)
rcv_pt = rcv_pt + n*nerv
snd_pt = snd_pt + n*nesd
@ -498,7 +500,7 @@ subroutine psi_dswapidxm(iictxt,iicomm,flag,n,beta,y,idx, &
call psb_erractionrestore(err_act)
return
9999 call psb_error_handler(iictxt,err_act)
9999 call psb_error_handler(ctxt,err_act)
return
end subroutine psi_dswapidxm
@ -579,7 +581,9 @@ subroutine psi_dswapdatav(flag,beta,y,desc_a,work,info,data)
integer(psb_ipk_), optional :: data
! locals
integer(psb_ipk_) :: ictxt, np, me, icomm, idxs, idxr, totxch, data_, err_act
type(psb_ctxt_type) :: ctxt
integer(psb_mpk_) :: icomm
integer(psb_ipk_) :: np, me, idxs, idxr, totxch, data_, err_act
integer(psb_ipk_), pointer :: d_idx(:)
character(len=20) :: name
@ -587,9 +591,9 @@ subroutine psi_dswapdatav(flag,beta,y,desc_a,work,info,data)
name='psi_swap_datav'
call psb_erractionsave(err_act)
ictxt = desc_a%get_context()
ctxt = desc_a%get_context()
icomm = desc_a%get_mpic()
call psb_info(ictxt,me,np)
call psb_info(ctxt,me,np)
if (np == -1) then
info=psb_err_context_error_
call psb_errpush(info,name)
@ -614,13 +618,13 @@ subroutine psi_dswapdatav(flag,beta,y,desc_a,work,info,data)
goto 9999
end if
call psi_swapdata(ictxt,icomm,flag,beta,y,d_idx,totxch,idxs,idxr,work,info)
call psi_swapdata(ctxt,icomm,flag,beta,y,d_idx,totxch,idxs,idxr,work,info)
if (info /= psb_success_) goto 9999
call psb_erractionrestore(err_act)
return
9999 call psb_error_handler(ictxt,err_act)
9999 call psb_error_handler(ctxt,err_act)
return
end subroutine psi_dswapdatav
@ -636,7 +640,7 @@ end subroutine psi_dswapdatav
!
!
!
subroutine psi_dswapidxv(iictxt,iicomm,flag,beta,y,idx, &
subroutine psi_dswapidxv(ctxt,icomm,flag,beta,y,idx, &
& totxch,totsnd,totrcv,work,info)
use psi_mod, psb_protect_name => psi_dswapidxv
@ -651,15 +655,17 @@ subroutine psi_dswapidxv(iictxt,iicomm,flag,beta,y,idx, &
include 'mpif.h'
#endif
integer(psb_ipk_), intent(in) :: iictxt,iicomm,flag
integer(psb_ipk_), intent(out) :: info
type(psb_ctxt_type), intent(in) :: ctxt
integer(psb_mpk_), intent(in) :: icomm
integer(psb_ipk_), intent(in) :: flag
integer(psb_ipk_), intent(out) :: info
real(psb_dpk_) :: y(:), beta
real(psb_dpk_), target :: work(:)
integer(psb_ipk_), intent(in) :: idx(:),totxch,totsnd, totrcv
! locals
integer(psb_mpk_) :: ictxt, icomm, np, me,&
& proc_to_comm, p2ptag, p2pstat(mpi_status_size), iret
integer(psb_ipk_) :: np, me
integer(psb_mpk_) :: proc_to_comm, p2ptag, p2pstat(mpi_status_size), iret
integer(psb_mpk_), allocatable, dimension(:) :: bsdidx, brvidx,&
& sdsz, rvsz, prcid, rvhd, sdhd
integer(psb_ipk_) :: nesd, nerv,&
@ -676,10 +682,7 @@ subroutine psi_dswapidxv(iictxt,iicomm,flag,beta,y,idx, &
info=psb_success_
name='psi_swap_datav'
call psb_erractionsave(err_act)
ictxt = iictxt
icomm = iicomm
call psb_info(ictxt,me,np)
call psb_info(ctxt,me,np)
if (np == -1) then
info=psb_err_context_error_
call psb_errpush(info,name)
@ -719,7 +722,7 @@ subroutine psi_dswapidxv(iictxt,iicomm,flag,beta,y,idx, &
proc_to_comm = idx(pnti+psb_proc_id_)
nerv = idx(pnti+psb_n_elem_recv_)
nesd = idx(pnti+nerv+psb_n_elem_send_)
prcid(proc_to_comm) = psb_get_mpi_rank(ictxt,proc_to_comm)
prcid(proc_to_comm) = psb_get_mpi_rank(ctxt,proc_to_comm)
brvidx(proc_to_comm) = rcv_pt
rvsz(proc_to_comm) = nerv
@ -799,14 +802,14 @@ subroutine psi_dswapidxv(iictxt,iicomm,flag,beta,y,idx, &
nesd = idx(pnti+nerv+psb_n_elem_send_)
if (proc_to_comm < me) then
if (nesd>0) call psb_snd(ictxt,&
if (nesd>0) call psb_snd(ctxt,&
& sndbuf(snd_pt:snd_pt+nesd-1), proc_to_comm)
if (nerv>0) call psb_rcv(ictxt,&
if (nerv>0) call psb_rcv(ctxt,&
& rcvbuf(rcv_pt:rcv_pt+nerv-1), proc_to_comm)
else if (proc_to_comm > me) then
if (nerv>0) call psb_rcv(ictxt,&
if (nerv>0) call psb_rcv(ctxt,&
& rcvbuf(rcv_pt:rcv_pt+nerv-1), proc_to_comm)
if (nesd>0) call psb_snd(ictxt,&
if (nesd>0) call psb_snd(ctxt,&
& sndbuf(snd_pt:snd_pt+nesd-1), proc_to_comm)
else if (proc_to_comm == me) then
if (nesd /= nerv) then
@ -833,7 +836,7 @@ subroutine psi_dswapidxv(iictxt,iicomm,flag,beta,y,idx, &
nerv = idx(pnti+psb_n_elem_recv_)
nesd = idx(pnti+nerv+psb_n_elem_send_)
prcid(i) = psb_get_mpi_rank(ictxt,proc_to_comm)
prcid(i) = psb_get_mpi_rank(ctxt,proc_to_comm)
if ((nerv>0).and.(proc_to_comm /= me)) then
p2ptag = psb_double_swap_tag
call mpi_irecv(rcvbuf(rcv_pt),nerv,&
@ -917,7 +920,7 @@ subroutine psi_dswapidxv(iictxt,iicomm,flag,beta,y,idx, &
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_snd(ictxt,&
if (nesd>0) call psb_snd(ctxt,&
& sndbuf(snd_pt:snd_pt+nesd-1), proc_to_comm)
rcv_pt = rcv_pt + nerv
snd_pt = snd_pt + nesd
@ -933,7 +936,7 @@ subroutine psi_dswapidxv(iictxt,iicomm,flag,beta,y,idx, &
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_rcv(ictxt,&
if (nerv>0) call psb_rcv(ctxt,&
& rcvbuf(rcv_pt:rcv_pt+nerv-1), proc_to_comm)
rcv_pt = rcv_pt + nerv
snd_pt = snd_pt + nesd
@ -980,7 +983,7 @@ subroutine psi_dswapidxv(iictxt,iicomm,flag,beta,y,idx, &
call psb_erractionrestore(err_act)
return
9999 call psb_error_handler(iictxt,err_act)
9999 call psb_error_handler(ctxt,err_act)
return
end subroutine psi_dswapidxv

@ -115,7 +115,9 @@ subroutine psi_dswaptran_vect(flag,beta,y,desc_a,work,info,data)
integer(psb_ipk_), optional :: data
! locals
integer(psb_ipk_) :: ictxt, np, me, icomm, idxs, idxr, totxch, err_act, data_
type(psb_ctxt_type) :: ctxt
integer(psb_mpk_) :: icomm
integer(psb_ipk_) :: np, me, idxs, idxr, totxch, err_act, data_
class(psb_i_base_vect_type), pointer :: d_vidx
character(len=20) :: name
@ -123,9 +125,9 @@ subroutine psi_dswaptran_vect(flag,beta,y,desc_a,work,info,data)
name='psi_swap_tranv'
call psb_erractionsave(err_act)
ictxt = desc_a%get_context()
ctxt = desc_a%get_context()
icomm = desc_a%get_mpic()
call psb_info(ictxt,me,np)
call psb_info(ctxt,me,np)
if (np == -1) then
info=psb_err_context_error_
call psb_errpush(info,name)
@ -150,19 +152,17 @@ subroutine psi_dswaptran_vect(flag,beta,y,desc_a,work,info,data)
goto 9999
end if
call psi_swaptran(ictxt,icomm,flag,beta,y,d_vidx,totxch,idxs,idxr,work,info)
call psi_swaptran(ctxt,icomm,flag,beta,y,d_vidx,totxch,idxs,idxr,work,info)
if (info /= psb_success_) goto 9999
call psb_erractionrestore(err_act)
return
9999 call psb_error_handler(ictxt,err_act)
9999 call psb_error_handler(ctxt,err_act)
return
end subroutine psi_dswaptran_vect
!
!
! Subroutine: psi_dtran_vidx_vect
@ -176,7 +176,7 @@ end subroutine psi_dswaptran_vect
!
!
!
subroutine psi_dtran_vidx_vect(iictxt,iicomm,flag,beta,y,idx,&
subroutine psi_dtran_vidx_vect(ctxt,icomm,flag,beta,y,idx,&
& totxch,totsnd,totrcv,work,info)
use psi_mod, psb_protect_name => psi_dtran_vidx_vect
@ -193,7 +193,9 @@ subroutine psi_dtran_vidx_vect(iictxt,iicomm,flag,beta,y,idx,&
include 'mpif.h'
#endif
integer(psb_ipk_), intent(in) :: iictxt,iicomm,flag
type(psb_ctxt_type), intent(in) :: ctxt
integer(psb_mpk_), intent(in) :: icomm
integer(psb_ipk_), intent(in) :: flag
integer(psb_ipk_), intent(out) :: info
class(psb_d_base_vect_type) :: y
real(psb_dpk_) :: beta
@ -202,8 +204,8 @@ subroutine psi_dtran_vidx_vect(iictxt,iicomm,flag,beta,y,idx,&
integer(psb_ipk_), intent(in) :: totxch,totsnd, totrcv
! locals
integer(psb_mpk_) :: ictxt, icomm, np, me,&
& proc_to_comm, p2ptag, p2pstat(mpi_status_size), iret
integer(psb_ipk_) :: np, me
integer(psb_mpk_) :: proc_to_comm, p2ptag, p2pstat(mpi_status_size), iret
integer(psb_mpk_), allocatable :: prcid(:)
integer(psb_ipk_) :: nesd, nerv,&
& err_act, i, idx_pt, totsnd_, totrcv_,&
@ -216,10 +218,7 @@ subroutine psi_dtran_vidx_vect(iictxt,iicomm,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)
call psb_info(ctxt,me,np)
if (np == -1) then
info=psb_err_context_error_
call psb_errpush(info,name)
@ -266,7 +265,7 @@ subroutine psi_dtran_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_
prcid(i) = psb_get_mpi_rank(ictxt,proc_to_comm)
prcid(i) = psb_get_mpi_rank(ctxt,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,&
@ -422,7 +421,7 @@ subroutine psi_dtran_vidx_vect(iictxt,iicomm,flag,beta,y,idx,&
call psb_erractionrestore(err_act)
return
9999 call psb_error_handler(iictxt,err_act)
9999 call psb_error_handler(ctxt,err_act)
return
@ -463,7 +462,9 @@ subroutine psi_dswaptran_multivect(flag,beta,y,desc_a,work,info,data)
integer(psb_ipk_), optional :: data
! locals
integer(psb_ipk_) :: ictxt, np, me, icomm, idxs, idxr, totxch, err_act, data_
type(psb_ctxt_type) :: ctxt
integer(psb_mpk_) :: icomm
integer(psb_ipk_) :: np, me, idxs, idxr, totxch, err_act, data_
class(psb_i_base_vect_type), pointer :: d_vidx
character(len=20) :: name
@ -471,9 +472,9 @@ subroutine psi_dswaptran_multivect(flag,beta,y,desc_a,work,info,data)
name='psi_swap_tranv'
call psb_erractionsave(err_act)
ictxt = desc_a%get_context()
ctxt = desc_a%get_context()
icomm = desc_a%get_mpic()
call psb_info(ictxt,me,np)
call psb_info(ctxt,me,np)
if (np == -1) then
info=psb_err_context_error_
call psb_errpush(info,name)
@ -498,13 +499,13 @@ subroutine psi_dswaptran_multivect(flag,beta,y,desc_a,work,info,data)
goto 9999
end if
call psi_swaptran(ictxt,icomm,flag,beta,y,d_vidx,totxch,idxs,idxr,work,info)
call psi_swaptran(ctxt,icomm,flag,beta,y,d_vidx,totxch,idxs,idxr,work,info)
if (info /= psb_success_) goto 9999
call psb_erractionrestore(err_act)
return
9999 call psb_error_handler(ictxt,err_act)
9999 call psb_error_handler(ctxt,err_act)
return
end subroutine psi_dswaptran_multivect
@ -523,7 +524,7 @@ subroutine psi_dswaptran_multivect(flag,beta,y,desc_a,work,info,data)
!
!
!
subroutine psi_dtran_vidx_multivect(iictxt,iicomm,flag,beta,y,idx,&
subroutine psi_dtran_vidx_multivect(ctxt,icomm,flag,beta,y,idx,&
& totxch,totsnd,totrcv,work,info)
use psi_mod, psb_protect_name => psi_dtran_vidx_multivect
@ -540,7 +541,9 @@ subroutine psi_dtran_vidx_multivect(iictxt,iicomm,flag,beta,y,idx,&
include 'mpif.h'
#endif
integer(psb_ipk_), intent(in) :: iictxt,iicomm,flag
type(psb_ctxt_type), intent(in) :: ctxt
integer(psb_mpk_), intent(in) :: icomm
integer(psb_ipk_), intent(in) :: flag
integer(psb_ipk_), intent(out) :: info
class(psb_d_base_multivect_type) :: y
real(psb_dpk_) :: beta
@ -549,8 +552,8 @@ subroutine psi_dtran_vidx_multivect(iictxt,iicomm,flag,beta,y,idx,&
integer(psb_ipk_), intent(in) :: totxch,totsnd, totrcv
! locals
integer(psb_mpk_) :: ictxt, icomm, np, me,&
& proc_to_comm, p2ptag, p2pstat(mpi_status_size), iret
integer(psb_ipk_) :: np, me
integer(psb_mpk_) :: proc_to_comm, p2ptag, p2pstat(mpi_status_size), iret
integer(psb_mpk_), allocatable :: prcid(:)
integer(psb_ipk_) :: nesd, nerv,&
& err_act, i, idx_pt, totsnd_, totrcv_,&
@ -563,10 +566,7 @@ subroutine psi_dtran_vidx_multivect(iictxt,iicomm,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)
call psb_info(ctxt,me,np)
if (np == -1) then
info=psb_err_context_error_
call psb_errpush(info,name)
@ -613,7 +613,7 @@ subroutine psi_dtran_vidx_multivect(iictxt,iicomm,flag,beta,y,idx,&
proc_to_comm = idx%v(pnti+psb_proc_id_)
nerv = idx%v(pnti+psb_n_elem_recv_)
nesd = idx%v(pnti+nerv+psb_n_elem_send_)
prcid(i) = psb_get_mpi_rank(ictxt,proc_to_comm)
prcid(i) = psb_get_mpi_rank(ctxt,proc_to_comm)
if ((nesd>0).and.(proc_to_comm /= me)) then
if (debug) write(*,*) me,'Posting receive from',prcid(i),snd_pt
call mpi_irecv(y%combuf(snd_pt),n*nesd,&
@ -773,7 +773,7 @@ subroutine psi_dtran_vidx_multivect(iictxt,iicomm,flag,beta,y,idx,&
call psb_erractionrestore(err_act)
return
9999 call psb_error_handler(iictxt,err_act)
9999 call psb_error_handler(ctxt,err_act)
return

@ -110,7 +110,9 @@ subroutine psi_dswaptranm(flag,n,beta,y,desc_a,work,info,data)
integer(psb_ipk_), optional :: data
! locals
integer(psb_ipk_) :: ictxt, np, me, icomm, idxs, idxr, err_act, totxch, data_
type(psb_ctxt_type) :: ctxt
integer(psb_mpk_) :: icomm
integer(psb_ipk_) :: np, me, idxs, idxr, err_act, totxch, data_
integer(psb_ipk_), pointer :: d_idx(:)
character(len=20) :: name
@ -118,10 +120,10 @@ subroutine psi_dswaptranm(flag,n,beta,y,desc_a,work,info,data)
name='psi_swap_tran'
call psb_erractionsave(err_act)
ictxt = desc_a%get_context()
ctxt = desc_a%get_context()
icomm = desc_a%get_mpic()
call psb_info(ictxt,me,np)
call psb_info(ctxt,me,np)
if (np == -1) then
info=psb_err_context_error_
call psb_errpush(info,name)
@ -146,18 +148,18 @@ subroutine psi_dswaptranm(flag,n,beta,y,desc_a,work,info,data)
goto 9999
end if
call psi_swaptran(ictxt,icomm,flag,n,beta,y,d_idx,totxch,idxs,idxr,work,info)
call psi_swaptran(ctxt,icomm,flag,n,beta,y,d_idx,totxch,idxs,idxr,work,info)
if (info /= psb_success_) goto 9999
call psb_erractionrestore(err_act)
return
9999 call psb_error_handler(ictxt,err_act)
9999 call psb_error_handler(ctxt,err_act)
return
end subroutine psi_dswaptranm
subroutine psi_dtranidxm(iictxt,iicomm,flag,n,beta,y,idx,&
subroutine psi_dtranidxm(ctxt,icomm,flag,n,beta,y,idx,&
& totxch,totsnd,totrcv,work,info)
use psi_mod, psb_protect_name => psi_dtranidxm
@ -172,15 +174,17 @@ subroutine psi_dtranidxm(iictxt,iicomm,flag,n,beta,y,idx,&
include 'mpif.h'
#endif
integer(psb_ipk_), intent(in) :: iictxt,iicomm,flag,n
integer(psb_ipk_), intent(out) :: info
type(psb_ctxt_type), intent(in) :: ctxt
integer(psb_mpk_), intent(in) :: icomm
integer(psb_ipk_), intent(in) :: flag,n
integer(psb_ipk_), intent(out) :: info
real(psb_dpk_) :: y(:,:), beta
real(psb_dpk_), target :: work(:)
integer(psb_ipk_), intent(in) :: idx(:),totxch,totsnd, totrcv
! locals
integer(psb_mpk_) :: ictxt, icomm, np, me,&
& proc_to_comm, p2ptag, p2pstat(mpi_status_size), iret
integer(psb_ipk_) :: np, me
integer(psb_mpk_) :: proc_to_comm, p2ptag, p2pstat(mpi_status_size), iret
integer(psb_mpk_), allocatable, dimension(:) :: bsdidx, brvidx,&
& sdsz, rvsz, prcid, rvhd, sdhd
integer(psb_ipk_) :: nesd, nerv,&
@ -197,10 +201,7 @@ subroutine psi_dtranidxm(iictxt,iicomm,flag,n,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)
call psb_info(ctxt,me,np)
if (np == -1) then
info=psb_err_context_error_
call psb_errpush(info,name)
@ -240,7 +241,7 @@ subroutine psi_dtranidxm(iictxt,iicomm,flag,n,beta,y,idx,&
proc_to_comm = idx(pnti+psb_proc_id_)
nerv = idx(pnti+psb_n_elem_recv_)
nesd = idx(pnti+nerv+psb_n_elem_send_)
prcid(proc_to_comm) = psb_get_mpi_rank(ictxt,proc_to_comm)
prcid(proc_to_comm) = psb_get_mpi_rank(ctxt,proc_to_comm)
brvidx(proc_to_comm) = rcv_pt
rvsz(proc_to_comm) = n*nerv
@ -324,14 +325,14 @@ subroutine psi_dtranidxm(iictxt,iicomm,flag,n,beta,y,idx,&
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(ctxt,&
& rcvbuf(rcv_pt:rcv_pt+n*nerv-1), proc_to_comm)
if (nesd>0) call psb_rcv(ictxt,&
if (nesd>0) call psb_rcv(ctxt,&
& 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(ctxt,&
& sndbuf(snd_pt:snd_pt+n*nesd-1), proc_to_comm)
if (nerv>0) call psb_snd(ictxt,&
if (nerv>0) call psb_snd(ctxt,&
& rcvbuf(rcv_pt:rcv_pt+n*nerv-1), proc_to_comm)
else if (proc_to_comm == me) then
if (nesd /= nerv) then
@ -358,7 +359,7 @@ subroutine psi_dtranidxm(iictxt,iicomm,flag,n,beta,y,idx,&
proc_to_comm = idx(pnti+psb_proc_id_)
nerv = idx(pnti+psb_n_elem_recv_)
nesd = idx(pnti+nerv+psb_n_elem_send_)
prcid(i) = psb_get_mpi_rank(ictxt,proc_to_comm)
prcid(i) = psb_get_mpi_rank(ctxt,proc_to_comm)
if ((nesd>0).and.(proc_to_comm /= me)) then
p2ptag = psb_double_swap_tag
call mpi_irecv(sndbuf(snd_pt),n*nesd,&
@ -443,7 +444,7 @@ subroutine psi_dtranidxm(iictxt,iicomm,flag,n,beta,y,idx,&
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(ctxt,&
& rcvbuf(rcv_pt:rcv_pt+n*nerv-1), proc_to_comm)
rcv_pt = rcv_pt + n*nerv
snd_pt = snd_pt + n*nesd
@ -460,7 +461,7 @@ subroutine psi_dtranidxm(iictxt,iicomm,flag,n,beta,y,idx,&
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(ctxt,&
& sndbuf(snd_pt:snd_pt+n*nesd-1), proc_to_comm)
rcv_pt = rcv_pt + n*nerv
snd_pt = snd_pt + n*nesd
@ -508,7 +509,7 @@ subroutine psi_dtranidxm(iictxt,iicomm,flag,n,beta,y,idx,&
call psb_erractionrestore(err_act)
return
9999 call psb_error_handler(iictxt,err_act)
9999 call psb_error_handler(ctxt,err_act)
return
end subroutine psi_dtranidxm
@ -592,7 +593,9 @@ subroutine psi_dswaptranv(flag,beta,y,desc_a,work,info,data)
integer(psb_ipk_), optional :: data
! locals
integer(psb_ipk_) :: ictxt, np, me, icomm, idxs, idxr, totxch, err_act, data_
type(psb_ctxt_type) :: ctxt
integer(psb_mpk_) :: icomm
integer(psb_ipk_) :: np, me, idxs, idxr, totxch, err_act, data_
integer(psb_ipk_), pointer :: d_idx(:)
character(len=20) :: name
@ -600,9 +603,9 @@ subroutine psi_dswaptranv(flag,beta,y,desc_a,work,info,data)
name='psi_swap_tranv'
call psb_erractionsave(err_act)
ictxt = desc_a%get_context()
ctxt = desc_a%get_context()
icomm = desc_a%get_mpic()
call psb_info(ictxt,me,np)
call psb_info(ctxt,me,np)
if (np == -1) then
info=psb_err_context_error_
call psb_errpush(info,name)
@ -627,13 +630,13 @@ subroutine psi_dswaptranv(flag,beta,y,desc_a,work,info,data)
goto 9999
end if
call psi_swaptran(ictxt,icomm,flag,beta,y,d_idx,totxch,idxs,idxr,work,info)
call psi_swaptran(ctxt,icomm,flag,beta,y,d_idx,totxch,idxs,idxr,work,info)
if (info /= psb_success_) goto 9999
call psb_erractionrestore(err_act)
return
9999 call psb_error_handler(ictxt,err_act)
9999 call psb_error_handler(ctxt,err_act)
return
end subroutine psi_dswaptranv
@ -649,7 +652,7 @@ end subroutine psi_dswaptranv
!
!
!
subroutine psi_dtranidxv(iictxt,iicomm,flag,beta,y,idx,&
subroutine psi_dtranidxv(ctxt,icomm,flag,beta,y,idx,&
& totxch,totsnd,totrcv,work,info)
use psi_mod, psb_protect_name => psi_dtranidxv
@ -664,15 +667,17 @@ subroutine psi_dtranidxv(iictxt,iicomm,flag,beta,y,idx,&
include 'mpif.h'
#endif
integer(psb_ipk_), intent(in) :: iictxt,iicomm,flag
integer(psb_ipk_), intent(out) :: info
type(psb_ctxt_type), intent(in) :: ctxt
integer(psb_mpk_), intent(in) :: icomm
integer(psb_ipk_), intent(in) :: flag
integer(psb_ipk_), intent(out) :: info
real(psb_dpk_) :: y(:), beta
real(psb_dpk_), target :: work(:)
integer(psb_ipk_), intent(in) :: idx(:),totxch,totsnd, totrcv
! locals
integer(psb_mpk_) :: ictxt, icomm, np, me,&
& proc_to_comm, p2ptag, p2pstat(mpi_status_size), iret
integer(psb_ipk_) :: np, me
integer(psb_mpk_) :: proc_to_comm, p2ptag, p2pstat(mpi_status_size), iret
integer(psb_mpk_), allocatable, dimension(:) :: bsdidx, brvidx,&
& sdsz, rvsz, prcid, rvhd, sdhd
integer(psb_ipk_) :: nesd, nerv,&
@ -689,10 +694,7 @@ subroutine psi_dtranidxv(iictxt,iicomm,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)
call psb_info(ctxt,me,np)
if (np == -1) then
info=psb_err_context_error_
call psb_errpush(info,name)
@ -732,7 +734,7 @@ subroutine psi_dtranidxv(iictxt,iicomm,flag,beta,y,idx,&
proc_to_comm = idx(pnti+psb_proc_id_)
nerv = idx(pnti+psb_n_elem_recv_)
nesd = idx(pnti+nerv+psb_n_elem_send_)
prcid(proc_to_comm) = psb_get_mpi_rank(ictxt,proc_to_comm)
prcid(proc_to_comm) = psb_get_mpi_rank(ctxt,proc_to_comm)
brvidx(proc_to_comm) = rcv_pt
rvsz(proc_to_comm) = nerv
@ -817,14 +819,14 @@ subroutine psi_dtranidxv(iictxt,iicomm,flag,beta,y,idx,&
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(ctxt,&
& rcvbuf(rcv_pt:rcv_pt+nerv-1), proc_to_comm)
if (nesd>0) call psb_rcv(ictxt,&
if (nesd>0) call psb_rcv(ctxt,&
& 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(ctxt,&
& sndbuf(snd_pt:snd_pt+nesd-1), proc_to_comm)
if (nerv>0) call psb_snd(ictxt,&
if (nerv>0) call psb_snd(ctxt,&
& rcvbuf(rcv_pt:rcv_pt+nerv-1), proc_to_comm)
else if (proc_to_comm == me) then
if (nesd /= nerv) then
@ -850,7 +852,7 @@ subroutine psi_dtranidxv(iictxt,iicomm,flag,beta,y,idx,&
proc_to_comm = idx(pnti+psb_proc_id_)
nerv = idx(pnti+psb_n_elem_recv_)
nesd = idx(pnti+nerv+psb_n_elem_send_)
prcid(i) = psb_get_mpi_rank(ictxt,proc_to_comm)
prcid(i) = psb_get_mpi_rank(ctxt,proc_to_comm)
if ((nesd>0).and.(proc_to_comm /= me)) then
p2ptag = psb_double_swap_tag
call mpi_irecv(sndbuf(snd_pt),nesd,&
@ -933,7 +935,7 @@ subroutine psi_dtranidxv(iictxt,iicomm,flag,beta,y,idx,&
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(ctxt,&
& rcvbuf(rcv_pt:rcv_pt+nerv-1), proc_to_comm)
rcv_pt = rcv_pt + nerv
snd_pt = snd_pt + nesd
@ -949,7 +951,7 @@ subroutine psi_dtranidxv(iictxt,iicomm,flag,beta,y,idx,&
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(ctxt,&
& sndbuf(snd_pt:snd_pt+nesd-1), proc_to_comm)
rcv_pt = rcv_pt + nerv
snd_pt = snd_pt + nesd
@ -996,7 +998,7 @@ subroutine psi_dtranidxv(iictxt,iicomm,flag,beta,y,idx,&
call psb_erractionrestore(err_act)
return
9999 call psb_error_handler(iictxt,err_act)
9999 call psb_error_handler(ctxt,err_act)
return
end subroutine psi_dtranidxv

@ -45,7 +45,8 @@ subroutine psi_eovrl_restrr1(x,xs,desc_a,info)
integer(psb_ipk_), intent(out) :: info
! locals
integer(psb_ipk_) :: ictxt, np, me, err_act, i, idx, isz
type(psb_ctxt_type) :: ctxt
integer(psb_ipk_) :: np, me, err_act, i, idx, isz
character(len=20) :: name, ch_err
name='psi_eovrl_restrr1'
@ -54,8 +55,8 @@ subroutine psi_eovrl_restrr1(x,xs,desc_a,info)
if (psb_errstatus_fatal()) then
info = psb_err_internal_error_ ; goto 9999
end if
ictxt = desc_a%get_context()
call psb_info(ictxt, me, np)
ctxt = desc_a%get_context()
call psb_info(ctxt, me, np)
if (np == -1) then
info = psb_err_context_error_
call psb_errpush(info,name)
@ -72,7 +73,7 @@ subroutine psi_eovrl_restrr1(x,xs,desc_a,info)
call psb_erractionrestore(err_act)
return
9999 call psb_error_handler(ictxt,err_act)
9999 call psb_error_handler(ctxt,err_act)
return
end subroutine psi_eovrl_restrr1
@ -88,7 +89,8 @@ subroutine psi_eovrl_restrr2(x,xs,desc_a,info)
integer(psb_ipk_), intent(out) :: info
! locals
integer(psb_ipk_) :: ictxt, np, me, err_act, i, idx, isz
type(psb_ctxt_type) :: ctxt
integer(psb_ipk_) :: np, me, err_act, i, idx, isz
character(len=20) :: name, ch_err
name='psi_eovrl_restrr2'
@ -97,8 +99,8 @@ subroutine psi_eovrl_restrr2(x,xs,desc_a,info)
if (psb_errstatus_fatal()) then
info = psb_err_internal_error_ ; goto 9999
end if
ictxt = desc_a%get_context()
call psb_info(ictxt, me, np)
ctxt = desc_a%get_context()
call psb_info(ctxt, me, np)
if (np == -1) then
info = psb_err_context_error_
call psb_errpush(info,name)
@ -122,7 +124,7 @@ subroutine psi_eovrl_restrr2(x,xs,desc_a,info)
call psb_erractionrestore(err_act)
return
9999 call psb_error_handler(ictxt,err_act)
9999 call psb_error_handler(ctxt,err_act)
return
end subroutine psi_eovrl_restrr2

@ -47,7 +47,8 @@ subroutine psi_eovrl_saver1(x,xs,desc_a,info)
integer(psb_ipk_), intent(out) :: info
! locals
integer(psb_ipk_) :: ictxt, np, me, err_act, i, idx, isz
type(psb_ctxt_type) :: ctxt
integer(psb_ipk_) :: np, me, err_act, i, idx, isz
character(len=20) :: name, ch_err
name='psi_eovrl_saver1'
@ -56,8 +57,8 @@ subroutine psi_eovrl_saver1(x,xs,desc_a,info)
if (psb_errstatus_fatal()) then
info = psb_err_internal_error_ ; goto 9999
end if
ictxt = desc_a%get_context()
call psb_info(ictxt, me, np)
ctxt = desc_a%get_context()
call psb_info(ctxt, me, np)
if (np == -1) then
info = psb_err_context_error_
call psb_errpush(info,name)
@ -80,7 +81,7 @@ subroutine psi_eovrl_saver1(x,xs,desc_a,info)
call psb_erractionrestore(err_act)
return
9999 call psb_error_handler(ictxt,err_act)
9999 call psb_error_handler(ctxt,err_act)
return
end subroutine psi_eovrl_saver1
@ -99,7 +100,8 @@ subroutine psi_eovrl_saver2(x,xs,desc_a,info)
integer(psb_ipk_), intent(out) :: info
! locals
integer(psb_ipk_) :: ictxt, np, me, err_act, i, idx, isz, nc
type(psb_ctxt_type) :: ctxt
integer(psb_ipk_) :: np, me, err_act, i, idx, isz, nc
character(len=20) :: name, ch_err
name='psi_eovrl_saver2'
@ -108,8 +110,8 @@ subroutine psi_eovrl_saver2(x,xs,desc_a,info)
if (psb_errstatus_fatal()) then
info = psb_err_internal_error_ ; goto 9999
end if
ictxt = desc_a%get_context()
call psb_info(ictxt, me, np)
ctxt = desc_a%get_context()
call psb_info(ctxt, me, np)
if (np == -1) then
info = psb_err_context_error_
call psb_errpush(info,name)
@ -133,7 +135,7 @@ subroutine psi_eovrl_saver2(x,xs,desc_a,info)
call psb_erractionrestore(err_act)
return
9999 call psb_error_handler(ictxt,err_act)
9999 call psb_error_handler(ctxt,err_act)
return
end subroutine psi_eovrl_saver2

@ -46,7 +46,8 @@ subroutine psi_eovrl_updr1(x,desc_a,update,info)
integer(psb_ipk_), intent(out) :: info
! locals
integer(psb_ipk_) :: ictxt, np, me, err_act, i, idx, ndm
type(psb_ctxt_type) :: ctxt
integer(psb_ipk_) :: np, me, err_act, i, idx, ndm
integer(psb_ipk_) :: ierr(5)
character(len=20) :: name, ch_err
@ -56,8 +57,8 @@ subroutine psi_eovrl_updr1(x,desc_a,update,info)
if (psb_errstatus_fatal()) then
info = psb_err_internal_error_ ; goto 9999
end if
ictxt = desc_a%get_context()
call psb_info(ictxt, me, np)
ctxt = desc_a%get_context()
call psb_info(ctxt, me, np)
if (np == -1) then
info = psb_err_context_error_
call psb_errpush(info,name)
@ -98,12 +99,11 @@ subroutine psi_eovrl_updr1(x,desc_a,update,info)
call psb_erractionrestore(err_act)
return
9999 call psb_error_handler(ictxt,err_act)
9999 call psb_error_handler(ctxt,err_act)
return
end subroutine psi_eovrl_updr1
subroutine psi_eovrl_updr2(x,desc_a,update,info)
use psi_mod, psi_protect_name => psi_eovrl_updr2
@ -115,7 +115,8 @@ subroutine psi_eovrl_updr2(x,desc_a,update,info)
integer(psb_ipk_), intent(out) :: info
! locals
integer(psb_ipk_) :: ictxt, np, me, err_act, i, idx, ndm
type(psb_ctxt_type) :: ctxt
integer(psb_ipk_) :: np, me, err_act, i, idx, ndm
integer(psb_ipk_) :: ierr(5)
character(len=20) :: name, ch_err
@ -125,8 +126,8 @@ subroutine psi_eovrl_updr2(x,desc_a,update,info)
if (psb_errstatus_fatal()) then
info = psb_err_internal_error_ ; goto 9999
end if
ictxt = desc_a%get_context()
call psb_info(ictxt, me, np)
ctxt = desc_a%get_context()
call psb_info(ctxt, me, np)
if (np == -1) then
info = psb_err_context_error_
call psb_errpush(info,name)
@ -167,7 +168,7 @@ subroutine psi_eovrl_updr2(x,desc_a,update,info)
call psb_erractionrestore(err_act)
return
9999 call psb_error_handler(ictxt,err_act)
9999 call psb_error_handler(ctxt,err_act)
return
end subroutine psi_eovrl_updr2

@ -106,7 +106,9 @@ subroutine psi_eswapdatam(flag,n,beta,y,desc_a,work,info,data)
integer(psb_ipk_), optional :: data
! locals
integer(psb_ipk_) :: ictxt, np, me, icomm, idxs, idxr, totxch, data_, err_act
type(psb_ctxt_type) :: ctxt
integer(psb_mpk_) :: icomm
integer(psb_ipk_) :: np, me, idxs, idxr, totxch, data_, err_act
integer(psb_ipk_), pointer :: d_idx(:)
character(len=20) :: name
@ -114,9 +116,9 @@ subroutine psi_eswapdatam(flag,n,beta,y,desc_a,work,info,data)
name='psi_swap_data'
call psb_erractionsave(err_act)
ictxt = desc_a%get_context()
ctxt = desc_a%get_context()
icomm = desc_a%get_mpic()
call psb_info(ictxt,me,np)
call psb_info(ctxt,me,np)
if (np == -1) then
info=psb_err_context_error_
call psb_errpush(info,name)
@ -141,18 +143,18 @@ subroutine psi_eswapdatam(flag,n,beta,y,desc_a,work,info,data)
goto 9999
end if
call psi_swapdata(ictxt,icomm,flag,n,beta,y,d_idx,totxch,idxs,idxr,work,info)
call psi_swapdata(ctxt,icomm,flag,n,beta,y,d_idx,totxch,idxs,idxr,work,info)
if (info /= psb_success_) goto 9999
call psb_erractionrestore(err_act)
return
9999 call psb_error_handler(ictxt,err_act)
9999 call psb_error_handler(ctxt,err_act)
return
end subroutine psi_eswapdatam
subroutine psi_eswapidxm(iictxt,iicomm,flag,n,beta,y,idx, &
subroutine psi_eswapidxm(ctxt,icomm,flag,n,beta,y,idx, &
& totxch,totsnd,totrcv,work,info)
use psi_mod, psb_protect_name => psi_eswapidxm
@ -167,15 +169,18 @@ subroutine psi_eswapidxm(iictxt,iicomm,flag,n,beta,y,idx, &
include 'mpif.h'
#endif
integer(psb_ipk_), intent(in) :: iictxt,iicomm,flag,n
integer(psb_ipk_), intent(out) :: info
type(psb_ctxt_type), intent(in) :: ctxt
integer(psb_mpk_), intent(in) :: icomm
integer(psb_ipk_), intent(in) :: flag,n
integer(psb_ipk_), intent(out) :: info
integer(psb_epk_) :: y(:,:), beta
integer(psb_epk_), target :: work(:)
integer(psb_ipk_), intent(in) :: idx(:),totxch,totsnd, totrcv
! locals
integer(psb_mpk_) :: ictxt, icomm, np, me,&
& proc_to_comm, p2ptag, p2pstat(mpi_status_size), iret
integer(psb_ipk_) :: np, me
integer(psb_mpk_) :: proc_to_comm, p2ptag, p2pstat(mpi_status_size), iret
integer(psb_mpk_), allocatable, dimension(:) :: bsdidx, brvidx,&
& sdsz, rvsz, prcid, rvhd, sdhd
integer(psb_ipk_) :: nesd, nerv,&
@ -192,10 +197,7 @@ subroutine psi_eswapidxm(iictxt,iicomm,flag,n,beta,y,idx, &
info=psb_success_
name='psi_swap_data'
call psb_erractionsave(err_act)
ictxt = iictxt
icomm = iicomm
call psb_info(ictxt,me,np)
call psb_info(ctxt,me,np)
if (np == -1) then
info=psb_err_context_error_
call psb_errpush(info,name)
@ -235,7 +237,7 @@ subroutine psi_eswapidxm(iictxt,iicomm,flag,n,beta,y,idx, &
proc_to_comm = idx(pnti+psb_proc_id_)
nerv = idx(pnti+psb_n_elem_recv_)
nesd = idx(pnti+nerv+psb_n_elem_send_)
prcid(proc_to_comm) = psb_get_mpi_rank(ictxt,proc_to_comm)
prcid(proc_to_comm) = psb_get_mpi_rank(ctxt,proc_to_comm)
brvidx(proc_to_comm) = rcv_pt
rvsz(proc_to_comm) = n*nerv
@ -314,14 +316,14 @@ subroutine psi_eswapidxm(iictxt,iicomm,flag,n,beta,y,idx, &
nesd = idx(pnti+nerv+psb_n_elem_send_)
if (proc_to_comm < me) then
if (nesd>0) call psb_snd(ictxt,&
if (nesd>0) call psb_snd(ctxt,&
& sndbuf(snd_pt:snd_pt+n*nesd-1), proc_to_comm)
if (nerv>0) call psb_rcv(ictxt,&
if (nerv>0) call psb_rcv(ctxt,&
& rcvbuf(rcv_pt:rcv_pt+n*nerv-1), proc_to_comm)
else if (proc_to_comm > me) then
if (nerv>0) call psb_rcv(ictxt,&
if (nerv>0) call psb_rcv(ctxt,&
& rcvbuf(rcv_pt:rcv_pt+n*nerv-1), proc_to_comm)
if (nesd>0) call psb_snd(ictxt,&
if (nesd>0) call psb_snd(ctxt,&
& sndbuf(snd_pt:snd_pt+n*nesd-1), proc_to_comm)
else if (proc_to_comm == me) then
if (nesd /= nerv) then
@ -348,7 +350,7 @@ subroutine psi_eswapidxm(iictxt,iicomm,flag,n,beta,y,idx, &
proc_to_comm = idx(pnti+psb_proc_id_)
nerv = idx(pnti+psb_n_elem_recv_)
nesd = idx(pnti+nerv+psb_n_elem_send_)
prcid(i) = psb_get_mpi_rank(ictxt,proc_to_comm)
prcid(i) = psb_get_mpi_rank(ctxt,proc_to_comm)
if ((nerv>0).and.(proc_to_comm /= me)) then
p2ptag = psb_int8_swap_tag
call mpi_irecv(rcvbuf(rcv_pt),n*nerv,&
@ -433,7 +435,7 @@ subroutine psi_eswapidxm(iictxt,iicomm,flag,n,beta,y,idx, &
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_snd(ictxt,&
if (nesd>0) call psb_snd(ctxt,&
& sndbuf(snd_pt:snd_pt+n*nesd-1), proc_to_comm)
rcv_pt = rcv_pt + n*nerv
snd_pt = snd_pt + n*nesd
@ -450,7 +452,7 @@ subroutine psi_eswapidxm(iictxt,iicomm,flag,n,beta,y,idx, &
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_rcv(ictxt,&
if (nerv>0) call psb_rcv(ctxt,&
& rcvbuf(rcv_pt:rcv_pt+n*nerv-1), proc_to_comm)
rcv_pt = rcv_pt + n*nerv
snd_pt = snd_pt + n*nesd
@ -498,7 +500,7 @@ subroutine psi_eswapidxm(iictxt,iicomm,flag,n,beta,y,idx, &
call psb_erractionrestore(err_act)
return
9999 call psb_error_handler(iictxt,err_act)
9999 call psb_error_handler(ctxt,err_act)
return
end subroutine psi_eswapidxm
@ -579,7 +581,9 @@ subroutine psi_eswapdatav(flag,beta,y,desc_a,work,info,data)
integer(psb_ipk_), optional :: data
! locals
integer(psb_ipk_) :: ictxt, np, me, icomm, idxs, idxr, totxch, data_, err_act
type(psb_ctxt_type) :: ctxt
integer(psb_mpk_) :: icomm
integer(psb_ipk_) :: np, me, idxs, idxr, totxch, data_, err_act
integer(psb_ipk_), pointer :: d_idx(:)
character(len=20) :: name
@ -587,9 +591,9 @@ subroutine psi_eswapdatav(flag,beta,y,desc_a,work,info,data)
name='psi_swap_datav'
call psb_erractionsave(err_act)
ictxt = desc_a%get_context()
ctxt = desc_a%get_context()
icomm = desc_a%get_mpic()
call psb_info(ictxt,me,np)
call psb_info(ctxt,me,np)
if (np == -1) then
info=psb_err_context_error_
call psb_errpush(info,name)
@ -614,13 +618,13 @@ subroutine psi_eswapdatav(flag,beta,y,desc_a,work,info,data)
goto 9999
end if
call psi_swapdata(ictxt,icomm,flag,beta,y,d_idx,totxch,idxs,idxr,work,info)
call psi_swapdata(ctxt,icomm,flag,beta,y,d_idx,totxch,idxs,idxr,work,info)
if (info /= psb_success_) goto 9999
call psb_erractionrestore(err_act)
return
9999 call psb_error_handler(ictxt,err_act)
9999 call psb_error_handler(ctxt,err_act)
return
end subroutine psi_eswapdatav
@ -636,7 +640,7 @@ end subroutine psi_eswapdatav
!
!
!
subroutine psi_eswapidxv(iictxt,iicomm,flag,beta,y,idx, &
subroutine psi_eswapidxv(ctxt,icomm,flag,beta,y,idx, &
& totxch,totsnd,totrcv,work,info)
use psi_mod, psb_protect_name => psi_eswapidxv
@ -651,15 +655,17 @@ subroutine psi_eswapidxv(iictxt,iicomm,flag,beta,y,idx, &
include 'mpif.h'
#endif
integer(psb_ipk_), intent(in) :: iictxt,iicomm,flag
integer(psb_ipk_), intent(out) :: info
type(psb_ctxt_type), intent(in) :: ctxt
integer(psb_mpk_), intent(in) :: icomm
integer(psb_ipk_), intent(in) :: flag
integer(psb_ipk_), intent(out) :: info
integer(psb_epk_) :: y(:), beta
integer(psb_epk_), target :: work(:)
integer(psb_ipk_), intent(in) :: idx(:),totxch,totsnd, totrcv
! locals
integer(psb_mpk_) :: ictxt, icomm, np, me,&
& proc_to_comm, p2ptag, p2pstat(mpi_status_size), iret
integer(psb_ipk_) :: np, me
integer(psb_mpk_) :: proc_to_comm, p2ptag, p2pstat(mpi_status_size), iret
integer(psb_mpk_), allocatable, dimension(:) :: bsdidx, brvidx,&
& sdsz, rvsz, prcid, rvhd, sdhd
integer(psb_ipk_) :: nesd, nerv,&
@ -676,10 +682,7 @@ subroutine psi_eswapidxv(iictxt,iicomm,flag,beta,y,idx, &
info=psb_success_
name='psi_swap_datav'
call psb_erractionsave(err_act)
ictxt = iictxt
icomm = iicomm
call psb_info(ictxt,me,np)
call psb_info(ctxt,me,np)
if (np == -1) then
info=psb_err_context_error_
call psb_errpush(info,name)
@ -719,7 +722,7 @@ subroutine psi_eswapidxv(iictxt,iicomm,flag,beta,y,idx, &
proc_to_comm = idx(pnti+psb_proc_id_)
nerv = idx(pnti+psb_n_elem_recv_)
nesd = idx(pnti+nerv+psb_n_elem_send_)
prcid(proc_to_comm) = psb_get_mpi_rank(ictxt,proc_to_comm)
prcid(proc_to_comm) = psb_get_mpi_rank(ctxt,proc_to_comm)
brvidx(proc_to_comm) = rcv_pt
rvsz(proc_to_comm) = nerv
@ -799,14 +802,14 @@ subroutine psi_eswapidxv(iictxt,iicomm,flag,beta,y,idx, &
nesd = idx(pnti+nerv+psb_n_elem_send_)
if (proc_to_comm < me) then
if (nesd>0) call psb_snd(ictxt,&
if (nesd>0) call psb_snd(ctxt,&
& sndbuf(snd_pt:snd_pt+nesd-1), proc_to_comm)
if (nerv>0) call psb_rcv(ictxt,&
if (nerv>0) call psb_rcv(ctxt,&
& rcvbuf(rcv_pt:rcv_pt+nerv-1), proc_to_comm)
else if (proc_to_comm > me) then
if (nerv>0) call psb_rcv(ictxt,&
if (nerv>0) call psb_rcv(ctxt,&
& rcvbuf(rcv_pt:rcv_pt+nerv-1), proc_to_comm)
if (nesd>0) call psb_snd(ictxt,&
if (nesd>0) call psb_snd(ctxt,&
& sndbuf(snd_pt:snd_pt+nesd-1), proc_to_comm)
else if (proc_to_comm == me) then
if (nesd /= nerv) then
@ -833,7 +836,7 @@ subroutine psi_eswapidxv(iictxt,iicomm,flag,beta,y,idx, &
nerv = idx(pnti+psb_n_elem_recv_)
nesd = idx(pnti+nerv+psb_n_elem_send_)
prcid(i) = psb_get_mpi_rank(ictxt,proc_to_comm)
prcid(i) = psb_get_mpi_rank(ctxt,proc_to_comm)
if ((nerv>0).and.(proc_to_comm /= me)) then
p2ptag = psb_int8_swap_tag
call mpi_irecv(rcvbuf(rcv_pt),nerv,&
@ -917,7 +920,7 @@ subroutine psi_eswapidxv(iictxt,iicomm,flag,beta,y,idx, &
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_snd(ictxt,&
if (nesd>0) call psb_snd(ctxt,&
& sndbuf(snd_pt:snd_pt+nesd-1), proc_to_comm)
rcv_pt = rcv_pt + nerv
snd_pt = snd_pt + nesd
@ -933,7 +936,7 @@ subroutine psi_eswapidxv(iictxt,iicomm,flag,beta,y,idx, &
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_rcv(ictxt,&
if (nerv>0) call psb_rcv(ctxt,&
& rcvbuf(rcv_pt:rcv_pt+nerv-1), proc_to_comm)
rcv_pt = rcv_pt + nerv
snd_pt = snd_pt + nesd
@ -980,7 +983,7 @@ subroutine psi_eswapidxv(iictxt,iicomm,flag,beta,y,idx, &
call psb_erractionrestore(err_act)
return
9999 call psb_error_handler(iictxt,err_act)
9999 call psb_error_handler(ctxt,err_act)
return
end subroutine psi_eswapidxv

@ -110,7 +110,9 @@ subroutine psi_eswaptranm(flag,n,beta,y,desc_a,work,info,data)
integer(psb_ipk_), optional :: data
! locals
integer(psb_ipk_) :: ictxt, np, me, icomm, idxs, idxr, err_act, totxch, data_
type(psb_ctxt_type) :: ctxt
integer(psb_mpk_) :: icomm
integer(psb_ipk_) :: np, me, idxs, idxr, err_act, totxch, data_
integer(psb_ipk_), pointer :: d_idx(:)
character(len=20) :: name
@ -118,10 +120,10 @@ subroutine psi_eswaptranm(flag,n,beta,y,desc_a,work,info,data)
name='psi_swap_tran'
call psb_erractionsave(err_act)
ictxt = desc_a%get_context()
ctxt = desc_a%get_context()
icomm = desc_a%get_mpic()
call psb_info(ictxt,me,np)
call psb_info(ctxt,me,np)
if (np == -1) then
info=psb_err_context_error_
call psb_errpush(info,name)
@ -146,18 +148,18 @@ subroutine psi_eswaptranm(flag,n,beta,y,desc_a,work,info,data)
goto 9999
end if
call psi_swaptran(ictxt,icomm,flag,n,beta,y,d_idx,totxch,idxs,idxr,work,info)
call psi_swaptran(ctxt,icomm,flag,n,beta,y,d_idx,totxch,idxs,idxr,work,info)
if (info /= psb_success_) goto 9999
call psb_erractionrestore(err_act)
return
9999 call psb_error_handler(ictxt,err_act)
9999 call psb_error_handler(ctxt,err_act)
return
end subroutine psi_eswaptranm
subroutine psi_etranidxm(iictxt,iicomm,flag,n,beta,y,idx,&
subroutine psi_etranidxm(ctxt,icomm,flag,n,beta,y,idx,&
& totxch,totsnd,totrcv,work,info)
use psi_mod, psb_protect_name => psi_etranidxm
@ -172,15 +174,17 @@ subroutine psi_etranidxm(iictxt,iicomm,flag,n,beta,y,idx,&
include 'mpif.h'
#endif
integer(psb_ipk_), intent(in) :: iictxt,iicomm,flag,n
integer(psb_ipk_), intent(out) :: info
type(psb_ctxt_type), intent(in) :: ctxt
integer(psb_mpk_), intent(in) :: icomm
integer(psb_ipk_), intent(in) :: flag,n
integer(psb_ipk_), intent(out) :: info
integer(psb_epk_) :: y(:,:), beta
integer(psb_epk_), target :: work(:)
integer(psb_ipk_), intent(in) :: idx(:),totxch,totsnd, totrcv
! locals
integer(psb_mpk_) :: ictxt, icomm, np, me,&
& proc_to_comm, p2ptag, p2pstat(mpi_status_size), iret
integer(psb_ipk_) :: np, me
integer(psb_mpk_) :: proc_to_comm, p2ptag, p2pstat(mpi_status_size), iret
integer(psb_mpk_), allocatable, dimension(:) :: bsdidx, brvidx,&
& sdsz, rvsz, prcid, rvhd, sdhd
integer(psb_ipk_) :: nesd, nerv,&
@ -197,10 +201,7 @@ subroutine psi_etranidxm(iictxt,iicomm,flag,n,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)
call psb_info(ctxt,me,np)
if (np == -1) then
info=psb_err_context_error_
call psb_errpush(info,name)
@ -240,7 +241,7 @@ subroutine psi_etranidxm(iictxt,iicomm,flag,n,beta,y,idx,&
proc_to_comm = idx(pnti+psb_proc_id_)
nerv = idx(pnti+psb_n_elem_recv_)
nesd = idx(pnti+nerv+psb_n_elem_send_)
prcid(proc_to_comm) = psb_get_mpi_rank(ictxt,proc_to_comm)
prcid(proc_to_comm) = psb_get_mpi_rank(ctxt,proc_to_comm)
brvidx(proc_to_comm) = rcv_pt
rvsz(proc_to_comm) = n*nerv
@ -324,14 +325,14 @@ subroutine psi_etranidxm(iictxt,iicomm,flag,n,beta,y,idx,&
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(ctxt,&
& rcvbuf(rcv_pt:rcv_pt+n*nerv-1), proc_to_comm)
if (nesd>0) call psb_rcv(ictxt,&
if (nesd>0) call psb_rcv(ctxt,&
& 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(ctxt,&
& sndbuf(snd_pt:snd_pt+n*nesd-1), proc_to_comm)
if (nerv>0) call psb_snd(ictxt,&
if (nerv>0) call psb_snd(ctxt,&
& rcvbuf(rcv_pt:rcv_pt+n*nerv-1), proc_to_comm)
else if (proc_to_comm == me) then
if (nesd /= nerv) then
@ -358,7 +359,7 @@ subroutine psi_etranidxm(iictxt,iicomm,flag,n,beta,y,idx,&
proc_to_comm = idx(pnti+psb_proc_id_)
nerv = idx(pnti+psb_n_elem_recv_)
nesd = idx(pnti+nerv+psb_n_elem_send_)
prcid(i) = psb_get_mpi_rank(ictxt,proc_to_comm)
prcid(i) = psb_get_mpi_rank(ctxt,proc_to_comm)
if ((nesd>0).and.(proc_to_comm /= me)) then
p2ptag = psb_int8_swap_tag
call mpi_irecv(sndbuf(snd_pt),n*nesd,&
@ -443,7 +444,7 @@ subroutine psi_etranidxm(iictxt,iicomm,flag,n,beta,y,idx,&
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(ctxt,&
& rcvbuf(rcv_pt:rcv_pt+n*nerv-1), proc_to_comm)
rcv_pt = rcv_pt + n*nerv
snd_pt = snd_pt + n*nesd
@ -460,7 +461,7 @@ subroutine psi_etranidxm(iictxt,iicomm,flag,n,beta,y,idx,&
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(ctxt,&
& sndbuf(snd_pt:snd_pt+n*nesd-1), proc_to_comm)
rcv_pt = rcv_pt + n*nerv
snd_pt = snd_pt + n*nesd
@ -508,7 +509,7 @@ subroutine psi_etranidxm(iictxt,iicomm,flag,n,beta,y,idx,&
call psb_erractionrestore(err_act)
return
9999 call psb_error_handler(iictxt,err_act)
9999 call psb_error_handler(ctxt,err_act)
return
end subroutine psi_etranidxm
@ -592,7 +593,9 @@ subroutine psi_eswaptranv(flag,beta,y,desc_a,work,info,data)
integer(psb_ipk_), optional :: data
! locals
integer(psb_ipk_) :: ictxt, np, me, icomm, idxs, idxr, totxch, err_act, data_
type(psb_ctxt_type) :: ctxt
integer(psb_mpk_) :: icomm
integer(psb_ipk_) :: np, me, idxs, idxr, totxch, err_act, data_
integer(psb_ipk_), pointer :: d_idx(:)
character(len=20) :: name
@ -600,9 +603,9 @@ subroutine psi_eswaptranv(flag,beta,y,desc_a,work,info,data)
name='psi_swap_tranv'
call psb_erractionsave(err_act)
ictxt = desc_a%get_context()
ctxt = desc_a%get_context()
icomm = desc_a%get_mpic()
call psb_info(ictxt,me,np)
call psb_info(ctxt,me,np)
if (np == -1) then
info=psb_err_context_error_
call psb_errpush(info,name)
@ -627,13 +630,13 @@ subroutine psi_eswaptranv(flag,beta,y,desc_a,work,info,data)
goto 9999
end if
call psi_swaptran(ictxt,icomm,flag,beta,y,d_idx,totxch,idxs,idxr,work,info)
call psi_swaptran(ctxt,icomm,flag,beta,y,d_idx,totxch,idxs,idxr,work,info)
if (info /= psb_success_) goto 9999
call psb_erractionrestore(err_act)
return
9999 call psb_error_handler(ictxt,err_act)
9999 call psb_error_handler(ctxt,err_act)
return
end subroutine psi_eswaptranv
@ -649,7 +652,7 @@ end subroutine psi_eswaptranv
!
!
!
subroutine psi_etranidxv(iictxt,iicomm,flag,beta,y,idx,&
subroutine psi_etranidxv(ctxt,icomm,flag,beta,y,idx,&
& totxch,totsnd,totrcv,work,info)
use psi_mod, psb_protect_name => psi_etranidxv
@ -664,15 +667,17 @@ subroutine psi_etranidxv(iictxt,iicomm,flag,beta,y,idx,&
include 'mpif.h'
#endif
integer(psb_ipk_), intent(in) :: iictxt,iicomm,flag
integer(psb_ipk_), intent(out) :: info
type(psb_ctxt_type), intent(in) :: ctxt
integer(psb_mpk_), intent(in) :: icomm
integer(psb_ipk_), intent(in) :: flag
integer(psb_ipk_), intent(out) :: info
integer(psb_epk_) :: y(:), beta
integer(psb_epk_), target :: work(:)
integer(psb_ipk_), intent(in) :: idx(:),totxch,totsnd, totrcv
! locals
integer(psb_mpk_) :: ictxt, icomm, np, me,&
& proc_to_comm, p2ptag, p2pstat(mpi_status_size), iret
integer(psb_ipk_) :: np, me
integer(psb_mpk_) :: proc_to_comm, p2ptag, p2pstat(mpi_status_size), iret
integer(psb_mpk_), allocatable, dimension(:) :: bsdidx, brvidx,&
& sdsz, rvsz, prcid, rvhd, sdhd
integer(psb_ipk_) :: nesd, nerv,&
@ -689,10 +694,7 @@ subroutine psi_etranidxv(iictxt,iicomm,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)
call psb_info(ctxt,me,np)
if (np == -1) then
info=psb_err_context_error_
call psb_errpush(info,name)
@ -732,7 +734,7 @@ subroutine psi_etranidxv(iictxt,iicomm,flag,beta,y,idx,&
proc_to_comm = idx(pnti+psb_proc_id_)
nerv = idx(pnti+psb_n_elem_recv_)
nesd = idx(pnti+nerv+psb_n_elem_send_)
prcid(proc_to_comm) = psb_get_mpi_rank(ictxt,proc_to_comm)
prcid(proc_to_comm) = psb_get_mpi_rank(ctxt,proc_to_comm)
brvidx(proc_to_comm) = rcv_pt
rvsz(proc_to_comm) = nerv
@ -817,14 +819,14 @@ subroutine psi_etranidxv(iictxt,iicomm,flag,beta,y,idx,&
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(ctxt,&
& rcvbuf(rcv_pt:rcv_pt+nerv-1), proc_to_comm)
if (nesd>0) call psb_rcv(ictxt,&
if (nesd>0) call psb_rcv(ctxt,&
& 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(ctxt,&
& sndbuf(snd_pt:snd_pt+nesd-1), proc_to_comm)
if (nerv>0) call psb_snd(ictxt,&
if (nerv>0) call psb_snd(ctxt,&
& rcvbuf(rcv_pt:rcv_pt+nerv-1), proc_to_comm)
else if (proc_to_comm == me) then
if (nesd /= nerv) then
@ -850,7 +852,7 @@ subroutine psi_etranidxv(iictxt,iicomm,flag,beta,y,idx,&
proc_to_comm = idx(pnti+psb_proc_id_)
nerv = idx(pnti+psb_n_elem_recv_)
nesd = idx(pnti+nerv+psb_n_elem_send_)
prcid(i) = psb_get_mpi_rank(ictxt,proc_to_comm)
prcid(i) = psb_get_mpi_rank(ctxt,proc_to_comm)
if ((nesd>0).and.(proc_to_comm /= me)) then
p2ptag = psb_int8_swap_tag
call mpi_irecv(sndbuf(snd_pt),nesd,&
@ -933,7 +935,7 @@ subroutine psi_etranidxv(iictxt,iicomm,flag,beta,y,idx,&
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(ctxt,&
& rcvbuf(rcv_pt:rcv_pt+nerv-1), proc_to_comm)
rcv_pt = rcv_pt + nerv
snd_pt = snd_pt + nesd
@ -949,7 +951,7 @@ subroutine psi_etranidxv(iictxt,iicomm,flag,beta,y,idx,&
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(ctxt,&
& sndbuf(snd_pt:snd_pt+nesd-1), proc_to_comm)
rcv_pt = rcv_pt + nerv
snd_pt = snd_pt + nesd
@ -996,7 +998,7 @@ subroutine psi_etranidxv(iictxt,iicomm,flag,beta,y,idx,&
call psb_erractionrestore(err_act)
return
9999 call psb_error_handler(iictxt,err_act)
9999 call psb_error_handler(ctxt,err_act)
return
end subroutine psi_etranidxv

@ -45,7 +45,8 @@ subroutine psi_i2ovrl_restrr1(x,xs,desc_a,info)
integer(psb_ipk_), intent(out) :: info
! locals
integer(psb_ipk_) :: ictxt, np, me, err_act, i, idx, isz
type(psb_ctxt_type) :: ctxt
integer(psb_ipk_) :: np, me, err_act, i, idx, isz
character(len=20) :: name, ch_err
name='psi_i2ovrl_restrr1'
@ -54,8 +55,8 @@ subroutine psi_i2ovrl_restrr1(x,xs,desc_a,info)
if (psb_errstatus_fatal()) then
info = psb_err_internal_error_ ; goto 9999
end if
ictxt = desc_a%get_context()
call psb_info(ictxt, me, np)
ctxt = desc_a%get_context()
call psb_info(ctxt, me, np)
if (np == -1) then
info = psb_err_context_error_
call psb_errpush(info,name)
@ -72,7 +73,7 @@ subroutine psi_i2ovrl_restrr1(x,xs,desc_a,info)
call psb_erractionrestore(err_act)
return
9999 call psb_error_handler(ictxt,err_act)
9999 call psb_error_handler(ctxt,err_act)
return
end subroutine psi_i2ovrl_restrr1
@ -88,7 +89,8 @@ subroutine psi_i2ovrl_restrr2(x,xs,desc_a,info)
integer(psb_ipk_), intent(out) :: info
! locals
integer(psb_ipk_) :: ictxt, np, me, err_act, i, idx, isz
type(psb_ctxt_type) :: ctxt
integer(psb_ipk_) :: np, me, err_act, i, idx, isz
character(len=20) :: name, ch_err
name='psi_i2ovrl_restrr2'
@ -97,8 +99,8 @@ subroutine psi_i2ovrl_restrr2(x,xs,desc_a,info)
if (psb_errstatus_fatal()) then
info = psb_err_internal_error_ ; goto 9999
end if
ictxt = desc_a%get_context()
call psb_info(ictxt, me, np)
ctxt = desc_a%get_context()
call psb_info(ctxt, me, np)
if (np == -1) then
info = psb_err_context_error_
call psb_errpush(info,name)
@ -122,7 +124,7 @@ subroutine psi_i2ovrl_restrr2(x,xs,desc_a,info)
call psb_erractionrestore(err_act)
return
9999 call psb_error_handler(ictxt,err_act)
9999 call psb_error_handler(ctxt,err_act)
return
end subroutine psi_i2ovrl_restrr2

@ -47,7 +47,8 @@ subroutine psi_i2ovrl_saver1(x,xs,desc_a,info)
integer(psb_ipk_), intent(out) :: info
! locals
integer(psb_ipk_) :: ictxt, np, me, err_act, i, idx, isz
type(psb_ctxt_type) :: ctxt
integer(psb_ipk_) :: np, me, err_act, i, idx, isz
character(len=20) :: name, ch_err
name='psi_i2ovrl_saver1'
@ -56,8 +57,8 @@ subroutine psi_i2ovrl_saver1(x,xs,desc_a,info)
if (psb_errstatus_fatal()) then
info = psb_err_internal_error_ ; goto 9999
end if
ictxt = desc_a%get_context()
call psb_info(ictxt, me, np)
ctxt = desc_a%get_context()
call psb_info(ctxt, me, np)
if (np == -1) then
info = psb_err_context_error_
call psb_errpush(info,name)
@ -80,7 +81,7 @@ subroutine psi_i2ovrl_saver1(x,xs,desc_a,info)
call psb_erractionrestore(err_act)
return
9999 call psb_error_handler(ictxt,err_act)
9999 call psb_error_handler(ctxt,err_act)
return
end subroutine psi_i2ovrl_saver1
@ -99,7 +100,8 @@ subroutine psi_i2ovrl_saver2(x,xs,desc_a,info)
integer(psb_ipk_), intent(out) :: info
! locals
integer(psb_ipk_) :: ictxt, np, me, err_act, i, idx, isz, nc
type(psb_ctxt_type) :: ctxt
integer(psb_ipk_) :: np, me, err_act, i, idx, isz, nc
character(len=20) :: name, ch_err
name='psi_i2ovrl_saver2'
@ -108,8 +110,8 @@ subroutine psi_i2ovrl_saver2(x,xs,desc_a,info)
if (psb_errstatus_fatal()) then
info = psb_err_internal_error_ ; goto 9999
end if
ictxt = desc_a%get_context()
call psb_info(ictxt, me, np)
ctxt = desc_a%get_context()
call psb_info(ctxt, me, np)
if (np == -1) then
info = psb_err_context_error_
call psb_errpush(info,name)
@ -133,7 +135,7 @@ subroutine psi_i2ovrl_saver2(x,xs,desc_a,info)
call psb_erractionrestore(err_act)
return
9999 call psb_error_handler(ictxt,err_act)
9999 call psb_error_handler(ctxt,err_act)
return
end subroutine psi_i2ovrl_saver2

@ -46,7 +46,8 @@ subroutine psi_i2ovrl_updr1(x,desc_a,update,info)
integer(psb_ipk_), intent(out) :: info
! locals
integer(psb_ipk_) :: ictxt, np, me, err_act, i, idx, ndm
type(psb_ctxt_type) :: ctxt
integer(psb_ipk_) :: np, me, err_act, i, idx, ndm
integer(psb_ipk_) :: ierr(5)
character(len=20) :: name, ch_err
@ -56,8 +57,8 @@ subroutine psi_i2ovrl_updr1(x,desc_a,update,info)
if (psb_errstatus_fatal()) then
info = psb_err_internal_error_ ; goto 9999
end if
ictxt = desc_a%get_context()
call psb_info(ictxt, me, np)
ctxt = desc_a%get_context()
call psb_info(ctxt, me, np)
if (np == -1) then
info = psb_err_context_error_
call psb_errpush(info,name)
@ -98,12 +99,11 @@ subroutine psi_i2ovrl_updr1(x,desc_a,update,info)
call psb_erractionrestore(err_act)
return
9999 call psb_error_handler(ictxt,err_act)
9999 call psb_error_handler(ctxt,err_act)
return
end subroutine psi_i2ovrl_updr1
subroutine psi_i2ovrl_updr2(x,desc_a,update,info)
use psi_mod, psi_protect_name => psi_i2ovrl_updr2
@ -115,7 +115,8 @@ subroutine psi_i2ovrl_updr2(x,desc_a,update,info)
integer(psb_ipk_), intent(out) :: info
! locals
integer(psb_ipk_) :: ictxt, np, me, err_act, i, idx, ndm
type(psb_ctxt_type) :: ctxt
integer(psb_ipk_) :: np, me, err_act, i, idx, ndm
integer(psb_ipk_) :: ierr(5)
character(len=20) :: name, ch_err
@ -125,8 +126,8 @@ subroutine psi_i2ovrl_updr2(x,desc_a,update,info)
if (psb_errstatus_fatal()) then
info = psb_err_internal_error_ ; goto 9999
end if
ictxt = desc_a%get_context()
call psb_info(ictxt, me, np)
ctxt = desc_a%get_context()
call psb_info(ctxt, me, np)
if (np == -1) then
info = psb_err_context_error_
call psb_errpush(info,name)
@ -167,7 +168,7 @@ subroutine psi_i2ovrl_updr2(x,desc_a,update,info)
call psb_erractionrestore(err_act)
return
9999 call psb_error_handler(ictxt,err_act)
9999 call psb_error_handler(ctxt,err_act)
return
end subroutine psi_i2ovrl_updr2

@ -106,7 +106,9 @@ subroutine psi_i2swapdatam(flag,n,beta,y,desc_a,work,info,data)
integer(psb_ipk_), optional :: data
! locals
integer(psb_ipk_) :: ictxt, np, me, icomm, idxs, idxr, totxch, data_, err_act
type(psb_ctxt_type) :: ctxt
integer(psb_mpk_) :: icomm
integer(psb_ipk_) :: np, me, idxs, idxr, totxch, data_, err_act
integer(psb_ipk_), pointer :: d_idx(:)
character(len=20) :: name
@ -114,9 +116,9 @@ subroutine psi_i2swapdatam(flag,n,beta,y,desc_a,work,info,data)
name='psi_swap_data'
call psb_erractionsave(err_act)
ictxt = desc_a%get_context()
ctxt = desc_a%get_context()
icomm = desc_a%get_mpic()
call psb_info(ictxt,me,np)
call psb_info(ctxt,me,np)
if (np == -1) then
info=psb_err_context_error_
call psb_errpush(info,name)
@ -141,18 +143,18 @@ subroutine psi_i2swapdatam(flag,n,beta,y,desc_a,work,info,data)
goto 9999
end if
call psi_swapdata(ictxt,icomm,flag,n,beta,y,d_idx,totxch,idxs,idxr,work,info)
call psi_swapdata(ctxt,icomm,flag,n,beta,y,d_idx,totxch,idxs,idxr,work,info)
if (info /= psb_success_) goto 9999
call psb_erractionrestore(err_act)
return
9999 call psb_error_handler(ictxt,err_act)
9999 call psb_error_handler(ctxt,err_act)
return
end subroutine psi_i2swapdatam
subroutine psi_i2swapidxm(iictxt,iicomm,flag,n,beta,y,idx, &
subroutine psi_i2swapidxm(ctxt,icomm,flag,n,beta,y,idx, &
& totxch,totsnd,totrcv,work,info)
use psi_mod, psb_protect_name => psi_i2swapidxm
@ -167,15 +169,18 @@ subroutine psi_i2swapidxm(iictxt,iicomm,flag,n,beta,y,idx, &
include 'mpif.h'
#endif
integer(psb_ipk_), intent(in) :: iictxt,iicomm,flag,n
integer(psb_ipk_), intent(out) :: info
type(psb_ctxt_type), intent(in) :: ctxt
integer(psb_mpk_), intent(in) :: icomm
integer(psb_ipk_), intent(in) :: flag,n
integer(psb_ipk_), intent(out) :: info
integer(psb_i2pk_) :: y(:,:), beta
integer(psb_i2pk_), target :: work(:)
integer(psb_ipk_), intent(in) :: idx(:),totxch,totsnd, totrcv
! locals
integer(psb_mpk_) :: ictxt, icomm, np, me,&
& proc_to_comm, p2ptag, p2pstat(mpi_status_size), iret
integer(psb_ipk_) :: np, me
integer(psb_mpk_) :: proc_to_comm, p2ptag, p2pstat(mpi_status_size), iret
integer(psb_mpk_), allocatable, dimension(:) :: bsdidx, brvidx,&
& sdsz, rvsz, prcid, rvhd, sdhd
integer(psb_ipk_) :: nesd, nerv,&
@ -192,10 +197,7 @@ subroutine psi_i2swapidxm(iictxt,iicomm,flag,n,beta,y,idx, &
info=psb_success_
name='psi_swap_data'
call psb_erractionsave(err_act)
ictxt = iictxt
icomm = iicomm
call psb_info(ictxt,me,np)
call psb_info(ctxt,me,np)
if (np == -1) then
info=psb_err_context_error_
call psb_errpush(info,name)
@ -235,7 +237,7 @@ subroutine psi_i2swapidxm(iictxt,iicomm,flag,n,beta,y,idx, &
proc_to_comm = idx(pnti+psb_proc_id_)
nerv = idx(pnti+psb_n_elem_recv_)
nesd = idx(pnti+nerv+psb_n_elem_send_)
prcid(proc_to_comm) = psb_get_mpi_rank(ictxt,proc_to_comm)
prcid(proc_to_comm) = psb_get_mpi_rank(ctxt,proc_to_comm)
brvidx(proc_to_comm) = rcv_pt
rvsz(proc_to_comm) = n*nerv
@ -314,14 +316,14 @@ subroutine psi_i2swapidxm(iictxt,iicomm,flag,n,beta,y,idx, &
nesd = idx(pnti+nerv+psb_n_elem_send_)
if (proc_to_comm < me) then
if (nesd>0) call psb_snd(ictxt,&
if (nesd>0) call psb_snd(ctxt,&
& sndbuf(snd_pt:snd_pt+n*nesd-1), proc_to_comm)
if (nerv>0) call psb_rcv(ictxt,&
if (nerv>0) call psb_rcv(ctxt,&
& rcvbuf(rcv_pt:rcv_pt+n*nerv-1), proc_to_comm)
else if (proc_to_comm > me) then
if (nerv>0) call psb_rcv(ictxt,&
if (nerv>0) call psb_rcv(ctxt,&
& rcvbuf(rcv_pt:rcv_pt+n*nerv-1), proc_to_comm)
if (nesd>0) call psb_snd(ictxt,&
if (nesd>0) call psb_snd(ctxt,&
& sndbuf(snd_pt:snd_pt+n*nesd-1), proc_to_comm)
else if (proc_to_comm == me) then
if (nesd /= nerv) then
@ -348,7 +350,7 @@ subroutine psi_i2swapidxm(iictxt,iicomm,flag,n,beta,y,idx, &
proc_to_comm = idx(pnti+psb_proc_id_)
nerv = idx(pnti+psb_n_elem_recv_)
nesd = idx(pnti+nerv+psb_n_elem_send_)
prcid(i) = psb_get_mpi_rank(ictxt,proc_to_comm)
prcid(i) = psb_get_mpi_rank(ctxt,proc_to_comm)
if ((nerv>0).and.(proc_to_comm /= me)) then
p2ptag = psb_int2_swap_tag
call mpi_irecv(rcvbuf(rcv_pt),n*nerv,&
@ -433,7 +435,7 @@ subroutine psi_i2swapidxm(iictxt,iicomm,flag,n,beta,y,idx, &
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_snd(ictxt,&
if (nesd>0) call psb_snd(ctxt,&
& sndbuf(snd_pt:snd_pt+n*nesd-1), proc_to_comm)
rcv_pt = rcv_pt + n*nerv
snd_pt = snd_pt + n*nesd
@ -450,7 +452,7 @@ subroutine psi_i2swapidxm(iictxt,iicomm,flag,n,beta,y,idx, &
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_rcv(ictxt,&
if (nerv>0) call psb_rcv(ctxt,&
& rcvbuf(rcv_pt:rcv_pt+n*nerv-1), proc_to_comm)
rcv_pt = rcv_pt + n*nerv
snd_pt = snd_pt + n*nesd
@ -498,7 +500,7 @@ subroutine psi_i2swapidxm(iictxt,iicomm,flag,n,beta,y,idx, &
call psb_erractionrestore(err_act)
return
9999 call psb_error_handler(iictxt,err_act)
9999 call psb_error_handler(ctxt,err_act)
return
end subroutine psi_i2swapidxm
@ -579,7 +581,9 @@ subroutine psi_i2swapdatav(flag,beta,y,desc_a,work,info,data)
integer(psb_ipk_), optional :: data
! locals
integer(psb_ipk_) :: ictxt, np, me, icomm, idxs, idxr, totxch, data_, err_act
type(psb_ctxt_type) :: ctxt
integer(psb_mpk_) :: icomm
integer(psb_ipk_) :: np, me, idxs, idxr, totxch, data_, err_act
integer(psb_ipk_), pointer :: d_idx(:)
character(len=20) :: name
@ -587,9 +591,9 @@ subroutine psi_i2swapdatav(flag,beta,y,desc_a,work,info,data)
name='psi_swap_datav'
call psb_erractionsave(err_act)
ictxt = desc_a%get_context()
ctxt = desc_a%get_context()
icomm = desc_a%get_mpic()
call psb_info(ictxt,me,np)
call psb_info(ctxt,me,np)
if (np == -1) then
info=psb_err_context_error_
call psb_errpush(info,name)
@ -614,13 +618,13 @@ subroutine psi_i2swapdatav(flag,beta,y,desc_a,work,info,data)
goto 9999
end if
call psi_swapdata(ictxt,icomm,flag,beta,y,d_idx,totxch,idxs,idxr,work,info)
call psi_swapdata(ctxt,icomm,flag,beta,y,d_idx,totxch,idxs,idxr,work,info)
if (info /= psb_success_) goto 9999
call psb_erractionrestore(err_act)
return
9999 call psb_error_handler(ictxt,err_act)
9999 call psb_error_handler(ctxt,err_act)
return
end subroutine psi_i2swapdatav
@ -636,7 +640,7 @@ end subroutine psi_i2swapdatav
!
!
!
subroutine psi_i2swapidxv(iictxt,iicomm,flag,beta,y,idx, &
subroutine psi_i2swapidxv(ctxt,icomm,flag,beta,y,idx, &
& totxch,totsnd,totrcv,work,info)
use psi_mod, psb_protect_name => psi_i2swapidxv
@ -651,15 +655,17 @@ subroutine psi_i2swapidxv(iictxt,iicomm,flag,beta,y,idx, &
include 'mpif.h'
#endif
integer(psb_ipk_), intent(in) :: iictxt,iicomm,flag
integer(psb_ipk_), intent(out) :: info
type(psb_ctxt_type), intent(in) :: ctxt
integer(psb_mpk_), intent(in) :: icomm
integer(psb_ipk_), intent(in) :: flag
integer(psb_ipk_), intent(out) :: info
integer(psb_i2pk_) :: y(:), beta
integer(psb_i2pk_), target :: work(:)
integer(psb_ipk_), intent(in) :: idx(:),totxch,totsnd, totrcv
! locals
integer(psb_mpk_) :: ictxt, icomm, np, me,&
& proc_to_comm, p2ptag, p2pstat(mpi_status_size), iret
integer(psb_ipk_) :: np, me
integer(psb_mpk_) :: proc_to_comm, p2ptag, p2pstat(mpi_status_size), iret
integer(psb_mpk_), allocatable, dimension(:) :: bsdidx, brvidx,&
& sdsz, rvsz, prcid, rvhd, sdhd
integer(psb_ipk_) :: nesd, nerv,&
@ -676,10 +682,7 @@ subroutine psi_i2swapidxv(iictxt,iicomm,flag,beta,y,idx, &
info=psb_success_
name='psi_swap_datav'
call psb_erractionsave(err_act)
ictxt = iictxt
icomm = iicomm
call psb_info(ictxt,me,np)
call psb_info(ctxt,me,np)
if (np == -1) then
info=psb_err_context_error_
call psb_errpush(info,name)
@ -719,7 +722,7 @@ subroutine psi_i2swapidxv(iictxt,iicomm,flag,beta,y,idx, &
proc_to_comm = idx(pnti+psb_proc_id_)
nerv = idx(pnti+psb_n_elem_recv_)
nesd = idx(pnti+nerv+psb_n_elem_send_)
prcid(proc_to_comm) = psb_get_mpi_rank(ictxt,proc_to_comm)
prcid(proc_to_comm) = psb_get_mpi_rank(ctxt,proc_to_comm)
brvidx(proc_to_comm) = rcv_pt
rvsz(proc_to_comm) = nerv
@ -799,14 +802,14 @@ subroutine psi_i2swapidxv(iictxt,iicomm,flag,beta,y,idx, &
nesd = idx(pnti+nerv+psb_n_elem_send_)
if (proc_to_comm < me) then
if (nesd>0) call psb_snd(ictxt,&
if (nesd>0) call psb_snd(ctxt,&
& sndbuf(snd_pt:snd_pt+nesd-1), proc_to_comm)
if (nerv>0) call psb_rcv(ictxt,&
if (nerv>0) call psb_rcv(ctxt,&
& rcvbuf(rcv_pt:rcv_pt+nerv-1), proc_to_comm)
else if (proc_to_comm > me) then
if (nerv>0) call psb_rcv(ictxt,&
if (nerv>0) call psb_rcv(ctxt,&
& rcvbuf(rcv_pt:rcv_pt+nerv-1), proc_to_comm)
if (nesd>0) call psb_snd(ictxt,&
if (nesd>0) call psb_snd(ctxt,&
& sndbuf(snd_pt:snd_pt+nesd-1), proc_to_comm)
else if (proc_to_comm == me) then
if (nesd /= nerv) then
@ -833,7 +836,7 @@ subroutine psi_i2swapidxv(iictxt,iicomm,flag,beta,y,idx, &
nerv = idx(pnti+psb_n_elem_recv_)
nesd = idx(pnti+nerv+psb_n_elem_send_)
prcid(i) = psb_get_mpi_rank(ictxt,proc_to_comm)
prcid(i) = psb_get_mpi_rank(ctxt,proc_to_comm)
if ((nerv>0).and.(proc_to_comm /= me)) then
p2ptag = psb_int2_swap_tag
call mpi_irecv(rcvbuf(rcv_pt),nerv,&
@ -917,7 +920,7 @@ subroutine psi_i2swapidxv(iictxt,iicomm,flag,beta,y,idx, &
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_snd(ictxt,&
if (nesd>0) call psb_snd(ctxt,&
& sndbuf(snd_pt:snd_pt+nesd-1), proc_to_comm)
rcv_pt = rcv_pt + nerv
snd_pt = snd_pt + nesd
@ -933,7 +936,7 @@ subroutine psi_i2swapidxv(iictxt,iicomm,flag,beta,y,idx, &
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_rcv(ictxt,&
if (nerv>0) call psb_rcv(ctxt,&
& rcvbuf(rcv_pt:rcv_pt+nerv-1), proc_to_comm)
rcv_pt = rcv_pt + nerv
snd_pt = snd_pt + nesd
@ -980,7 +983,7 @@ subroutine psi_i2swapidxv(iictxt,iicomm,flag,beta,y,idx, &
call psb_erractionrestore(err_act)
return
9999 call psb_error_handler(iictxt,err_act)
9999 call psb_error_handler(ctxt,err_act)
return
end subroutine psi_i2swapidxv

@ -110,7 +110,9 @@ subroutine psi_i2swaptranm(flag,n,beta,y,desc_a,work,info,data)
integer(psb_ipk_), optional :: data
! locals
integer(psb_ipk_) :: ictxt, np, me, icomm, idxs, idxr, err_act, totxch, data_
type(psb_ctxt_type) :: ctxt
integer(psb_mpk_) :: icomm
integer(psb_ipk_) :: np, me, idxs, idxr, err_act, totxch, data_
integer(psb_ipk_), pointer :: d_idx(:)
character(len=20) :: name
@ -118,10 +120,10 @@ subroutine psi_i2swaptranm(flag,n,beta,y,desc_a,work,info,data)
name='psi_swap_tran'
call psb_erractionsave(err_act)
ictxt = desc_a%get_context()
ctxt = desc_a%get_context()
icomm = desc_a%get_mpic()
call psb_info(ictxt,me,np)
call psb_info(ctxt,me,np)
if (np == -1) then
info=psb_err_context_error_
call psb_errpush(info,name)
@ -146,18 +148,18 @@ subroutine psi_i2swaptranm(flag,n,beta,y,desc_a,work,info,data)
goto 9999
end if
call psi_swaptran(ictxt,icomm,flag,n,beta,y,d_idx,totxch,idxs,idxr,work,info)
call psi_swaptran(ctxt,icomm,flag,n,beta,y,d_idx,totxch,idxs,idxr,work,info)
if (info /= psb_success_) goto 9999
call psb_erractionrestore(err_act)
return
9999 call psb_error_handler(ictxt,err_act)
9999 call psb_error_handler(ctxt,err_act)
return
end subroutine psi_i2swaptranm
subroutine psi_i2tranidxm(iictxt,iicomm,flag,n,beta,y,idx,&
subroutine psi_i2tranidxm(ctxt,icomm,flag,n,beta,y,idx,&
& totxch,totsnd,totrcv,work,info)
use psi_mod, psb_protect_name => psi_i2tranidxm
@ -172,15 +174,17 @@ subroutine psi_i2tranidxm(iictxt,iicomm,flag,n,beta,y,idx,&
include 'mpif.h'
#endif
integer(psb_ipk_), intent(in) :: iictxt,iicomm,flag,n
integer(psb_ipk_), intent(out) :: info
type(psb_ctxt_type), intent(in) :: ctxt
integer(psb_mpk_), intent(in) :: icomm
integer(psb_ipk_), intent(in) :: flag,n
integer(psb_ipk_), intent(out) :: info
integer(psb_i2pk_) :: y(:,:), beta
integer(psb_i2pk_), target :: work(:)
integer(psb_ipk_), intent(in) :: idx(:),totxch,totsnd, totrcv
! locals
integer(psb_mpk_) :: ictxt, icomm, np, me,&
& proc_to_comm, p2ptag, p2pstat(mpi_status_size), iret
integer(psb_ipk_) :: np, me
integer(psb_mpk_) :: proc_to_comm, p2ptag, p2pstat(mpi_status_size), iret
integer(psb_mpk_), allocatable, dimension(:) :: bsdidx, brvidx,&
& sdsz, rvsz, prcid, rvhd, sdhd
integer(psb_ipk_) :: nesd, nerv,&
@ -197,10 +201,7 @@ subroutine psi_i2tranidxm(iictxt,iicomm,flag,n,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)
call psb_info(ctxt,me,np)
if (np == -1) then
info=psb_err_context_error_
call psb_errpush(info,name)
@ -240,7 +241,7 @@ subroutine psi_i2tranidxm(iictxt,iicomm,flag,n,beta,y,idx,&
proc_to_comm = idx(pnti+psb_proc_id_)
nerv = idx(pnti+psb_n_elem_recv_)
nesd = idx(pnti+nerv+psb_n_elem_send_)
prcid(proc_to_comm) = psb_get_mpi_rank(ictxt,proc_to_comm)
prcid(proc_to_comm) = psb_get_mpi_rank(ctxt,proc_to_comm)
brvidx(proc_to_comm) = rcv_pt
rvsz(proc_to_comm) = n*nerv
@ -324,14 +325,14 @@ subroutine psi_i2tranidxm(iictxt,iicomm,flag,n,beta,y,idx,&
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(ctxt,&
& rcvbuf(rcv_pt:rcv_pt+n*nerv-1), proc_to_comm)
if (nesd>0) call psb_rcv(ictxt,&
if (nesd>0) call psb_rcv(ctxt,&
& 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(ctxt,&
& sndbuf(snd_pt:snd_pt+n*nesd-1), proc_to_comm)
if (nerv>0) call psb_snd(ictxt,&
if (nerv>0) call psb_snd(ctxt,&
& rcvbuf(rcv_pt:rcv_pt+n*nerv-1), proc_to_comm)
else if (proc_to_comm == me) then
if (nesd /= nerv) then
@ -358,7 +359,7 @@ subroutine psi_i2tranidxm(iictxt,iicomm,flag,n,beta,y,idx,&
proc_to_comm = idx(pnti+psb_proc_id_)
nerv = idx(pnti+psb_n_elem_recv_)
nesd = idx(pnti+nerv+psb_n_elem_send_)
prcid(i) = psb_get_mpi_rank(ictxt,proc_to_comm)
prcid(i) = psb_get_mpi_rank(ctxt,proc_to_comm)
if ((nesd>0).and.(proc_to_comm /= me)) then
p2ptag = psb_int2_swap_tag
call mpi_irecv(sndbuf(snd_pt),n*nesd,&
@ -443,7 +444,7 @@ subroutine psi_i2tranidxm(iictxt,iicomm,flag,n,beta,y,idx,&
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(ctxt,&
& rcvbuf(rcv_pt:rcv_pt+n*nerv-1), proc_to_comm)
rcv_pt = rcv_pt + n*nerv
snd_pt = snd_pt + n*nesd
@ -460,7 +461,7 @@ subroutine psi_i2tranidxm(iictxt,iicomm,flag,n,beta,y,idx,&
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(ctxt,&
& sndbuf(snd_pt:snd_pt+n*nesd-1), proc_to_comm)
rcv_pt = rcv_pt + n*nerv
snd_pt = snd_pt + n*nesd
@ -508,7 +509,7 @@ subroutine psi_i2tranidxm(iictxt,iicomm,flag,n,beta,y,idx,&
call psb_erractionrestore(err_act)
return
9999 call psb_error_handler(iictxt,err_act)
9999 call psb_error_handler(ctxt,err_act)
return
end subroutine psi_i2tranidxm
@ -592,7 +593,9 @@ subroutine psi_i2swaptranv(flag,beta,y,desc_a,work,info,data)
integer(psb_ipk_), optional :: data
! locals
integer(psb_ipk_) :: ictxt, np, me, icomm, idxs, idxr, totxch, err_act, data_
type(psb_ctxt_type) :: ctxt
integer(psb_mpk_) :: icomm
integer(psb_ipk_) :: np, me, idxs, idxr, totxch, err_act, data_
integer(psb_ipk_), pointer :: d_idx(:)
character(len=20) :: name
@ -600,9 +603,9 @@ subroutine psi_i2swaptranv(flag,beta,y,desc_a,work,info,data)
name='psi_swap_tranv'
call psb_erractionsave(err_act)
ictxt = desc_a%get_context()
ctxt = desc_a%get_context()
icomm = desc_a%get_mpic()
call psb_info(ictxt,me,np)
call psb_info(ctxt,me,np)
if (np == -1) then
info=psb_err_context_error_
call psb_errpush(info,name)
@ -627,13 +630,13 @@ subroutine psi_i2swaptranv(flag,beta,y,desc_a,work,info,data)
goto 9999
end if
call psi_swaptran(ictxt,icomm,flag,beta,y,d_idx,totxch,idxs,idxr,work,info)
call psi_swaptran(ctxt,icomm,flag,beta,y,d_idx,totxch,idxs,idxr,work,info)
if (info /= psb_success_) goto 9999
call psb_erractionrestore(err_act)
return
9999 call psb_error_handler(ictxt,err_act)
9999 call psb_error_handler(ctxt,err_act)
return
end subroutine psi_i2swaptranv
@ -649,7 +652,7 @@ end subroutine psi_i2swaptranv
!
!
!
subroutine psi_i2tranidxv(iictxt,iicomm,flag,beta,y,idx,&
subroutine psi_i2tranidxv(ctxt,icomm,flag,beta,y,idx,&
& totxch,totsnd,totrcv,work,info)
use psi_mod, psb_protect_name => psi_i2tranidxv
@ -664,15 +667,17 @@ subroutine psi_i2tranidxv(iictxt,iicomm,flag,beta,y,idx,&
include 'mpif.h'
#endif
integer(psb_ipk_), intent(in) :: iictxt,iicomm,flag
integer(psb_ipk_), intent(out) :: info
type(psb_ctxt_type), intent(in) :: ctxt
integer(psb_mpk_), intent(in) :: icomm
integer(psb_ipk_), intent(in) :: flag
integer(psb_ipk_), intent(out) :: info
integer(psb_i2pk_) :: y(:), beta
integer(psb_i2pk_), target :: work(:)
integer(psb_ipk_), intent(in) :: idx(:),totxch,totsnd, totrcv
! locals
integer(psb_mpk_) :: ictxt, icomm, np, me,&
& proc_to_comm, p2ptag, p2pstat(mpi_status_size), iret
integer(psb_ipk_) :: np, me
integer(psb_mpk_) :: proc_to_comm, p2ptag, p2pstat(mpi_status_size), iret
integer(psb_mpk_), allocatable, dimension(:) :: bsdidx, brvidx,&
& sdsz, rvsz, prcid, rvhd, sdhd
integer(psb_ipk_) :: nesd, nerv,&
@ -689,10 +694,7 @@ subroutine psi_i2tranidxv(iictxt,iicomm,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)
call psb_info(ctxt,me,np)
if (np == -1) then
info=psb_err_context_error_
call psb_errpush(info,name)
@ -732,7 +734,7 @@ subroutine psi_i2tranidxv(iictxt,iicomm,flag,beta,y,idx,&
proc_to_comm = idx(pnti+psb_proc_id_)
nerv = idx(pnti+psb_n_elem_recv_)
nesd = idx(pnti+nerv+psb_n_elem_send_)
prcid(proc_to_comm) = psb_get_mpi_rank(ictxt,proc_to_comm)
prcid(proc_to_comm) = psb_get_mpi_rank(ctxt,proc_to_comm)
brvidx(proc_to_comm) = rcv_pt
rvsz(proc_to_comm) = nerv
@ -817,14 +819,14 @@ subroutine psi_i2tranidxv(iictxt,iicomm,flag,beta,y,idx,&
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(ctxt,&
& rcvbuf(rcv_pt:rcv_pt+nerv-1), proc_to_comm)
if (nesd>0) call psb_rcv(ictxt,&
if (nesd>0) call psb_rcv(ctxt,&
& 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(ctxt,&
& sndbuf(snd_pt:snd_pt+nesd-1), proc_to_comm)
if (nerv>0) call psb_snd(ictxt,&
if (nerv>0) call psb_snd(ctxt,&
& rcvbuf(rcv_pt:rcv_pt+nerv-1), proc_to_comm)
else if (proc_to_comm == me) then
if (nesd /= nerv) then
@ -850,7 +852,7 @@ subroutine psi_i2tranidxv(iictxt,iicomm,flag,beta,y,idx,&
proc_to_comm = idx(pnti+psb_proc_id_)
nerv = idx(pnti+psb_n_elem_recv_)
nesd = idx(pnti+nerv+psb_n_elem_send_)
prcid(i) = psb_get_mpi_rank(ictxt,proc_to_comm)
prcid(i) = psb_get_mpi_rank(ctxt,proc_to_comm)
if ((nesd>0).and.(proc_to_comm /= me)) then
p2ptag = psb_int2_swap_tag
call mpi_irecv(sndbuf(snd_pt),nesd,&
@ -933,7 +935,7 @@ subroutine psi_i2tranidxv(iictxt,iicomm,flag,beta,y,idx,&
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(ctxt,&
& rcvbuf(rcv_pt:rcv_pt+nerv-1), proc_to_comm)
rcv_pt = rcv_pt + nerv
snd_pt = snd_pt + nesd
@ -949,7 +951,7 @@ subroutine psi_i2tranidxv(iictxt,iicomm,flag,beta,y,idx,&
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(ctxt,&
& sndbuf(snd_pt:snd_pt+nesd-1), proc_to_comm)
rcv_pt = rcv_pt + nerv
snd_pt = snd_pt + nesd
@ -996,7 +998,7 @@ subroutine psi_i2tranidxv(iictxt,iicomm,flag,beta,y,idx,&
call psb_erractionrestore(err_act)
return
9999 call psb_error_handler(iictxt,err_act)
9999 call psb_error_handler(ctxt,err_act)
return
end subroutine psi_i2tranidxv

@ -47,7 +47,8 @@ subroutine psi_iovrl_restr_vect(x,xs,desc_a,info)
integer(psb_ipk_), intent(out) :: info
! locals
integer(psb_ipk_) :: ictxt, np, me, err_act, i, idx, isz
type(psb_ctxt_type) :: ctxt
integer(psb_ipk_) :: np, me, err_act, i, idx, isz
character(len=20) :: name, ch_err
name='psi_iovrl_restr_vect'
@ -56,8 +57,8 @@ subroutine psi_iovrl_restr_vect(x,xs,desc_a,info)
if (psb_errstatus_fatal()) then
info = psb_err_internal_error_ ; goto 9999
end if
ictxt = desc_a%get_context()
call psb_info(ictxt, me, np)
ctxt = desc_a%get_context()
call psb_info(ctxt, me, np)
if (np == -1) then
info = psb_err_context_error_
call psb_errpush(info,name)
@ -71,7 +72,7 @@ subroutine psi_iovrl_restr_vect(x,xs,desc_a,info)
call psb_erractionrestore(err_act)
return
9999 call psb_error_handler(ictxt,err_act)
9999 call psb_error_handler(ctxt,err_act)
return
end subroutine psi_iovrl_restr_vect
@ -89,7 +90,8 @@ subroutine psi_iovrl_restr_multivect(x,xs,desc_a,info)
integer(psb_ipk_), intent(out) :: info
! locals
integer(psb_ipk_) :: ictxt, np, me, err_act, i, idx, isz, nc
type(psb_ctxt_type) :: ctxt
integer(psb_ipk_) :: np, me, err_act, i, idx, isz, nc
character(len=20) :: name, ch_err
name='psi_iovrl_restr_mv'
@ -98,8 +100,8 @@ subroutine psi_iovrl_restr_multivect(x,xs,desc_a,info)
if (psb_errstatus_fatal()) then
info = psb_err_internal_error_ ; goto 9999
end if
ictxt = desc_a%get_context()
call psb_info(ictxt, me, np)
ctxt = desc_a%get_context()
call psb_info(ctxt, me, np)
if (np == -1) then
info = psb_err_context_error_
call psb_errpush(info,name)
@ -112,7 +114,7 @@ subroutine psi_iovrl_restr_multivect(x,xs,desc_a,info)
call psb_erractionrestore(err_act)
return
9999 call psb_error_handler(ictxt,err_act)
9999 call psb_error_handler(ctxt,err_act)
return
end subroutine psi_iovrl_restr_multivect

@ -47,7 +47,8 @@ subroutine psi_iovrl_save_vect(x,xs,desc_a,info)
integer(psb_ipk_), intent(out) :: info
! locals
integer(psb_ipk_) :: ictxt, np, me, err_act, i, idx, isz
type(psb_ctxt_type) :: ctxt
integer(psb_ipk_) :: np, me, err_act, i, idx, isz
character(len=20) :: name, ch_err
name='psi_dovrl_saver1'
@ -56,8 +57,8 @@ subroutine psi_iovrl_save_vect(x,xs,desc_a,info)
if (psb_errstatus_fatal()) then
info = psb_err_internal_error_ ; goto 9999
end if
ictxt = desc_a%get_context()
call psb_info(ictxt, me, np)
ctxt = desc_a%get_context()
call psb_info(ctxt, me, np)
if (np == -1) then
info = psb_err_context_error_
call psb_errpush(info,name)
@ -77,13 +78,11 @@ subroutine psi_iovrl_save_vect(x,xs,desc_a,info)
call psb_erractionrestore(err_act)
return
9999 call psb_error_handler(ictxt,err_act)
9999 call psb_error_handler(ctxt,err_act)
return
end subroutine psi_iovrl_save_vect
subroutine psi_iovrl_save_multivect(x,xs,desc_a,info)
use psi_mod, psi_protect_name => psi_iovrl_save_multivect
use psb_realloc_mod
@ -97,7 +96,8 @@ subroutine psi_iovrl_save_multivect(x,xs,desc_a,info)
integer(psb_ipk_), intent(out) :: info
! locals
integer(psb_ipk_) :: ictxt, np, me, err_act, i, idx, isz, nc
type(psb_ctxt_type) :: ctxt
integer(psb_ipk_) :: np, me, err_act, i, idx, isz, nc
character(len=20) :: name, ch_err
name='psi_dovrl_saver1'
@ -106,8 +106,8 @@ subroutine psi_iovrl_save_multivect(x,xs,desc_a,info)
if (psb_errstatus_fatal()) then
info = psb_err_internal_error_ ; goto 9999
end if
ictxt = desc_a%get_context()
call psb_info(ictxt, me, np)
ctxt = desc_a%get_context()
call psb_info(ctxt, me, np)
if (np == -1) then
info = psb_err_context_error_
call psb_errpush(info,name)
@ -128,7 +128,7 @@ subroutine psi_iovrl_save_multivect(x,xs,desc_a,info)
call psb_erractionrestore(err_act)
return
9999 call psb_error_handler(ictxt,err_act)
9999 call psb_error_handler(ctxt,err_act)
return
end subroutine psi_iovrl_save_multivect

@ -32,7 +32,7 @@
! Subroutine: psi_iovrl_update
! These subroutines update the overlap region of a vector; they are used
! for the transpose matrix-vector product when there is a nonempty overlap,
! or for the application of Additive Schwarz preconditioners.
! or for the application of Additive Schwarz preconditioners.
!
!
!
@ -50,7 +50,8 @@ subroutine psi_iovrl_upd_vect(x,desc_a,update,info)
! locals
integer(psb_ipk_), allocatable :: xs(:)
integer(psb_ipk_) :: ictxt, np, me, err_act, i, idx, ndm, nx
type(psb_ctxt_type) :: ctxt
integer(psb_ipk_) :: np, me, err_act, i, idx, ndm, nx
integer(psb_ipk_) :: ierr(5)
character(len=20) :: name, ch_err
@ -61,8 +62,8 @@ subroutine psi_iovrl_upd_vect(x,desc_a,update,info)
if (psb_errstatus_fatal()) then
info = psb_err_internal_error_ ; goto 9999
end if
ictxt = desc_a%get_context()
call psb_info(ictxt, me, np)
ctxt = desc_a%get_context()
call psb_info(ctxt, me, np)
if (np == -1) then
info = psb_err_context_error_
call psb_errpush(info,name)
@ -112,7 +113,7 @@ subroutine psi_iovrl_upd_vect(x,desc_a,update,info)
call psb_erractionrestore(err_act)
return
9999 call psb_error_handler(ictxt,err_act)
9999 call psb_error_handler(ctxt,err_act)
return
end subroutine psi_iovrl_upd_vect
@ -131,7 +132,8 @@ subroutine psi_iovrl_upd_multivect(x,desc_a,update,info)
! locals
integer(psb_ipk_), allocatable :: xs(:,:)
integer(psb_ipk_) :: ictxt, np, me, err_act, i, idx, ndm, nx, nc
type(psb_ctxt_type) :: ctxt
integer(psb_ipk_) :: np, me, err_act, i, idx, ndm, nx, nc
integer(psb_ipk_) :: ierr(5)
character(len=20) :: name, ch_err
@ -142,8 +144,8 @@ subroutine psi_iovrl_upd_multivect(x,desc_a,update,info)
if (psb_errstatus_fatal()) then
info = psb_err_internal_error_ ; goto 9999
end if
ictxt = desc_a%get_context()
call psb_info(ictxt, me, np)
ctxt = desc_a%get_context()
call psb_info(ctxt, me, np)
if (np == -1) then
info = psb_err_context_error_
call psb_errpush(info,name)
@ -194,7 +196,7 @@ subroutine psi_iovrl_upd_multivect(x,desc_a,update,info)
call psb_erractionrestore(err_act)
return
9999 call psb_error_handler(ictxt,err_act)
9999 call psb_error_handler(ctxt,err_act)
return
end subroutine psi_iovrl_upd_multivect

@ -113,7 +113,9 @@ subroutine psi_iswapdata_vect(flag,beta,y,desc_a,work,info,data)
integer(psb_ipk_), optional :: data
! locals
integer(psb_ipk_) :: ictxt, np, me, icomm, idxs, idxr, totxch, data_, err_act
type(psb_ctxt_type) :: ctxt
integer(psb_mpk_) :: icomm
integer(psb_ipk_) :: np, me, idxs, idxr, totxch, data_, err_act
class(psb_i_base_vect_type), pointer :: d_vidx
character(len=20) :: name
@ -121,9 +123,9 @@ subroutine psi_iswapdata_vect(flag,beta,y,desc_a,work,info,data)
name='psi_swap_datav'
call psb_erractionsave(err_act)
ictxt = desc_a%get_context()
ctxt = desc_a%get_context()
icomm = desc_a%get_mpic()
call psb_info(ictxt,me,np)
call psb_info(ctxt,me,np)
if (np == -1) then
info=psb_err_context_error_
call psb_errpush(info,name)
@ -148,13 +150,13 @@ subroutine psi_iswapdata_vect(flag,beta,y,desc_a,work,info,data)
goto 9999
end if
call psi_swapdata(ictxt,icomm,flag,beta,y,d_vidx,totxch,idxs,idxr,work,info)
call psi_swapdata(ctxt,icomm,flag,beta,y,d_vidx,totxch,idxs,idxr,work,info)
if (info /= psb_success_) goto 9999
call psb_erractionrestore(err_act)
return
9999 call psb_error_handler(ictxt,err_act)
9999 call psb_error_handler(ctxt,err_act)
return
end subroutine psi_iswapdata_vect
@ -173,7 +175,7 @@ end subroutine psi_iswapdata_vect
!
!
!
subroutine psi_iswap_vidx_vect(iictxt,iicomm,flag,beta,y,idx, &
subroutine psi_iswap_vidx_vect(ctxt,icomm,flag,beta,y,idx, &
& totxch,totsnd,totrcv,work,info)
use psi_mod, psb_protect_name => psi_iswap_vidx_vect
@ -190,8 +192,10 @@ subroutine psi_iswap_vidx_vect(iictxt,iicomm,flag,beta,y,idx, &
include 'mpif.h'
#endif
integer(psb_ipk_), intent(in) :: iictxt,iicomm,flag
integer(psb_ipk_), intent(out) :: info
type(psb_ctxt_type), intent(in) :: ctxt
integer(psb_mpk_), intent(in) :: icomm
integer(psb_ipk_), intent(in) :: flag
integer(psb_ipk_), intent(out) :: info
class(psb_i_base_vect_type) :: y
integer(psb_ipk_) :: beta
integer(psb_ipk_), target :: work(:)
@ -199,8 +203,8 @@ subroutine psi_iswap_vidx_vect(iictxt,iicomm,flag,beta,y,idx, &
integer(psb_ipk_), intent(in) :: totxch,totsnd, totrcv
! locals
integer(psb_mpk_) :: ictxt, icomm, np, me,&
& proc_to_comm, p2ptag, p2pstat(mpi_status_size), iret
integer(psb_ipk_) :: np, me
integer(psb_mpk_) :: proc_to_comm, p2ptag, p2pstat(mpi_status_size), iret
integer(psb_mpk_), allocatable :: prcid(:)
integer(psb_ipk_) :: nesd, nerv,&
& err_act, i, idx_pt, totsnd_, totrcv_,&
@ -213,10 +217,7 @@ subroutine psi_iswap_vidx_vect(iictxt,iicomm,flag,beta,y,idx, &
info=psb_success_
name='psi_swap_datav'
call psb_erractionsave(err_act)
ictxt = iictxt
icomm = iicomm
call psb_info(ictxt,me,np)
call psb_info(ctxt,me,np)
if (np == -1) then
info=psb_err_context_error_
call psb_errpush(info,name)
@ -260,7 +261,7 @@ subroutine psi_iswap_vidx_vect(iictxt,iicomm,flag,beta,y,idx, &
nesd = idx%v(pnti+nerv+psb_n_elem_send_)
rcv_pt = 1+pnti+psb_n_elem_recv_
prcid(i) = psb_get_mpi_rank(ictxt,proc_to_comm)
prcid(i) = psb_get_mpi_rank(ctxt,proc_to_comm)
if ((nerv>0).and.(proc_to_comm /= me)) then
if (debug) write(*,*) me,'Posting receive from',prcid(i),rcv_pt
p2ptag = psb_int_swap_tag
@ -413,7 +414,7 @@ subroutine psi_iswap_vidx_vect(iictxt,iicomm,flag,beta,y,idx, &
call psb_erractionrestore(err_act)
return
9999 call psb_error_handler(iictxt,err_act)
9999 call psb_error_handler(ctxt,err_act)
return
end subroutine psi_iswap_vidx_vect
@ -450,7 +451,9 @@ subroutine psi_iswapdata_multivect(flag,beta,y,desc_a,work,info,data)
integer(psb_ipk_), optional :: data
! locals
integer(psb_ipk_) :: ictxt, np, me, icomm, idxs, idxr, totxch, data_, err_act
type(psb_ctxt_type) :: ctxt
integer(psb_mpk_) :: icomm
integer(psb_ipk_) :: np, me, idxs, idxr, totxch, data_, err_act
class(psb_i_base_vect_type), pointer :: d_vidx
character(len=20) :: name
@ -458,9 +461,9 @@ subroutine psi_iswapdata_multivect(flag,beta,y,desc_a,work,info,data)
name='psi_swap_datav'
call psb_erractionsave(err_act)
ictxt = desc_a%get_context()
ctxt = desc_a%get_context()
icomm = desc_a%get_mpic()
call psb_info(ictxt,me,np)
call psb_info(ctxt,me,np)
if (np == -1) then
info=psb_err_context_error_
call psb_errpush(info,name)
@ -485,13 +488,13 @@ subroutine psi_iswapdata_multivect(flag,beta,y,desc_a,work,info,data)
goto 9999
end if
call psi_swapdata(ictxt,icomm,flag,beta,y,d_vidx,totxch,idxs,idxr,work,info)
call psi_swapdata(ctxt,icomm,flag,beta,y,d_vidx,totxch,idxs,idxr,work,info)
if (info /= psb_success_) goto 9999
call psb_erractionrestore(err_act)
return
9999 call psb_error_handler(ictxt,err_act)
9999 call psb_error_handler(ctxt,err_act)
return
end subroutine psi_iswapdata_multivect
@ -510,7 +513,7 @@ end subroutine psi_iswapdata_multivect
!
!
!
subroutine psi_iswap_vidx_multivect(iictxt,iicomm,flag,beta,y,idx, &
subroutine psi_iswap_vidx_multivect(ctxt,icomm,flag,beta,y,idx, &
& totxch,totsnd,totrcv,work,info)
use psi_mod, psb_protect_name => psi_iswap_vidx_multivect
@ -527,8 +530,10 @@ subroutine psi_iswap_vidx_multivect(iictxt,iicomm,flag,beta,y,idx, &
include 'mpif.h'
#endif
integer(psb_ipk_), intent(in) :: iictxt,iicomm,flag
integer(psb_ipk_), intent(out) :: info
type(psb_ctxt_type), intent(in) :: ctxt
integer(psb_mpk_), intent(in) :: icomm
integer(psb_ipk_), intent(in) :: flag
integer(psb_ipk_), intent(out) :: info
class(psb_i_base_multivect_type) :: y
integer(psb_ipk_) :: beta
integer(psb_ipk_), target :: work(:)
@ -536,8 +541,8 @@ subroutine psi_iswap_vidx_multivect(iictxt,iicomm,flag,beta,y,idx, &
integer(psb_ipk_), intent(in) :: totxch,totsnd, totrcv
! locals
integer(psb_mpk_) :: ictxt, icomm, np, me,&
& proc_to_comm, p2ptag, p2pstat(mpi_status_size), iret
integer(psb_ipk_) :: np, me
integer(psb_mpk_) :: proc_to_comm, p2ptag, p2pstat(mpi_status_size), iret
integer(psb_mpk_), allocatable :: prcid(:)
integer(psb_ipk_) :: nesd, nerv,&
& err_act, i, idx_pt, totsnd_, totrcv_,&
@ -550,10 +555,7 @@ subroutine psi_iswap_vidx_multivect(iictxt,iicomm,flag,beta,y,idx, &
info=psb_success_
name='psi_swap_datav'
call psb_erractionsave(err_act)
ictxt = iictxt
icomm = iicomm
call psb_info(ictxt,me,np)
call psb_info(ctxt,me,np)
if (np == -1) then
info=psb_err_context_error_
call psb_errpush(info,name)
@ -599,7 +601,7 @@ subroutine psi_iswap_vidx_multivect(iictxt,iicomm,flag,beta,y,idx, &
proc_to_comm = idx%v(pnti+psb_proc_id_)
nerv = idx%v(pnti+psb_n_elem_recv_)
nesd = idx%v(pnti+nerv+psb_n_elem_send_)
prcid(i) = psb_get_mpi_rank(ictxt,proc_to_comm)
prcid(i) = psb_get_mpi_rank(ctxt,proc_to_comm)
if ((nerv>0).and.(proc_to_comm /= me)) then
if (debug) write(*,*) me,'Posting receive from',prcid(i),rcv_pt
p2ptag = psb_int_swap_tag
@ -756,7 +758,7 @@ subroutine psi_iswap_vidx_multivect(iictxt,iicomm,flag,beta,y,idx, &
call psb_erractionrestore(err_act)
return
9999 call psb_error_handler(iictxt,err_act)
9999 call psb_error_handler(ctxt,err_act)
return
end subroutine psi_iswap_vidx_multivect

@ -115,7 +115,9 @@ subroutine psi_iswaptran_vect(flag,beta,y,desc_a,work,info,data)
integer(psb_ipk_), optional :: data
! locals
integer(psb_ipk_) :: ictxt, np, me, icomm, idxs, idxr, totxch, err_act, data_
type(psb_ctxt_type) :: ctxt
integer(psb_mpk_) :: icomm
integer(psb_ipk_) :: np, me, idxs, idxr, totxch, err_act, data_
class(psb_i_base_vect_type), pointer :: d_vidx
character(len=20) :: name
@ -123,9 +125,9 @@ subroutine psi_iswaptran_vect(flag,beta,y,desc_a,work,info,data)
name='psi_swap_tranv'
call psb_erractionsave(err_act)
ictxt = desc_a%get_context()
ctxt = desc_a%get_context()
icomm = desc_a%get_mpic()
call psb_info(ictxt,me,np)
call psb_info(ctxt,me,np)
if (np == -1) then
info=psb_err_context_error_
call psb_errpush(info,name)
@ -150,19 +152,17 @@ subroutine psi_iswaptran_vect(flag,beta,y,desc_a,work,info,data)
goto 9999
end if
call psi_swaptran(ictxt,icomm,flag,beta,y,d_vidx,totxch,idxs,idxr,work,info)
call psi_swaptran(ctxt,icomm,flag,beta,y,d_vidx,totxch,idxs,idxr,work,info)
if (info /= psb_success_) goto 9999
call psb_erractionrestore(err_act)
return
9999 call psb_error_handler(ictxt,err_act)
9999 call psb_error_handler(ctxt,err_act)
return
end subroutine psi_iswaptran_vect
!
!
! Subroutine: psi_itran_vidx_vect
@ -176,7 +176,7 @@ end subroutine psi_iswaptran_vect
!
!
!
subroutine psi_itran_vidx_vect(iictxt,iicomm,flag,beta,y,idx,&
subroutine psi_itran_vidx_vect(ctxt,icomm,flag,beta,y,idx,&
& totxch,totsnd,totrcv,work,info)
use psi_mod, psb_protect_name => psi_itran_vidx_vect
@ -193,7 +193,9 @@ subroutine psi_itran_vidx_vect(iictxt,iicomm,flag,beta,y,idx,&
include 'mpif.h'
#endif
integer(psb_ipk_), intent(in) :: iictxt,iicomm,flag
type(psb_ctxt_type), intent(in) :: ctxt
integer(psb_mpk_), intent(in) :: icomm
integer(psb_ipk_), intent(in) :: flag
integer(psb_ipk_), intent(out) :: info
class(psb_i_base_vect_type) :: y
integer(psb_ipk_) :: beta
@ -202,8 +204,8 @@ subroutine psi_itran_vidx_vect(iictxt,iicomm,flag,beta,y,idx,&
integer(psb_ipk_), intent(in) :: totxch,totsnd, totrcv
! locals
integer(psb_mpk_) :: ictxt, icomm, np, me,&
& proc_to_comm, p2ptag, p2pstat(mpi_status_size), iret
integer(psb_ipk_) :: np, me
integer(psb_mpk_) :: proc_to_comm, p2ptag, p2pstat(mpi_status_size), iret
integer(psb_mpk_), allocatable :: prcid(:)
integer(psb_ipk_) :: nesd, nerv,&
& err_act, i, idx_pt, totsnd_, totrcv_,&
@ -216,10 +218,7 @@ 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
call psb_info(ictxt,me,np)
call psb_info(ctxt,me,np)
if (np == -1) then
info=psb_err_context_error_
call psb_errpush(info,name)
@ -266,7 +265,7 @@ 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_
prcid(i) = psb_get_mpi_rank(ictxt,proc_to_comm)
prcid(i) = psb_get_mpi_rank(ctxt,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,&
@ -422,7 +421,7 @@ subroutine psi_itran_vidx_vect(iictxt,iicomm,flag,beta,y,idx,&
call psb_erractionrestore(err_act)
return
9999 call psb_error_handler(iictxt,err_act)
9999 call psb_error_handler(ctxt,err_act)
return
@ -463,7 +462,9 @@ subroutine psi_iswaptran_multivect(flag,beta,y,desc_a,work,info,data)
integer(psb_ipk_), optional :: data
! locals
integer(psb_ipk_) :: ictxt, np, me, icomm, idxs, idxr, totxch, err_act, data_
type(psb_ctxt_type) :: ctxt
integer(psb_mpk_) :: icomm
integer(psb_ipk_) :: np, me, idxs, idxr, totxch, err_act, data_
class(psb_i_base_vect_type), pointer :: d_vidx
character(len=20) :: name
@ -471,9 +472,9 @@ subroutine psi_iswaptran_multivect(flag,beta,y,desc_a,work,info,data)
name='psi_swap_tranv'
call psb_erractionsave(err_act)
ictxt = desc_a%get_context()
ctxt = desc_a%get_context()
icomm = desc_a%get_mpic()
call psb_info(ictxt,me,np)
call psb_info(ctxt,me,np)
if (np == -1) then
info=psb_err_context_error_
call psb_errpush(info,name)
@ -498,13 +499,13 @@ subroutine psi_iswaptran_multivect(flag,beta,y,desc_a,work,info,data)
goto 9999
end if
call psi_swaptran(ictxt,icomm,flag,beta,y,d_vidx,totxch,idxs,idxr,work,info)
call psi_swaptran(ctxt,icomm,flag,beta,y,d_vidx,totxch,idxs,idxr,work,info)
if (info /= psb_success_) goto 9999
call psb_erractionrestore(err_act)
return
9999 call psb_error_handler(ictxt,err_act)
9999 call psb_error_handler(ctxt,err_act)
return
end subroutine psi_iswaptran_multivect
@ -523,7 +524,7 @@ subroutine psi_iswaptran_multivect(flag,beta,y,desc_a,work,info,data)
!
!
!
subroutine psi_itran_vidx_multivect(iictxt,iicomm,flag,beta,y,idx,&
subroutine psi_itran_vidx_multivect(ctxt,icomm,flag,beta,y,idx,&
& totxch,totsnd,totrcv,work,info)
use psi_mod, psb_protect_name => psi_itran_vidx_multivect
@ -540,7 +541,9 @@ subroutine psi_itran_vidx_multivect(iictxt,iicomm,flag,beta,y,idx,&
include 'mpif.h'
#endif
integer(psb_ipk_), intent(in) :: iictxt,iicomm,flag
type(psb_ctxt_type), intent(in) :: ctxt
integer(psb_mpk_), intent(in) :: icomm
integer(psb_ipk_), intent(in) :: flag
integer(psb_ipk_), intent(out) :: info
class(psb_i_base_multivect_type) :: y
integer(psb_ipk_) :: beta
@ -549,8 +552,8 @@ subroutine psi_itran_vidx_multivect(iictxt,iicomm,flag,beta,y,idx,&
integer(psb_ipk_), intent(in) :: totxch,totsnd, totrcv
! locals
integer(psb_mpk_) :: ictxt, icomm, np, me,&
& proc_to_comm, p2ptag, p2pstat(mpi_status_size), iret
integer(psb_ipk_) :: np, me
integer(psb_mpk_) :: proc_to_comm, p2ptag, p2pstat(mpi_status_size), iret
integer(psb_mpk_), allocatable :: prcid(:)
integer(psb_ipk_) :: nesd, nerv,&
& err_act, i, idx_pt, totsnd_, totrcv_,&
@ -563,10 +566,7 @@ subroutine psi_itran_vidx_multivect(iictxt,iicomm,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)
call psb_info(ctxt,me,np)
if (np == -1) then
info=psb_err_context_error_
call psb_errpush(info,name)
@ -613,7 +613,7 @@ subroutine psi_itran_vidx_multivect(iictxt,iicomm,flag,beta,y,idx,&
proc_to_comm = idx%v(pnti+psb_proc_id_)
nerv = idx%v(pnti+psb_n_elem_recv_)
nesd = idx%v(pnti+nerv+psb_n_elem_send_)
prcid(i) = psb_get_mpi_rank(ictxt,proc_to_comm)
prcid(i) = psb_get_mpi_rank(ctxt,proc_to_comm)
if ((nesd>0).and.(proc_to_comm /= me)) then
if (debug) write(*,*) me,'Posting receive from',prcid(i),snd_pt
call mpi_irecv(y%combuf(snd_pt),n*nesd,&
@ -773,7 +773,7 @@ subroutine psi_itran_vidx_multivect(iictxt,iicomm,flag,beta,y,idx,&
call psb_erractionrestore(err_act)
return
9999 call psb_error_handler(iictxt,err_act)
9999 call psb_error_handler(ctxt,err_act)
return

@ -47,7 +47,8 @@ subroutine psi_lovrl_restr_vect(x,xs,desc_a,info)
integer(psb_ipk_), intent(out) :: info
! locals
integer(psb_ipk_) :: ictxt, np, me, err_act, i, idx, isz
type(psb_ctxt_type) :: ctxt
integer(psb_ipk_) :: np, me, err_act, i, idx, isz
character(len=20) :: name, ch_err
name='psi_lovrl_restr_vect'
@ -56,8 +57,8 @@ subroutine psi_lovrl_restr_vect(x,xs,desc_a,info)
if (psb_errstatus_fatal()) then
info = psb_err_internal_error_ ; goto 9999
end if
ictxt = desc_a%get_context()
call psb_info(ictxt, me, np)
ctxt = desc_a%get_context()
call psb_info(ctxt, me, np)
if (np == -1) then
info = psb_err_context_error_
call psb_errpush(info,name)
@ -71,7 +72,7 @@ subroutine psi_lovrl_restr_vect(x,xs,desc_a,info)
call psb_erractionrestore(err_act)
return
9999 call psb_error_handler(ictxt,err_act)
9999 call psb_error_handler(ctxt,err_act)
return
end subroutine psi_lovrl_restr_vect
@ -89,7 +90,8 @@ subroutine psi_lovrl_restr_multivect(x,xs,desc_a,info)
integer(psb_ipk_), intent(out) :: info
! locals
integer(psb_ipk_) :: ictxt, np, me, err_act, i, idx, isz, nc
type(psb_ctxt_type) :: ctxt
integer(psb_ipk_) :: np, me, err_act, i, idx, isz, nc
character(len=20) :: name, ch_err
name='psi_lovrl_restr_mv'
@ -98,8 +100,8 @@ subroutine psi_lovrl_restr_multivect(x,xs,desc_a,info)
if (psb_errstatus_fatal()) then
info = psb_err_internal_error_ ; goto 9999
end if
ictxt = desc_a%get_context()
call psb_info(ictxt, me, np)
ctxt = desc_a%get_context()
call psb_info(ctxt, me, np)
if (np == -1) then
info = psb_err_context_error_
call psb_errpush(info,name)
@ -112,7 +114,7 @@ subroutine psi_lovrl_restr_multivect(x,xs,desc_a,info)
call psb_erractionrestore(err_act)
return
9999 call psb_error_handler(ictxt,err_act)
9999 call psb_error_handler(ctxt,err_act)
return
end subroutine psi_lovrl_restr_multivect

@ -47,7 +47,8 @@ subroutine psi_lovrl_save_vect(x,xs,desc_a,info)
integer(psb_ipk_), intent(out) :: info
! locals
integer(psb_ipk_) :: ictxt, np, me, err_act, i, idx, isz
type(psb_ctxt_type) :: ctxt
integer(psb_ipk_) :: np, me, err_act, i, idx, isz
character(len=20) :: name, ch_err
name='psi_dovrl_saver1'
@ -56,8 +57,8 @@ subroutine psi_lovrl_save_vect(x,xs,desc_a,info)
if (psb_errstatus_fatal()) then
info = psb_err_internal_error_ ; goto 9999
end if
ictxt = desc_a%get_context()
call psb_info(ictxt, me, np)
ctxt = desc_a%get_context()
call psb_info(ctxt, me, np)
if (np == -1) then
info = psb_err_context_error_
call psb_errpush(info,name)
@ -77,13 +78,11 @@ subroutine psi_lovrl_save_vect(x,xs,desc_a,info)
call psb_erractionrestore(err_act)
return
9999 call psb_error_handler(ictxt,err_act)
9999 call psb_error_handler(ctxt,err_act)
return
end subroutine psi_lovrl_save_vect
subroutine psi_lovrl_save_multivect(x,xs,desc_a,info)
use psi_mod, psi_protect_name => psi_lovrl_save_multivect
use psb_realloc_mod
@ -97,7 +96,8 @@ subroutine psi_lovrl_save_multivect(x,xs,desc_a,info)
integer(psb_ipk_), intent(out) :: info
! locals
integer(psb_ipk_) :: ictxt, np, me, err_act, i, idx, isz, nc
type(psb_ctxt_type) :: ctxt
integer(psb_ipk_) :: np, me, err_act, i, idx, isz, nc
character(len=20) :: name, ch_err
name='psi_dovrl_saver1'
@ -106,8 +106,8 @@ subroutine psi_lovrl_save_multivect(x,xs,desc_a,info)
if (psb_errstatus_fatal()) then
info = psb_err_internal_error_ ; goto 9999
end if
ictxt = desc_a%get_context()
call psb_info(ictxt, me, np)
ctxt = desc_a%get_context()
call psb_info(ctxt, me, np)
if (np == -1) then
info = psb_err_context_error_
call psb_errpush(info,name)
@ -128,7 +128,7 @@ subroutine psi_lovrl_save_multivect(x,xs,desc_a,info)
call psb_erractionrestore(err_act)
return
9999 call psb_error_handler(ictxt,err_act)
9999 call psb_error_handler(ctxt,err_act)
return
end subroutine psi_lovrl_save_multivect

@ -32,7 +32,7 @@
! Subroutine: psi_lovrl_update
! These subroutines update the overlap region of a vector; they are used
! for the transpose matrix-vector product when there is a nonempty overlap,
! or for the application of Additive Schwarz preconditioners.
! or for the application of Additive Schwarz preconditioners.
!
!
!
@ -50,7 +50,8 @@ subroutine psi_lovrl_upd_vect(x,desc_a,update,info)
! locals
integer(psb_lpk_), allocatable :: xs(:)
integer(psb_ipk_) :: ictxt, np, me, err_act, i, idx, ndm, nx
type(psb_ctxt_type) :: ctxt
integer(psb_ipk_) :: np, me, err_act, i, idx, ndm, nx
integer(psb_ipk_) :: ierr(5)
character(len=20) :: name, ch_err
@ -61,8 +62,8 @@ subroutine psi_lovrl_upd_vect(x,desc_a,update,info)
if (psb_errstatus_fatal()) then
info = psb_err_internal_error_ ; goto 9999
end if
ictxt = desc_a%get_context()
call psb_info(ictxt, me, np)
ctxt = desc_a%get_context()
call psb_info(ctxt, me, np)
if (np == -1) then
info = psb_err_context_error_
call psb_errpush(info,name)
@ -112,7 +113,7 @@ subroutine psi_lovrl_upd_vect(x,desc_a,update,info)
call psb_erractionrestore(err_act)
return
9999 call psb_error_handler(ictxt,err_act)
9999 call psb_error_handler(ctxt,err_act)
return
end subroutine psi_lovrl_upd_vect
@ -131,7 +132,8 @@ subroutine psi_lovrl_upd_multivect(x,desc_a,update,info)
! locals
integer(psb_lpk_), allocatable :: xs(:,:)
integer(psb_ipk_) :: ictxt, np, me, err_act, i, idx, ndm, nx, nc
type(psb_ctxt_type) :: ctxt
integer(psb_ipk_) :: np, me, err_act, i, idx, ndm, nx, nc
integer(psb_ipk_) :: ierr(5)
character(len=20) :: name, ch_err
@ -142,8 +144,8 @@ subroutine psi_lovrl_upd_multivect(x,desc_a,update,info)
if (psb_errstatus_fatal()) then
info = psb_err_internal_error_ ; goto 9999
end if
ictxt = desc_a%get_context()
call psb_info(ictxt, me, np)
ctxt = desc_a%get_context()
call psb_info(ctxt, me, np)
if (np == -1) then
info = psb_err_context_error_
call psb_errpush(info,name)
@ -194,7 +196,7 @@ subroutine psi_lovrl_upd_multivect(x,desc_a,update,info)
call psb_erractionrestore(err_act)
return
9999 call psb_error_handler(ictxt,err_act)
9999 call psb_error_handler(ctxt,err_act)
return
end subroutine psi_lovrl_upd_multivect

@ -113,7 +113,9 @@ subroutine psi_lswapdata_vect(flag,beta,y,desc_a,work,info,data)
integer(psb_ipk_), optional :: data
! locals
integer(psb_ipk_) :: ictxt, np, me, icomm, idxs, idxr, totxch, data_, err_act
type(psb_ctxt_type) :: ctxt
integer(psb_mpk_) :: icomm
integer(psb_ipk_) :: np, me, idxs, idxr, totxch, data_, err_act
class(psb_i_base_vect_type), pointer :: d_vidx
character(len=20) :: name
@ -121,9 +123,9 @@ subroutine psi_lswapdata_vect(flag,beta,y,desc_a,work,info,data)
name='psi_swap_datav'
call psb_erractionsave(err_act)
ictxt = desc_a%get_context()
ctxt = desc_a%get_context()
icomm = desc_a%get_mpic()
call psb_info(ictxt,me,np)
call psb_info(ctxt,me,np)
if (np == -1) then
info=psb_err_context_error_
call psb_errpush(info,name)
@ -148,13 +150,13 @@ subroutine psi_lswapdata_vect(flag,beta,y,desc_a,work,info,data)
goto 9999
end if
call psi_swapdata(ictxt,icomm,flag,beta,y,d_vidx,totxch,idxs,idxr,work,info)
call psi_swapdata(ctxt,icomm,flag,beta,y,d_vidx,totxch,idxs,idxr,work,info)
if (info /= psb_success_) goto 9999
call psb_erractionrestore(err_act)
return
9999 call psb_error_handler(ictxt,err_act)
9999 call psb_error_handler(ctxt,err_act)
return
end subroutine psi_lswapdata_vect
@ -173,7 +175,7 @@ end subroutine psi_lswapdata_vect
!
!
!
subroutine psi_lswap_vidx_vect(iictxt,iicomm,flag,beta,y,idx, &
subroutine psi_lswap_vidx_vect(ctxt,icomm,flag,beta,y,idx, &
& totxch,totsnd,totrcv,work,info)
use psi_mod, psb_protect_name => psi_lswap_vidx_vect
@ -190,8 +192,10 @@ subroutine psi_lswap_vidx_vect(iictxt,iicomm,flag,beta,y,idx, &
include 'mpif.h'
#endif
integer(psb_ipk_), intent(in) :: iictxt,iicomm,flag
integer(psb_ipk_), intent(out) :: info
type(psb_ctxt_type), intent(in) :: ctxt
integer(psb_mpk_), intent(in) :: icomm
integer(psb_ipk_), intent(in) :: flag
integer(psb_ipk_), intent(out) :: info
class(psb_l_base_vect_type) :: y
integer(psb_lpk_) :: beta
integer(psb_lpk_), target :: work(:)
@ -199,8 +203,8 @@ subroutine psi_lswap_vidx_vect(iictxt,iicomm,flag,beta,y,idx, &
integer(psb_ipk_), intent(in) :: totxch,totsnd, totrcv
! locals
integer(psb_mpk_) :: ictxt, icomm, np, me,&
& proc_to_comm, p2ptag, p2pstat(mpi_status_size), iret
integer(psb_ipk_) :: np, me
integer(psb_mpk_) :: proc_to_comm, p2ptag, p2pstat(mpi_status_size), iret
integer(psb_mpk_), allocatable :: prcid(:)
integer(psb_ipk_) :: nesd, nerv,&
& err_act, i, idx_pt, totsnd_, totrcv_,&
@ -213,10 +217,7 @@ subroutine psi_lswap_vidx_vect(iictxt,iicomm,flag,beta,y,idx, &
info=psb_success_
name='psi_swap_datav'
call psb_erractionsave(err_act)
ictxt = iictxt
icomm = iicomm
call psb_info(ictxt,me,np)
call psb_info(ctxt,me,np)
if (np == -1) then
info=psb_err_context_error_
call psb_errpush(info,name)
@ -260,7 +261,7 @@ subroutine psi_lswap_vidx_vect(iictxt,iicomm,flag,beta,y,idx, &
nesd = idx%v(pnti+nerv+psb_n_elem_send_)
rcv_pt = 1+pnti+psb_n_elem_recv_
prcid(i) = psb_get_mpi_rank(ictxt,proc_to_comm)
prcid(i) = psb_get_mpi_rank(ctxt,proc_to_comm)
if ((nerv>0).and.(proc_to_comm /= me)) then
if (debug) write(*,*) me,'Posting receive from',prcid(i),rcv_pt
p2ptag = psb_long_swap_tag
@ -413,7 +414,7 @@ subroutine psi_lswap_vidx_vect(iictxt,iicomm,flag,beta,y,idx, &
call psb_erractionrestore(err_act)
return
9999 call psb_error_handler(iictxt,err_act)
9999 call psb_error_handler(ctxt,err_act)
return
end subroutine psi_lswap_vidx_vect
@ -450,7 +451,9 @@ subroutine psi_lswapdata_multivect(flag,beta,y,desc_a,work,info,data)
integer(psb_ipk_), optional :: data
! locals
integer(psb_ipk_) :: ictxt, np, me, icomm, idxs, idxr, totxch, data_, err_act
type(psb_ctxt_type) :: ctxt
integer(psb_mpk_) :: icomm
integer(psb_ipk_) :: np, me, idxs, idxr, totxch, data_, err_act
class(psb_i_base_vect_type), pointer :: d_vidx
character(len=20) :: name
@ -458,9 +461,9 @@ subroutine psi_lswapdata_multivect(flag,beta,y,desc_a,work,info,data)
name='psi_swap_datav'
call psb_erractionsave(err_act)
ictxt = desc_a%get_context()
ctxt = desc_a%get_context()
icomm = desc_a%get_mpic()
call psb_info(ictxt,me,np)
call psb_info(ctxt,me,np)
if (np == -1) then
info=psb_err_context_error_
call psb_errpush(info,name)
@ -485,13 +488,13 @@ subroutine psi_lswapdata_multivect(flag,beta,y,desc_a,work,info,data)
goto 9999
end if
call psi_swapdata(ictxt,icomm,flag,beta,y,d_vidx,totxch,idxs,idxr,work,info)
call psi_swapdata(ctxt,icomm,flag,beta,y,d_vidx,totxch,idxs,idxr,work,info)
if (info /= psb_success_) goto 9999
call psb_erractionrestore(err_act)
return
9999 call psb_error_handler(ictxt,err_act)
9999 call psb_error_handler(ctxt,err_act)
return
end subroutine psi_lswapdata_multivect
@ -510,7 +513,7 @@ end subroutine psi_lswapdata_multivect
!
!
!
subroutine psi_lswap_vidx_multivect(iictxt,iicomm,flag,beta,y,idx, &
subroutine psi_lswap_vidx_multivect(ctxt,icomm,flag,beta,y,idx, &
& totxch,totsnd,totrcv,work,info)
use psi_mod, psb_protect_name => psi_lswap_vidx_multivect
@ -527,8 +530,10 @@ subroutine psi_lswap_vidx_multivect(iictxt,iicomm,flag,beta,y,idx, &
include 'mpif.h'
#endif
integer(psb_ipk_), intent(in) :: iictxt,iicomm,flag
integer(psb_ipk_), intent(out) :: info
type(psb_ctxt_type), intent(in) :: ctxt
integer(psb_mpk_), intent(in) :: icomm
integer(psb_ipk_), intent(in) :: flag
integer(psb_ipk_), intent(out) :: info
class(psb_l_base_multivect_type) :: y
integer(psb_lpk_) :: beta
integer(psb_lpk_), target :: work(:)
@ -536,8 +541,8 @@ subroutine psi_lswap_vidx_multivect(iictxt,iicomm,flag,beta,y,idx, &
integer(psb_ipk_), intent(in) :: totxch,totsnd, totrcv
! locals
integer(psb_mpk_) :: ictxt, icomm, np, me,&
& proc_to_comm, p2ptag, p2pstat(mpi_status_size), iret
integer(psb_ipk_) :: np, me
integer(psb_mpk_) :: proc_to_comm, p2ptag, p2pstat(mpi_status_size), iret
integer(psb_mpk_), allocatable :: prcid(:)
integer(psb_ipk_) :: nesd, nerv,&
& err_act, i, idx_pt, totsnd_, totrcv_,&
@ -550,10 +555,7 @@ subroutine psi_lswap_vidx_multivect(iictxt,iicomm,flag,beta,y,idx, &
info=psb_success_
name='psi_swap_datav'
call psb_erractionsave(err_act)
ictxt = iictxt
icomm = iicomm
call psb_info(ictxt,me,np)
call psb_info(ctxt,me,np)
if (np == -1) then
info=psb_err_context_error_
call psb_errpush(info,name)
@ -599,7 +601,7 @@ subroutine psi_lswap_vidx_multivect(iictxt,iicomm,flag,beta,y,idx, &
proc_to_comm = idx%v(pnti+psb_proc_id_)
nerv = idx%v(pnti+psb_n_elem_recv_)
nesd = idx%v(pnti+nerv+psb_n_elem_send_)
prcid(i) = psb_get_mpi_rank(ictxt,proc_to_comm)
prcid(i) = psb_get_mpi_rank(ctxt,proc_to_comm)
if ((nerv>0).and.(proc_to_comm /= me)) then
if (debug) write(*,*) me,'Posting receive from',prcid(i),rcv_pt
p2ptag = psb_long_swap_tag
@ -756,7 +758,7 @@ subroutine psi_lswap_vidx_multivect(iictxt,iicomm,flag,beta,y,idx, &
call psb_erractionrestore(err_act)
return
9999 call psb_error_handler(iictxt,err_act)
9999 call psb_error_handler(ctxt,err_act)
return
end subroutine psi_lswap_vidx_multivect

@ -115,7 +115,9 @@ subroutine psi_lswaptran_vect(flag,beta,y,desc_a,work,info,data)
integer(psb_ipk_), optional :: data
! locals
integer(psb_ipk_) :: ictxt, np, me, icomm, idxs, idxr, totxch, err_act, data_
type(psb_ctxt_type) :: ctxt
integer(psb_mpk_) :: icomm
integer(psb_ipk_) :: np, me, idxs, idxr, totxch, err_act, data_
class(psb_i_base_vect_type), pointer :: d_vidx
character(len=20) :: name
@ -123,9 +125,9 @@ subroutine psi_lswaptran_vect(flag,beta,y,desc_a,work,info,data)
name='psi_swap_tranv'
call psb_erractionsave(err_act)
ictxt = desc_a%get_context()
ctxt = desc_a%get_context()
icomm = desc_a%get_mpic()
call psb_info(ictxt,me,np)
call psb_info(ctxt,me,np)
if (np == -1) then
info=psb_err_context_error_
call psb_errpush(info,name)
@ -150,19 +152,17 @@ subroutine psi_lswaptran_vect(flag,beta,y,desc_a,work,info,data)
goto 9999
end if
call psi_swaptran(ictxt,icomm,flag,beta,y,d_vidx,totxch,idxs,idxr,work,info)
call psi_swaptran(ctxt,icomm,flag,beta,y,d_vidx,totxch,idxs,idxr,work,info)
if (info /= psb_success_) goto 9999
call psb_erractionrestore(err_act)
return
9999 call psb_error_handler(ictxt,err_act)
9999 call psb_error_handler(ctxt,err_act)
return
end subroutine psi_lswaptran_vect
!
!
! Subroutine: psi_ltran_vidx_vect
@ -176,7 +176,7 @@ end subroutine psi_lswaptran_vect
!
!
!
subroutine psi_ltran_vidx_vect(iictxt,iicomm,flag,beta,y,idx,&
subroutine psi_ltran_vidx_vect(ctxt,icomm,flag,beta,y,idx,&
& totxch,totsnd,totrcv,work,info)
use psi_mod, psb_protect_name => psi_ltran_vidx_vect
@ -193,7 +193,9 @@ subroutine psi_ltran_vidx_vect(iictxt,iicomm,flag,beta,y,idx,&
include 'mpif.h'
#endif
integer(psb_ipk_), intent(in) :: iictxt,iicomm,flag
type(psb_ctxt_type), intent(in) :: ctxt
integer(psb_mpk_), intent(in) :: icomm
integer(psb_ipk_), intent(in) :: flag
integer(psb_ipk_), intent(out) :: info
class(psb_l_base_vect_type) :: y
integer(psb_lpk_) :: beta
@ -202,8 +204,8 @@ subroutine psi_ltran_vidx_vect(iictxt,iicomm,flag,beta,y,idx,&
integer(psb_ipk_), intent(in) :: totxch,totsnd, totrcv
! locals
integer(psb_mpk_) :: ictxt, icomm, np, me,&
& proc_to_comm, p2ptag, p2pstat(mpi_status_size), iret
integer(psb_ipk_) :: np, me
integer(psb_mpk_) :: proc_to_comm, p2ptag, p2pstat(mpi_status_size), iret
integer(psb_mpk_), allocatable :: prcid(:)
integer(psb_ipk_) :: nesd, nerv,&
& err_act, i, idx_pt, totsnd_, totrcv_,&
@ -216,10 +218,7 @@ subroutine psi_ltran_vidx_vect(iictxt,iicomm,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)
call psb_info(ctxt,me,np)
if (np == -1) then
info=psb_err_context_error_
call psb_errpush(info,name)
@ -266,7 +265,7 @@ subroutine psi_ltran_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_
prcid(i) = psb_get_mpi_rank(ictxt,proc_to_comm)
prcid(i) = psb_get_mpi_rank(ctxt,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,&
@ -422,7 +421,7 @@ subroutine psi_ltran_vidx_vect(iictxt,iicomm,flag,beta,y,idx,&
call psb_erractionrestore(err_act)
return
9999 call psb_error_handler(iictxt,err_act)
9999 call psb_error_handler(ctxt,err_act)
return
@ -463,7 +462,9 @@ subroutine psi_lswaptran_multivect(flag,beta,y,desc_a,work,info,data)
integer(psb_ipk_), optional :: data
! locals
integer(psb_ipk_) :: ictxt, np, me, icomm, idxs, idxr, totxch, err_act, data_
type(psb_ctxt_type) :: ctxt
integer(psb_mpk_) :: icomm
integer(psb_ipk_) :: np, me, idxs, idxr, totxch, err_act, data_
class(psb_i_base_vect_type), pointer :: d_vidx
character(len=20) :: name
@ -471,9 +472,9 @@ subroutine psi_lswaptran_multivect(flag,beta,y,desc_a,work,info,data)
name='psi_swap_tranv'
call psb_erractionsave(err_act)
ictxt = desc_a%get_context()
ctxt = desc_a%get_context()
icomm = desc_a%get_mpic()
call psb_info(ictxt,me,np)
call psb_info(ctxt,me,np)
if (np == -1) then
info=psb_err_context_error_
call psb_errpush(info,name)
@ -498,13 +499,13 @@ subroutine psi_lswaptran_multivect(flag,beta,y,desc_a,work,info,data)
goto 9999
end if
call psi_swaptran(ictxt,icomm,flag,beta,y,d_vidx,totxch,idxs,idxr,work,info)
call psi_swaptran(ctxt,icomm,flag,beta,y,d_vidx,totxch,idxs,idxr,work,info)
if (info /= psb_success_) goto 9999
call psb_erractionrestore(err_act)
return
9999 call psb_error_handler(ictxt,err_act)
9999 call psb_error_handler(ctxt,err_act)
return
end subroutine psi_lswaptran_multivect
@ -523,7 +524,7 @@ subroutine psi_lswaptran_multivect(flag,beta,y,desc_a,work,info,data)
!
!
!
subroutine psi_ltran_vidx_multivect(iictxt,iicomm,flag,beta,y,idx,&
subroutine psi_ltran_vidx_multivect(ctxt,icomm,flag,beta,y,idx,&
& totxch,totsnd,totrcv,work,info)
use psi_mod, psb_protect_name => psi_ltran_vidx_multivect
@ -540,7 +541,9 @@ subroutine psi_ltran_vidx_multivect(iictxt,iicomm,flag,beta,y,idx,&
include 'mpif.h'
#endif
integer(psb_ipk_), intent(in) :: iictxt,iicomm,flag
type(psb_ctxt_type), intent(in) :: ctxt
integer(psb_mpk_), intent(in) :: icomm
integer(psb_ipk_), intent(in) :: flag
integer(psb_ipk_), intent(out) :: info
class(psb_l_base_multivect_type) :: y
integer(psb_lpk_) :: beta
@ -549,8 +552,8 @@ subroutine psi_ltran_vidx_multivect(iictxt,iicomm,flag,beta,y,idx,&
integer(psb_ipk_), intent(in) :: totxch,totsnd, totrcv
! locals
integer(psb_mpk_) :: ictxt, icomm, np, me,&
& proc_to_comm, p2ptag, p2pstat(mpi_status_size), iret
integer(psb_ipk_) :: np, me
integer(psb_mpk_) :: proc_to_comm, p2ptag, p2pstat(mpi_status_size), iret
integer(psb_mpk_), allocatable :: prcid(:)
integer(psb_ipk_) :: nesd, nerv,&
& err_act, i, idx_pt, totsnd_, totrcv_,&
@ -563,10 +566,7 @@ subroutine psi_ltran_vidx_multivect(iictxt,iicomm,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)
call psb_info(ctxt,me,np)
if (np == -1) then
info=psb_err_context_error_
call psb_errpush(info,name)
@ -613,7 +613,7 @@ subroutine psi_ltran_vidx_multivect(iictxt,iicomm,flag,beta,y,idx,&
proc_to_comm = idx%v(pnti+psb_proc_id_)
nerv = idx%v(pnti+psb_n_elem_recv_)
nesd = idx%v(pnti+nerv+psb_n_elem_send_)
prcid(i) = psb_get_mpi_rank(ictxt,proc_to_comm)
prcid(i) = psb_get_mpi_rank(ctxt,proc_to_comm)
if ((nesd>0).and.(proc_to_comm /= me)) then
if (debug) write(*,*) me,'Posting receive from',prcid(i),snd_pt
call mpi_irecv(y%combuf(snd_pt),n*nesd,&
@ -773,7 +773,7 @@ subroutine psi_ltran_vidx_multivect(iictxt,iicomm,flag,beta,y,idx,&
call psb_erractionrestore(err_act)
return
9999 call psb_error_handler(iictxt,err_act)
9999 call psb_error_handler(ctxt,err_act)
return

@ -45,7 +45,8 @@ subroutine psi_movrl_restrr1(x,xs,desc_a,info)
integer(psb_ipk_), intent(out) :: info
! locals
integer(psb_ipk_) :: ictxt, np, me, err_act, i, idx, isz
type(psb_ctxt_type) :: ctxt
integer(psb_ipk_) :: np, me, err_act, i, idx, isz
character(len=20) :: name, ch_err
name='psi_movrl_restrr1'
@ -54,8 +55,8 @@ subroutine psi_movrl_restrr1(x,xs,desc_a,info)
if (psb_errstatus_fatal()) then
info = psb_err_internal_error_ ; goto 9999
end if
ictxt = desc_a%get_context()
call psb_info(ictxt, me, np)
ctxt = desc_a%get_context()
call psb_info(ctxt, me, np)
if (np == -1) then
info = psb_err_context_error_
call psb_errpush(info,name)
@ -72,7 +73,7 @@ subroutine psi_movrl_restrr1(x,xs,desc_a,info)
call psb_erractionrestore(err_act)
return
9999 call psb_error_handler(ictxt,err_act)
9999 call psb_error_handler(ctxt,err_act)
return
end subroutine psi_movrl_restrr1
@ -88,7 +89,8 @@ subroutine psi_movrl_restrr2(x,xs,desc_a,info)
integer(psb_ipk_), intent(out) :: info
! locals
integer(psb_ipk_) :: ictxt, np, me, err_act, i, idx, isz
type(psb_ctxt_type) :: ctxt
integer(psb_ipk_) :: np, me, err_act, i, idx, isz
character(len=20) :: name, ch_err
name='psi_movrl_restrr2'
@ -97,8 +99,8 @@ subroutine psi_movrl_restrr2(x,xs,desc_a,info)
if (psb_errstatus_fatal()) then
info = psb_err_internal_error_ ; goto 9999
end if
ictxt = desc_a%get_context()
call psb_info(ictxt, me, np)
ctxt = desc_a%get_context()
call psb_info(ctxt, me, np)
if (np == -1) then
info = psb_err_context_error_
call psb_errpush(info,name)
@ -122,7 +124,7 @@ subroutine psi_movrl_restrr2(x,xs,desc_a,info)
call psb_erractionrestore(err_act)
return
9999 call psb_error_handler(ictxt,err_act)
9999 call psb_error_handler(ctxt,err_act)
return
end subroutine psi_movrl_restrr2

@ -47,7 +47,8 @@ subroutine psi_movrl_saver1(x,xs,desc_a,info)
integer(psb_ipk_), intent(out) :: info
! locals
integer(psb_ipk_) :: ictxt, np, me, err_act, i, idx, isz
type(psb_ctxt_type) :: ctxt
integer(psb_ipk_) :: np, me, err_act, i, idx, isz
character(len=20) :: name, ch_err
name='psi_movrl_saver1'
@ -56,8 +57,8 @@ subroutine psi_movrl_saver1(x,xs,desc_a,info)
if (psb_errstatus_fatal()) then
info = psb_err_internal_error_ ; goto 9999
end if
ictxt = desc_a%get_context()
call psb_info(ictxt, me, np)
ctxt = desc_a%get_context()
call psb_info(ctxt, me, np)
if (np == -1) then
info = psb_err_context_error_
call psb_errpush(info,name)
@ -80,7 +81,7 @@ subroutine psi_movrl_saver1(x,xs,desc_a,info)
call psb_erractionrestore(err_act)
return
9999 call psb_error_handler(ictxt,err_act)
9999 call psb_error_handler(ctxt,err_act)
return
end subroutine psi_movrl_saver1
@ -99,7 +100,8 @@ subroutine psi_movrl_saver2(x,xs,desc_a,info)
integer(psb_ipk_), intent(out) :: info
! locals
integer(psb_ipk_) :: ictxt, np, me, err_act, i, idx, isz, nc
type(psb_ctxt_type) :: ctxt
integer(psb_ipk_) :: np, me, err_act, i, idx, isz, nc
character(len=20) :: name, ch_err
name='psi_movrl_saver2'
@ -108,8 +110,8 @@ subroutine psi_movrl_saver2(x,xs,desc_a,info)
if (psb_errstatus_fatal()) then
info = psb_err_internal_error_ ; goto 9999
end if
ictxt = desc_a%get_context()
call psb_info(ictxt, me, np)
ctxt = desc_a%get_context()
call psb_info(ctxt, me, np)
if (np == -1) then
info = psb_err_context_error_
call psb_errpush(info,name)
@ -133,7 +135,7 @@ subroutine psi_movrl_saver2(x,xs,desc_a,info)
call psb_erractionrestore(err_act)
return
9999 call psb_error_handler(ictxt,err_act)
9999 call psb_error_handler(ctxt,err_act)
return
end subroutine psi_movrl_saver2

@ -46,7 +46,8 @@ subroutine psi_movrl_updr1(x,desc_a,update,info)
integer(psb_ipk_), intent(out) :: info
! locals
integer(psb_ipk_) :: ictxt, np, me, err_act, i, idx, ndm
type(psb_ctxt_type) :: ctxt
integer(psb_ipk_) :: np, me, err_act, i, idx, ndm
integer(psb_ipk_) :: ierr(5)
character(len=20) :: name, ch_err
@ -56,8 +57,8 @@ subroutine psi_movrl_updr1(x,desc_a,update,info)
if (psb_errstatus_fatal()) then
info = psb_err_internal_error_ ; goto 9999
end if
ictxt = desc_a%get_context()
call psb_info(ictxt, me, np)
ctxt = desc_a%get_context()
call psb_info(ctxt, me, np)
if (np == -1) then
info = psb_err_context_error_
call psb_errpush(info,name)
@ -98,12 +99,11 @@ subroutine psi_movrl_updr1(x,desc_a,update,info)
call psb_erractionrestore(err_act)
return
9999 call psb_error_handler(ictxt,err_act)
9999 call psb_error_handler(ctxt,err_act)
return
end subroutine psi_movrl_updr1
subroutine psi_movrl_updr2(x,desc_a,update,info)
use psi_mod, psi_protect_name => psi_movrl_updr2
@ -115,7 +115,8 @@ subroutine psi_movrl_updr2(x,desc_a,update,info)
integer(psb_ipk_), intent(out) :: info
! locals
integer(psb_ipk_) :: ictxt, np, me, err_act, i, idx, ndm
type(psb_ctxt_type) :: ctxt
integer(psb_ipk_) :: np, me, err_act, i, idx, ndm
integer(psb_ipk_) :: ierr(5)
character(len=20) :: name, ch_err
@ -125,8 +126,8 @@ subroutine psi_movrl_updr2(x,desc_a,update,info)
if (psb_errstatus_fatal()) then
info = psb_err_internal_error_ ; goto 9999
end if
ictxt = desc_a%get_context()
call psb_info(ictxt, me, np)
ctxt = desc_a%get_context()
call psb_info(ctxt, me, np)
if (np == -1) then
info = psb_err_context_error_
call psb_errpush(info,name)
@ -167,7 +168,7 @@ subroutine psi_movrl_updr2(x,desc_a,update,info)
call psb_erractionrestore(err_act)
return
9999 call psb_error_handler(ictxt,err_act)
9999 call psb_error_handler(ctxt,err_act)
return
end subroutine psi_movrl_updr2

@ -106,7 +106,9 @@ subroutine psi_mswapdatam(flag,n,beta,y,desc_a,work,info,data)
integer(psb_ipk_), optional :: data
! locals
integer(psb_ipk_) :: ictxt, np, me, icomm, idxs, idxr, totxch, data_, err_act
type(psb_ctxt_type) :: ctxt
integer(psb_mpk_) :: icomm
integer(psb_ipk_) :: np, me, idxs, idxr, totxch, data_, err_act
integer(psb_ipk_), pointer :: d_idx(:)
character(len=20) :: name
@ -114,9 +116,9 @@ subroutine psi_mswapdatam(flag,n,beta,y,desc_a,work,info,data)
name='psi_swap_data'
call psb_erractionsave(err_act)
ictxt = desc_a%get_context()
ctxt = desc_a%get_context()
icomm = desc_a%get_mpic()
call psb_info(ictxt,me,np)
call psb_info(ctxt,me,np)
if (np == -1) then
info=psb_err_context_error_
call psb_errpush(info,name)
@ -141,18 +143,18 @@ subroutine psi_mswapdatam(flag,n,beta,y,desc_a,work,info,data)
goto 9999
end if
call psi_swapdata(ictxt,icomm,flag,n,beta,y,d_idx,totxch,idxs,idxr,work,info)
call psi_swapdata(ctxt,icomm,flag,n,beta,y,d_idx,totxch,idxs,idxr,work,info)
if (info /= psb_success_) goto 9999
call psb_erractionrestore(err_act)
return
9999 call psb_error_handler(ictxt,err_act)
9999 call psb_error_handler(ctxt,err_act)
return
end subroutine psi_mswapdatam
subroutine psi_mswapidxm(iictxt,iicomm,flag,n,beta,y,idx, &
subroutine psi_mswapidxm(ctxt,icomm,flag,n,beta,y,idx, &
& totxch,totsnd,totrcv,work,info)
use psi_mod, psb_protect_name => psi_mswapidxm
@ -167,15 +169,18 @@ subroutine psi_mswapidxm(iictxt,iicomm,flag,n,beta,y,idx, &
include 'mpif.h'
#endif
integer(psb_ipk_), intent(in) :: iictxt,iicomm,flag,n
integer(psb_ipk_), intent(out) :: info
type(psb_ctxt_type), intent(in) :: ctxt
integer(psb_mpk_), intent(in) :: icomm
integer(psb_ipk_), intent(in) :: flag,n
integer(psb_ipk_), intent(out) :: info
integer(psb_mpk_) :: y(:,:), beta
integer(psb_mpk_), target :: work(:)
integer(psb_ipk_), intent(in) :: idx(:),totxch,totsnd, totrcv
! locals
integer(psb_mpk_) :: ictxt, icomm, np, me,&
& proc_to_comm, p2ptag, p2pstat(mpi_status_size), iret
integer(psb_ipk_) :: np, me
integer(psb_mpk_) :: proc_to_comm, p2ptag, p2pstat(mpi_status_size), iret
integer(psb_mpk_), allocatable, dimension(:) :: bsdidx, brvidx,&
& sdsz, rvsz, prcid, rvhd, sdhd
integer(psb_ipk_) :: nesd, nerv,&
@ -192,10 +197,7 @@ subroutine psi_mswapidxm(iictxt,iicomm,flag,n,beta,y,idx, &
info=psb_success_
name='psi_swap_data'
call psb_erractionsave(err_act)
ictxt = iictxt
icomm = iicomm
call psb_info(ictxt,me,np)
call psb_info(ctxt,me,np)
if (np == -1) then
info=psb_err_context_error_
call psb_errpush(info,name)
@ -235,7 +237,7 @@ subroutine psi_mswapidxm(iictxt,iicomm,flag,n,beta,y,idx, &
proc_to_comm = idx(pnti+psb_proc_id_)
nerv = idx(pnti+psb_n_elem_recv_)
nesd = idx(pnti+nerv+psb_n_elem_send_)
prcid(proc_to_comm) = psb_get_mpi_rank(ictxt,proc_to_comm)
prcid(proc_to_comm) = psb_get_mpi_rank(ctxt,proc_to_comm)
brvidx(proc_to_comm) = rcv_pt
rvsz(proc_to_comm) = n*nerv
@ -314,14 +316,14 @@ subroutine psi_mswapidxm(iictxt,iicomm,flag,n,beta,y,idx, &
nesd = idx(pnti+nerv+psb_n_elem_send_)
if (proc_to_comm < me) then
if (nesd>0) call psb_snd(ictxt,&
if (nesd>0) call psb_snd(ctxt,&
& sndbuf(snd_pt:snd_pt+n*nesd-1), proc_to_comm)
if (nerv>0) call psb_rcv(ictxt,&
if (nerv>0) call psb_rcv(ctxt,&
& rcvbuf(rcv_pt:rcv_pt+n*nerv-1), proc_to_comm)
else if (proc_to_comm > me) then
if (nerv>0) call psb_rcv(ictxt,&
if (nerv>0) call psb_rcv(ctxt,&
& rcvbuf(rcv_pt:rcv_pt+n*nerv-1), proc_to_comm)
if (nesd>0) call psb_snd(ictxt,&
if (nesd>0) call psb_snd(ctxt,&
& sndbuf(snd_pt:snd_pt+n*nesd-1), proc_to_comm)
else if (proc_to_comm == me) then
if (nesd /= nerv) then
@ -348,7 +350,7 @@ subroutine psi_mswapidxm(iictxt,iicomm,flag,n,beta,y,idx, &
proc_to_comm = idx(pnti+psb_proc_id_)
nerv = idx(pnti+psb_n_elem_recv_)
nesd = idx(pnti+nerv+psb_n_elem_send_)
prcid(i) = psb_get_mpi_rank(ictxt,proc_to_comm)
prcid(i) = psb_get_mpi_rank(ctxt,proc_to_comm)
if ((nerv>0).and.(proc_to_comm /= me)) then
p2ptag = psb_int4_swap_tag
call mpi_irecv(rcvbuf(rcv_pt),n*nerv,&
@ -433,7 +435,7 @@ subroutine psi_mswapidxm(iictxt,iicomm,flag,n,beta,y,idx, &
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_snd(ictxt,&
if (nesd>0) call psb_snd(ctxt,&
& sndbuf(snd_pt:snd_pt+n*nesd-1), proc_to_comm)
rcv_pt = rcv_pt + n*nerv
snd_pt = snd_pt + n*nesd
@ -450,7 +452,7 @@ subroutine psi_mswapidxm(iictxt,iicomm,flag,n,beta,y,idx, &
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_rcv(ictxt,&
if (nerv>0) call psb_rcv(ctxt,&
& rcvbuf(rcv_pt:rcv_pt+n*nerv-1), proc_to_comm)
rcv_pt = rcv_pt + n*nerv
snd_pt = snd_pt + n*nesd
@ -498,7 +500,7 @@ subroutine psi_mswapidxm(iictxt,iicomm,flag,n,beta,y,idx, &
call psb_erractionrestore(err_act)
return
9999 call psb_error_handler(iictxt,err_act)
9999 call psb_error_handler(ctxt,err_act)
return
end subroutine psi_mswapidxm
@ -579,7 +581,9 @@ subroutine psi_mswapdatav(flag,beta,y,desc_a,work,info,data)
integer(psb_ipk_), optional :: data
! locals
integer(psb_ipk_) :: ictxt, np, me, icomm, idxs, idxr, totxch, data_, err_act
type(psb_ctxt_type) :: ctxt
integer(psb_mpk_) :: icomm
integer(psb_ipk_) :: np, me, idxs, idxr, totxch, data_, err_act
integer(psb_ipk_), pointer :: d_idx(:)
character(len=20) :: name
@ -587,9 +591,9 @@ subroutine psi_mswapdatav(flag,beta,y,desc_a,work,info,data)
name='psi_swap_datav'
call psb_erractionsave(err_act)
ictxt = desc_a%get_context()
ctxt = desc_a%get_context()
icomm = desc_a%get_mpic()
call psb_info(ictxt,me,np)
call psb_info(ctxt,me,np)
if (np == -1) then
info=psb_err_context_error_
call psb_errpush(info,name)
@ -614,13 +618,13 @@ subroutine psi_mswapdatav(flag,beta,y,desc_a,work,info,data)
goto 9999
end if
call psi_swapdata(ictxt,icomm,flag,beta,y,d_idx,totxch,idxs,idxr,work,info)
call psi_swapdata(ctxt,icomm,flag,beta,y,d_idx,totxch,idxs,idxr,work,info)
if (info /= psb_success_) goto 9999
call psb_erractionrestore(err_act)
return
9999 call psb_error_handler(ictxt,err_act)
9999 call psb_error_handler(ctxt,err_act)
return
end subroutine psi_mswapdatav
@ -636,7 +640,7 @@ end subroutine psi_mswapdatav
!
!
!
subroutine psi_mswapidxv(iictxt,iicomm,flag,beta,y,idx, &
subroutine psi_mswapidxv(ctxt,icomm,flag,beta,y,idx, &
& totxch,totsnd,totrcv,work,info)
use psi_mod, psb_protect_name => psi_mswapidxv
@ -651,15 +655,17 @@ subroutine psi_mswapidxv(iictxt,iicomm,flag,beta,y,idx, &
include 'mpif.h'
#endif
integer(psb_ipk_), intent(in) :: iictxt,iicomm,flag
integer(psb_ipk_), intent(out) :: info
type(psb_ctxt_type), intent(in) :: ctxt
integer(psb_mpk_), intent(in) :: icomm
integer(psb_ipk_), intent(in) :: flag
integer(psb_ipk_), intent(out) :: info
integer(psb_mpk_) :: y(:), beta
integer(psb_mpk_), target :: work(:)
integer(psb_ipk_), intent(in) :: idx(:),totxch,totsnd, totrcv
! locals
integer(psb_mpk_) :: ictxt, icomm, np, me,&
& proc_to_comm, p2ptag, p2pstat(mpi_status_size), iret
integer(psb_ipk_) :: np, me
integer(psb_mpk_) :: proc_to_comm, p2ptag, p2pstat(mpi_status_size), iret
integer(psb_mpk_), allocatable, dimension(:) :: bsdidx, brvidx,&
& sdsz, rvsz, prcid, rvhd, sdhd
integer(psb_ipk_) :: nesd, nerv,&
@ -676,10 +682,7 @@ subroutine psi_mswapidxv(iictxt,iicomm,flag,beta,y,idx, &
info=psb_success_
name='psi_swap_datav'
call psb_erractionsave(err_act)
ictxt = iictxt
icomm = iicomm
call psb_info(ictxt,me,np)
call psb_info(ctxt,me,np)
if (np == -1) then
info=psb_err_context_error_
call psb_errpush(info,name)
@ -719,7 +722,7 @@ subroutine psi_mswapidxv(iictxt,iicomm,flag,beta,y,idx, &
proc_to_comm = idx(pnti+psb_proc_id_)
nerv = idx(pnti+psb_n_elem_recv_)
nesd = idx(pnti+nerv+psb_n_elem_send_)
prcid(proc_to_comm) = psb_get_mpi_rank(ictxt,proc_to_comm)
prcid(proc_to_comm) = psb_get_mpi_rank(ctxt,proc_to_comm)
brvidx(proc_to_comm) = rcv_pt
rvsz(proc_to_comm) = nerv
@ -799,14 +802,14 @@ subroutine psi_mswapidxv(iictxt,iicomm,flag,beta,y,idx, &
nesd = idx(pnti+nerv+psb_n_elem_send_)
if (proc_to_comm < me) then
if (nesd>0) call psb_snd(ictxt,&
if (nesd>0) call psb_snd(ctxt,&
& sndbuf(snd_pt:snd_pt+nesd-1), proc_to_comm)
if (nerv>0) call psb_rcv(ictxt,&
if (nerv>0) call psb_rcv(ctxt,&
& rcvbuf(rcv_pt:rcv_pt+nerv-1), proc_to_comm)
else if (proc_to_comm > me) then
if (nerv>0) call psb_rcv(ictxt,&
if (nerv>0) call psb_rcv(ctxt,&
& rcvbuf(rcv_pt:rcv_pt+nerv-1), proc_to_comm)
if (nesd>0) call psb_snd(ictxt,&
if (nesd>0) call psb_snd(ctxt,&
& sndbuf(snd_pt:snd_pt+nesd-1), proc_to_comm)
else if (proc_to_comm == me) then
if (nesd /= nerv) then
@ -833,7 +836,7 @@ subroutine psi_mswapidxv(iictxt,iicomm,flag,beta,y,idx, &
nerv = idx(pnti+psb_n_elem_recv_)
nesd = idx(pnti+nerv+psb_n_elem_send_)
prcid(i) = psb_get_mpi_rank(ictxt,proc_to_comm)
prcid(i) = psb_get_mpi_rank(ctxt,proc_to_comm)
if ((nerv>0).and.(proc_to_comm /= me)) then
p2ptag = psb_int4_swap_tag
call mpi_irecv(rcvbuf(rcv_pt),nerv,&
@ -917,7 +920,7 @@ subroutine psi_mswapidxv(iictxt,iicomm,flag,beta,y,idx, &
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_snd(ictxt,&
if (nesd>0) call psb_snd(ctxt,&
& sndbuf(snd_pt:snd_pt+nesd-1), proc_to_comm)
rcv_pt = rcv_pt + nerv
snd_pt = snd_pt + nesd
@ -933,7 +936,7 @@ subroutine psi_mswapidxv(iictxt,iicomm,flag,beta,y,idx, &
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_rcv(ictxt,&
if (nerv>0) call psb_rcv(ctxt,&
& rcvbuf(rcv_pt:rcv_pt+nerv-1), proc_to_comm)
rcv_pt = rcv_pt + nerv
snd_pt = snd_pt + nesd
@ -980,7 +983,7 @@ subroutine psi_mswapidxv(iictxt,iicomm,flag,beta,y,idx, &
call psb_erractionrestore(err_act)
return
9999 call psb_error_handler(iictxt,err_act)
9999 call psb_error_handler(ctxt,err_act)
return
end subroutine psi_mswapidxv

@ -110,7 +110,9 @@ subroutine psi_mswaptranm(flag,n,beta,y,desc_a,work,info,data)
integer(psb_ipk_), optional :: data
! locals
integer(psb_ipk_) :: ictxt, np, me, icomm, idxs, idxr, err_act, totxch, data_
type(psb_ctxt_type) :: ctxt
integer(psb_mpk_) :: icomm
integer(psb_ipk_) :: np, me, idxs, idxr, err_act, totxch, data_
integer(psb_ipk_), pointer :: d_idx(:)
character(len=20) :: name
@ -118,10 +120,10 @@ subroutine psi_mswaptranm(flag,n,beta,y,desc_a,work,info,data)
name='psi_swap_tran'
call psb_erractionsave(err_act)
ictxt = desc_a%get_context()
ctxt = desc_a%get_context()
icomm = desc_a%get_mpic()
call psb_info(ictxt,me,np)
call psb_info(ctxt,me,np)
if (np == -1) then
info=psb_err_context_error_
call psb_errpush(info,name)
@ -146,18 +148,18 @@ subroutine psi_mswaptranm(flag,n,beta,y,desc_a,work,info,data)
goto 9999
end if
call psi_swaptran(ictxt,icomm,flag,n,beta,y,d_idx,totxch,idxs,idxr,work,info)
call psi_swaptran(ctxt,icomm,flag,n,beta,y,d_idx,totxch,idxs,idxr,work,info)
if (info /= psb_success_) goto 9999
call psb_erractionrestore(err_act)
return
9999 call psb_error_handler(ictxt,err_act)
9999 call psb_error_handler(ctxt,err_act)
return
end subroutine psi_mswaptranm
subroutine psi_mtranidxm(iictxt,iicomm,flag,n,beta,y,idx,&
subroutine psi_mtranidxm(ctxt,icomm,flag,n,beta,y,idx,&
& totxch,totsnd,totrcv,work,info)
use psi_mod, psb_protect_name => psi_mtranidxm
@ -172,15 +174,17 @@ subroutine psi_mtranidxm(iictxt,iicomm,flag,n,beta,y,idx,&
include 'mpif.h'
#endif
integer(psb_ipk_), intent(in) :: iictxt,iicomm,flag,n
integer(psb_ipk_), intent(out) :: info
type(psb_ctxt_type), intent(in) :: ctxt
integer(psb_mpk_), intent(in) :: icomm
integer(psb_ipk_), intent(in) :: flag,n
integer(psb_ipk_), intent(out) :: info
integer(psb_mpk_) :: y(:,:), beta
integer(psb_mpk_), target :: work(:)
integer(psb_ipk_), intent(in) :: idx(:),totxch,totsnd, totrcv
! locals
integer(psb_mpk_) :: ictxt, icomm, np, me,&
& proc_to_comm, p2ptag, p2pstat(mpi_status_size), iret
integer(psb_ipk_) :: np, me
integer(psb_mpk_) :: proc_to_comm, p2ptag, p2pstat(mpi_status_size), iret
integer(psb_mpk_), allocatable, dimension(:) :: bsdidx, brvidx,&
& sdsz, rvsz, prcid, rvhd, sdhd
integer(psb_ipk_) :: nesd, nerv,&
@ -197,10 +201,7 @@ subroutine psi_mtranidxm(iictxt,iicomm,flag,n,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)
call psb_info(ctxt,me,np)
if (np == -1) then
info=psb_err_context_error_
call psb_errpush(info,name)
@ -240,7 +241,7 @@ subroutine psi_mtranidxm(iictxt,iicomm,flag,n,beta,y,idx,&
proc_to_comm = idx(pnti+psb_proc_id_)
nerv = idx(pnti+psb_n_elem_recv_)
nesd = idx(pnti+nerv+psb_n_elem_send_)
prcid(proc_to_comm) = psb_get_mpi_rank(ictxt,proc_to_comm)
prcid(proc_to_comm) = psb_get_mpi_rank(ctxt,proc_to_comm)
brvidx(proc_to_comm) = rcv_pt
rvsz(proc_to_comm) = n*nerv
@ -324,14 +325,14 @@ subroutine psi_mtranidxm(iictxt,iicomm,flag,n,beta,y,idx,&
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(ctxt,&
& rcvbuf(rcv_pt:rcv_pt+n*nerv-1), proc_to_comm)
if (nesd>0) call psb_rcv(ictxt,&
if (nesd>0) call psb_rcv(ctxt,&
& 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(ctxt,&
& sndbuf(snd_pt:snd_pt+n*nesd-1), proc_to_comm)
if (nerv>0) call psb_snd(ictxt,&
if (nerv>0) call psb_snd(ctxt,&
& rcvbuf(rcv_pt:rcv_pt+n*nerv-1), proc_to_comm)
else if (proc_to_comm == me) then
if (nesd /= nerv) then
@ -358,7 +359,7 @@ subroutine psi_mtranidxm(iictxt,iicomm,flag,n,beta,y,idx,&
proc_to_comm = idx(pnti+psb_proc_id_)
nerv = idx(pnti+psb_n_elem_recv_)
nesd = idx(pnti+nerv+psb_n_elem_send_)
prcid(i) = psb_get_mpi_rank(ictxt,proc_to_comm)
prcid(i) = psb_get_mpi_rank(ctxt,proc_to_comm)
if ((nesd>0).and.(proc_to_comm /= me)) then
p2ptag = psb_int4_swap_tag
call mpi_irecv(sndbuf(snd_pt),n*nesd,&
@ -443,7 +444,7 @@ subroutine psi_mtranidxm(iictxt,iicomm,flag,n,beta,y,idx,&
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(ctxt,&
& rcvbuf(rcv_pt:rcv_pt+n*nerv-1), proc_to_comm)
rcv_pt = rcv_pt + n*nerv
snd_pt = snd_pt + n*nesd
@ -460,7 +461,7 @@ subroutine psi_mtranidxm(iictxt,iicomm,flag,n,beta,y,idx,&
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(ctxt,&
& sndbuf(snd_pt:snd_pt+n*nesd-1), proc_to_comm)
rcv_pt = rcv_pt + n*nerv
snd_pt = snd_pt + n*nesd
@ -508,7 +509,7 @@ subroutine psi_mtranidxm(iictxt,iicomm,flag,n,beta,y,idx,&
call psb_erractionrestore(err_act)
return
9999 call psb_error_handler(iictxt,err_act)
9999 call psb_error_handler(ctxt,err_act)
return
end subroutine psi_mtranidxm
@ -592,7 +593,9 @@ subroutine psi_mswaptranv(flag,beta,y,desc_a,work,info,data)
integer(psb_ipk_), optional :: data
! locals
integer(psb_ipk_) :: ictxt, np, me, icomm, idxs, idxr, totxch, err_act, data_
type(psb_ctxt_type) :: ctxt
integer(psb_mpk_) :: icomm
integer(psb_ipk_) :: np, me, idxs, idxr, totxch, err_act, data_
integer(psb_ipk_), pointer :: d_idx(:)
character(len=20) :: name
@ -600,9 +603,9 @@ subroutine psi_mswaptranv(flag,beta,y,desc_a,work,info,data)
name='psi_swap_tranv'
call psb_erractionsave(err_act)
ictxt = desc_a%get_context()
ctxt = desc_a%get_context()
icomm = desc_a%get_mpic()
call psb_info(ictxt,me,np)
call psb_info(ctxt,me,np)
if (np == -1) then
info=psb_err_context_error_
call psb_errpush(info,name)
@ -627,13 +630,13 @@ subroutine psi_mswaptranv(flag,beta,y,desc_a,work,info,data)
goto 9999
end if
call psi_swaptran(ictxt,icomm,flag,beta,y,d_idx,totxch,idxs,idxr,work,info)
call psi_swaptran(ctxt,icomm,flag,beta,y,d_idx,totxch,idxs,idxr,work,info)
if (info /= psb_success_) goto 9999
call psb_erractionrestore(err_act)
return
9999 call psb_error_handler(ictxt,err_act)
9999 call psb_error_handler(ctxt,err_act)
return
end subroutine psi_mswaptranv
@ -649,7 +652,7 @@ end subroutine psi_mswaptranv
!
!
!
subroutine psi_mtranidxv(iictxt,iicomm,flag,beta,y,idx,&
subroutine psi_mtranidxv(ctxt,icomm,flag,beta,y,idx,&
& totxch,totsnd,totrcv,work,info)
use psi_mod, psb_protect_name => psi_mtranidxv
@ -664,15 +667,17 @@ subroutine psi_mtranidxv(iictxt,iicomm,flag,beta,y,idx,&
include 'mpif.h'
#endif
integer(psb_ipk_), intent(in) :: iictxt,iicomm,flag
integer(psb_ipk_), intent(out) :: info
type(psb_ctxt_type), intent(in) :: ctxt
integer(psb_mpk_), intent(in) :: icomm
integer(psb_ipk_), intent(in) :: flag
integer(psb_ipk_), intent(out) :: info
integer(psb_mpk_) :: y(:), beta
integer(psb_mpk_), target :: work(:)
integer(psb_ipk_), intent(in) :: idx(:),totxch,totsnd, totrcv
! locals
integer(psb_mpk_) :: ictxt, icomm, np, me,&
& proc_to_comm, p2ptag, p2pstat(mpi_status_size), iret
integer(psb_ipk_) :: np, me
integer(psb_mpk_) :: proc_to_comm, p2ptag, p2pstat(mpi_status_size), iret
integer(psb_mpk_), allocatable, dimension(:) :: bsdidx, brvidx,&
& sdsz, rvsz, prcid, rvhd, sdhd
integer(psb_ipk_) :: nesd, nerv,&
@ -689,10 +694,7 @@ subroutine psi_mtranidxv(iictxt,iicomm,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)
call psb_info(ctxt,me,np)
if (np == -1) then
info=psb_err_context_error_
call psb_errpush(info,name)
@ -732,7 +734,7 @@ subroutine psi_mtranidxv(iictxt,iicomm,flag,beta,y,idx,&
proc_to_comm = idx(pnti+psb_proc_id_)
nerv = idx(pnti+psb_n_elem_recv_)
nesd = idx(pnti+nerv+psb_n_elem_send_)
prcid(proc_to_comm) = psb_get_mpi_rank(ictxt,proc_to_comm)
prcid(proc_to_comm) = psb_get_mpi_rank(ctxt,proc_to_comm)
brvidx(proc_to_comm) = rcv_pt
rvsz(proc_to_comm) = nerv
@ -817,14 +819,14 @@ subroutine psi_mtranidxv(iictxt,iicomm,flag,beta,y,idx,&
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(ctxt,&
& rcvbuf(rcv_pt:rcv_pt+nerv-1), proc_to_comm)
if (nesd>0) call psb_rcv(ictxt,&
if (nesd>0) call psb_rcv(ctxt,&
& 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(ctxt,&
& sndbuf(snd_pt:snd_pt+nesd-1), proc_to_comm)
if (nerv>0) call psb_snd(ictxt,&
if (nerv>0) call psb_snd(ctxt,&
& rcvbuf(rcv_pt:rcv_pt+nerv-1), proc_to_comm)
else if (proc_to_comm == me) then
if (nesd /= nerv) then
@ -850,7 +852,7 @@ subroutine psi_mtranidxv(iictxt,iicomm,flag,beta,y,idx,&
proc_to_comm = idx(pnti+psb_proc_id_)
nerv = idx(pnti+psb_n_elem_recv_)
nesd = idx(pnti+nerv+psb_n_elem_send_)
prcid(i) = psb_get_mpi_rank(ictxt,proc_to_comm)
prcid(i) = psb_get_mpi_rank(ctxt,proc_to_comm)
if ((nesd>0).and.(proc_to_comm /= me)) then
p2ptag = psb_int4_swap_tag
call mpi_irecv(sndbuf(snd_pt),nesd,&
@ -933,7 +935,7 @@ subroutine psi_mtranidxv(iictxt,iicomm,flag,beta,y,idx,&
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(ctxt,&
& rcvbuf(rcv_pt:rcv_pt+nerv-1), proc_to_comm)
rcv_pt = rcv_pt + nerv
snd_pt = snd_pt + nesd
@ -949,7 +951,7 @@ subroutine psi_mtranidxv(iictxt,iicomm,flag,beta,y,idx,&
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(ctxt,&
& sndbuf(snd_pt:snd_pt+nesd-1), proc_to_comm)
rcv_pt = rcv_pt + nerv
snd_pt = snd_pt + nesd
@ -996,7 +998,7 @@ subroutine psi_mtranidxv(iictxt,iicomm,flag,beta,y,idx,&
call psb_erractionrestore(err_act)
return
9999 call psb_error_handler(iictxt,err_act)
9999 call psb_error_handler(ctxt,err_act)
return
end subroutine psi_mtranidxv

@ -47,7 +47,8 @@ subroutine psi_sovrl_restr_vect(x,xs,desc_a,info)
integer(psb_ipk_), intent(out) :: info
! locals
integer(psb_ipk_) :: ictxt, np, me, err_act, i, idx, isz
type(psb_ctxt_type) :: ctxt
integer(psb_ipk_) :: np, me, err_act, i, idx, isz
character(len=20) :: name, ch_err
name='psi_sovrl_restr_vect'
@ -56,8 +57,8 @@ subroutine psi_sovrl_restr_vect(x,xs,desc_a,info)
if (psb_errstatus_fatal()) then
info = psb_err_internal_error_ ; goto 9999
end if
ictxt = desc_a%get_context()
call psb_info(ictxt, me, np)
ctxt = desc_a%get_context()
call psb_info(ctxt, me, np)
if (np == -1) then
info = psb_err_context_error_
call psb_errpush(info,name)
@ -71,7 +72,7 @@ subroutine psi_sovrl_restr_vect(x,xs,desc_a,info)
call psb_erractionrestore(err_act)
return
9999 call psb_error_handler(ictxt,err_act)
9999 call psb_error_handler(ctxt,err_act)
return
end subroutine psi_sovrl_restr_vect
@ -89,7 +90,8 @@ subroutine psi_sovrl_restr_multivect(x,xs,desc_a,info)
integer(psb_ipk_), intent(out) :: info
! locals
integer(psb_ipk_) :: ictxt, np, me, err_act, i, idx, isz, nc
type(psb_ctxt_type) :: ctxt
integer(psb_ipk_) :: np, me, err_act, i, idx, isz, nc
character(len=20) :: name, ch_err
name='psi_sovrl_restr_mv'
@ -98,8 +100,8 @@ subroutine psi_sovrl_restr_multivect(x,xs,desc_a,info)
if (psb_errstatus_fatal()) then
info = psb_err_internal_error_ ; goto 9999
end if
ictxt = desc_a%get_context()
call psb_info(ictxt, me, np)
ctxt = desc_a%get_context()
call psb_info(ctxt, me, np)
if (np == -1) then
info = psb_err_context_error_
call psb_errpush(info,name)
@ -112,7 +114,7 @@ subroutine psi_sovrl_restr_multivect(x,xs,desc_a,info)
call psb_erractionrestore(err_act)
return
9999 call psb_error_handler(ictxt,err_act)
9999 call psb_error_handler(ctxt,err_act)
return
end subroutine psi_sovrl_restr_multivect

@ -45,7 +45,8 @@ subroutine psi_sovrl_restrr1(x,xs,desc_a,info)
integer(psb_ipk_), intent(out) :: info
! locals
integer(psb_ipk_) :: ictxt, np, me, err_act, i, idx, isz
type(psb_ctxt_type) :: ctxt
integer(psb_ipk_) :: np, me, err_act, i, idx, isz
character(len=20) :: name, ch_err
name='psi_sovrl_restrr1'
@ -54,8 +55,8 @@ subroutine psi_sovrl_restrr1(x,xs,desc_a,info)
if (psb_errstatus_fatal()) then
info = psb_err_internal_error_ ; goto 9999
end if
ictxt = desc_a%get_context()
call psb_info(ictxt, me, np)
ctxt = desc_a%get_context()
call psb_info(ctxt, me, np)
if (np == -1) then
info = psb_err_context_error_
call psb_errpush(info,name)
@ -72,7 +73,7 @@ subroutine psi_sovrl_restrr1(x,xs,desc_a,info)
call psb_erractionrestore(err_act)
return
9999 call psb_error_handler(ictxt,err_act)
9999 call psb_error_handler(ctxt,err_act)
return
end subroutine psi_sovrl_restrr1
@ -88,7 +89,8 @@ subroutine psi_sovrl_restrr2(x,xs,desc_a,info)
integer(psb_ipk_), intent(out) :: info
! locals
integer(psb_ipk_) :: ictxt, np, me, err_act, i, idx, isz
type(psb_ctxt_type) :: ctxt
integer(psb_ipk_) :: np, me, err_act, i, idx, isz
character(len=20) :: name, ch_err
name='psi_sovrl_restrr2'
@ -97,8 +99,8 @@ subroutine psi_sovrl_restrr2(x,xs,desc_a,info)
if (psb_errstatus_fatal()) then
info = psb_err_internal_error_ ; goto 9999
end if
ictxt = desc_a%get_context()
call psb_info(ictxt, me, np)
ctxt = desc_a%get_context()
call psb_info(ctxt, me, np)
if (np == -1) then
info = psb_err_context_error_
call psb_errpush(info,name)
@ -122,7 +124,7 @@ subroutine psi_sovrl_restrr2(x,xs,desc_a,info)
call psb_erractionrestore(err_act)
return
9999 call psb_error_handler(ictxt,err_act)
9999 call psb_error_handler(ctxt,err_act)
return
end subroutine psi_sovrl_restrr2

@ -47,7 +47,8 @@ subroutine psi_sovrl_save_vect(x,xs,desc_a,info)
integer(psb_ipk_), intent(out) :: info
! locals
integer(psb_ipk_) :: ictxt, np, me, err_act, i, idx, isz
type(psb_ctxt_type) :: ctxt
integer(psb_ipk_) :: np, me, err_act, i, idx, isz
character(len=20) :: name, ch_err
name='psi_dovrl_saver1'
@ -56,8 +57,8 @@ subroutine psi_sovrl_save_vect(x,xs,desc_a,info)
if (psb_errstatus_fatal()) then
info = psb_err_internal_error_ ; goto 9999
end if
ictxt = desc_a%get_context()
call psb_info(ictxt, me, np)
ctxt = desc_a%get_context()
call psb_info(ctxt, me, np)
if (np == -1) then
info = psb_err_context_error_
call psb_errpush(info,name)
@ -77,13 +78,11 @@ subroutine psi_sovrl_save_vect(x,xs,desc_a,info)
call psb_erractionrestore(err_act)
return
9999 call psb_error_handler(ictxt,err_act)
9999 call psb_error_handler(ctxt,err_act)
return
end subroutine psi_sovrl_save_vect
subroutine psi_sovrl_save_multivect(x,xs,desc_a,info)
use psi_mod, psi_protect_name => psi_sovrl_save_multivect
use psb_realloc_mod
@ -97,7 +96,8 @@ subroutine psi_sovrl_save_multivect(x,xs,desc_a,info)
integer(psb_ipk_), intent(out) :: info
! locals
integer(psb_ipk_) :: ictxt, np, me, err_act, i, idx, isz, nc
type(psb_ctxt_type) :: ctxt
integer(psb_ipk_) :: np, me, err_act, i, idx, isz, nc
character(len=20) :: name, ch_err
name='psi_dovrl_saver1'
@ -106,8 +106,8 @@ subroutine psi_sovrl_save_multivect(x,xs,desc_a,info)
if (psb_errstatus_fatal()) then
info = psb_err_internal_error_ ; goto 9999
end if
ictxt = desc_a%get_context()
call psb_info(ictxt, me, np)
ctxt = desc_a%get_context()
call psb_info(ctxt, me, np)
if (np == -1) then
info = psb_err_context_error_
call psb_errpush(info,name)
@ -128,7 +128,7 @@ subroutine psi_sovrl_save_multivect(x,xs,desc_a,info)
call psb_erractionrestore(err_act)
return
9999 call psb_error_handler(ictxt,err_act)
9999 call psb_error_handler(ctxt,err_act)
return
end subroutine psi_sovrl_save_multivect

@ -47,7 +47,8 @@ subroutine psi_sovrl_saver1(x,xs,desc_a,info)
integer(psb_ipk_), intent(out) :: info
! locals
integer(psb_ipk_) :: ictxt, np, me, err_act, i, idx, isz
type(psb_ctxt_type) :: ctxt
integer(psb_ipk_) :: np, me, err_act, i, idx, isz
character(len=20) :: name, ch_err
name='psi_sovrl_saver1'
@ -56,8 +57,8 @@ subroutine psi_sovrl_saver1(x,xs,desc_a,info)
if (psb_errstatus_fatal()) then
info = psb_err_internal_error_ ; goto 9999
end if
ictxt = desc_a%get_context()
call psb_info(ictxt, me, np)
ctxt = desc_a%get_context()
call psb_info(ctxt, me, np)
if (np == -1) then
info = psb_err_context_error_
call psb_errpush(info,name)
@ -80,7 +81,7 @@ subroutine psi_sovrl_saver1(x,xs,desc_a,info)
call psb_erractionrestore(err_act)
return
9999 call psb_error_handler(ictxt,err_act)
9999 call psb_error_handler(ctxt,err_act)
return
end subroutine psi_sovrl_saver1
@ -99,7 +100,8 @@ subroutine psi_sovrl_saver2(x,xs,desc_a,info)
integer(psb_ipk_), intent(out) :: info
! locals
integer(psb_ipk_) :: ictxt, np, me, err_act, i, idx, isz, nc
type(psb_ctxt_type) :: ctxt
integer(psb_ipk_) :: np, me, err_act, i, idx, isz, nc
character(len=20) :: name, ch_err
name='psi_sovrl_saver2'
@ -108,8 +110,8 @@ subroutine psi_sovrl_saver2(x,xs,desc_a,info)
if (psb_errstatus_fatal()) then
info = psb_err_internal_error_ ; goto 9999
end if
ictxt = desc_a%get_context()
call psb_info(ictxt, me, np)
ctxt = desc_a%get_context()
call psb_info(ctxt, me, np)
if (np == -1) then
info = psb_err_context_error_
call psb_errpush(info,name)
@ -133,7 +135,7 @@ subroutine psi_sovrl_saver2(x,xs,desc_a,info)
call psb_erractionrestore(err_act)
return
9999 call psb_error_handler(ictxt,err_act)
9999 call psb_error_handler(ctxt,err_act)
return
end subroutine psi_sovrl_saver2

@ -32,7 +32,7 @@
! Subroutine: psi_sovrl_update
! These subroutines update the overlap region of a vector; they are used
! for the transpose matrix-vector product when there is a nonempty overlap,
! or for the application of Additive Schwarz preconditioners.
! or for the application of Additive Schwarz preconditioners.
!
!
!
@ -50,7 +50,8 @@ subroutine psi_sovrl_upd_vect(x,desc_a,update,info)
! locals
real(psb_spk_), allocatable :: xs(:)
integer(psb_ipk_) :: ictxt, np, me, err_act, i, idx, ndm, nx
type(psb_ctxt_type) :: ctxt
integer(psb_ipk_) :: np, me, err_act, i, idx, ndm, nx
integer(psb_ipk_) :: ierr(5)
character(len=20) :: name, ch_err
@ -61,8 +62,8 @@ subroutine psi_sovrl_upd_vect(x,desc_a,update,info)
if (psb_errstatus_fatal()) then
info = psb_err_internal_error_ ; goto 9999
end if
ictxt = desc_a%get_context()
call psb_info(ictxt, me, np)
ctxt = desc_a%get_context()
call psb_info(ctxt, me, np)
if (np == -1) then
info = psb_err_context_error_
call psb_errpush(info,name)
@ -112,7 +113,7 @@ subroutine psi_sovrl_upd_vect(x,desc_a,update,info)
call psb_erractionrestore(err_act)
return
9999 call psb_error_handler(ictxt,err_act)
9999 call psb_error_handler(ctxt,err_act)
return
end subroutine psi_sovrl_upd_vect
@ -131,7 +132,8 @@ subroutine psi_sovrl_upd_multivect(x,desc_a,update,info)
! locals
real(psb_spk_), allocatable :: xs(:,:)
integer(psb_ipk_) :: ictxt, np, me, err_act, i, idx, ndm, nx, nc
type(psb_ctxt_type) :: ctxt
integer(psb_ipk_) :: np, me, err_act, i, idx, ndm, nx, nc
integer(psb_ipk_) :: ierr(5)
character(len=20) :: name, ch_err
@ -142,8 +144,8 @@ subroutine psi_sovrl_upd_multivect(x,desc_a,update,info)
if (psb_errstatus_fatal()) then
info = psb_err_internal_error_ ; goto 9999
end if
ictxt = desc_a%get_context()
call psb_info(ictxt, me, np)
ctxt = desc_a%get_context()
call psb_info(ctxt, me, np)
if (np == -1) then
info = psb_err_context_error_
call psb_errpush(info,name)
@ -194,7 +196,7 @@ subroutine psi_sovrl_upd_multivect(x,desc_a,update,info)
call psb_erractionrestore(err_act)
return
9999 call psb_error_handler(ictxt,err_act)
9999 call psb_error_handler(ctxt,err_act)
return
end subroutine psi_sovrl_upd_multivect

@ -46,7 +46,8 @@ subroutine psi_sovrl_updr1(x,desc_a,update,info)
integer(psb_ipk_), intent(out) :: info
! locals
integer(psb_ipk_) :: ictxt, np, me, err_act, i, idx, ndm
type(psb_ctxt_type) :: ctxt
integer(psb_ipk_) :: np, me, err_act, i, idx, ndm
integer(psb_ipk_) :: ierr(5)
character(len=20) :: name, ch_err
@ -56,8 +57,8 @@ subroutine psi_sovrl_updr1(x,desc_a,update,info)
if (psb_errstatus_fatal()) then
info = psb_err_internal_error_ ; goto 9999
end if
ictxt = desc_a%get_context()
call psb_info(ictxt, me, np)
ctxt = desc_a%get_context()
call psb_info(ctxt, me, np)
if (np == -1) then
info = psb_err_context_error_
call psb_errpush(info,name)
@ -98,12 +99,11 @@ subroutine psi_sovrl_updr1(x,desc_a,update,info)
call psb_erractionrestore(err_act)
return
9999 call psb_error_handler(ictxt,err_act)
9999 call psb_error_handler(ctxt,err_act)
return
end subroutine psi_sovrl_updr1
subroutine psi_sovrl_updr2(x,desc_a,update,info)
use psi_mod, psi_protect_name => psi_sovrl_updr2
@ -115,7 +115,8 @@ subroutine psi_sovrl_updr2(x,desc_a,update,info)
integer(psb_ipk_), intent(out) :: info
! locals
integer(psb_ipk_) :: ictxt, np, me, err_act, i, idx, ndm
type(psb_ctxt_type) :: ctxt
integer(psb_ipk_) :: np, me, err_act, i, idx, ndm
integer(psb_ipk_) :: ierr(5)
character(len=20) :: name, ch_err
@ -125,8 +126,8 @@ subroutine psi_sovrl_updr2(x,desc_a,update,info)
if (psb_errstatus_fatal()) then
info = psb_err_internal_error_ ; goto 9999
end if
ictxt = desc_a%get_context()
call psb_info(ictxt, me, np)
ctxt = desc_a%get_context()
call psb_info(ctxt, me, np)
if (np == -1) then
info = psb_err_context_error_
call psb_errpush(info,name)
@ -167,7 +168,7 @@ subroutine psi_sovrl_updr2(x,desc_a,update,info)
call psb_erractionrestore(err_act)
return
9999 call psb_error_handler(ictxt,err_act)
9999 call psb_error_handler(ctxt,err_act)
return
end subroutine psi_sovrl_updr2

@ -113,7 +113,9 @@ subroutine psi_sswapdata_vect(flag,beta,y,desc_a,work,info,data)
integer(psb_ipk_), optional :: data
! locals
integer(psb_ipk_) :: ictxt, np, me, icomm, idxs, idxr, totxch, data_, err_act
type(psb_ctxt_type) :: ctxt
integer(psb_mpk_) :: icomm
integer(psb_ipk_) :: np, me, idxs, idxr, totxch, data_, err_act
class(psb_i_base_vect_type), pointer :: d_vidx
character(len=20) :: name
@ -121,9 +123,9 @@ subroutine psi_sswapdata_vect(flag,beta,y,desc_a,work,info,data)
name='psi_swap_datav'
call psb_erractionsave(err_act)
ictxt = desc_a%get_context()
ctxt = desc_a%get_context()
icomm = desc_a%get_mpic()
call psb_info(ictxt,me,np)
call psb_info(ctxt,me,np)
if (np == -1) then
info=psb_err_context_error_
call psb_errpush(info,name)
@ -148,13 +150,13 @@ subroutine psi_sswapdata_vect(flag,beta,y,desc_a,work,info,data)
goto 9999
end if
call psi_swapdata(ictxt,icomm,flag,beta,y,d_vidx,totxch,idxs,idxr,work,info)
call psi_swapdata(ctxt,icomm,flag,beta,y,d_vidx,totxch,idxs,idxr,work,info)
if (info /= psb_success_) goto 9999
call psb_erractionrestore(err_act)
return
9999 call psb_error_handler(ictxt,err_act)
9999 call psb_error_handler(ctxt,err_act)
return
end subroutine psi_sswapdata_vect
@ -173,7 +175,7 @@ end subroutine psi_sswapdata_vect
!
!
!
subroutine psi_sswap_vidx_vect(iictxt,iicomm,flag,beta,y,idx, &
subroutine psi_sswap_vidx_vect(ctxt,icomm,flag,beta,y,idx, &
& totxch,totsnd,totrcv,work,info)
use psi_mod, psb_protect_name => psi_sswap_vidx_vect
@ -190,8 +192,10 @@ subroutine psi_sswap_vidx_vect(iictxt,iicomm,flag,beta,y,idx, &
include 'mpif.h'
#endif
integer(psb_ipk_), intent(in) :: iictxt,iicomm,flag
integer(psb_ipk_), intent(out) :: info
type(psb_ctxt_type), intent(in) :: ctxt
integer(psb_mpk_), intent(in) :: icomm
integer(psb_ipk_), intent(in) :: flag
integer(psb_ipk_), intent(out) :: info
class(psb_s_base_vect_type) :: y
real(psb_spk_) :: beta
real(psb_spk_), target :: work(:)
@ -199,8 +203,8 @@ subroutine psi_sswap_vidx_vect(iictxt,iicomm,flag,beta,y,idx, &
integer(psb_ipk_), intent(in) :: totxch,totsnd, totrcv
! locals
integer(psb_mpk_) :: ictxt, icomm, np, me,&
& proc_to_comm, p2ptag, p2pstat(mpi_status_size), iret
integer(psb_ipk_) :: np, me
integer(psb_mpk_) :: proc_to_comm, p2ptag, p2pstat(mpi_status_size), iret
integer(psb_mpk_), allocatable :: prcid(:)
integer(psb_ipk_) :: nesd, nerv,&
& err_act, i, idx_pt, totsnd_, totrcv_,&
@ -213,10 +217,7 @@ subroutine psi_sswap_vidx_vect(iictxt,iicomm,flag,beta,y,idx, &
info=psb_success_
name='psi_swap_datav'
call psb_erractionsave(err_act)
ictxt = iictxt
icomm = iicomm
call psb_info(ictxt,me,np)
call psb_info(ctxt,me,np)
if (np == -1) then
info=psb_err_context_error_
call psb_errpush(info,name)
@ -260,7 +261,7 @@ subroutine psi_sswap_vidx_vect(iictxt,iicomm,flag,beta,y,idx, &
nesd = idx%v(pnti+nerv+psb_n_elem_send_)
rcv_pt = 1+pnti+psb_n_elem_recv_
prcid(i) = psb_get_mpi_rank(ictxt,proc_to_comm)
prcid(i) = psb_get_mpi_rank(ctxt,proc_to_comm)
if ((nerv>0).and.(proc_to_comm /= me)) then
if (debug) write(*,*) me,'Posting receive from',prcid(i),rcv_pt
p2ptag = psb_real_swap_tag
@ -413,7 +414,7 @@ subroutine psi_sswap_vidx_vect(iictxt,iicomm,flag,beta,y,idx, &
call psb_erractionrestore(err_act)
return
9999 call psb_error_handler(iictxt,err_act)
9999 call psb_error_handler(ctxt,err_act)
return
end subroutine psi_sswap_vidx_vect
@ -450,7 +451,9 @@ subroutine psi_sswapdata_multivect(flag,beta,y,desc_a,work,info,data)
integer(psb_ipk_), optional :: data
! locals
integer(psb_ipk_) :: ictxt, np, me, icomm, idxs, idxr, totxch, data_, err_act
type(psb_ctxt_type) :: ctxt
integer(psb_mpk_) :: icomm
integer(psb_ipk_) :: np, me, idxs, idxr, totxch, data_, err_act
class(psb_i_base_vect_type), pointer :: d_vidx
character(len=20) :: name
@ -458,9 +461,9 @@ subroutine psi_sswapdata_multivect(flag,beta,y,desc_a,work,info,data)
name='psi_swap_datav'
call psb_erractionsave(err_act)
ictxt = desc_a%get_context()
ctxt = desc_a%get_context()
icomm = desc_a%get_mpic()
call psb_info(ictxt,me,np)
call psb_info(ctxt,me,np)
if (np == -1) then
info=psb_err_context_error_
call psb_errpush(info,name)
@ -485,13 +488,13 @@ subroutine psi_sswapdata_multivect(flag,beta,y,desc_a,work,info,data)
goto 9999
end if
call psi_swapdata(ictxt,icomm,flag,beta,y,d_vidx,totxch,idxs,idxr,work,info)
call psi_swapdata(ctxt,icomm,flag,beta,y,d_vidx,totxch,idxs,idxr,work,info)
if (info /= psb_success_) goto 9999
call psb_erractionrestore(err_act)
return
9999 call psb_error_handler(ictxt,err_act)
9999 call psb_error_handler(ctxt,err_act)
return
end subroutine psi_sswapdata_multivect
@ -510,7 +513,7 @@ end subroutine psi_sswapdata_multivect
!
!
!
subroutine psi_sswap_vidx_multivect(iictxt,iicomm,flag,beta,y,idx, &
subroutine psi_sswap_vidx_multivect(ctxt,icomm,flag,beta,y,idx, &
& totxch,totsnd,totrcv,work,info)
use psi_mod, psb_protect_name => psi_sswap_vidx_multivect
@ -527,8 +530,10 @@ subroutine psi_sswap_vidx_multivect(iictxt,iicomm,flag,beta,y,idx, &
include 'mpif.h'
#endif
integer(psb_ipk_), intent(in) :: iictxt,iicomm,flag
integer(psb_ipk_), intent(out) :: info
type(psb_ctxt_type), intent(in) :: ctxt
integer(psb_mpk_), intent(in) :: icomm
integer(psb_ipk_), intent(in) :: flag
integer(psb_ipk_), intent(out) :: info
class(psb_s_base_multivect_type) :: y
real(psb_spk_) :: beta
real(psb_spk_), target :: work(:)
@ -536,8 +541,8 @@ subroutine psi_sswap_vidx_multivect(iictxt,iicomm,flag,beta,y,idx, &
integer(psb_ipk_), intent(in) :: totxch,totsnd, totrcv
! locals
integer(psb_mpk_) :: ictxt, icomm, np, me,&
& proc_to_comm, p2ptag, p2pstat(mpi_status_size), iret
integer(psb_ipk_) :: np, me
integer(psb_mpk_) :: proc_to_comm, p2ptag, p2pstat(mpi_status_size), iret
integer(psb_mpk_), allocatable :: prcid(:)
integer(psb_ipk_) :: nesd, nerv,&
& err_act, i, idx_pt, totsnd_, totrcv_,&
@ -550,10 +555,7 @@ subroutine psi_sswap_vidx_multivect(iictxt,iicomm,flag,beta,y,idx, &
info=psb_success_
name='psi_swap_datav'
call psb_erractionsave(err_act)
ictxt = iictxt
icomm = iicomm
call psb_info(ictxt,me,np)
call psb_info(ctxt,me,np)
if (np == -1) then
info=psb_err_context_error_
call psb_errpush(info,name)
@ -599,7 +601,7 @@ subroutine psi_sswap_vidx_multivect(iictxt,iicomm,flag,beta,y,idx, &
proc_to_comm = idx%v(pnti+psb_proc_id_)
nerv = idx%v(pnti+psb_n_elem_recv_)
nesd = idx%v(pnti+nerv+psb_n_elem_send_)
prcid(i) = psb_get_mpi_rank(ictxt,proc_to_comm)
prcid(i) = psb_get_mpi_rank(ctxt,proc_to_comm)
if ((nerv>0).and.(proc_to_comm /= me)) then
if (debug) write(*,*) me,'Posting receive from',prcid(i),rcv_pt
p2ptag = psb_real_swap_tag
@ -756,7 +758,7 @@ subroutine psi_sswap_vidx_multivect(iictxt,iicomm,flag,beta,y,idx, &
call psb_erractionrestore(err_act)
return
9999 call psb_error_handler(iictxt,err_act)
9999 call psb_error_handler(ctxt,err_act)
return
end subroutine psi_sswap_vidx_multivect

@ -106,7 +106,9 @@ subroutine psi_sswapdatam(flag,n,beta,y,desc_a,work,info,data)
integer(psb_ipk_), optional :: data
! locals
integer(psb_ipk_) :: ictxt, np, me, icomm, idxs, idxr, totxch, data_, err_act
type(psb_ctxt_type) :: ctxt
integer(psb_mpk_) :: icomm
integer(psb_ipk_) :: np, me, idxs, idxr, totxch, data_, err_act
integer(psb_ipk_), pointer :: d_idx(:)
character(len=20) :: name
@ -114,9 +116,9 @@ subroutine psi_sswapdatam(flag,n,beta,y,desc_a,work,info,data)
name='psi_swap_data'
call psb_erractionsave(err_act)
ictxt = desc_a%get_context()
ctxt = desc_a%get_context()
icomm = desc_a%get_mpic()
call psb_info(ictxt,me,np)
call psb_info(ctxt,me,np)
if (np == -1) then
info=psb_err_context_error_
call psb_errpush(info,name)
@ -141,18 +143,18 @@ subroutine psi_sswapdatam(flag,n,beta,y,desc_a,work,info,data)
goto 9999
end if
call psi_swapdata(ictxt,icomm,flag,n,beta,y,d_idx,totxch,idxs,idxr,work,info)
call psi_swapdata(ctxt,icomm,flag,n,beta,y,d_idx,totxch,idxs,idxr,work,info)
if (info /= psb_success_) goto 9999
call psb_erractionrestore(err_act)
return
9999 call psb_error_handler(ictxt,err_act)
9999 call psb_error_handler(ctxt,err_act)
return
end subroutine psi_sswapdatam
subroutine psi_sswapidxm(iictxt,iicomm,flag,n,beta,y,idx, &
subroutine psi_sswapidxm(ctxt,icomm,flag,n,beta,y,idx, &
& totxch,totsnd,totrcv,work,info)
use psi_mod, psb_protect_name => psi_sswapidxm
@ -167,15 +169,18 @@ subroutine psi_sswapidxm(iictxt,iicomm,flag,n,beta,y,idx, &
include 'mpif.h'
#endif
integer(psb_ipk_), intent(in) :: iictxt,iicomm,flag,n
integer(psb_ipk_), intent(out) :: info
type(psb_ctxt_type), intent(in) :: ctxt
integer(psb_mpk_), intent(in) :: icomm
integer(psb_ipk_), intent(in) :: flag,n
integer(psb_ipk_), intent(out) :: info
real(psb_spk_) :: y(:,:), beta
real(psb_spk_), target :: work(:)
integer(psb_ipk_), intent(in) :: idx(:),totxch,totsnd, totrcv
! locals
integer(psb_mpk_) :: ictxt, icomm, np, me,&
& proc_to_comm, p2ptag, p2pstat(mpi_status_size), iret
integer(psb_ipk_) :: np, me
integer(psb_mpk_) :: proc_to_comm, p2ptag, p2pstat(mpi_status_size), iret
integer(psb_mpk_), allocatable, dimension(:) :: bsdidx, brvidx,&
& sdsz, rvsz, prcid, rvhd, sdhd
integer(psb_ipk_) :: nesd, nerv,&
@ -192,10 +197,7 @@ subroutine psi_sswapidxm(iictxt,iicomm,flag,n,beta,y,idx, &
info=psb_success_
name='psi_swap_data'
call psb_erractionsave(err_act)
ictxt = iictxt
icomm = iicomm
call psb_info(ictxt,me,np)
call psb_info(ctxt,me,np)
if (np == -1) then
info=psb_err_context_error_
call psb_errpush(info,name)
@ -235,7 +237,7 @@ subroutine psi_sswapidxm(iictxt,iicomm,flag,n,beta,y,idx, &
proc_to_comm = idx(pnti+psb_proc_id_)
nerv = idx(pnti+psb_n_elem_recv_)
nesd = idx(pnti+nerv+psb_n_elem_send_)
prcid(proc_to_comm) = psb_get_mpi_rank(ictxt,proc_to_comm)
prcid(proc_to_comm) = psb_get_mpi_rank(ctxt,proc_to_comm)
brvidx(proc_to_comm) = rcv_pt
rvsz(proc_to_comm) = n*nerv
@ -314,14 +316,14 @@ subroutine psi_sswapidxm(iictxt,iicomm,flag,n,beta,y,idx, &
nesd = idx(pnti+nerv+psb_n_elem_send_)
if (proc_to_comm < me) then
if (nesd>0) call psb_snd(ictxt,&
if (nesd>0) call psb_snd(ctxt,&
& sndbuf(snd_pt:snd_pt+n*nesd-1), proc_to_comm)
if (nerv>0) call psb_rcv(ictxt,&
if (nerv>0) call psb_rcv(ctxt,&
& rcvbuf(rcv_pt:rcv_pt+n*nerv-1), proc_to_comm)
else if (proc_to_comm > me) then
if (nerv>0) call psb_rcv(ictxt,&
if (nerv>0) call psb_rcv(ctxt,&
& rcvbuf(rcv_pt:rcv_pt+n*nerv-1), proc_to_comm)
if (nesd>0) call psb_snd(ictxt,&
if (nesd>0) call psb_snd(ctxt,&
& sndbuf(snd_pt:snd_pt+n*nesd-1), proc_to_comm)
else if (proc_to_comm == me) then
if (nesd /= nerv) then
@ -348,7 +350,7 @@ subroutine psi_sswapidxm(iictxt,iicomm,flag,n,beta,y,idx, &
proc_to_comm = idx(pnti+psb_proc_id_)
nerv = idx(pnti+psb_n_elem_recv_)
nesd = idx(pnti+nerv+psb_n_elem_send_)
prcid(i) = psb_get_mpi_rank(ictxt,proc_to_comm)
prcid(i) = psb_get_mpi_rank(ctxt,proc_to_comm)
if ((nerv>0).and.(proc_to_comm /= me)) then
p2ptag = psb_real_swap_tag
call mpi_irecv(rcvbuf(rcv_pt),n*nerv,&
@ -433,7 +435,7 @@ subroutine psi_sswapidxm(iictxt,iicomm,flag,n,beta,y,idx, &
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_snd(ictxt,&
if (nesd>0) call psb_snd(ctxt,&
& sndbuf(snd_pt:snd_pt+n*nesd-1), proc_to_comm)
rcv_pt = rcv_pt + n*nerv
snd_pt = snd_pt + n*nesd
@ -450,7 +452,7 @@ subroutine psi_sswapidxm(iictxt,iicomm,flag,n,beta,y,idx, &
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_rcv(ictxt,&
if (nerv>0) call psb_rcv(ctxt,&
& rcvbuf(rcv_pt:rcv_pt+n*nerv-1), proc_to_comm)
rcv_pt = rcv_pt + n*nerv
snd_pt = snd_pt + n*nesd
@ -498,7 +500,7 @@ subroutine psi_sswapidxm(iictxt,iicomm,flag,n,beta,y,idx, &
call psb_erractionrestore(err_act)
return
9999 call psb_error_handler(iictxt,err_act)
9999 call psb_error_handler(ctxt,err_act)
return
end subroutine psi_sswapidxm
@ -579,7 +581,9 @@ subroutine psi_sswapdatav(flag,beta,y,desc_a,work,info,data)
integer(psb_ipk_), optional :: data
! locals
integer(psb_ipk_) :: ictxt, np, me, icomm, idxs, idxr, totxch, data_, err_act
type(psb_ctxt_type) :: ctxt
integer(psb_mpk_) :: icomm
integer(psb_ipk_) :: np, me, idxs, idxr, totxch, data_, err_act
integer(psb_ipk_), pointer :: d_idx(:)
character(len=20) :: name
@ -587,9 +591,9 @@ subroutine psi_sswapdatav(flag,beta,y,desc_a,work,info,data)
name='psi_swap_datav'
call psb_erractionsave(err_act)
ictxt = desc_a%get_context()
ctxt = desc_a%get_context()
icomm = desc_a%get_mpic()
call psb_info(ictxt,me,np)
call psb_info(ctxt,me,np)
if (np == -1) then
info=psb_err_context_error_
call psb_errpush(info,name)
@ -614,13 +618,13 @@ subroutine psi_sswapdatav(flag,beta,y,desc_a,work,info,data)
goto 9999
end if
call psi_swapdata(ictxt,icomm,flag,beta,y,d_idx,totxch,idxs,idxr,work,info)
call psi_swapdata(ctxt,icomm,flag,beta,y,d_idx,totxch,idxs,idxr,work,info)
if (info /= psb_success_) goto 9999
call psb_erractionrestore(err_act)
return
9999 call psb_error_handler(ictxt,err_act)
9999 call psb_error_handler(ctxt,err_act)
return
end subroutine psi_sswapdatav
@ -636,7 +640,7 @@ end subroutine psi_sswapdatav
!
!
!
subroutine psi_sswapidxv(iictxt,iicomm,flag,beta,y,idx, &
subroutine psi_sswapidxv(ctxt,icomm,flag,beta,y,idx, &
& totxch,totsnd,totrcv,work,info)
use psi_mod, psb_protect_name => psi_sswapidxv
@ -651,15 +655,17 @@ subroutine psi_sswapidxv(iictxt,iicomm,flag,beta,y,idx, &
include 'mpif.h'
#endif
integer(psb_ipk_), intent(in) :: iictxt,iicomm,flag
integer(psb_ipk_), intent(out) :: info
type(psb_ctxt_type), intent(in) :: ctxt
integer(psb_mpk_), intent(in) :: icomm
integer(psb_ipk_), intent(in) :: flag
integer(psb_ipk_), intent(out) :: info
real(psb_spk_) :: y(:), beta
real(psb_spk_), target :: work(:)
integer(psb_ipk_), intent(in) :: idx(:),totxch,totsnd, totrcv
! locals
integer(psb_mpk_) :: ictxt, icomm, np, me,&
& proc_to_comm, p2ptag, p2pstat(mpi_status_size), iret
integer(psb_ipk_) :: np, me
integer(psb_mpk_) :: proc_to_comm, p2ptag, p2pstat(mpi_status_size), iret
integer(psb_mpk_), allocatable, dimension(:) :: bsdidx, brvidx,&
& sdsz, rvsz, prcid, rvhd, sdhd
integer(psb_ipk_) :: nesd, nerv,&
@ -676,10 +682,7 @@ subroutine psi_sswapidxv(iictxt,iicomm,flag,beta,y,idx, &
info=psb_success_
name='psi_swap_datav'
call psb_erractionsave(err_act)
ictxt = iictxt
icomm = iicomm
call psb_info(ictxt,me,np)
call psb_info(ctxt,me,np)
if (np == -1) then
info=psb_err_context_error_
call psb_errpush(info,name)
@ -719,7 +722,7 @@ subroutine psi_sswapidxv(iictxt,iicomm,flag,beta,y,idx, &
proc_to_comm = idx(pnti+psb_proc_id_)
nerv = idx(pnti+psb_n_elem_recv_)
nesd = idx(pnti+nerv+psb_n_elem_send_)
prcid(proc_to_comm) = psb_get_mpi_rank(ictxt,proc_to_comm)
prcid(proc_to_comm) = psb_get_mpi_rank(ctxt,proc_to_comm)
brvidx(proc_to_comm) = rcv_pt
rvsz(proc_to_comm) = nerv
@ -799,14 +802,14 @@ subroutine psi_sswapidxv(iictxt,iicomm,flag,beta,y,idx, &
nesd = idx(pnti+nerv+psb_n_elem_send_)
if (proc_to_comm < me) then
if (nesd>0) call psb_snd(ictxt,&
if (nesd>0) call psb_snd(ctxt,&
& sndbuf(snd_pt:snd_pt+nesd-1), proc_to_comm)
if (nerv>0) call psb_rcv(ictxt,&
if (nerv>0) call psb_rcv(ctxt,&
& rcvbuf(rcv_pt:rcv_pt+nerv-1), proc_to_comm)
else if (proc_to_comm > me) then
if (nerv>0) call psb_rcv(ictxt,&
if (nerv>0) call psb_rcv(ctxt,&
& rcvbuf(rcv_pt:rcv_pt+nerv-1), proc_to_comm)
if (nesd>0) call psb_snd(ictxt,&
if (nesd>0) call psb_snd(ctxt,&
& sndbuf(snd_pt:snd_pt+nesd-1), proc_to_comm)
else if (proc_to_comm == me) then
if (nesd /= nerv) then
@ -833,7 +836,7 @@ subroutine psi_sswapidxv(iictxt,iicomm,flag,beta,y,idx, &
nerv = idx(pnti+psb_n_elem_recv_)
nesd = idx(pnti+nerv+psb_n_elem_send_)
prcid(i) = psb_get_mpi_rank(ictxt,proc_to_comm)
prcid(i) = psb_get_mpi_rank(ctxt,proc_to_comm)
if ((nerv>0).and.(proc_to_comm /= me)) then
p2ptag = psb_real_swap_tag
call mpi_irecv(rcvbuf(rcv_pt),nerv,&
@ -917,7 +920,7 @@ subroutine psi_sswapidxv(iictxt,iicomm,flag,beta,y,idx, &
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_snd(ictxt,&
if (nesd>0) call psb_snd(ctxt,&
& sndbuf(snd_pt:snd_pt+nesd-1), proc_to_comm)
rcv_pt = rcv_pt + nerv
snd_pt = snd_pt + nesd
@ -933,7 +936,7 @@ subroutine psi_sswapidxv(iictxt,iicomm,flag,beta,y,idx, &
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_rcv(ictxt,&
if (nerv>0) call psb_rcv(ctxt,&
& rcvbuf(rcv_pt:rcv_pt+nerv-1), proc_to_comm)
rcv_pt = rcv_pt + nerv
snd_pt = snd_pt + nesd
@ -980,7 +983,7 @@ subroutine psi_sswapidxv(iictxt,iicomm,flag,beta,y,idx, &
call psb_erractionrestore(err_act)
return
9999 call psb_error_handler(iictxt,err_act)
9999 call psb_error_handler(ctxt,err_act)
return
end subroutine psi_sswapidxv

@ -115,7 +115,9 @@ subroutine psi_sswaptran_vect(flag,beta,y,desc_a,work,info,data)
integer(psb_ipk_), optional :: data
! locals
integer(psb_ipk_) :: ictxt, np, me, icomm, idxs, idxr, totxch, err_act, data_
type(psb_ctxt_type) :: ctxt
integer(psb_mpk_) :: icomm
integer(psb_ipk_) :: np, me, idxs, idxr, totxch, err_act, data_
class(psb_i_base_vect_type), pointer :: d_vidx
character(len=20) :: name
@ -123,9 +125,9 @@ subroutine psi_sswaptran_vect(flag,beta,y,desc_a,work,info,data)
name='psi_swap_tranv'
call psb_erractionsave(err_act)
ictxt = desc_a%get_context()
ctxt = desc_a%get_context()
icomm = desc_a%get_mpic()
call psb_info(ictxt,me,np)
call psb_info(ctxt,me,np)
if (np == -1) then
info=psb_err_context_error_
call psb_errpush(info,name)
@ -150,19 +152,17 @@ subroutine psi_sswaptran_vect(flag,beta,y,desc_a,work,info,data)
goto 9999
end if
call psi_swaptran(ictxt,icomm,flag,beta,y,d_vidx,totxch,idxs,idxr,work,info)
call psi_swaptran(ctxt,icomm,flag,beta,y,d_vidx,totxch,idxs,idxr,work,info)
if (info /= psb_success_) goto 9999
call psb_erractionrestore(err_act)
return
9999 call psb_error_handler(ictxt,err_act)
9999 call psb_error_handler(ctxt,err_act)
return
end subroutine psi_sswaptran_vect
!
!
! Subroutine: psi_stran_vidx_vect
@ -176,7 +176,7 @@ end subroutine psi_sswaptran_vect
!
!
!
subroutine psi_stran_vidx_vect(iictxt,iicomm,flag,beta,y,idx,&
subroutine psi_stran_vidx_vect(ctxt,icomm,flag,beta,y,idx,&
& totxch,totsnd,totrcv,work,info)
use psi_mod, psb_protect_name => psi_stran_vidx_vect
@ -193,7 +193,9 @@ subroutine psi_stran_vidx_vect(iictxt,iicomm,flag,beta,y,idx,&
include 'mpif.h'
#endif
integer(psb_ipk_), intent(in) :: iictxt,iicomm,flag
type(psb_ctxt_type), intent(in) :: ctxt
integer(psb_mpk_), intent(in) :: icomm
integer(psb_ipk_), intent(in) :: flag
integer(psb_ipk_), intent(out) :: info
class(psb_s_base_vect_type) :: y
real(psb_spk_) :: beta
@ -202,8 +204,8 @@ subroutine psi_stran_vidx_vect(iictxt,iicomm,flag,beta,y,idx,&
integer(psb_ipk_), intent(in) :: totxch,totsnd, totrcv
! locals
integer(psb_mpk_) :: ictxt, icomm, np, me,&
& proc_to_comm, p2ptag, p2pstat(mpi_status_size), iret
integer(psb_ipk_) :: np, me
integer(psb_mpk_) :: proc_to_comm, p2ptag, p2pstat(mpi_status_size), iret
integer(psb_mpk_), allocatable :: prcid(:)
integer(psb_ipk_) :: nesd, nerv,&
& err_act, i, idx_pt, totsnd_, totrcv_,&
@ -216,10 +218,7 @@ subroutine psi_stran_vidx_vect(iictxt,iicomm,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)
call psb_info(ctxt,me,np)
if (np == -1) then
info=psb_err_context_error_
call psb_errpush(info,name)
@ -266,7 +265,7 @@ subroutine psi_stran_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_
prcid(i) = psb_get_mpi_rank(ictxt,proc_to_comm)
prcid(i) = psb_get_mpi_rank(ctxt,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,&
@ -422,7 +421,7 @@ subroutine psi_stran_vidx_vect(iictxt,iicomm,flag,beta,y,idx,&
call psb_erractionrestore(err_act)
return
9999 call psb_error_handler(iictxt,err_act)
9999 call psb_error_handler(ctxt,err_act)
return
@ -463,7 +462,9 @@ subroutine psi_sswaptran_multivect(flag,beta,y,desc_a,work,info,data)
integer(psb_ipk_), optional :: data
! locals
integer(psb_ipk_) :: ictxt, np, me, icomm, idxs, idxr, totxch, err_act, data_
type(psb_ctxt_type) :: ctxt
integer(psb_mpk_) :: icomm
integer(psb_ipk_) :: np, me, idxs, idxr, totxch, err_act, data_
class(psb_i_base_vect_type), pointer :: d_vidx
character(len=20) :: name
@ -471,9 +472,9 @@ subroutine psi_sswaptran_multivect(flag,beta,y,desc_a,work,info,data)
name='psi_swap_tranv'
call psb_erractionsave(err_act)
ictxt = desc_a%get_context()
ctxt = desc_a%get_context()
icomm = desc_a%get_mpic()
call psb_info(ictxt,me,np)
call psb_info(ctxt,me,np)
if (np == -1) then
info=psb_err_context_error_
call psb_errpush(info,name)
@ -498,13 +499,13 @@ subroutine psi_sswaptran_multivect(flag,beta,y,desc_a,work,info,data)
goto 9999
end if
call psi_swaptran(ictxt,icomm,flag,beta,y,d_vidx,totxch,idxs,idxr,work,info)
call psi_swaptran(ctxt,icomm,flag,beta,y,d_vidx,totxch,idxs,idxr,work,info)
if (info /= psb_success_) goto 9999
call psb_erractionrestore(err_act)
return
9999 call psb_error_handler(ictxt,err_act)
9999 call psb_error_handler(ctxt,err_act)
return
end subroutine psi_sswaptran_multivect
@ -523,7 +524,7 @@ subroutine psi_sswaptran_multivect(flag,beta,y,desc_a,work,info,data)
!
!
!
subroutine psi_stran_vidx_multivect(iictxt,iicomm,flag,beta,y,idx,&
subroutine psi_stran_vidx_multivect(ctxt,icomm,flag,beta,y,idx,&
& totxch,totsnd,totrcv,work,info)
use psi_mod, psb_protect_name => psi_stran_vidx_multivect
@ -540,7 +541,9 @@ subroutine psi_stran_vidx_multivect(iictxt,iicomm,flag,beta,y,idx,&
include 'mpif.h'
#endif
integer(psb_ipk_), intent(in) :: iictxt,iicomm,flag
type(psb_ctxt_type), intent(in) :: ctxt
integer(psb_mpk_), intent(in) :: icomm
integer(psb_ipk_), intent(in) :: flag
integer(psb_ipk_), intent(out) :: info
class(psb_s_base_multivect_type) :: y
real(psb_spk_) :: beta
@ -549,8 +552,8 @@ subroutine psi_stran_vidx_multivect(iictxt,iicomm,flag,beta,y,idx,&
integer(psb_ipk_), intent(in) :: totxch,totsnd, totrcv
! locals
integer(psb_mpk_) :: ictxt, icomm, np, me,&
& proc_to_comm, p2ptag, p2pstat(mpi_status_size), iret
integer(psb_ipk_) :: np, me
integer(psb_mpk_) :: proc_to_comm, p2ptag, p2pstat(mpi_status_size), iret
integer(psb_mpk_), allocatable :: prcid(:)
integer(psb_ipk_) :: nesd, nerv,&
& err_act, i, idx_pt, totsnd_, totrcv_,&
@ -563,10 +566,7 @@ subroutine psi_stran_vidx_multivect(iictxt,iicomm,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)
call psb_info(ctxt,me,np)
if (np == -1) then
info=psb_err_context_error_
call psb_errpush(info,name)
@ -613,7 +613,7 @@ subroutine psi_stran_vidx_multivect(iictxt,iicomm,flag,beta,y,idx,&
proc_to_comm = idx%v(pnti+psb_proc_id_)
nerv = idx%v(pnti+psb_n_elem_recv_)
nesd = idx%v(pnti+nerv+psb_n_elem_send_)
prcid(i) = psb_get_mpi_rank(ictxt,proc_to_comm)
prcid(i) = psb_get_mpi_rank(ctxt,proc_to_comm)
if ((nesd>0).and.(proc_to_comm /= me)) then
if (debug) write(*,*) me,'Posting receive from',prcid(i),snd_pt
call mpi_irecv(y%combuf(snd_pt),n*nesd,&
@ -773,7 +773,7 @@ subroutine psi_stran_vidx_multivect(iictxt,iicomm,flag,beta,y,idx,&
call psb_erractionrestore(err_act)
return
9999 call psb_error_handler(iictxt,err_act)
9999 call psb_error_handler(ctxt,err_act)
return

@ -110,7 +110,9 @@ subroutine psi_sswaptranm(flag,n,beta,y,desc_a,work,info,data)
integer(psb_ipk_), optional :: data
! locals
integer(psb_ipk_) :: ictxt, np, me, icomm, idxs, idxr, err_act, totxch, data_
type(psb_ctxt_type) :: ctxt
integer(psb_mpk_) :: icomm
integer(psb_ipk_) :: np, me, idxs, idxr, err_act, totxch, data_
integer(psb_ipk_), pointer :: d_idx(:)
character(len=20) :: name
@ -118,10 +120,10 @@ subroutine psi_sswaptranm(flag,n,beta,y,desc_a,work,info,data)
name='psi_swap_tran'
call psb_erractionsave(err_act)
ictxt = desc_a%get_context()
ctxt = desc_a%get_context()
icomm = desc_a%get_mpic()
call psb_info(ictxt,me,np)
call psb_info(ctxt,me,np)
if (np == -1) then
info=psb_err_context_error_
call psb_errpush(info,name)
@ -146,18 +148,18 @@ subroutine psi_sswaptranm(flag,n,beta,y,desc_a,work,info,data)
goto 9999
end if
call psi_swaptran(ictxt,icomm,flag,n,beta,y,d_idx,totxch,idxs,idxr,work,info)
call psi_swaptran(ctxt,icomm,flag,n,beta,y,d_idx,totxch,idxs,idxr,work,info)
if (info /= psb_success_) goto 9999
call psb_erractionrestore(err_act)
return
9999 call psb_error_handler(ictxt,err_act)
9999 call psb_error_handler(ctxt,err_act)
return
end subroutine psi_sswaptranm
subroutine psi_stranidxm(iictxt,iicomm,flag,n,beta,y,idx,&
subroutine psi_stranidxm(ctxt,icomm,flag,n,beta,y,idx,&
& totxch,totsnd,totrcv,work,info)
use psi_mod, psb_protect_name => psi_stranidxm
@ -172,15 +174,17 @@ subroutine psi_stranidxm(iictxt,iicomm,flag,n,beta,y,idx,&
include 'mpif.h'
#endif
integer(psb_ipk_), intent(in) :: iictxt,iicomm,flag,n
integer(psb_ipk_), intent(out) :: info
type(psb_ctxt_type), intent(in) :: ctxt
integer(psb_mpk_), intent(in) :: icomm
integer(psb_ipk_), intent(in) :: flag,n
integer(psb_ipk_), intent(out) :: info
real(psb_spk_) :: y(:,:), beta
real(psb_spk_), target :: work(:)
integer(psb_ipk_), intent(in) :: idx(:),totxch,totsnd, totrcv
! locals
integer(psb_mpk_) :: ictxt, icomm, np, me,&
& proc_to_comm, p2ptag, p2pstat(mpi_status_size), iret
integer(psb_ipk_) :: np, me
integer(psb_mpk_) :: proc_to_comm, p2ptag, p2pstat(mpi_status_size), iret
integer(psb_mpk_), allocatable, dimension(:) :: bsdidx, brvidx,&
& sdsz, rvsz, prcid, rvhd, sdhd
integer(psb_ipk_) :: nesd, nerv,&
@ -197,10 +201,7 @@ subroutine psi_stranidxm(iictxt,iicomm,flag,n,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)
call psb_info(ctxt,me,np)
if (np == -1) then
info=psb_err_context_error_
call psb_errpush(info,name)
@ -240,7 +241,7 @@ subroutine psi_stranidxm(iictxt,iicomm,flag,n,beta,y,idx,&
proc_to_comm = idx(pnti+psb_proc_id_)
nerv = idx(pnti+psb_n_elem_recv_)
nesd = idx(pnti+nerv+psb_n_elem_send_)
prcid(proc_to_comm) = psb_get_mpi_rank(ictxt,proc_to_comm)
prcid(proc_to_comm) = psb_get_mpi_rank(ctxt,proc_to_comm)
brvidx(proc_to_comm) = rcv_pt
rvsz(proc_to_comm) = n*nerv
@ -324,14 +325,14 @@ subroutine psi_stranidxm(iictxt,iicomm,flag,n,beta,y,idx,&
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(ctxt,&
& rcvbuf(rcv_pt:rcv_pt+n*nerv-1), proc_to_comm)
if (nesd>0) call psb_rcv(ictxt,&
if (nesd>0) call psb_rcv(ctxt,&
& 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(ctxt,&
& sndbuf(snd_pt:snd_pt+n*nesd-1), proc_to_comm)
if (nerv>0) call psb_snd(ictxt,&
if (nerv>0) call psb_snd(ctxt,&
& rcvbuf(rcv_pt:rcv_pt+n*nerv-1), proc_to_comm)
else if (proc_to_comm == me) then
if (nesd /= nerv) then
@ -358,7 +359,7 @@ subroutine psi_stranidxm(iictxt,iicomm,flag,n,beta,y,idx,&
proc_to_comm = idx(pnti+psb_proc_id_)
nerv = idx(pnti+psb_n_elem_recv_)
nesd = idx(pnti+nerv+psb_n_elem_send_)
prcid(i) = psb_get_mpi_rank(ictxt,proc_to_comm)
prcid(i) = psb_get_mpi_rank(ctxt,proc_to_comm)
if ((nesd>0).and.(proc_to_comm /= me)) then
p2ptag = psb_real_swap_tag
call mpi_irecv(sndbuf(snd_pt),n*nesd,&
@ -443,7 +444,7 @@ subroutine psi_stranidxm(iictxt,iicomm,flag,n,beta,y,idx,&
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(ctxt,&
& rcvbuf(rcv_pt:rcv_pt+n*nerv-1), proc_to_comm)
rcv_pt = rcv_pt + n*nerv
snd_pt = snd_pt + n*nesd
@ -460,7 +461,7 @@ subroutine psi_stranidxm(iictxt,iicomm,flag,n,beta,y,idx,&
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(ctxt,&
& sndbuf(snd_pt:snd_pt+n*nesd-1), proc_to_comm)
rcv_pt = rcv_pt + n*nerv
snd_pt = snd_pt + n*nesd
@ -508,7 +509,7 @@ subroutine psi_stranidxm(iictxt,iicomm,flag,n,beta,y,idx,&
call psb_erractionrestore(err_act)
return
9999 call psb_error_handler(iictxt,err_act)
9999 call psb_error_handler(ctxt,err_act)
return
end subroutine psi_stranidxm
@ -592,7 +593,9 @@ subroutine psi_sswaptranv(flag,beta,y,desc_a,work,info,data)
integer(psb_ipk_), optional :: data
! locals
integer(psb_ipk_) :: ictxt, np, me, icomm, idxs, idxr, totxch, err_act, data_
type(psb_ctxt_type) :: ctxt
integer(psb_mpk_) :: icomm
integer(psb_ipk_) :: np, me, idxs, idxr, totxch, err_act, data_
integer(psb_ipk_), pointer :: d_idx(:)
character(len=20) :: name
@ -600,9 +603,9 @@ subroutine psi_sswaptranv(flag,beta,y,desc_a,work,info,data)
name='psi_swap_tranv'
call psb_erractionsave(err_act)
ictxt = desc_a%get_context()
ctxt = desc_a%get_context()
icomm = desc_a%get_mpic()
call psb_info(ictxt,me,np)
call psb_info(ctxt,me,np)
if (np == -1) then
info=psb_err_context_error_
call psb_errpush(info,name)
@ -627,13 +630,13 @@ subroutine psi_sswaptranv(flag,beta,y,desc_a,work,info,data)
goto 9999
end if
call psi_swaptran(ictxt,icomm,flag,beta,y,d_idx,totxch,idxs,idxr,work,info)
call psi_swaptran(ctxt,icomm,flag,beta,y,d_idx,totxch,idxs,idxr,work,info)
if (info /= psb_success_) goto 9999
call psb_erractionrestore(err_act)
return
9999 call psb_error_handler(ictxt,err_act)
9999 call psb_error_handler(ctxt,err_act)
return
end subroutine psi_sswaptranv
@ -649,7 +652,7 @@ end subroutine psi_sswaptranv
!
!
!
subroutine psi_stranidxv(iictxt,iicomm,flag,beta,y,idx,&
subroutine psi_stranidxv(ctxt,icomm,flag,beta,y,idx,&
& totxch,totsnd,totrcv,work,info)
use psi_mod, psb_protect_name => psi_stranidxv
@ -664,15 +667,17 @@ subroutine psi_stranidxv(iictxt,iicomm,flag,beta,y,idx,&
include 'mpif.h'
#endif
integer(psb_ipk_), intent(in) :: iictxt,iicomm,flag
integer(psb_ipk_), intent(out) :: info
type(psb_ctxt_type), intent(in) :: ctxt
integer(psb_mpk_), intent(in) :: icomm
integer(psb_ipk_), intent(in) :: flag
integer(psb_ipk_), intent(out) :: info
real(psb_spk_) :: y(:), beta
real(psb_spk_), target :: work(:)
integer(psb_ipk_), intent(in) :: idx(:),totxch,totsnd, totrcv
! locals
integer(psb_mpk_) :: ictxt, icomm, np, me,&
& proc_to_comm, p2ptag, p2pstat(mpi_status_size), iret
integer(psb_ipk_) :: np, me
integer(psb_mpk_) :: proc_to_comm, p2ptag, p2pstat(mpi_status_size), iret
integer(psb_mpk_), allocatable, dimension(:) :: bsdidx, brvidx,&
& sdsz, rvsz, prcid, rvhd, sdhd
integer(psb_ipk_) :: nesd, nerv,&
@ -689,10 +694,7 @@ subroutine psi_stranidxv(iictxt,iicomm,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)
call psb_info(ctxt,me,np)
if (np == -1) then
info=psb_err_context_error_
call psb_errpush(info,name)
@ -732,7 +734,7 @@ subroutine psi_stranidxv(iictxt,iicomm,flag,beta,y,idx,&
proc_to_comm = idx(pnti+psb_proc_id_)
nerv = idx(pnti+psb_n_elem_recv_)
nesd = idx(pnti+nerv+psb_n_elem_send_)
prcid(proc_to_comm) = psb_get_mpi_rank(ictxt,proc_to_comm)
prcid(proc_to_comm) = psb_get_mpi_rank(ctxt,proc_to_comm)
brvidx(proc_to_comm) = rcv_pt
rvsz(proc_to_comm) = nerv
@ -817,14 +819,14 @@ subroutine psi_stranidxv(iictxt,iicomm,flag,beta,y,idx,&
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(ctxt,&
& rcvbuf(rcv_pt:rcv_pt+nerv-1), proc_to_comm)
if (nesd>0) call psb_rcv(ictxt,&
if (nesd>0) call psb_rcv(ctxt,&
& 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(ctxt,&
& sndbuf(snd_pt:snd_pt+nesd-1), proc_to_comm)
if (nerv>0) call psb_snd(ictxt,&
if (nerv>0) call psb_snd(ctxt,&
& rcvbuf(rcv_pt:rcv_pt+nerv-1), proc_to_comm)
else if (proc_to_comm == me) then
if (nesd /= nerv) then
@ -850,7 +852,7 @@ subroutine psi_stranidxv(iictxt,iicomm,flag,beta,y,idx,&
proc_to_comm = idx(pnti+psb_proc_id_)
nerv = idx(pnti+psb_n_elem_recv_)
nesd = idx(pnti+nerv+psb_n_elem_send_)
prcid(i) = psb_get_mpi_rank(ictxt,proc_to_comm)
prcid(i) = psb_get_mpi_rank(ctxt,proc_to_comm)
if ((nesd>0).and.(proc_to_comm /= me)) then
p2ptag = psb_real_swap_tag
call mpi_irecv(sndbuf(snd_pt),nesd,&
@ -933,7 +935,7 @@ subroutine psi_stranidxv(iictxt,iicomm,flag,beta,y,idx,&
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(ctxt,&
& rcvbuf(rcv_pt:rcv_pt+nerv-1), proc_to_comm)
rcv_pt = rcv_pt + nerv
snd_pt = snd_pt + nesd
@ -949,7 +951,7 @@ subroutine psi_stranidxv(iictxt,iicomm,flag,beta,y,idx,&
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(ctxt,&
& sndbuf(snd_pt:snd_pt+nesd-1), proc_to_comm)
rcv_pt = rcv_pt + nerv
snd_pt = snd_pt + nesd
@ -996,7 +998,7 @@ subroutine psi_stranidxv(iictxt,iicomm,flag,beta,y,idx,&
call psb_erractionrestore(err_act)
return
9999 call psb_error_handler(iictxt,err_act)
9999 call psb_error_handler(ctxt,err_act)
return
end subroutine psi_stranidxv

@ -47,7 +47,8 @@ subroutine psi_zovrl_restr_vect(x,xs,desc_a,info)
integer(psb_ipk_), intent(out) :: info
! locals
integer(psb_ipk_) :: ictxt, np, me, err_act, i, idx, isz
type(psb_ctxt_type) :: ctxt
integer(psb_ipk_) :: np, me, err_act, i, idx, isz
character(len=20) :: name, ch_err
name='psi_zovrl_restr_vect'
@ -56,8 +57,8 @@ subroutine psi_zovrl_restr_vect(x,xs,desc_a,info)
if (psb_errstatus_fatal()) then
info = psb_err_internal_error_ ; goto 9999
end if
ictxt = desc_a%get_context()
call psb_info(ictxt, me, np)
ctxt = desc_a%get_context()
call psb_info(ctxt, me, np)
if (np == -1) then
info = psb_err_context_error_
call psb_errpush(info,name)
@ -71,7 +72,7 @@ subroutine psi_zovrl_restr_vect(x,xs,desc_a,info)
call psb_erractionrestore(err_act)
return
9999 call psb_error_handler(ictxt,err_act)
9999 call psb_error_handler(ctxt,err_act)
return
end subroutine psi_zovrl_restr_vect
@ -89,7 +90,8 @@ subroutine psi_zovrl_restr_multivect(x,xs,desc_a,info)
integer(psb_ipk_), intent(out) :: info
! locals
integer(psb_ipk_) :: ictxt, np, me, err_act, i, idx, isz, nc
type(psb_ctxt_type) :: ctxt
integer(psb_ipk_) :: np, me, err_act, i, idx, isz, nc
character(len=20) :: name, ch_err
name='psi_zovrl_restr_mv'
@ -98,8 +100,8 @@ subroutine psi_zovrl_restr_multivect(x,xs,desc_a,info)
if (psb_errstatus_fatal()) then
info = psb_err_internal_error_ ; goto 9999
end if
ictxt = desc_a%get_context()
call psb_info(ictxt, me, np)
ctxt = desc_a%get_context()
call psb_info(ctxt, me, np)
if (np == -1) then
info = psb_err_context_error_
call psb_errpush(info,name)
@ -112,7 +114,7 @@ subroutine psi_zovrl_restr_multivect(x,xs,desc_a,info)
call psb_erractionrestore(err_act)
return
9999 call psb_error_handler(ictxt,err_act)
9999 call psb_error_handler(ctxt,err_act)
return
end subroutine psi_zovrl_restr_multivect

@ -45,7 +45,8 @@ subroutine psi_zovrl_restrr1(x,xs,desc_a,info)
integer(psb_ipk_), intent(out) :: info
! locals
integer(psb_ipk_) :: ictxt, np, me, err_act, i, idx, isz
type(psb_ctxt_type) :: ctxt
integer(psb_ipk_) :: np, me, err_act, i, idx, isz
character(len=20) :: name, ch_err
name='psi_zovrl_restrr1'
@ -54,8 +55,8 @@ subroutine psi_zovrl_restrr1(x,xs,desc_a,info)
if (psb_errstatus_fatal()) then
info = psb_err_internal_error_ ; goto 9999
end if
ictxt = desc_a%get_context()
call psb_info(ictxt, me, np)
ctxt = desc_a%get_context()
call psb_info(ctxt, me, np)
if (np == -1) then
info = psb_err_context_error_
call psb_errpush(info,name)
@ -72,7 +73,7 @@ subroutine psi_zovrl_restrr1(x,xs,desc_a,info)
call psb_erractionrestore(err_act)
return
9999 call psb_error_handler(ictxt,err_act)
9999 call psb_error_handler(ctxt,err_act)
return
end subroutine psi_zovrl_restrr1
@ -88,7 +89,8 @@ subroutine psi_zovrl_restrr2(x,xs,desc_a,info)
integer(psb_ipk_), intent(out) :: info
! locals
integer(psb_ipk_) :: ictxt, np, me, err_act, i, idx, isz
type(psb_ctxt_type) :: ctxt
integer(psb_ipk_) :: np, me, err_act, i, idx, isz
character(len=20) :: name, ch_err
name='psi_zovrl_restrr2'
@ -97,8 +99,8 @@ subroutine psi_zovrl_restrr2(x,xs,desc_a,info)
if (psb_errstatus_fatal()) then
info = psb_err_internal_error_ ; goto 9999
end if
ictxt = desc_a%get_context()
call psb_info(ictxt, me, np)
ctxt = desc_a%get_context()
call psb_info(ctxt, me, np)
if (np == -1) then
info = psb_err_context_error_
call psb_errpush(info,name)
@ -122,7 +124,7 @@ subroutine psi_zovrl_restrr2(x,xs,desc_a,info)
call psb_erractionrestore(err_act)
return
9999 call psb_error_handler(ictxt,err_act)
9999 call psb_error_handler(ctxt,err_act)
return
end subroutine psi_zovrl_restrr2

@ -47,7 +47,8 @@ subroutine psi_zovrl_save_vect(x,xs,desc_a,info)
integer(psb_ipk_), intent(out) :: info
! locals
integer(psb_ipk_) :: ictxt, np, me, err_act, i, idx, isz
type(psb_ctxt_type) :: ctxt
integer(psb_ipk_) :: np, me, err_act, i, idx, isz
character(len=20) :: name, ch_err
name='psi_dovrl_saver1'
@ -56,8 +57,8 @@ subroutine psi_zovrl_save_vect(x,xs,desc_a,info)
if (psb_errstatus_fatal()) then
info = psb_err_internal_error_ ; goto 9999
end if
ictxt = desc_a%get_context()
call psb_info(ictxt, me, np)
ctxt = desc_a%get_context()
call psb_info(ctxt, me, np)
if (np == -1) then
info = psb_err_context_error_
call psb_errpush(info,name)
@ -77,13 +78,11 @@ subroutine psi_zovrl_save_vect(x,xs,desc_a,info)
call psb_erractionrestore(err_act)
return
9999 call psb_error_handler(ictxt,err_act)
9999 call psb_error_handler(ctxt,err_act)
return
end subroutine psi_zovrl_save_vect
subroutine psi_zovrl_save_multivect(x,xs,desc_a,info)
use psi_mod, psi_protect_name => psi_zovrl_save_multivect
use psb_realloc_mod
@ -97,7 +96,8 @@ subroutine psi_zovrl_save_multivect(x,xs,desc_a,info)
integer(psb_ipk_), intent(out) :: info
! locals
integer(psb_ipk_) :: ictxt, np, me, err_act, i, idx, isz, nc
type(psb_ctxt_type) :: ctxt
integer(psb_ipk_) :: np, me, err_act, i, idx, isz, nc
character(len=20) :: name, ch_err
name='psi_dovrl_saver1'
@ -106,8 +106,8 @@ subroutine psi_zovrl_save_multivect(x,xs,desc_a,info)
if (psb_errstatus_fatal()) then
info = psb_err_internal_error_ ; goto 9999
end if
ictxt = desc_a%get_context()
call psb_info(ictxt, me, np)
ctxt = desc_a%get_context()
call psb_info(ctxt, me, np)
if (np == -1) then
info = psb_err_context_error_
call psb_errpush(info,name)
@ -128,7 +128,7 @@ subroutine psi_zovrl_save_multivect(x,xs,desc_a,info)
call psb_erractionrestore(err_act)
return
9999 call psb_error_handler(ictxt,err_act)
9999 call psb_error_handler(ctxt,err_act)
return
end subroutine psi_zovrl_save_multivect

@ -47,7 +47,8 @@ subroutine psi_zovrl_saver1(x,xs,desc_a,info)
integer(psb_ipk_), intent(out) :: info
! locals
integer(psb_ipk_) :: ictxt, np, me, err_act, i, idx, isz
type(psb_ctxt_type) :: ctxt
integer(psb_ipk_) :: np, me, err_act, i, idx, isz
character(len=20) :: name, ch_err
name='psi_zovrl_saver1'
@ -56,8 +57,8 @@ subroutine psi_zovrl_saver1(x,xs,desc_a,info)
if (psb_errstatus_fatal()) then
info = psb_err_internal_error_ ; goto 9999
end if
ictxt = desc_a%get_context()
call psb_info(ictxt, me, np)
ctxt = desc_a%get_context()
call psb_info(ctxt, me, np)
if (np == -1) then
info = psb_err_context_error_
call psb_errpush(info,name)
@ -80,7 +81,7 @@ subroutine psi_zovrl_saver1(x,xs,desc_a,info)
call psb_erractionrestore(err_act)
return
9999 call psb_error_handler(ictxt,err_act)
9999 call psb_error_handler(ctxt,err_act)
return
end subroutine psi_zovrl_saver1
@ -99,7 +100,8 @@ subroutine psi_zovrl_saver2(x,xs,desc_a,info)
integer(psb_ipk_), intent(out) :: info
! locals
integer(psb_ipk_) :: ictxt, np, me, err_act, i, idx, isz, nc
type(psb_ctxt_type) :: ctxt
integer(psb_ipk_) :: np, me, err_act, i, idx, isz, nc
character(len=20) :: name, ch_err
name='psi_zovrl_saver2'
@ -108,8 +110,8 @@ subroutine psi_zovrl_saver2(x,xs,desc_a,info)
if (psb_errstatus_fatal()) then
info = psb_err_internal_error_ ; goto 9999
end if
ictxt = desc_a%get_context()
call psb_info(ictxt, me, np)
ctxt = desc_a%get_context()
call psb_info(ctxt, me, np)
if (np == -1) then
info = psb_err_context_error_
call psb_errpush(info,name)
@ -133,7 +135,7 @@ subroutine psi_zovrl_saver2(x,xs,desc_a,info)
call psb_erractionrestore(err_act)
return
9999 call psb_error_handler(ictxt,err_act)
9999 call psb_error_handler(ctxt,err_act)
return
end subroutine psi_zovrl_saver2

@ -32,7 +32,7 @@
! Subroutine: psi_zovrl_update
! These subroutines update the overlap region of a vector; they are used
! for the transpose matrix-vector product when there is a nonempty overlap,
! or for the application of Additive Schwarz preconditioners.
! or for the application of Additive Schwarz preconditioners.
!
!
!
@ -50,7 +50,8 @@ subroutine psi_zovrl_upd_vect(x,desc_a,update,info)
! locals
complex(psb_dpk_), allocatable :: xs(:)
integer(psb_ipk_) :: ictxt, np, me, err_act, i, idx, ndm, nx
type(psb_ctxt_type) :: ctxt
integer(psb_ipk_) :: np, me, err_act, i, idx, ndm, nx
integer(psb_ipk_) :: ierr(5)
character(len=20) :: name, ch_err
@ -61,8 +62,8 @@ subroutine psi_zovrl_upd_vect(x,desc_a,update,info)
if (psb_errstatus_fatal()) then
info = psb_err_internal_error_ ; goto 9999
end if
ictxt = desc_a%get_context()
call psb_info(ictxt, me, np)
ctxt = desc_a%get_context()
call psb_info(ctxt, me, np)
if (np == -1) then
info = psb_err_context_error_
call psb_errpush(info,name)
@ -112,7 +113,7 @@ subroutine psi_zovrl_upd_vect(x,desc_a,update,info)
call psb_erractionrestore(err_act)
return
9999 call psb_error_handler(ictxt,err_act)
9999 call psb_error_handler(ctxt,err_act)
return
end subroutine psi_zovrl_upd_vect
@ -131,7 +132,8 @@ subroutine psi_zovrl_upd_multivect(x,desc_a,update,info)
! locals
complex(psb_dpk_), allocatable :: xs(:,:)
integer(psb_ipk_) :: ictxt, np, me, err_act, i, idx, ndm, nx, nc
type(psb_ctxt_type) :: ctxt
integer(psb_ipk_) :: np, me, err_act, i, idx, ndm, nx, nc
integer(psb_ipk_) :: ierr(5)
character(len=20) :: name, ch_err
@ -142,8 +144,8 @@ subroutine psi_zovrl_upd_multivect(x,desc_a,update,info)
if (psb_errstatus_fatal()) then
info = psb_err_internal_error_ ; goto 9999
end if
ictxt = desc_a%get_context()
call psb_info(ictxt, me, np)
ctxt = desc_a%get_context()
call psb_info(ctxt, me, np)
if (np == -1) then
info = psb_err_context_error_
call psb_errpush(info,name)
@ -194,7 +196,7 @@ subroutine psi_zovrl_upd_multivect(x,desc_a,update,info)
call psb_erractionrestore(err_act)
return
9999 call psb_error_handler(ictxt,err_act)
9999 call psb_error_handler(ctxt,err_act)
return
end subroutine psi_zovrl_upd_multivect

@ -46,7 +46,8 @@ subroutine psi_zovrl_updr1(x,desc_a,update,info)
integer(psb_ipk_), intent(out) :: info
! locals
integer(psb_ipk_) :: ictxt, np, me, err_act, i, idx, ndm
type(psb_ctxt_type) :: ctxt
integer(psb_ipk_) :: np, me, err_act, i, idx, ndm
integer(psb_ipk_) :: ierr(5)
character(len=20) :: name, ch_err
@ -56,8 +57,8 @@ subroutine psi_zovrl_updr1(x,desc_a,update,info)
if (psb_errstatus_fatal()) then
info = psb_err_internal_error_ ; goto 9999
end if
ictxt = desc_a%get_context()
call psb_info(ictxt, me, np)
ctxt = desc_a%get_context()
call psb_info(ctxt, me, np)
if (np == -1) then
info = psb_err_context_error_
call psb_errpush(info,name)
@ -98,12 +99,11 @@ subroutine psi_zovrl_updr1(x,desc_a,update,info)
call psb_erractionrestore(err_act)
return
9999 call psb_error_handler(ictxt,err_act)
9999 call psb_error_handler(ctxt,err_act)
return
end subroutine psi_zovrl_updr1
subroutine psi_zovrl_updr2(x,desc_a,update,info)
use psi_mod, psi_protect_name => psi_zovrl_updr2
@ -115,7 +115,8 @@ subroutine psi_zovrl_updr2(x,desc_a,update,info)
integer(psb_ipk_), intent(out) :: info
! locals
integer(psb_ipk_) :: ictxt, np, me, err_act, i, idx, ndm
type(psb_ctxt_type) :: ctxt
integer(psb_ipk_) :: np, me, err_act, i, idx, ndm
integer(psb_ipk_) :: ierr(5)
character(len=20) :: name, ch_err
@ -125,8 +126,8 @@ subroutine psi_zovrl_updr2(x,desc_a,update,info)
if (psb_errstatus_fatal()) then
info = psb_err_internal_error_ ; goto 9999
end if
ictxt = desc_a%get_context()
call psb_info(ictxt, me, np)
ctxt = desc_a%get_context()
call psb_info(ctxt, me, np)
if (np == -1) then
info = psb_err_context_error_
call psb_errpush(info,name)
@ -167,7 +168,7 @@ subroutine psi_zovrl_updr2(x,desc_a,update,info)
call psb_erractionrestore(err_act)
return
9999 call psb_error_handler(ictxt,err_act)
9999 call psb_error_handler(ctxt,err_act)
return
end subroutine psi_zovrl_updr2

@ -113,7 +113,9 @@ subroutine psi_zswapdata_vect(flag,beta,y,desc_a,work,info,data)
integer(psb_ipk_), optional :: data
! locals
integer(psb_ipk_) :: ictxt, np, me, icomm, idxs, idxr, totxch, data_, err_act
type(psb_ctxt_type) :: ctxt
integer(psb_mpk_) :: icomm
integer(psb_ipk_) :: np, me, idxs, idxr, totxch, data_, err_act
class(psb_i_base_vect_type), pointer :: d_vidx
character(len=20) :: name
@ -121,9 +123,9 @@ subroutine psi_zswapdata_vect(flag,beta,y,desc_a,work,info,data)
name='psi_swap_datav'
call psb_erractionsave(err_act)
ictxt = desc_a%get_context()
ctxt = desc_a%get_context()
icomm = desc_a%get_mpic()
call psb_info(ictxt,me,np)
call psb_info(ctxt,me,np)
if (np == -1) then
info=psb_err_context_error_
call psb_errpush(info,name)
@ -148,13 +150,13 @@ subroutine psi_zswapdata_vect(flag,beta,y,desc_a,work,info,data)
goto 9999
end if
call psi_swapdata(ictxt,icomm,flag,beta,y,d_vidx,totxch,idxs,idxr,work,info)
call psi_swapdata(ctxt,icomm,flag,beta,y,d_vidx,totxch,idxs,idxr,work,info)
if (info /= psb_success_) goto 9999
call psb_erractionrestore(err_act)
return
9999 call psb_error_handler(ictxt,err_act)
9999 call psb_error_handler(ctxt,err_act)
return
end subroutine psi_zswapdata_vect
@ -173,7 +175,7 @@ end subroutine psi_zswapdata_vect
!
!
!
subroutine psi_zswap_vidx_vect(iictxt,iicomm,flag,beta,y,idx, &
subroutine psi_zswap_vidx_vect(ctxt,icomm,flag,beta,y,idx, &
& totxch,totsnd,totrcv,work,info)
use psi_mod, psb_protect_name => psi_zswap_vidx_vect
@ -190,8 +192,10 @@ subroutine psi_zswap_vidx_vect(iictxt,iicomm,flag,beta,y,idx, &
include 'mpif.h'
#endif
integer(psb_ipk_), intent(in) :: iictxt,iicomm,flag
integer(psb_ipk_), intent(out) :: info
type(psb_ctxt_type), intent(in) :: ctxt
integer(psb_mpk_), intent(in) :: icomm
integer(psb_ipk_), intent(in) :: flag
integer(psb_ipk_), intent(out) :: info
class(psb_z_base_vect_type) :: y
complex(psb_dpk_) :: beta
complex(psb_dpk_), target :: work(:)
@ -199,8 +203,8 @@ subroutine psi_zswap_vidx_vect(iictxt,iicomm,flag,beta,y,idx, &
integer(psb_ipk_), intent(in) :: totxch,totsnd, totrcv
! locals
integer(psb_mpk_) :: ictxt, icomm, np, me,&
& proc_to_comm, p2ptag, p2pstat(mpi_status_size), iret
integer(psb_ipk_) :: np, me
integer(psb_mpk_) :: proc_to_comm, p2ptag, p2pstat(mpi_status_size), iret
integer(psb_mpk_), allocatable :: prcid(:)
integer(psb_ipk_) :: nesd, nerv,&
& err_act, i, idx_pt, totsnd_, totrcv_,&
@ -213,10 +217,7 @@ subroutine psi_zswap_vidx_vect(iictxt,iicomm,flag,beta,y,idx, &
info=psb_success_
name='psi_swap_datav'
call psb_erractionsave(err_act)
ictxt = iictxt
icomm = iicomm
call psb_info(ictxt,me,np)
call psb_info(ctxt,me,np)
if (np == -1) then
info=psb_err_context_error_
call psb_errpush(info,name)
@ -260,7 +261,7 @@ subroutine psi_zswap_vidx_vect(iictxt,iicomm,flag,beta,y,idx, &
nesd = idx%v(pnti+nerv+psb_n_elem_send_)
rcv_pt = 1+pnti+psb_n_elem_recv_
prcid(i) = psb_get_mpi_rank(ictxt,proc_to_comm)
prcid(i) = psb_get_mpi_rank(ctxt,proc_to_comm)
if ((nerv>0).and.(proc_to_comm /= me)) then
if (debug) write(*,*) me,'Posting receive from',prcid(i),rcv_pt
p2ptag = psb_dcomplex_swap_tag
@ -413,7 +414,7 @@ subroutine psi_zswap_vidx_vect(iictxt,iicomm,flag,beta,y,idx, &
call psb_erractionrestore(err_act)
return
9999 call psb_error_handler(iictxt,err_act)
9999 call psb_error_handler(ctxt,err_act)
return
end subroutine psi_zswap_vidx_vect
@ -450,7 +451,9 @@ subroutine psi_zswapdata_multivect(flag,beta,y,desc_a,work,info,data)
integer(psb_ipk_), optional :: data
! locals
integer(psb_ipk_) :: ictxt, np, me, icomm, idxs, idxr, totxch, data_, err_act
type(psb_ctxt_type) :: ctxt
integer(psb_mpk_) :: icomm
integer(psb_ipk_) :: np, me, idxs, idxr, totxch, data_, err_act
class(psb_i_base_vect_type), pointer :: d_vidx
character(len=20) :: name
@ -458,9 +461,9 @@ subroutine psi_zswapdata_multivect(flag,beta,y,desc_a,work,info,data)
name='psi_swap_datav'
call psb_erractionsave(err_act)
ictxt = desc_a%get_context()
ctxt = desc_a%get_context()
icomm = desc_a%get_mpic()
call psb_info(ictxt,me,np)
call psb_info(ctxt,me,np)
if (np == -1) then
info=psb_err_context_error_
call psb_errpush(info,name)
@ -485,13 +488,13 @@ subroutine psi_zswapdata_multivect(flag,beta,y,desc_a,work,info,data)
goto 9999
end if
call psi_swapdata(ictxt,icomm,flag,beta,y,d_vidx,totxch,idxs,idxr,work,info)
call psi_swapdata(ctxt,icomm,flag,beta,y,d_vidx,totxch,idxs,idxr,work,info)
if (info /= psb_success_) goto 9999
call psb_erractionrestore(err_act)
return
9999 call psb_error_handler(ictxt,err_act)
9999 call psb_error_handler(ctxt,err_act)
return
end subroutine psi_zswapdata_multivect
@ -510,7 +513,7 @@ end subroutine psi_zswapdata_multivect
!
!
!
subroutine psi_zswap_vidx_multivect(iictxt,iicomm,flag,beta,y,idx, &
subroutine psi_zswap_vidx_multivect(ctxt,icomm,flag,beta,y,idx, &
& totxch,totsnd,totrcv,work,info)
use psi_mod, psb_protect_name => psi_zswap_vidx_multivect
@ -527,8 +530,10 @@ subroutine psi_zswap_vidx_multivect(iictxt,iicomm,flag,beta,y,idx, &
include 'mpif.h'
#endif
integer(psb_ipk_), intent(in) :: iictxt,iicomm,flag
integer(psb_ipk_), intent(out) :: info
type(psb_ctxt_type), intent(in) :: ctxt
integer(psb_mpk_), intent(in) :: icomm
integer(psb_ipk_), intent(in) :: flag
integer(psb_ipk_), intent(out) :: info
class(psb_z_base_multivect_type) :: y
complex(psb_dpk_) :: beta
complex(psb_dpk_), target :: work(:)
@ -536,8 +541,8 @@ subroutine psi_zswap_vidx_multivect(iictxt,iicomm,flag,beta,y,idx, &
integer(psb_ipk_), intent(in) :: totxch,totsnd, totrcv
! locals
integer(psb_mpk_) :: ictxt, icomm, np, me,&
& proc_to_comm, p2ptag, p2pstat(mpi_status_size), iret
integer(psb_ipk_) :: np, me
integer(psb_mpk_) :: proc_to_comm, p2ptag, p2pstat(mpi_status_size), iret
integer(psb_mpk_), allocatable :: prcid(:)
integer(psb_ipk_) :: nesd, nerv,&
& err_act, i, idx_pt, totsnd_, totrcv_,&
@ -550,10 +555,7 @@ subroutine psi_zswap_vidx_multivect(iictxt,iicomm,flag,beta,y,idx, &
info=psb_success_
name='psi_swap_datav'
call psb_erractionsave(err_act)
ictxt = iictxt
icomm = iicomm
call psb_info(ictxt,me,np)
call psb_info(ctxt,me,np)
if (np == -1) then
info=psb_err_context_error_
call psb_errpush(info,name)
@ -599,7 +601,7 @@ subroutine psi_zswap_vidx_multivect(iictxt,iicomm,flag,beta,y,idx, &
proc_to_comm = idx%v(pnti+psb_proc_id_)
nerv = idx%v(pnti+psb_n_elem_recv_)
nesd = idx%v(pnti+nerv+psb_n_elem_send_)
prcid(i) = psb_get_mpi_rank(ictxt,proc_to_comm)
prcid(i) = psb_get_mpi_rank(ctxt,proc_to_comm)
if ((nerv>0).and.(proc_to_comm /= me)) then
if (debug) write(*,*) me,'Posting receive from',prcid(i),rcv_pt
p2ptag = psb_dcomplex_swap_tag
@ -756,7 +758,7 @@ subroutine psi_zswap_vidx_multivect(iictxt,iicomm,flag,beta,y,idx, &
call psb_erractionrestore(err_act)
return
9999 call psb_error_handler(iictxt,err_act)
9999 call psb_error_handler(ctxt,err_act)
return
end subroutine psi_zswap_vidx_multivect

@ -106,7 +106,9 @@ subroutine psi_zswapdatam(flag,n,beta,y,desc_a,work,info,data)
integer(psb_ipk_), optional :: data
! locals
integer(psb_ipk_) :: ictxt, np, me, icomm, idxs, idxr, totxch, data_, err_act
type(psb_ctxt_type) :: ctxt
integer(psb_mpk_) :: icomm
integer(psb_ipk_) :: np, me, idxs, idxr, totxch, data_, err_act
integer(psb_ipk_), pointer :: d_idx(:)
character(len=20) :: name
@ -114,9 +116,9 @@ subroutine psi_zswapdatam(flag,n,beta,y,desc_a,work,info,data)
name='psi_swap_data'
call psb_erractionsave(err_act)
ictxt = desc_a%get_context()
ctxt = desc_a%get_context()
icomm = desc_a%get_mpic()
call psb_info(ictxt,me,np)
call psb_info(ctxt,me,np)
if (np == -1) then
info=psb_err_context_error_
call psb_errpush(info,name)
@ -141,18 +143,18 @@ subroutine psi_zswapdatam(flag,n,beta,y,desc_a,work,info,data)
goto 9999
end if
call psi_swapdata(ictxt,icomm,flag,n,beta,y,d_idx,totxch,idxs,idxr,work,info)
call psi_swapdata(ctxt,icomm,flag,n,beta,y,d_idx,totxch,idxs,idxr,work,info)
if (info /= psb_success_) goto 9999
call psb_erractionrestore(err_act)
return
9999 call psb_error_handler(ictxt,err_act)
9999 call psb_error_handler(ctxt,err_act)
return
end subroutine psi_zswapdatam
subroutine psi_zswapidxm(iictxt,iicomm,flag,n,beta,y,idx, &
subroutine psi_zswapidxm(ctxt,icomm,flag,n,beta,y,idx, &
& totxch,totsnd,totrcv,work,info)
use psi_mod, psb_protect_name => psi_zswapidxm
@ -167,15 +169,18 @@ subroutine psi_zswapidxm(iictxt,iicomm,flag,n,beta,y,idx, &
include 'mpif.h'
#endif
integer(psb_ipk_), intent(in) :: iictxt,iicomm,flag,n
integer(psb_ipk_), intent(out) :: info
type(psb_ctxt_type), intent(in) :: ctxt
integer(psb_mpk_), intent(in) :: icomm
integer(psb_ipk_), intent(in) :: 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_mpk_) :: ictxt, icomm, np, me,&
& proc_to_comm, p2ptag, p2pstat(mpi_status_size), iret
integer(psb_ipk_) :: np, me
integer(psb_mpk_) :: proc_to_comm, p2ptag, p2pstat(mpi_status_size), iret
integer(psb_mpk_), allocatable, dimension(:) :: bsdidx, brvidx,&
& sdsz, rvsz, prcid, rvhd, sdhd
integer(psb_ipk_) :: nesd, nerv,&
@ -192,10 +197,7 @@ subroutine psi_zswapidxm(iictxt,iicomm,flag,n,beta,y,idx, &
info=psb_success_
name='psi_swap_data'
call psb_erractionsave(err_act)
ictxt = iictxt
icomm = iicomm
call psb_info(ictxt,me,np)
call psb_info(ctxt,me,np)
if (np == -1) then
info=psb_err_context_error_
call psb_errpush(info,name)
@ -235,7 +237,7 @@ subroutine psi_zswapidxm(iictxt,iicomm,flag,n,beta,y,idx, &
proc_to_comm = idx(pnti+psb_proc_id_)
nerv = idx(pnti+psb_n_elem_recv_)
nesd = idx(pnti+nerv+psb_n_elem_send_)
prcid(proc_to_comm) = psb_get_mpi_rank(ictxt,proc_to_comm)
prcid(proc_to_comm) = psb_get_mpi_rank(ctxt,proc_to_comm)
brvidx(proc_to_comm) = rcv_pt
rvsz(proc_to_comm) = n*nerv
@ -314,14 +316,14 @@ subroutine psi_zswapidxm(iictxt,iicomm,flag,n,beta,y,idx, &
nesd = idx(pnti+nerv+psb_n_elem_send_)
if (proc_to_comm < me) then
if (nesd>0) call psb_snd(ictxt,&
if (nesd>0) call psb_snd(ctxt,&
& sndbuf(snd_pt:snd_pt+n*nesd-1), proc_to_comm)
if (nerv>0) call psb_rcv(ictxt,&
if (nerv>0) call psb_rcv(ctxt,&
& rcvbuf(rcv_pt:rcv_pt+n*nerv-1), proc_to_comm)
else if (proc_to_comm > me) then
if (nerv>0) call psb_rcv(ictxt,&
if (nerv>0) call psb_rcv(ctxt,&
& rcvbuf(rcv_pt:rcv_pt+n*nerv-1), proc_to_comm)
if (nesd>0) call psb_snd(ictxt,&
if (nesd>0) call psb_snd(ctxt,&
& sndbuf(snd_pt:snd_pt+n*nesd-1), proc_to_comm)
else if (proc_to_comm == me) then
if (nesd /= nerv) then
@ -348,7 +350,7 @@ subroutine psi_zswapidxm(iictxt,iicomm,flag,n,beta,y,idx, &
proc_to_comm = idx(pnti+psb_proc_id_)
nerv = idx(pnti+psb_n_elem_recv_)
nesd = idx(pnti+nerv+psb_n_elem_send_)
prcid(i) = psb_get_mpi_rank(ictxt,proc_to_comm)
prcid(i) = psb_get_mpi_rank(ctxt,proc_to_comm)
if ((nerv>0).and.(proc_to_comm /= me)) then
p2ptag = psb_dcomplex_swap_tag
call mpi_irecv(rcvbuf(rcv_pt),n*nerv,&
@ -433,7 +435,7 @@ subroutine psi_zswapidxm(iictxt,iicomm,flag,n,beta,y,idx, &
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_snd(ictxt,&
if (nesd>0) call psb_snd(ctxt,&
& sndbuf(snd_pt:snd_pt+n*nesd-1), proc_to_comm)
rcv_pt = rcv_pt + n*nerv
snd_pt = snd_pt + n*nesd
@ -450,7 +452,7 @@ subroutine psi_zswapidxm(iictxt,iicomm,flag,n,beta,y,idx, &
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_rcv(ictxt,&
if (nerv>0) call psb_rcv(ctxt,&
& rcvbuf(rcv_pt:rcv_pt+n*nerv-1), proc_to_comm)
rcv_pt = rcv_pt + n*nerv
snd_pt = snd_pt + n*nesd
@ -498,7 +500,7 @@ subroutine psi_zswapidxm(iictxt,iicomm,flag,n,beta,y,idx, &
call psb_erractionrestore(err_act)
return
9999 call psb_error_handler(iictxt,err_act)
9999 call psb_error_handler(ctxt,err_act)
return
end subroutine psi_zswapidxm
@ -579,7 +581,9 @@ subroutine psi_zswapdatav(flag,beta,y,desc_a,work,info,data)
integer(psb_ipk_), optional :: data
! locals
integer(psb_ipk_) :: ictxt, np, me, icomm, idxs, idxr, totxch, data_, err_act
type(psb_ctxt_type) :: ctxt
integer(psb_mpk_) :: icomm
integer(psb_ipk_) :: np, me, idxs, idxr, totxch, data_, err_act
integer(psb_ipk_), pointer :: d_idx(:)
character(len=20) :: name
@ -587,9 +591,9 @@ subroutine psi_zswapdatav(flag,beta,y,desc_a,work,info,data)
name='psi_swap_datav'
call psb_erractionsave(err_act)
ictxt = desc_a%get_context()
ctxt = desc_a%get_context()
icomm = desc_a%get_mpic()
call psb_info(ictxt,me,np)
call psb_info(ctxt,me,np)
if (np == -1) then
info=psb_err_context_error_
call psb_errpush(info,name)
@ -614,13 +618,13 @@ subroutine psi_zswapdatav(flag,beta,y,desc_a,work,info,data)
goto 9999
end if
call psi_swapdata(ictxt,icomm,flag,beta,y,d_idx,totxch,idxs,idxr,work,info)
call psi_swapdata(ctxt,icomm,flag,beta,y,d_idx,totxch,idxs,idxr,work,info)
if (info /= psb_success_) goto 9999
call psb_erractionrestore(err_act)
return
9999 call psb_error_handler(ictxt,err_act)
9999 call psb_error_handler(ctxt,err_act)
return
end subroutine psi_zswapdatav
@ -636,7 +640,7 @@ end subroutine psi_zswapdatav
!
!
!
subroutine psi_zswapidxv(iictxt,iicomm,flag,beta,y,idx, &
subroutine psi_zswapidxv(ctxt,icomm,flag,beta,y,idx, &
& totxch,totsnd,totrcv,work,info)
use psi_mod, psb_protect_name => psi_zswapidxv
@ -651,15 +655,17 @@ subroutine psi_zswapidxv(iictxt,iicomm,flag,beta,y,idx, &
include 'mpif.h'
#endif
integer(psb_ipk_), intent(in) :: iictxt,iicomm,flag
integer(psb_ipk_), intent(out) :: info
type(psb_ctxt_type), intent(in) :: ctxt
integer(psb_mpk_), intent(in) :: icomm
integer(psb_ipk_), intent(in) :: 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_mpk_) :: ictxt, icomm, np, me,&
& proc_to_comm, p2ptag, p2pstat(mpi_status_size), iret
integer(psb_ipk_) :: np, me
integer(psb_mpk_) :: proc_to_comm, p2ptag, p2pstat(mpi_status_size), iret
integer(psb_mpk_), allocatable, dimension(:) :: bsdidx, brvidx,&
& sdsz, rvsz, prcid, rvhd, sdhd
integer(psb_ipk_) :: nesd, nerv,&
@ -676,10 +682,7 @@ subroutine psi_zswapidxv(iictxt,iicomm,flag,beta,y,idx, &
info=psb_success_
name='psi_swap_datav'
call psb_erractionsave(err_act)
ictxt = iictxt
icomm = iicomm
call psb_info(ictxt,me,np)
call psb_info(ctxt,me,np)
if (np == -1) then
info=psb_err_context_error_
call psb_errpush(info,name)
@ -719,7 +722,7 @@ subroutine psi_zswapidxv(iictxt,iicomm,flag,beta,y,idx, &
proc_to_comm = idx(pnti+psb_proc_id_)
nerv = idx(pnti+psb_n_elem_recv_)
nesd = idx(pnti+nerv+psb_n_elem_send_)
prcid(proc_to_comm) = psb_get_mpi_rank(ictxt,proc_to_comm)
prcid(proc_to_comm) = psb_get_mpi_rank(ctxt,proc_to_comm)
brvidx(proc_to_comm) = rcv_pt
rvsz(proc_to_comm) = nerv
@ -799,14 +802,14 @@ subroutine psi_zswapidxv(iictxt,iicomm,flag,beta,y,idx, &
nesd = idx(pnti+nerv+psb_n_elem_send_)
if (proc_to_comm < me) then
if (nesd>0) call psb_snd(ictxt,&
if (nesd>0) call psb_snd(ctxt,&
& sndbuf(snd_pt:snd_pt+nesd-1), proc_to_comm)
if (nerv>0) call psb_rcv(ictxt,&
if (nerv>0) call psb_rcv(ctxt,&
& rcvbuf(rcv_pt:rcv_pt+nerv-1), proc_to_comm)
else if (proc_to_comm > me) then
if (nerv>0) call psb_rcv(ictxt,&
if (nerv>0) call psb_rcv(ctxt,&
& rcvbuf(rcv_pt:rcv_pt+nerv-1), proc_to_comm)
if (nesd>0) call psb_snd(ictxt,&
if (nesd>0) call psb_snd(ctxt,&
& sndbuf(snd_pt:snd_pt+nesd-1), proc_to_comm)
else if (proc_to_comm == me) then
if (nesd /= nerv) then
@ -833,7 +836,7 @@ subroutine psi_zswapidxv(iictxt,iicomm,flag,beta,y,idx, &
nerv = idx(pnti+psb_n_elem_recv_)
nesd = idx(pnti+nerv+psb_n_elem_send_)
prcid(i) = psb_get_mpi_rank(ictxt,proc_to_comm)
prcid(i) = psb_get_mpi_rank(ctxt,proc_to_comm)
if ((nerv>0).and.(proc_to_comm /= me)) then
p2ptag = psb_dcomplex_swap_tag
call mpi_irecv(rcvbuf(rcv_pt),nerv,&
@ -917,7 +920,7 @@ subroutine psi_zswapidxv(iictxt,iicomm,flag,beta,y,idx, &
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_snd(ictxt,&
if (nesd>0) call psb_snd(ctxt,&
& sndbuf(snd_pt:snd_pt+nesd-1), proc_to_comm)
rcv_pt = rcv_pt + nerv
snd_pt = snd_pt + nesd
@ -933,7 +936,7 @@ subroutine psi_zswapidxv(iictxt,iicomm,flag,beta,y,idx, &
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_rcv(ictxt,&
if (nerv>0) call psb_rcv(ctxt,&
& rcvbuf(rcv_pt:rcv_pt+nerv-1), proc_to_comm)
rcv_pt = rcv_pt + nerv
snd_pt = snd_pt + nesd
@ -980,7 +983,7 @@ subroutine psi_zswapidxv(iictxt,iicomm,flag,beta,y,idx, &
call psb_erractionrestore(err_act)
return
9999 call psb_error_handler(iictxt,err_act)
9999 call psb_error_handler(ctxt,err_act)
return
end subroutine psi_zswapidxv

@ -115,7 +115,9 @@ subroutine psi_zswaptran_vect(flag,beta,y,desc_a,work,info,data)
integer(psb_ipk_), optional :: data
! locals
integer(psb_ipk_) :: ictxt, np, me, icomm, idxs, idxr, totxch, err_act, data_
type(psb_ctxt_type) :: ctxt
integer(psb_mpk_) :: icomm
integer(psb_ipk_) :: np, me, idxs, idxr, totxch, err_act, data_
class(psb_i_base_vect_type), pointer :: d_vidx
character(len=20) :: name
@ -123,9 +125,9 @@ subroutine psi_zswaptran_vect(flag,beta,y,desc_a,work,info,data)
name='psi_swap_tranv'
call psb_erractionsave(err_act)
ictxt = desc_a%get_context()
ctxt = desc_a%get_context()
icomm = desc_a%get_mpic()
call psb_info(ictxt,me,np)
call psb_info(ctxt,me,np)
if (np == -1) then
info=psb_err_context_error_
call psb_errpush(info,name)
@ -150,19 +152,17 @@ subroutine psi_zswaptran_vect(flag,beta,y,desc_a,work,info,data)
goto 9999
end if
call psi_swaptran(ictxt,icomm,flag,beta,y,d_vidx,totxch,idxs,idxr,work,info)
call psi_swaptran(ctxt,icomm,flag,beta,y,d_vidx,totxch,idxs,idxr,work,info)
if (info /= psb_success_) goto 9999
call psb_erractionrestore(err_act)
return
9999 call psb_error_handler(ictxt,err_act)
9999 call psb_error_handler(ctxt,err_act)
return
end subroutine psi_zswaptran_vect
!
!
! Subroutine: psi_ztran_vidx_vect
@ -176,7 +176,7 @@ end subroutine psi_zswaptran_vect
!
!
!
subroutine psi_ztran_vidx_vect(iictxt,iicomm,flag,beta,y,idx,&
subroutine psi_ztran_vidx_vect(ctxt,icomm,flag,beta,y,idx,&
& totxch,totsnd,totrcv,work,info)
use psi_mod, psb_protect_name => psi_ztran_vidx_vect
@ -193,7 +193,9 @@ subroutine psi_ztran_vidx_vect(iictxt,iicomm,flag,beta,y,idx,&
include 'mpif.h'
#endif
integer(psb_ipk_), intent(in) :: iictxt,iicomm,flag
type(psb_ctxt_type), intent(in) :: ctxt
integer(psb_mpk_), intent(in) :: icomm
integer(psb_ipk_), intent(in) :: flag
integer(psb_ipk_), intent(out) :: info
class(psb_z_base_vect_type) :: y
complex(psb_dpk_) :: beta
@ -202,8 +204,8 @@ subroutine psi_ztran_vidx_vect(iictxt,iicomm,flag,beta,y,idx,&
integer(psb_ipk_), intent(in) :: totxch,totsnd, totrcv
! locals
integer(psb_mpk_) :: ictxt, icomm, np, me,&
& proc_to_comm, p2ptag, p2pstat(mpi_status_size), iret
integer(psb_ipk_) :: np, me
integer(psb_mpk_) :: proc_to_comm, p2ptag, p2pstat(mpi_status_size), iret
integer(psb_mpk_), allocatable :: prcid(:)
integer(psb_ipk_) :: nesd, nerv,&
& err_act, i, idx_pt, totsnd_, totrcv_,&
@ -216,10 +218,7 @@ subroutine psi_ztran_vidx_vect(iictxt,iicomm,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)
call psb_info(ctxt,me,np)
if (np == -1) then
info=psb_err_context_error_
call psb_errpush(info,name)
@ -266,7 +265,7 @@ subroutine psi_ztran_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_
prcid(i) = psb_get_mpi_rank(ictxt,proc_to_comm)
prcid(i) = psb_get_mpi_rank(ctxt,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,&
@ -422,7 +421,7 @@ subroutine psi_ztran_vidx_vect(iictxt,iicomm,flag,beta,y,idx,&
call psb_erractionrestore(err_act)
return
9999 call psb_error_handler(iictxt,err_act)
9999 call psb_error_handler(ctxt,err_act)
return
@ -463,7 +462,9 @@ subroutine psi_zswaptran_multivect(flag,beta,y,desc_a,work,info,data)
integer(psb_ipk_), optional :: data
! locals
integer(psb_ipk_) :: ictxt, np, me, icomm, idxs, idxr, totxch, err_act, data_
type(psb_ctxt_type) :: ctxt
integer(psb_mpk_) :: icomm
integer(psb_ipk_) :: np, me, idxs, idxr, totxch, err_act, data_
class(psb_i_base_vect_type), pointer :: d_vidx
character(len=20) :: name
@ -471,9 +472,9 @@ subroutine psi_zswaptran_multivect(flag,beta,y,desc_a,work,info,data)
name='psi_swap_tranv'
call psb_erractionsave(err_act)
ictxt = desc_a%get_context()
ctxt = desc_a%get_context()
icomm = desc_a%get_mpic()
call psb_info(ictxt,me,np)
call psb_info(ctxt,me,np)
if (np == -1) then
info=psb_err_context_error_
call psb_errpush(info,name)
@ -498,13 +499,13 @@ subroutine psi_zswaptran_multivect(flag,beta,y,desc_a,work,info,data)
goto 9999
end if
call psi_swaptran(ictxt,icomm,flag,beta,y,d_vidx,totxch,idxs,idxr,work,info)
call psi_swaptran(ctxt,icomm,flag,beta,y,d_vidx,totxch,idxs,idxr,work,info)
if (info /= psb_success_) goto 9999
call psb_erractionrestore(err_act)
return
9999 call psb_error_handler(ictxt,err_act)
9999 call psb_error_handler(ctxt,err_act)
return
end subroutine psi_zswaptran_multivect
@ -523,7 +524,7 @@ subroutine psi_zswaptran_multivect(flag,beta,y,desc_a,work,info,data)
!
!
!
subroutine psi_ztran_vidx_multivect(iictxt,iicomm,flag,beta,y,idx,&
subroutine psi_ztran_vidx_multivect(ctxt,icomm,flag,beta,y,idx,&
& totxch,totsnd,totrcv,work,info)
use psi_mod, psb_protect_name => psi_ztran_vidx_multivect
@ -540,7 +541,9 @@ subroutine psi_ztran_vidx_multivect(iictxt,iicomm,flag,beta,y,idx,&
include 'mpif.h'
#endif
integer(psb_ipk_), intent(in) :: iictxt,iicomm,flag
type(psb_ctxt_type), intent(in) :: ctxt
integer(psb_mpk_), intent(in) :: icomm
integer(psb_ipk_), intent(in) :: flag
integer(psb_ipk_), intent(out) :: info
class(psb_z_base_multivect_type) :: y
complex(psb_dpk_) :: beta
@ -549,8 +552,8 @@ subroutine psi_ztran_vidx_multivect(iictxt,iicomm,flag,beta,y,idx,&
integer(psb_ipk_), intent(in) :: totxch,totsnd, totrcv
! locals
integer(psb_mpk_) :: ictxt, icomm, np, me,&
& proc_to_comm, p2ptag, p2pstat(mpi_status_size), iret
integer(psb_ipk_) :: np, me
integer(psb_mpk_) :: proc_to_comm, p2ptag, p2pstat(mpi_status_size), iret
integer(psb_mpk_), allocatable :: prcid(:)
integer(psb_ipk_) :: nesd, nerv,&
& err_act, i, idx_pt, totsnd_, totrcv_,&
@ -563,10 +566,7 @@ subroutine psi_ztran_vidx_multivect(iictxt,iicomm,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)
call psb_info(ctxt,me,np)
if (np == -1) then
info=psb_err_context_error_
call psb_errpush(info,name)
@ -613,7 +613,7 @@ subroutine psi_ztran_vidx_multivect(iictxt,iicomm,flag,beta,y,idx,&
proc_to_comm = idx%v(pnti+psb_proc_id_)
nerv = idx%v(pnti+psb_n_elem_recv_)
nesd = idx%v(pnti+nerv+psb_n_elem_send_)
prcid(i) = psb_get_mpi_rank(ictxt,proc_to_comm)
prcid(i) = psb_get_mpi_rank(ctxt,proc_to_comm)
if ((nesd>0).and.(proc_to_comm /= me)) then
if (debug) write(*,*) me,'Posting receive from',prcid(i),snd_pt
call mpi_irecv(y%combuf(snd_pt),n*nesd,&
@ -773,7 +773,7 @@ subroutine psi_ztran_vidx_multivect(iictxt,iicomm,flag,beta,y,idx,&
call psb_erractionrestore(err_act)
return
9999 call psb_error_handler(iictxt,err_act)
9999 call psb_error_handler(ctxt,err_act)
return

@ -110,7 +110,9 @@ subroutine psi_zswaptranm(flag,n,beta,y,desc_a,work,info,data)
integer(psb_ipk_), optional :: data
! locals
integer(psb_ipk_) :: ictxt, np, me, icomm, idxs, idxr, err_act, totxch, data_
type(psb_ctxt_type) :: ctxt
integer(psb_mpk_) :: icomm
integer(psb_ipk_) :: np, me, idxs, idxr, err_act, totxch, data_
integer(psb_ipk_), pointer :: d_idx(:)
character(len=20) :: name
@ -118,10 +120,10 @@ subroutine psi_zswaptranm(flag,n,beta,y,desc_a,work,info,data)
name='psi_swap_tran'
call psb_erractionsave(err_act)
ictxt = desc_a%get_context()
ctxt = desc_a%get_context()
icomm = desc_a%get_mpic()
call psb_info(ictxt,me,np)
call psb_info(ctxt,me,np)
if (np == -1) then
info=psb_err_context_error_
call psb_errpush(info,name)
@ -146,18 +148,18 @@ subroutine psi_zswaptranm(flag,n,beta,y,desc_a,work,info,data)
goto 9999
end if
call psi_swaptran(ictxt,icomm,flag,n,beta,y,d_idx,totxch,idxs,idxr,work,info)
call psi_swaptran(ctxt,icomm,flag,n,beta,y,d_idx,totxch,idxs,idxr,work,info)
if (info /= psb_success_) goto 9999
call psb_erractionrestore(err_act)
return
9999 call psb_error_handler(ictxt,err_act)
9999 call psb_error_handler(ctxt,err_act)
return
end subroutine psi_zswaptranm
subroutine psi_ztranidxm(iictxt,iicomm,flag,n,beta,y,idx,&
subroutine psi_ztranidxm(ctxt,icomm,flag,n,beta,y,idx,&
& totxch,totsnd,totrcv,work,info)
use psi_mod, psb_protect_name => psi_ztranidxm
@ -172,15 +174,17 @@ subroutine psi_ztranidxm(iictxt,iicomm,flag,n,beta,y,idx,&
include 'mpif.h'
#endif
integer(psb_ipk_), intent(in) :: iictxt,iicomm,flag,n
integer(psb_ipk_), intent(out) :: info
type(psb_ctxt_type), intent(in) :: ctxt
integer(psb_mpk_), intent(in) :: icomm
integer(psb_ipk_), intent(in) :: 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_mpk_) :: ictxt, icomm, np, me,&
& proc_to_comm, p2ptag, p2pstat(mpi_status_size), iret
integer(psb_ipk_) :: np, me
integer(psb_mpk_) :: proc_to_comm, p2ptag, p2pstat(mpi_status_size), iret
integer(psb_mpk_), allocatable, dimension(:) :: bsdidx, brvidx,&
& sdsz, rvsz, prcid, rvhd, sdhd
integer(psb_ipk_) :: nesd, nerv,&
@ -197,10 +201,7 @@ subroutine psi_ztranidxm(iictxt,iicomm,flag,n,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)
call psb_info(ctxt,me,np)
if (np == -1) then
info=psb_err_context_error_
call psb_errpush(info,name)
@ -240,7 +241,7 @@ subroutine psi_ztranidxm(iictxt,iicomm,flag,n,beta,y,idx,&
proc_to_comm = idx(pnti+psb_proc_id_)
nerv = idx(pnti+psb_n_elem_recv_)
nesd = idx(pnti+nerv+psb_n_elem_send_)
prcid(proc_to_comm) = psb_get_mpi_rank(ictxt,proc_to_comm)
prcid(proc_to_comm) = psb_get_mpi_rank(ctxt,proc_to_comm)
brvidx(proc_to_comm) = rcv_pt
rvsz(proc_to_comm) = n*nerv
@ -324,14 +325,14 @@ subroutine psi_ztranidxm(iictxt,iicomm,flag,n,beta,y,idx,&
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(ctxt,&
& rcvbuf(rcv_pt:rcv_pt+n*nerv-1), proc_to_comm)
if (nesd>0) call psb_rcv(ictxt,&
if (nesd>0) call psb_rcv(ctxt,&
& 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(ctxt,&
& sndbuf(snd_pt:snd_pt+n*nesd-1), proc_to_comm)
if (nerv>0) call psb_snd(ictxt,&
if (nerv>0) call psb_snd(ctxt,&
& rcvbuf(rcv_pt:rcv_pt+n*nerv-1), proc_to_comm)
else if (proc_to_comm == me) then
if (nesd /= nerv) then
@ -358,7 +359,7 @@ subroutine psi_ztranidxm(iictxt,iicomm,flag,n,beta,y,idx,&
proc_to_comm = idx(pnti+psb_proc_id_)
nerv = idx(pnti+psb_n_elem_recv_)
nesd = idx(pnti+nerv+psb_n_elem_send_)
prcid(i) = psb_get_mpi_rank(ictxt,proc_to_comm)
prcid(i) = psb_get_mpi_rank(ctxt,proc_to_comm)
if ((nesd>0).and.(proc_to_comm /= me)) then
p2ptag = psb_dcomplex_swap_tag
call mpi_irecv(sndbuf(snd_pt),n*nesd,&
@ -443,7 +444,7 @@ subroutine psi_ztranidxm(iictxt,iicomm,flag,n,beta,y,idx,&
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(ctxt,&
& rcvbuf(rcv_pt:rcv_pt+n*nerv-1), proc_to_comm)
rcv_pt = rcv_pt + n*nerv
snd_pt = snd_pt + n*nesd
@ -460,7 +461,7 @@ subroutine psi_ztranidxm(iictxt,iicomm,flag,n,beta,y,idx,&
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(ctxt,&
& sndbuf(snd_pt:snd_pt+n*nesd-1), proc_to_comm)
rcv_pt = rcv_pt + n*nerv
snd_pt = snd_pt + n*nesd
@ -508,7 +509,7 @@ subroutine psi_ztranidxm(iictxt,iicomm,flag,n,beta,y,idx,&
call psb_erractionrestore(err_act)
return
9999 call psb_error_handler(iictxt,err_act)
9999 call psb_error_handler(ctxt,err_act)
return
end subroutine psi_ztranidxm
@ -592,7 +593,9 @@ subroutine psi_zswaptranv(flag,beta,y,desc_a,work,info,data)
integer(psb_ipk_), optional :: data
! locals
integer(psb_ipk_) :: ictxt, np, me, icomm, idxs, idxr, totxch, err_act, data_
type(psb_ctxt_type) :: ctxt
integer(psb_mpk_) :: icomm
integer(psb_ipk_) :: np, me, idxs, idxr, totxch, err_act, data_
integer(psb_ipk_), pointer :: d_idx(:)
character(len=20) :: name
@ -600,9 +603,9 @@ subroutine psi_zswaptranv(flag,beta,y,desc_a,work,info,data)
name='psi_swap_tranv'
call psb_erractionsave(err_act)
ictxt = desc_a%get_context()
ctxt = desc_a%get_context()
icomm = desc_a%get_mpic()
call psb_info(ictxt,me,np)
call psb_info(ctxt,me,np)
if (np == -1) then
info=psb_err_context_error_
call psb_errpush(info,name)
@ -627,13 +630,13 @@ subroutine psi_zswaptranv(flag,beta,y,desc_a,work,info,data)
goto 9999
end if
call psi_swaptran(ictxt,icomm,flag,beta,y,d_idx,totxch,idxs,idxr,work,info)
call psi_swaptran(ctxt,icomm,flag,beta,y,d_idx,totxch,idxs,idxr,work,info)
if (info /= psb_success_) goto 9999
call psb_erractionrestore(err_act)
return
9999 call psb_error_handler(ictxt,err_act)
9999 call psb_error_handler(ctxt,err_act)
return
end subroutine psi_zswaptranv
@ -649,7 +652,7 @@ end subroutine psi_zswaptranv
!
!
!
subroutine psi_ztranidxv(iictxt,iicomm,flag,beta,y,idx,&
subroutine psi_ztranidxv(ctxt,icomm,flag,beta,y,idx,&
& totxch,totsnd,totrcv,work,info)
use psi_mod, psb_protect_name => psi_ztranidxv
@ -664,15 +667,17 @@ subroutine psi_ztranidxv(iictxt,iicomm,flag,beta,y,idx,&
include 'mpif.h'
#endif
integer(psb_ipk_), intent(in) :: iictxt,iicomm,flag
integer(psb_ipk_), intent(out) :: info
type(psb_ctxt_type), intent(in) :: ctxt
integer(psb_mpk_), intent(in) :: icomm
integer(psb_ipk_), intent(in) :: 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_mpk_) :: ictxt, icomm, np, me,&
& proc_to_comm, p2ptag, p2pstat(mpi_status_size), iret
integer(psb_ipk_) :: np, me
integer(psb_mpk_) :: proc_to_comm, p2ptag, p2pstat(mpi_status_size), iret
integer(psb_mpk_), allocatable, dimension(:) :: bsdidx, brvidx,&
& sdsz, rvsz, prcid, rvhd, sdhd
integer(psb_ipk_) :: nesd, nerv,&
@ -689,10 +694,7 @@ subroutine psi_ztranidxv(iictxt,iicomm,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)
call psb_info(ctxt,me,np)
if (np == -1) then
info=psb_err_context_error_
call psb_errpush(info,name)
@ -732,7 +734,7 @@ subroutine psi_ztranidxv(iictxt,iicomm,flag,beta,y,idx,&
proc_to_comm = idx(pnti+psb_proc_id_)
nerv = idx(pnti+psb_n_elem_recv_)
nesd = idx(pnti+nerv+psb_n_elem_send_)
prcid(proc_to_comm) = psb_get_mpi_rank(ictxt,proc_to_comm)
prcid(proc_to_comm) = psb_get_mpi_rank(ctxt,proc_to_comm)
brvidx(proc_to_comm) = rcv_pt
rvsz(proc_to_comm) = nerv
@ -817,14 +819,14 @@ subroutine psi_ztranidxv(iictxt,iicomm,flag,beta,y,idx,&
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(ctxt,&
& rcvbuf(rcv_pt:rcv_pt+nerv-1), proc_to_comm)
if (nesd>0) call psb_rcv(ictxt,&
if (nesd>0) call psb_rcv(ctxt,&
& 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(ctxt,&
& sndbuf(snd_pt:snd_pt+nesd-1), proc_to_comm)
if (nerv>0) call psb_snd(ictxt,&
if (nerv>0) call psb_snd(ctxt,&
& rcvbuf(rcv_pt:rcv_pt+nerv-1), proc_to_comm)
else if (proc_to_comm == me) then
if (nesd /= nerv) then
@ -850,7 +852,7 @@ subroutine psi_ztranidxv(iictxt,iicomm,flag,beta,y,idx,&
proc_to_comm = idx(pnti+psb_proc_id_)
nerv = idx(pnti+psb_n_elem_recv_)
nesd = idx(pnti+nerv+psb_n_elem_send_)
prcid(i) = psb_get_mpi_rank(ictxt,proc_to_comm)
prcid(i) = psb_get_mpi_rank(ctxt,proc_to_comm)
if ((nesd>0).and.(proc_to_comm /= me)) then
p2ptag = psb_dcomplex_swap_tag
call mpi_irecv(sndbuf(snd_pt),nesd,&
@ -933,7 +935,7 @@ subroutine psi_ztranidxv(iictxt,iicomm,flag,beta,y,idx,&
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(ctxt,&
& rcvbuf(rcv_pt:rcv_pt+nerv-1), proc_to_comm)
rcv_pt = rcv_pt + nerv
snd_pt = snd_pt + nesd
@ -949,7 +951,7 @@ subroutine psi_ztranidxv(iictxt,iicomm,flag,beta,y,idx,&
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(ctxt,&
& sndbuf(snd_pt:snd_pt+nesd-1), proc_to_comm)
rcv_pt = rcv_pt + nerv
snd_pt = snd_pt + nesd
@ -996,7 +998,7 @@ subroutine psi_ztranidxv(iictxt,iicomm,flag,beta,y,idx,&
call psb_erractionrestore(err_act)
return
9999 call psb_error_handler(iictxt,err_act)
9999 call psb_error_handler(ctxt,err_act)
return
end subroutine psi_ztranidxv

@ -57,7 +57,8 @@ subroutine psb_cgather_vect(globx, locx, desc_a, info, iroot)
! locals
integer(psb_mpk_) :: ictxt, np, me, root, iiroot, icomm, myrank, rootrank
type(psb_ctxt_type) :: ctxt
integer(psb_mpk_) :: np, me, root, iiroot, icomm, myrank, rootrank
integer(psb_ipk_) :: ierr(5), err_act, jlx, ilx, lda_locx, lda_globx, i
integer(psb_lpk_) :: m, n, k, ilocx, jlocx, idx, iglobx, jglobx
complex(psb_spk_), allocatable :: llocx(:)
@ -70,10 +71,10 @@ subroutine psb_cgather_vect(globx, locx, desc_a, info, iroot)
info = psb_err_internal_error_ ; goto 9999
end if
ictxt=desc_a%get_context()
ctxt=desc_a%get_context()
! check on blacs grid
call psb_info(ictxt, me, np)
call psb_info(ctxt, me, np)
if (np == -1) then
info = psb_err_context_error_
call psb_errpush(info,name)
@ -148,12 +149,12 @@ subroutine psb_cgather_vect(globx, locx, desc_a, info, iroot)
end if
end do
call psb_sum(ictxt,globx(1:m),root=root)
call psb_sum(ctxt,globx(1:m),root=root)
call psb_erractionrestore(err_act)
return
9999 call psb_error_handler(ione*ictxt,err_act)
9999 call psb_error_handler(ctxt,err_act)
return
@ -174,7 +175,8 @@ subroutine psb_cgather_multivect(globx, locx, desc_a, info, iroot)
! locals
integer(psb_mpk_) :: ictxt, np, me, root, iiroot, icomm, myrank, rootrank
type(psb_ctxt_type) :: ctxt
integer(psb_mpk_) :: np, me, root, iiroot, icomm, myrank, rootrank
integer(psb_ipk_) :: ierr(5), err_act, jlx, ilx, lda_locx, lda_globx, i
integer(psb_lpk_) :: m, n, k, ilocx, jlocx, idx, iglobx, jglobx
complex(psb_spk_), allocatable :: llocx(:,:)
@ -187,10 +189,10 @@ subroutine psb_cgather_multivect(globx, locx, desc_a, info, iroot)
info = psb_err_internal_error_ ; goto 9999
end if
ictxt=desc_a%get_context()
ctxt=desc_a%get_context()
! check on blacs grid
call psb_info(ictxt, me, np)
call psb_info(ctxt, me, np)
if (np == -1) then
info = psb_err_context_error_
call psb_errpush(info,name)
@ -264,12 +266,12 @@ subroutine psb_cgather_multivect(globx, locx, desc_a, info, iroot)
end if
end do
call psb_sum(ictxt,globx(1:m,1:k),root=root)
call psb_sum(ctxt,globx(1:m,1:k),root=root)
call psb_erractionrestore(err_act)
return
9999 call psb_error_handler(ione*ictxt,err_act)
9999 call psb_error_handler(ctxt,err_act)
return

@ -57,12 +57,12 @@ subroutine psb_cgatherm(globx, locx, desc_a, info, iroot)
! locals
integer(psb_mpk_) :: ictxt, np, me, root, iiroot, icomm, myrank, rootrank
type(psb_ctxt_type) :: ctxt
integer(psb_mpk_) :: np, me, root, iiroot, icomm, myrank, rootrank
integer(psb_ipk_) :: ierr(5), err_act, lda_locx, lda_globx, lock, globk,&
& maxk, k, jlx, ilx, i, j
integer(psb_lpk_) :: m, n, ilocx, jlocx, idx, iglobx, jglobx
character(len=20) :: name, ch_err
character(len=20) :: name, ch_err
name='psb_cgatherm'
info=psb_success_
@ -71,9 +71,9 @@ subroutine psb_cgatherm(globx, locx, desc_a, info, iroot)
info = psb_err_internal_error_ ; goto 9999
end if
ictxt=desc_a%get_context()
ctxt=desc_a%get_context()
! check on blacs grid
call psb_info(ictxt, me, np)
call psb_info(ctxt, me, np)
if (np == -1) then
info = psb_err_context_error_
call psb_errpush(info,name)
@ -110,7 +110,7 @@ subroutine psb_cgatherm(globx, locx, desc_a, info, iroot)
maxk = lock
k = maxk
call psb_bcast(ictxt,k,root=iiroot)
call psb_bcast(ctxt,k,root=iiroot)
! there should be a global check on k here!!!
@ -157,12 +157,12 @@ subroutine psb_cgatherm(globx, locx, desc_a, info, iroot)
end do
end do
call psb_sum(ictxt,globx(1:m,1:k),root=root)
call psb_sum(ctxt,globx(1:m,1:k),root=root)
call psb_erractionrestore(err_act)
return
9999 call psb_error_handler(ione*ictxt,err_act)
9999 call psb_error_handler(ctxt,err_act)
return
@ -231,7 +231,8 @@ subroutine psb_cgatherv(globx, locx, desc_a, info, iroot)
! locals
integer(psb_mpk_) :: ictxt, np, me, root, iiroot, icomm, myrank, rootrank
type(psb_ctxt_type) :: ctxt
integer(psb_mpk_) :: np, me, root, iiroot, icomm, myrank, rootrank
integer(psb_ipk_) :: ierr(5), err_act, lda_locx, lda_globx, lock, globk,&
& maxk, k, jlx, ilx, i, j
integer(psb_lpk_) :: m, n, ilocx, jlocx, idx, iglobx, jglobx
@ -245,10 +246,10 @@ subroutine psb_cgatherv(globx, locx, desc_a, info, iroot)
info = psb_err_internal_error_ ; goto 9999
end if
ictxt=desc_a%get_context()
ctxt=desc_a%get_context()
! check on blacs grid
call psb_info(ictxt, me, np)
call psb_info(ctxt, me, np)
if (np == -1) then
info = psb_err_context_error_
call psb_errpush(info,name)
@ -322,12 +323,12 @@ subroutine psb_cgatherv(globx, locx, desc_a, info, iroot)
end if
end do
call psb_sum(ictxt,globx(1:m),root=root)
call psb_sum(ctxt,globx(1:m),root=root)
call psb_erractionrestore(err_act)
return
9999 call psb_error_handler(ione*ictxt,err_act)
9999 call psb_error_handler(ctxt,err_act)
return

@ -65,7 +65,8 @@ subroutine psb_chalo_vect(x,desc_a,info,work,tran,mode,data)
character, intent(in), optional :: tran
! locals
integer(psb_ipk_) :: ictxt, np, me, err_act, iix, jjx, &
type(psb_ctxt_type) :: ctxt
integer(psb_ipk_) :: np, me, err_act, iix, jjx, &
& nrow, ncol, lldx, imode, liwork,data_
integer(psb_lpk_) :: m, n, ix, ijx
complex(psb_spk_),pointer :: iwork(:)
@ -80,10 +81,10 @@ subroutine psb_chalo_vect(x,desc_a,info,work,tran,mode,data)
info = psb_err_internal_error_ ; goto 9999
end if
ictxt=desc_a%get_context()
ctxt=desc_a%get_context()
! check on blacs grid
call psb_info(ictxt, me, np)
call psb_info(ctxt, me, np)
if (np == -1) then
info = psb_err_context_error_
call psb_errpush(info,name)
@ -179,7 +180,7 @@ subroutine psb_chalo_vect(x,desc_a,info,work,tran,mode,data)
call psb_erractionrestore(err_act)
return
9999 call psb_error_handler(ione*ictxt,err_act)
9999 call psb_error_handler(ctxt,err_act)
return
end subroutine psb_chalo_vect
@ -219,7 +220,8 @@ subroutine psb_chalo_multivect(x,desc_a,info,work,tran,mode,data)
character, intent(in), optional :: tran
! locals
integer(psb_ipk_) :: ictxt, np, me, err_act, iix, jjx, &
type(psb_ctxt_type) :: ctxt
integer(psb_ipk_) :: np, me, err_act, iix, jjx, &
& nrow, ncol, lldx, imode, liwork,data_
integer(psb_lpk_) :: m, n, ix, ijx
complex(psb_spk_),pointer :: iwork(:)
@ -234,10 +236,10 @@ subroutine psb_chalo_multivect(x,desc_a,info,work,tran,mode,data)
info = psb_err_internal_error_ ; goto 9999
end if
ictxt=desc_a%get_context()
ctxt=desc_a%get_context()
! check on blacs grid
call psb_info(ictxt, me, np)
call psb_info(ctxt, me, np)
if (np == -1) then
info = psb_err_context_error_
call psb_errpush(info,name)
@ -334,7 +336,7 @@ subroutine psb_chalo_multivect(x,desc_a,info,work,tran,mode,data)
call psb_erractionrestore(err_act)
return
9999 call psb_error_handler(ione*ictxt,err_act)
9999 call psb_error_handler(ctxt,err_act)
return
end subroutine psb_chalo_multivect

@ -65,7 +65,8 @@ subroutine psb_chalom(x,desc_a,info,jx,ik,work,tran,mode,data)
character, intent(in), optional :: tran
! locals
integer(psb_mpk_) :: ictxt, np, me
type(psb_ctxt_type) :: ctxt
integer(psb_mpk_) :: np, me
integer(psb_ipk_) :: err_act, iix, jjx, k, maxk, nrow, imode, i,&
& liwork,data_, ldx
integer(psb_lpk_) :: m, n, ix, ijx
@ -81,10 +82,10 @@ subroutine psb_chalom(x,desc_a,info,jx,ik,work,tran,mode,data)
info = psb_err_internal_error_ ; goto 9999
end if
ictxt=desc_a%get_context()
ctxt=desc_a%get_context()
! check on blacs grid
call psb_info(ictxt, me, np)
call psb_info(ctxt, me, np)
if (np == -1) then
info = psb_err_context_error_
call psb_errpush(info,name)
@ -192,7 +193,7 @@ subroutine psb_chalom(x,desc_a,info,jx,ik,work,tran,mode,data)
call psb_erractionrestore(err_act)
return
9999 call psb_error_handler(ione*ictxt,err_act)
9999 call psb_error_handler(ctxt,err_act)
return
end subroutine psb_chalom
@ -266,7 +267,8 @@ subroutine psb_chalov(x,desc_a,info,work,tran,mode,data)
character, intent(in), optional :: tran
! locals
integer(psb_mpk_) :: ictxt, np, me
type(psb_ctxt_type) :: ctxt
integer(psb_mpk_) :: np, me
integer(psb_ipk_) :: err_act, ldx, iix, jjx, nrow, imode, liwork,data_
integer(psb_lpk_) :: m, n, ix, ijx
complex(psb_spk_),pointer :: iwork(:)
@ -281,10 +283,10 @@ subroutine psb_chalov(x,desc_a,info,work,tran,mode,data)
info = psb_err_internal_error_ ; goto 9999
end if
ictxt=desc_a%get_context()
ctxt=desc_a%get_context()
! check on blacs grid
call psb_info(ictxt, me, np)
call psb_info(ctxt, me, np)
if (np == -1) then
info = psb_err_context_error_
call psb_errpush(info,name)
@ -373,7 +375,7 @@ subroutine psb_chalov(x,desc_a,info,work,tran,mode,data)
call psb_erractionrestore(err_act)
return
9999 call psb_error_handler(ione*ictxt,err_act)
9999 call psb_error_handler(ctxt,err_act)
return
end subroutine psb_chalov

@ -75,7 +75,8 @@ subroutine psb_covrl_vect(x,desc_a,info,work,update,mode)
integer(psb_ipk_), intent(in), optional :: update,mode
! locals
integer(psb_ipk_) :: ictxt, np, me, err_act, k, iix, jjx, &
type(psb_ctxt_type) :: ctxt
integer(psb_ipk_) :: np, me, err_act, k, iix, jjx, &
& nrow, ncol, ldx, liwork, data_, update_, mode_
integer(psb_lpk_) :: m, n, ix, ijx
complex(psb_spk_),pointer :: iwork(:)
@ -90,10 +91,10 @@ subroutine psb_covrl_vect(x,desc_a,info,work,update,mode)
info = psb_err_internal_error_ ; goto 9999
end if
ictxt=desc_a%get_context()
ctxt=desc_a%get_context()
! check on blacs grid
call psb_info(ictxt, me, np)
call psb_info(ctxt, me, np)
if (np == -1) then
info = psb_err_context_error_
call psb_errpush(info,name)
@ -175,7 +176,7 @@ subroutine psb_covrl_vect(x,desc_a,info,work,update,mode)
call psb_erractionrestore(err_act)
return
9999 call psb_error_handler(ione*ictxt,err_act)
9999 call psb_error_handler(ctxt,err_act)
return
end subroutine psb_covrl_vect
@ -224,7 +225,8 @@ subroutine psb_covrl_multivect(x,desc_a,info,work,update,mode)
integer(psb_ipk_), intent(in), optional :: update,mode
! locals
integer(psb_ipk_) :: ictxt, np, me, err_act, k, iix, jjx, &
type(psb_ctxt_type) :: ctxt
integer(psb_ipk_) :: np, me, err_act, k, iix, jjx, &
& nrow, ncol, ldx, liwork, data_, update_, mode_
integer(psb_lpk_) :: m, n, ix, ijx
complex(psb_spk_),pointer :: iwork(:)
@ -239,10 +241,10 @@ subroutine psb_covrl_multivect(x,desc_a,info,work,update,mode)
info = psb_err_internal_error_ ; goto 9999
end if
ictxt=desc_a%get_context()
ctxt=desc_a%get_context()
! check on blacs grid
call psb_info(ictxt, me, np)
call psb_info(ctxt, me, np)
if (np == -1) then
info = psb_err_context_error_
call psb_errpush(info,name)
@ -326,7 +328,7 @@ subroutine psb_covrl_multivect(x,desc_a,info,work,update,mode)
call psb_erractionrestore(err_act)
return
9999 call psb_error_handler(ione*ictxt,err_act)
9999 call psb_error_handler(ctxt,err_act)
return
end subroutine psb_covrl_multivect

@ -76,7 +76,8 @@ subroutine psb_covrlm(x,desc_a,info,jx,ik,work,update,mode)
integer(psb_ipk_), intent(in), optional :: update,jx,ik,mode
! locals
integer(psb_mpk_) :: ictxt, np, me
type(psb_ctxt_type) :: ctxt
integer(psb_mpk_) :: np, me
integer(psb_ipk_) :: err_act, iix, jjx, nrow, ncol, k, maxk, update_,&
& mode_, liwork, ldx
integer(psb_lpk_) :: m, n, ix, ijx
@ -92,10 +93,10 @@ subroutine psb_covrlm(x,desc_a,info,jx,ik,work,update,mode)
info = psb_err_internal_error_ ; goto 9999
end if
ictxt=desc_a%get_context()
ctxt=desc_a%get_context()
! check on blacs grid
call psb_info(ictxt, me, np)
call psb_info(ctxt, me, np)
if (np == -1) then
info = psb_err_context_error_
call psb_errpush(info,name)
@ -187,7 +188,7 @@ subroutine psb_covrlm(x,desc_a,info,jx,ik,work,update,mode)
call psb_erractionrestore(err_act)
return
9999 call psb_error_handler(ione*ictxt,err_act)
9999 call psb_error_handler(ctxt,err_act)
return
end subroutine psb_covrlm
@ -265,7 +266,8 @@ subroutine psb_covrlv(x,desc_a,info,work,update,mode)
integer(psb_ipk_), intent(in), optional :: update,mode
! locals
integer(psb_ipk_) :: ictxt, np, me, err_act, iix, jjx, nrow, ncol, &
type(psb_ctxt_type) :: ctxt
integer(psb_ipk_) :: np, me, err_act, iix, jjx, nrow, ncol, &
& k, update_, mode_, liwork, ldx
integer(psb_lpk_) :: m, n, ix, ijx
complex(psb_spk_),pointer :: iwork(:)
@ -280,10 +282,10 @@ subroutine psb_covrlv(x,desc_a,info,work,update,mode)
info = psb_err_internal_error_ ; goto 9999
end if
ictxt=desc_a%get_context()
ctxt=desc_a%get_context()
! check on blacs grid
call psb_info(ictxt, me, np)
call psb_info(ctxt, me, np)
if (np == -1) then
info = psb_err_context_error_
call psb_errpush(info,name)
@ -368,7 +370,7 @@ subroutine psb_covrlv(x,desc_a,info,work,update,mode)
call psb_erractionrestore(err_act)
return
9999 call psb_error_handler(ione*ictxt,err_act)
9999 call psb_error_handler(ctxt,err_act)
return
end subroutine psb_covrlv

@ -54,7 +54,8 @@ subroutine psb_cscatter_vect(globx, locx, desc_a, info, root, mold)
class(psb_c_base_vect_type), intent(in), optional :: mold
! locals
integer(psb_mpk_) :: ictxt, np, me, icomm, myrank, rootrank
type(psb_ctxt_type) :: ctxt
integer(psb_mpk_) :: np, me, icomm, myrank, rootrank
integer(psb_ipk_) :: ierr(5), err_act, m, n, i, j, idx, nrow, iglobx, jglobx,&
& ilocx, jlocx, lda_locx, lda_globx, k, pos, ilx, jlx
complex(psb_spk_), allocatable :: vlocx(:)
@ -67,13 +68,13 @@ subroutine psb_cscatter_vect(globx, locx, desc_a, info, root, mold)
if (psb_errstatus_fatal()) then
info = psb_err_internal_error_ ; goto 9999
end if
ictxt=desc_a%get_context()
ctxt=desc_a%get_context()
debug_unit = psb_get_debug_unit()
debug_level = psb_get_debug_level()
! check on blacs grid
call psb_info(ictxt, me, np)
call psb_info(ctxt, me, np)
if (np == -1) then
info = psb_err_context_error_
call psb_errpush(info,name)
@ -92,7 +93,7 @@ subroutine psb_cscatter_vect(globx, locx, desc_a, info, root, mold)
call psb_erractionrestore(err_act)
return
9999 call psb_error_handler(ione*ictxt,err_act)
9999 call psb_error_handler(ctxt,err_act)
return

@ -62,7 +62,8 @@ subroutine psb_cscatterm(globx, locx, desc_a, info, root)
! locals
integer(psb_mpk_) :: ictxt, np, me, iroot, icomm, myrank, rootrank, iam, nlr
type(psb_ctxt_type) :: ctxt
integer(psb_mpk_) :: np, me, iroot, icomm, myrank, rootrank, iam, nlr
integer(psb_ipk_) :: ierr(5), err_act, nrow,&
& ilocx, jlocx, lda_locx, lda_globx, lock, globk, k, maxk, &
& col,pos
@ -79,10 +80,10 @@ subroutine psb_cscatterm(globx, locx, desc_a, info, root)
info = psb_err_internal_error_ ; goto 9999
end if
ictxt=desc_a%get_context()
ctxt=desc_a%get_context()
! check on blacs grid
call psb_info(ictxt, iam, np)
call psb_info(ctxt, iam, np)
if (np == -1) then
info = psb_err_context_error_
call psb_errpush(info,name)
@ -107,8 +108,8 @@ subroutine psb_cscatterm(globx, locx, desc_a, info, root)
m = desc_a%get_global_rows()
n = desc_a%get_global_cols()
icomm = psb_get_mpi_comm(ictxt)
myrank = psb_get_mpi_rank(ictxt,me)
icomm = psb_get_mpi_comm(ctxt)
myrank = psb_get_mpi_rank(ctxt,me)
if (iroot==-1) then
lda_globx = size(globx, 1)
@ -159,7 +160,7 @@ subroutine psb_cscatterm(globx, locx, desc_a, info, root)
end do
else
rootrank = psb_get_mpi_rank(ictxt,iroot)
rootrank = psb_get_mpi_rank(ctxt,iroot)
!
! This is potentially unsafe when IPK=8
! But then, IPK=8 is highly experimental anyway.
@ -235,7 +236,7 @@ subroutine psb_cscatterm(globx, locx, desc_a, info, root)
call psb_erractionrestore(err_act)
return
9999 call psb_error_handler(ione*ictxt,err_act)
9999 call psb_error_handler(ctxt,err_act)
return
@ -306,7 +307,8 @@ subroutine psb_cscatterv(globx, locx, desc_a, info, root)
! locals
integer(psb_mpk_) :: ictxt, np, iam, iroot, iiroot, icomm, myrank, rootrank, nlr
type(psb_ctxt_type) :: ctxt
integer(psb_mpk_) :: np, iam, iroot, iiroot, icomm, myrank, rootrank, nlr
integer(psb_ipk_) :: ierr(5), err_act, nrow,&
& ilocx, jlocx, lda_locx, lda_globx, k, pos, ilx, jlx
integer(psb_lpk_) :: m, n, i, j, idx, iglobx, jglobx
@ -322,13 +324,13 @@ subroutine psb_cscatterv(globx, locx, desc_a, info, root)
if (psb_errstatus_fatal()) then
info = psb_err_internal_error_ ; goto 9999
end if
ictxt=desc_a%get_context()
ctxt=desc_a%get_context()
debug_unit = psb_get_debug_unit()
debug_level = psb_get_debug_level()
! check on blacs grid
call psb_info(ictxt, iam, np)
call psb_info(ctxt, iam, np)
if (np == -1) then
info = psb_err_context_error_
call psb_errpush(info,name)
@ -347,8 +349,8 @@ subroutine psb_cscatterv(globx, locx, desc_a, info, root)
iroot = psb_root_
end if
icomm = psb_get_mpi_comm(ictxt)
myrank = psb_get_mpi_rank(ictxt,iam)
icomm = psb_get_mpi_comm(ctxt)
myrank = psb_get_mpi_rank(ctxt,iam)
iglobx = 1
jglobx = 1
@ -394,7 +396,7 @@ subroutine psb_cscatterv(globx, locx, desc_a, info, root)
locx(i)=globx(ltg(i))
end do
else
rootrank = psb_get_mpi_rank(ictxt,iroot)
rootrank = psb_get_mpi_rank(ctxt,iroot)
!
! This is potentially unsafe when IPK=8
! But then, IPK=8 is highly experimental anyway.
@ -472,7 +474,7 @@ subroutine psb_cscatterv(globx, locx, desc_a, info, root)
call psb_erractionrestore(err_act)
return
9999 call psb_error_handler(ione*ictxt,err_act)
9999 call psb_error_handler(ctxt,err_act)
return

@ -67,7 +67,8 @@ subroutine psb_csp_allgather(globa, loca, desc_a, info, root, dupl,keepnum,keep
integer(psb_ipk_) :: err_act, dupl_
integer(psb_ipk_) :: ip,naggrm1,naggrp1, i, j, k
logical :: keepnum_, keeploc_
integer(psb_mpk_) :: ictxt,np,me
type(psb_ctxt_type) :: ctxt
integer(psb_mpk_) :: np, me
integer(psb_mpk_) :: icomm, minfo, ndx, root_
integer(psb_mpk_), allocatable :: nzbr(:), idisp(:)
integer(psb_lpk_), allocatable :: locia(:), locja(:), glbia(:), glbja(:)
@ -82,9 +83,9 @@ subroutine psb_csp_allgather(globa, loca, desc_a, info, root, dupl,keepnum,keep
if (psb_errstatus_fatal()) then
info = psb_err_internal_error_ ; goto 9999
end if
ictxt = desc_a%get_context()
ctxt = desc_a%get_context()
icomm = desc_a%get_mpic()
call psb_info(ictxt, me, np)
call psb_info(ctxt, me, np)
if (present(keepnum)) then
keepnum_ = keepnum
@ -128,7 +129,7 @@ subroutine psb_csp_allgather(globa, loca, desc_a, info, root, dupl,keepnum,keep
call psb_loc_to_glob(loc_coo%ja(1:nzl),locja(1:nzl),desc_a,info,iact='I')
nzbr(:) = 0
nzbr(me+1) = nzl
call psb_sum(ictxt,nzbr(1:np))
call psb_sum(ctxt,nzbr(1:np))
nzg = sum(nzbr)
if (nzg <0) then
info = psb_err_mpi_int_ovflw_
@ -216,7 +217,7 @@ subroutine psb_csp_allgather(globa, loca, desc_a, info, root, dupl,keepnum,keep
9999 continue
call psb_errpush(info,name)
call psb_error_handler(ione*ictxt,err_act)
call psb_error_handler(ctxt,err_act)
return
@ -249,7 +250,8 @@ subroutine psb_lcsp_allgather(globa, loca, desc_a, info, root, dupl,keepnum,kee
integer(psb_ipk_) :: err_act, dupl_
integer(psb_ipk_) :: ip,naggrm1,naggrp1, i, j, k, nzl
logical :: keepnum_, keeploc_
integer(psb_mpk_) :: ictxt,np,me
type(psb_ctxt_type) :: ctxt
integer(psb_ipk_) :: np, me
integer(psb_mpk_) :: icomm, minfo, ndx, root_
integer(psb_mpk_), allocatable :: nzbr(:), idisp(:)
integer(psb_lpk_), allocatable :: lnzbr(:)
@ -264,9 +266,9 @@ subroutine psb_lcsp_allgather(globa, loca, desc_a, info, root, dupl,keepnum,kee
if (psb_errstatus_fatal()) then
info = psb_err_internal_error_ ; goto 9999
end if
ictxt = desc_a%get_context()
ctxt = desc_a%get_context()
icomm = desc_a%get_mpic()
call psb_info(ictxt, me, np)
call psb_info(ctxt, me, np)
if (present(keepnum)) then
keepnum_ = keepnum
@ -308,7 +310,7 @@ subroutine psb_lcsp_allgather(globa, loca, desc_a, info, root, dupl,keepnum,kee
call psb_loc_to_glob(loc_coo%ja(1:nzl),desc_a,info,iact='I')
nzbr(:) = 0
nzbr(me+1) = nzl
call psb_sum(ictxt,nzbr(1:np))
call psb_sum(ctxt,nzbr(1:np))
lnzbr = nzbr
nzg = sum(nzbr)
if ((nzg < 0).or.(nzg /= sum(lnzbr))) then
@ -388,7 +390,7 @@ subroutine psb_lcsp_allgather(globa, loca, desc_a, info, root, dupl,keepnum,kee
9999 continue
call psb_errpush(info,name)
call psb_error_handler(ione*ictxt,err_act)
call psb_error_handler(ctxt,err_act)
return
@ -420,7 +422,8 @@ subroutine psb_lclcsp_allgather(globa, loca, desc_a, info, root, dupl,keepnum,k
integer(psb_ipk_) :: err_act, dupl_
integer(psb_lpk_) :: ip,naggrm1,naggrp1, i, j, k, nzl
logical :: keepnum_, keeploc_
integer(psb_mpk_) :: ictxt,np,me
type(psb_ctxt_type) :: ctxt
integer(psb_ipk_) :: np, me
integer(psb_mpk_) :: icomm, minfo, ndx, root_
integer(psb_mpk_), allocatable :: nzbr(:), idisp(:)
integer(psb_lpk_), allocatable :: lnzbr(:)
@ -435,9 +438,9 @@ subroutine psb_lclcsp_allgather(globa, loca, desc_a, info, root, dupl,keepnum,k
if (psb_errstatus_fatal()) then
info = psb_err_internal_error_ ; goto 9999
end if
ictxt = desc_a%get_context()
ctxt = desc_a%get_context()
icomm = desc_a%get_mpic()
call psb_info(ictxt, me, np)
call psb_info(ctxt, me, np)
if (present(keepnum)) then
keepnum_ = keepnum
@ -479,7 +482,7 @@ subroutine psb_lclcsp_allgather(globa, loca, desc_a, info, root, dupl,keepnum,k
call psb_loc_to_glob(loc_coo%ja(1:nzl),desc_a,info,iact='I')
nzbr(:) = 0
nzbr(me+1) = nzl
call psb_sum(ictxt,nzbr(1:np))
call psb_sum(ctxt,nzbr(1:np))
lnzbr = nzbr
nzg = sum(nzbr)
if ((nzg < 0).or.(nzg /= sum(lnzbr))) then
@ -554,7 +557,7 @@ subroutine psb_lclcsp_allgather(globa, loca, desc_a, info, root, dupl,keepnum,k
9999 continue
call psb_errpush(info,name)
call psb_error_handler(ione*ictxt,err_act)
call psb_error_handler(ctxt,err_act)
return

@ -57,7 +57,8 @@ subroutine psb_dgather_vect(globx, locx, desc_a, info, iroot)
! locals
integer(psb_mpk_) :: ictxt, np, me, root, iiroot, icomm, myrank, rootrank
type(psb_ctxt_type) :: ctxt
integer(psb_mpk_) :: np, me, root, iiroot, icomm, myrank, rootrank
integer(psb_ipk_) :: ierr(5), err_act, jlx, ilx, lda_locx, lda_globx, i
integer(psb_lpk_) :: m, n, k, ilocx, jlocx, idx, iglobx, jglobx
real(psb_dpk_), allocatable :: llocx(:)
@ -70,10 +71,10 @@ subroutine psb_dgather_vect(globx, locx, desc_a, info, iroot)
info = psb_err_internal_error_ ; goto 9999
end if
ictxt=desc_a%get_context()
ctxt=desc_a%get_context()
! check on blacs grid
call psb_info(ictxt, me, np)
call psb_info(ctxt, me, np)
if (np == -1) then
info = psb_err_context_error_
call psb_errpush(info,name)
@ -148,12 +149,12 @@ subroutine psb_dgather_vect(globx, locx, desc_a, info, iroot)
end if
end do
call psb_sum(ictxt,globx(1:m),root=root)
call psb_sum(ctxt,globx(1:m),root=root)
call psb_erractionrestore(err_act)
return
9999 call psb_error_handler(ione*ictxt,err_act)
9999 call psb_error_handler(ctxt,err_act)
return
@ -174,7 +175,8 @@ subroutine psb_dgather_multivect(globx, locx, desc_a, info, iroot)
! locals
integer(psb_mpk_) :: ictxt, np, me, root, iiroot, icomm, myrank, rootrank
type(psb_ctxt_type) :: ctxt
integer(psb_mpk_) :: np, me, root, iiroot, icomm, myrank, rootrank
integer(psb_ipk_) :: ierr(5), err_act, jlx, ilx, lda_locx, lda_globx, i
integer(psb_lpk_) :: m, n, k, ilocx, jlocx, idx, iglobx, jglobx
real(psb_dpk_), allocatable :: llocx(:,:)
@ -187,10 +189,10 @@ subroutine psb_dgather_multivect(globx, locx, desc_a, info, iroot)
info = psb_err_internal_error_ ; goto 9999
end if
ictxt=desc_a%get_context()
ctxt=desc_a%get_context()
! check on blacs grid
call psb_info(ictxt, me, np)
call psb_info(ctxt, me, np)
if (np == -1) then
info = psb_err_context_error_
call psb_errpush(info,name)
@ -264,12 +266,12 @@ subroutine psb_dgather_multivect(globx, locx, desc_a, info, iroot)
end if
end do
call psb_sum(ictxt,globx(1:m,1:k),root=root)
call psb_sum(ctxt,globx(1:m,1:k),root=root)
call psb_erractionrestore(err_act)
return
9999 call psb_error_handler(ione*ictxt,err_act)
9999 call psb_error_handler(ctxt,err_act)
return

@ -57,12 +57,12 @@ subroutine psb_dgatherm(globx, locx, desc_a, info, iroot)
! locals
integer(psb_mpk_) :: ictxt, np, me, root, iiroot, icomm, myrank, rootrank
type(psb_ctxt_type) :: ctxt
integer(psb_mpk_) :: np, me, root, iiroot, icomm, myrank, rootrank
integer(psb_ipk_) :: ierr(5), err_act, lda_locx, lda_globx, lock, globk,&
& maxk, k, jlx, ilx, i, j
integer(psb_lpk_) :: m, n, ilocx, jlocx, idx, iglobx, jglobx
character(len=20) :: name, ch_err
character(len=20) :: name, ch_err
name='psb_dgatherm'
info=psb_success_
@ -71,9 +71,9 @@ subroutine psb_dgatherm(globx, locx, desc_a, info, iroot)
info = psb_err_internal_error_ ; goto 9999
end if
ictxt=desc_a%get_context()
ctxt=desc_a%get_context()
! check on blacs grid
call psb_info(ictxt, me, np)
call psb_info(ctxt, me, np)
if (np == -1) then
info = psb_err_context_error_
call psb_errpush(info,name)
@ -110,7 +110,7 @@ subroutine psb_dgatherm(globx, locx, desc_a, info, iroot)
maxk = lock
k = maxk
call psb_bcast(ictxt,k,root=iiroot)
call psb_bcast(ctxt,k,root=iiroot)
! there should be a global check on k here!!!
@ -157,12 +157,12 @@ subroutine psb_dgatherm(globx, locx, desc_a, info, iroot)
end do
end do
call psb_sum(ictxt,globx(1:m,1:k),root=root)
call psb_sum(ctxt,globx(1:m,1:k),root=root)
call psb_erractionrestore(err_act)
return
9999 call psb_error_handler(ione*ictxt,err_act)
9999 call psb_error_handler(ctxt,err_act)
return
@ -231,7 +231,8 @@ subroutine psb_dgatherv(globx, locx, desc_a, info, iroot)
! locals
integer(psb_mpk_) :: ictxt, np, me, root, iiroot, icomm, myrank, rootrank
type(psb_ctxt_type) :: ctxt
integer(psb_mpk_) :: np, me, root, iiroot, icomm, myrank, rootrank
integer(psb_ipk_) :: ierr(5), err_act, lda_locx, lda_globx, lock, globk,&
& maxk, k, jlx, ilx, i, j
integer(psb_lpk_) :: m, n, ilocx, jlocx, idx, iglobx, jglobx
@ -245,10 +246,10 @@ subroutine psb_dgatherv(globx, locx, desc_a, info, iroot)
info = psb_err_internal_error_ ; goto 9999
end if
ictxt=desc_a%get_context()
ctxt=desc_a%get_context()
! check on blacs grid
call psb_info(ictxt, me, np)
call psb_info(ctxt, me, np)
if (np == -1) then
info = psb_err_context_error_
call psb_errpush(info,name)
@ -322,12 +323,12 @@ subroutine psb_dgatherv(globx, locx, desc_a, info, iroot)
end if
end do
call psb_sum(ictxt,globx(1:m),root=root)
call psb_sum(ctxt,globx(1:m),root=root)
call psb_erractionrestore(err_act)
return
9999 call psb_error_handler(ione*ictxt,err_act)
9999 call psb_error_handler(ctxt,err_act)
return

@ -65,7 +65,8 @@ subroutine psb_dhalo_vect(x,desc_a,info,work,tran,mode,data)
character, intent(in), optional :: tran
! locals
integer(psb_ipk_) :: ictxt, np, me, err_act, iix, jjx, &
type(psb_ctxt_type) :: ctxt
integer(psb_ipk_) :: np, me, err_act, iix, jjx, &
& nrow, ncol, lldx, imode, liwork,data_
integer(psb_lpk_) :: m, n, ix, ijx
real(psb_dpk_),pointer :: iwork(:)
@ -80,10 +81,10 @@ subroutine psb_dhalo_vect(x,desc_a,info,work,tran,mode,data)
info = psb_err_internal_error_ ; goto 9999
end if
ictxt=desc_a%get_context()
ctxt=desc_a%get_context()
! check on blacs grid
call psb_info(ictxt, me, np)
call psb_info(ctxt, me, np)
if (np == -1) then
info = psb_err_context_error_
call psb_errpush(info,name)
@ -179,7 +180,7 @@ subroutine psb_dhalo_vect(x,desc_a,info,work,tran,mode,data)
call psb_erractionrestore(err_act)
return
9999 call psb_error_handler(ione*ictxt,err_act)
9999 call psb_error_handler(ctxt,err_act)
return
end subroutine psb_dhalo_vect
@ -219,7 +220,8 @@ subroutine psb_dhalo_multivect(x,desc_a,info,work,tran,mode,data)
character, intent(in), optional :: tran
! locals
integer(psb_ipk_) :: ictxt, np, me, err_act, iix, jjx, &
type(psb_ctxt_type) :: ctxt
integer(psb_ipk_) :: np, me, err_act, iix, jjx, &
& nrow, ncol, lldx, imode, liwork,data_
integer(psb_lpk_) :: m, n, ix, ijx
real(psb_dpk_),pointer :: iwork(:)
@ -234,10 +236,10 @@ subroutine psb_dhalo_multivect(x,desc_a,info,work,tran,mode,data)
info = psb_err_internal_error_ ; goto 9999
end if
ictxt=desc_a%get_context()
ctxt=desc_a%get_context()
! check on blacs grid
call psb_info(ictxt, me, np)
call psb_info(ctxt, me, np)
if (np == -1) then
info = psb_err_context_error_
call psb_errpush(info,name)
@ -334,7 +336,7 @@ subroutine psb_dhalo_multivect(x,desc_a,info,work,tran,mode,data)
call psb_erractionrestore(err_act)
return
9999 call psb_error_handler(ione*ictxt,err_act)
9999 call psb_error_handler(ctxt,err_act)
return
end subroutine psb_dhalo_multivect

@ -65,7 +65,8 @@ subroutine psb_dhalom(x,desc_a,info,jx,ik,work,tran,mode,data)
character, intent(in), optional :: tran
! locals
integer(psb_mpk_) :: ictxt, np, me
type(psb_ctxt_type) :: ctxt
integer(psb_mpk_) :: np, me
integer(psb_ipk_) :: err_act, iix, jjx, k, maxk, nrow, imode, i,&
& liwork,data_, ldx
integer(psb_lpk_) :: m, n, ix, ijx
@ -81,10 +82,10 @@ subroutine psb_dhalom(x,desc_a,info,jx,ik,work,tran,mode,data)
info = psb_err_internal_error_ ; goto 9999
end if
ictxt=desc_a%get_context()
ctxt=desc_a%get_context()
! check on blacs grid
call psb_info(ictxt, me, np)
call psb_info(ctxt, me, np)
if (np == -1) then
info = psb_err_context_error_
call psb_errpush(info,name)
@ -192,7 +193,7 @@ subroutine psb_dhalom(x,desc_a,info,jx,ik,work,tran,mode,data)
call psb_erractionrestore(err_act)
return
9999 call psb_error_handler(ione*ictxt,err_act)
9999 call psb_error_handler(ctxt,err_act)
return
end subroutine psb_dhalom
@ -266,7 +267,8 @@ subroutine psb_dhalov(x,desc_a,info,work,tran,mode,data)
character, intent(in), optional :: tran
! locals
integer(psb_mpk_) :: ictxt, np, me
type(psb_ctxt_type) :: ctxt
integer(psb_mpk_) :: np, me
integer(psb_ipk_) :: err_act, ldx, iix, jjx, nrow, imode, liwork,data_
integer(psb_lpk_) :: m, n, ix, ijx
real(psb_dpk_),pointer :: iwork(:)
@ -281,10 +283,10 @@ subroutine psb_dhalov(x,desc_a,info,work,tran,mode,data)
info = psb_err_internal_error_ ; goto 9999
end if
ictxt=desc_a%get_context()
ctxt=desc_a%get_context()
! check on blacs grid
call psb_info(ictxt, me, np)
call psb_info(ctxt, me, np)
if (np == -1) then
info = psb_err_context_error_
call psb_errpush(info,name)
@ -373,7 +375,7 @@ subroutine psb_dhalov(x,desc_a,info,work,tran,mode,data)
call psb_erractionrestore(err_act)
return
9999 call psb_error_handler(ione*ictxt,err_act)
9999 call psb_error_handler(ctxt,err_act)
return
end subroutine psb_dhalov

@ -75,7 +75,8 @@ subroutine psb_dovrl_vect(x,desc_a,info,work,update,mode)
integer(psb_ipk_), intent(in), optional :: update,mode
! locals
integer(psb_ipk_) :: ictxt, np, me, err_act, k, iix, jjx, &
type(psb_ctxt_type) :: ctxt
integer(psb_ipk_) :: np, me, err_act, k, iix, jjx, &
& nrow, ncol, ldx, liwork, data_, update_, mode_
integer(psb_lpk_) :: m, n, ix, ijx
real(psb_dpk_),pointer :: iwork(:)
@ -90,10 +91,10 @@ subroutine psb_dovrl_vect(x,desc_a,info,work,update,mode)
info = psb_err_internal_error_ ; goto 9999
end if
ictxt=desc_a%get_context()
ctxt=desc_a%get_context()
! check on blacs grid
call psb_info(ictxt, me, np)
call psb_info(ctxt, me, np)
if (np == -1) then
info = psb_err_context_error_
call psb_errpush(info,name)
@ -175,7 +176,7 @@ subroutine psb_dovrl_vect(x,desc_a,info,work,update,mode)
call psb_erractionrestore(err_act)
return
9999 call psb_error_handler(ione*ictxt,err_act)
9999 call psb_error_handler(ctxt,err_act)
return
end subroutine psb_dovrl_vect
@ -224,7 +225,8 @@ subroutine psb_dovrl_multivect(x,desc_a,info,work,update,mode)
integer(psb_ipk_), intent(in), optional :: update,mode
! locals
integer(psb_ipk_) :: ictxt, np, me, err_act, k, iix, jjx, &
type(psb_ctxt_type) :: ctxt
integer(psb_ipk_) :: np, me, err_act, k, iix, jjx, &
& nrow, ncol, ldx, liwork, data_, update_, mode_
integer(psb_lpk_) :: m, n, ix, ijx
real(psb_dpk_),pointer :: iwork(:)
@ -239,10 +241,10 @@ subroutine psb_dovrl_multivect(x,desc_a,info,work,update,mode)
info = psb_err_internal_error_ ; goto 9999
end if
ictxt=desc_a%get_context()
ctxt=desc_a%get_context()
! check on blacs grid
call psb_info(ictxt, me, np)
call psb_info(ctxt, me, np)
if (np == -1) then
info = psb_err_context_error_
call psb_errpush(info,name)
@ -326,7 +328,7 @@ subroutine psb_dovrl_multivect(x,desc_a,info,work,update,mode)
call psb_erractionrestore(err_act)
return
9999 call psb_error_handler(ione*ictxt,err_act)
9999 call psb_error_handler(ctxt,err_act)
return
end subroutine psb_dovrl_multivect

@ -76,7 +76,8 @@ subroutine psb_dovrlm(x,desc_a,info,jx,ik,work,update,mode)
integer(psb_ipk_), intent(in), optional :: update,jx,ik,mode
! locals
integer(psb_mpk_) :: ictxt, np, me
type(psb_ctxt_type) :: ctxt
integer(psb_mpk_) :: np, me
integer(psb_ipk_) :: err_act, iix, jjx, nrow, ncol, k, maxk, update_,&
& mode_, liwork, ldx
integer(psb_lpk_) :: m, n, ix, ijx
@ -92,10 +93,10 @@ subroutine psb_dovrlm(x,desc_a,info,jx,ik,work,update,mode)
info = psb_err_internal_error_ ; goto 9999
end if
ictxt=desc_a%get_context()
ctxt=desc_a%get_context()
! check on blacs grid
call psb_info(ictxt, me, np)
call psb_info(ctxt, me, np)
if (np == -1) then
info = psb_err_context_error_
call psb_errpush(info,name)
@ -187,7 +188,7 @@ subroutine psb_dovrlm(x,desc_a,info,jx,ik,work,update,mode)
call psb_erractionrestore(err_act)
return
9999 call psb_error_handler(ione*ictxt,err_act)
9999 call psb_error_handler(ctxt,err_act)
return
end subroutine psb_dovrlm
@ -265,7 +266,8 @@ subroutine psb_dovrlv(x,desc_a,info,work,update,mode)
integer(psb_ipk_), intent(in), optional :: update,mode
! locals
integer(psb_ipk_) :: ictxt, np, me, err_act, iix, jjx, nrow, ncol, &
type(psb_ctxt_type) :: ctxt
integer(psb_ipk_) :: np, me, err_act, iix, jjx, nrow, ncol, &
& k, update_, mode_, liwork, ldx
integer(psb_lpk_) :: m, n, ix, ijx
real(psb_dpk_),pointer :: iwork(:)
@ -280,10 +282,10 @@ subroutine psb_dovrlv(x,desc_a,info,work,update,mode)
info = psb_err_internal_error_ ; goto 9999
end if
ictxt=desc_a%get_context()
ctxt=desc_a%get_context()
! check on blacs grid
call psb_info(ictxt, me, np)
call psb_info(ctxt, me, np)
if (np == -1) then
info = psb_err_context_error_
call psb_errpush(info,name)
@ -368,7 +370,7 @@ subroutine psb_dovrlv(x,desc_a,info,work,update,mode)
call psb_erractionrestore(err_act)
return
9999 call psb_error_handler(ione*ictxt,err_act)
9999 call psb_error_handler(ctxt,err_act)
return
end subroutine psb_dovrlv

@ -54,7 +54,8 @@ subroutine psb_dscatter_vect(globx, locx, desc_a, info, root, mold)
class(psb_d_base_vect_type), intent(in), optional :: mold
! locals
integer(psb_mpk_) :: ictxt, np, me, icomm, myrank, rootrank
type(psb_ctxt_type) :: ctxt
integer(psb_mpk_) :: np, me, icomm, myrank, rootrank
integer(psb_ipk_) :: ierr(5), err_act, m, n, i, j, idx, nrow, iglobx, jglobx,&
& ilocx, jlocx, lda_locx, lda_globx, k, pos, ilx, jlx
real(psb_dpk_), allocatable :: vlocx(:)
@ -67,13 +68,13 @@ subroutine psb_dscatter_vect(globx, locx, desc_a, info, root, mold)
if (psb_errstatus_fatal()) then
info = psb_err_internal_error_ ; goto 9999
end if
ictxt=desc_a%get_context()
ctxt=desc_a%get_context()
debug_unit = psb_get_debug_unit()
debug_level = psb_get_debug_level()
! check on blacs grid
call psb_info(ictxt, me, np)
call psb_info(ctxt, me, np)
if (np == -1) then
info = psb_err_context_error_
call psb_errpush(info,name)
@ -92,7 +93,7 @@ subroutine psb_dscatter_vect(globx, locx, desc_a, info, root, mold)
call psb_erractionrestore(err_act)
return
9999 call psb_error_handler(ione*ictxt,err_act)
9999 call psb_error_handler(ctxt,err_act)
return

@ -62,7 +62,8 @@ subroutine psb_dscatterm(globx, locx, desc_a, info, root)
! locals
integer(psb_mpk_) :: ictxt, np, me, iroot, icomm, myrank, rootrank, iam, nlr
type(psb_ctxt_type) :: ctxt
integer(psb_mpk_) :: np, me, iroot, icomm, myrank, rootrank, iam, nlr
integer(psb_ipk_) :: ierr(5), err_act, nrow,&
& ilocx, jlocx, lda_locx, lda_globx, lock, globk, k, maxk, &
& col,pos
@ -79,10 +80,10 @@ subroutine psb_dscatterm(globx, locx, desc_a, info, root)
info = psb_err_internal_error_ ; goto 9999
end if
ictxt=desc_a%get_context()
ctxt=desc_a%get_context()
! check on blacs grid
call psb_info(ictxt, iam, np)
call psb_info(ctxt, iam, np)
if (np == -1) then
info = psb_err_context_error_
call psb_errpush(info,name)
@ -107,8 +108,8 @@ subroutine psb_dscatterm(globx, locx, desc_a, info, root)
m = desc_a%get_global_rows()
n = desc_a%get_global_cols()
icomm = psb_get_mpi_comm(ictxt)
myrank = psb_get_mpi_rank(ictxt,me)
icomm = psb_get_mpi_comm(ctxt)
myrank = psb_get_mpi_rank(ctxt,me)
if (iroot==-1) then
lda_globx = size(globx, 1)
@ -159,7 +160,7 @@ subroutine psb_dscatterm(globx, locx, desc_a, info, root)
end do
else
rootrank = psb_get_mpi_rank(ictxt,iroot)
rootrank = psb_get_mpi_rank(ctxt,iroot)
!
! This is potentially unsafe when IPK=8
! But then, IPK=8 is highly experimental anyway.
@ -235,7 +236,7 @@ subroutine psb_dscatterm(globx, locx, desc_a, info, root)
call psb_erractionrestore(err_act)
return
9999 call psb_error_handler(ione*ictxt,err_act)
9999 call psb_error_handler(ctxt,err_act)
return
@ -306,7 +307,8 @@ subroutine psb_dscatterv(globx, locx, desc_a, info, root)
! locals
integer(psb_mpk_) :: ictxt, np, iam, iroot, iiroot, icomm, myrank, rootrank, nlr
type(psb_ctxt_type) :: ctxt
integer(psb_mpk_) :: np, iam, iroot, iiroot, icomm, myrank, rootrank, nlr
integer(psb_ipk_) :: ierr(5), err_act, nrow,&
& ilocx, jlocx, lda_locx, lda_globx, k, pos, ilx, jlx
integer(psb_lpk_) :: m, n, i, j, idx, iglobx, jglobx
@ -322,13 +324,13 @@ subroutine psb_dscatterv(globx, locx, desc_a, info, root)
if (psb_errstatus_fatal()) then
info = psb_err_internal_error_ ; goto 9999
end if
ictxt=desc_a%get_context()
ctxt=desc_a%get_context()
debug_unit = psb_get_debug_unit()
debug_level = psb_get_debug_level()
! check on blacs grid
call psb_info(ictxt, iam, np)
call psb_info(ctxt, iam, np)
if (np == -1) then
info = psb_err_context_error_
call psb_errpush(info,name)
@ -347,8 +349,8 @@ subroutine psb_dscatterv(globx, locx, desc_a, info, root)
iroot = psb_root_
end if
icomm = psb_get_mpi_comm(ictxt)
myrank = psb_get_mpi_rank(ictxt,iam)
icomm = psb_get_mpi_comm(ctxt)
myrank = psb_get_mpi_rank(ctxt,iam)
iglobx = 1
jglobx = 1
@ -394,7 +396,7 @@ subroutine psb_dscatterv(globx, locx, desc_a, info, root)
locx(i)=globx(ltg(i))
end do
else
rootrank = psb_get_mpi_rank(ictxt,iroot)
rootrank = psb_get_mpi_rank(ctxt,iroot)
!
! This is potentially unsafe when IPK=8
! But then, IPK=8 is highly experimental anyway.
@ -472,7 +474,7 @@ subroutine psb_dscatterv(globx, locx, desc_a, info, root)
call psb_erractionrestore(err_act)
return
9999 call psb_error_handler(ione*ictxt,err_act)
9999 call psb_error_handler(ctxt,err_act)
return

@ -67,7 +67,8 @@ subroutine psb_dsp_allgather(globa, loca, desc_a, info, root, dupl,keepnum,keep
integer(psb_ipk_) :: err_act, dupl_
integer(psb_ipk_) :: ip,naggrm1,naggrp1, i, j, k
logical :: keepnum_, keeploc_
integer(psb_mpk_) :: ictxt,np,me
type(psb_ctxt_type) :: ctxt
integer(psb_mpk_) :: np, me
integer(psb_mpk_) :: icomm, minfo, ndx, root_
integer(psb_mpk_), allocatable :: nzbr(:), idisp(:)
integer(psb_lpk_), allocatable :: locia(:), locja(:), glbia(:), glbja(:)
@ -82,9 +83,9 @@ subroutine psb_dsp_allgather(globa, loca, desc_a, info, root, dupl,keepnum,keep
if (psb_errstatus_fatal()) then
info = psb_err_internal_error_ ; goto 9999
end if
ictxt = desc_a%get_context()
ctxt = desc_a%get_context()
icomm = desc_a%get_mpic()
call psb_info(ictxt, me, np)
call psb_info(ctxt, me, np)
if (present(keepnum)) then
keepnum_ = keepnum
@ -128,7 +129,7 @@ subroutine psb_dsp_allgather(globa, loca, desc_a, info, root, dupl,keepnum,keep
call psb_loc_to_glob(loc_coo%ja(1:nzl),locja(1:nzl),desc_a,info,iact='I')
nzbr(:) = 0
nzbr(me+1) = nzl
call psb_sum(ictxt,nzbr(1:np))
call psb_sum(ctxt,nzbr(1:np))
nzg = sum(nzbr)
if (nzg <0) then
info = psb_err_mpi_int_ovflw_
@ -216,7 +217,7 @@ subroutine psb_dsp_allgather(globa, loca, desc_a, info, root, dupl,keepnum,keep
9999 continue
call psb_errpush(info,name)
call psb_error_handler(ione*ictxt,err_act)
call psb_error_handler(ctxt,err_act)
return
@ -249,7 +250,8 @@ subroutine psb_ldsp_allgather(globa, loca, desc_a, info, root, dupl,keepnum,kee
integer(psb_ipk_) :: err_act, dupl_
integer(psb_ipk_) :: ip,naggrm1,naggrp1, i, j, k, nzl
logical :: keepnum_, keeploc_
integer(psb_mpk_) :: ictxt,np,me
type(psb_ctxt_type) :: ctxt
integer(psb_ipk_) :: np, me
integer(psb_mpk_) :: icomm, minfo, ndx, root_
integer(psb_mpk_), allocatable :: nzbr(:), idisp(:)
integer(psb_lpk_), allocatable :: lnzbr(:)
@ -264,9 +266,9 @@ subroutine psb_ldsp_allgather(globa, loca, desc_a, info, root, dupl,keepnum,kee
if (psb_errstatus_fatal()) then
info = psb_err_internal_error_ ; goto 9999
end if
ictxt = desc_a%get_context()
ctxt = desc_a%get_context()
icomm = desc_a%get_mpic()
call psb_info(ictxt, me, np)
call psb_info(ctxt, me, np)
if (present(keepnum)) then
keepnum_ = keepnum
@ -308,7 +310,7 @@ subroutine psb_ldsp_allgather(globa, loca, desc_a, info, root, dupl,keepnum,kee
call psb_loc_to_glob(loc_coo%ja(1:nzl),desc_a,info,iact='I')
nzbr(:) = 0
nzbr(me+1) = nzl
call psb_sum(ictxt,nzbr(1:np))
call psb_sum(ctxt,nzbr(1:np))
lnzbr = nzbr
nzg = sum(nzbr)
if ((nzg < 0).or.(nzg /= sum(lnzbr))) then
@ -388,7 +390,7 @@ subroutine psb_ldsp_allgather(globa, loca, desc_a, info, root, dupl,keepnum,kee
9999 continue
call psb_errpush(info,name)
call psb_error_handler(ione*ictxt,err_act)
call psb_error_handler(ctxt,err_act)
return
@ -420,7 +422,8 @@ subroutine psb_ldldsp_allgather(globa, loca, desc_a, info, root, dupl,keepnum,k
integer(psb_ipk_) :: err_act, dupl_
integer(psb_lpk_) :: ip,naggrm1,naggrp1, i, j, k, nzl
logical :: keepnum_, keeploc_
integer(psb_mpk_) :: ictxt,np,me
type(psb_ctxt_type) :: ctxt
integer(psb_ipk_) :: np, me
integer(psb_mpk_) :: icomm, minfo, ndx, root_
integer(psb_mpk_), allocatable :: nzbr(:), idisp(:)
integer(psb_lpk_), allocatable :: lnzbr(:)
@ -435,9 +438,9 @@ subroutine psb_ldldsp_allgather(globa, loca, desc_a, info, root, dupl,keepnum,k
if (psb_errstatus_fatal()) then
info = psb_err_internal_error_ ; goto 9999
end if
ictxt = desc_a%get_context()
ctxt = desc_a%get_context()
icomm = desc_a%get_mpic()
call psb_info(ictxt, me, np)
call psb_info(ctxt, me, np)
if (present(keepnum)) then
keepnum_ = keepnum
@ -479,7 +482,7 @@ subroutine psb_ldldsp_allgather(globa, loca, desc_a, info, root, dupl,keepnum,k
call psb_loc_to_glob(loc_coo%ja(1:nzl),desc_a,info,iact='I')
nzbr(:) = 0
nzbr(me+1) = nzl
call psb_sum(ictxt,nzbr(1:np))
call psb_sum(ctxt,nzbr(1:np))
lnzbr = nzbr
nzg = sum(nzbr)
if ((nzg < 0).or.(nzg /= sum(lnzbr))) then
@ -554,7 +557,7 @@ subroutine psb_ldldsp_allgather(globa, loca, desc_a, info, root, dupl,keepnum,k
9999 continue
call psb_errpush(info,name)
call psb_error_handler(ione*ictxt,err_act)
call psb_error_handler(ctxt,err_act)
return

@ -57,12 +57,12 @@ subroutine psb_egatherm(globx, locx, desc_a, info, iroot)
! locals
integer(psb_mpk_) :: ictxt, np, me, root, iiroot, icomm, myrank, rootrank
type(psb_ctxt_type) :: ctxt
integer(psb_mpk_) :: np, me, root, iiroot, icomm, myrank, rootrank
integer(psb_ipk_) :: ierr(5), err_act, lda_locx, lda_globx, lock, globk,&
& maxk, k, jlx, ilx, i, j
integer(psb_lpk_) :: m, n, ilocx, jlocx, idx, iglobx, jglobx
character(len=20) :: name, ch_err
character(len=20) :: name, ch_err
name='psb_egatherm'
info=psb_success_
@ -71,9 +71,9 @@ subroutine psb_egatherm(globx, locx, desc_a, info, iroot)
info = psb_err_internal_error_ ; goto 9999
end if
ictxt=desc_a%get_context()
ctxt=desc_a%get_context()
! check on blacs grid
call psb_info(ictxt, me, np)
call psb_info(ctxt, me, np)
if (np == -1) then
info = psb_err_context_error_
call psb_errpush(info,name)
@ -110,7 +110,7 @@ subroutine psb_egatherm(globx, locx, desc_a, info, iroot)
maxk = lock
k = maxk
call psb_bcast(ictxt,k,root=iiroot)
call psb_bcast(ctxt,k,root=iiroot)
! there should be a global check on k here!!!
@ -157,12 +157,12 @@ subroutine psb_egatherm(globx, locx, desc_a, info, iroot)
end do
end do
call psb_sum(ictxt,globx(1:m,1:k),root=root)
call psb_sum(ctxt,globx(1:m,1:k),root=root)
call psb_erractionrestore(err_act)
return
9999 call psb_error_handler(ione*ictxt,err_act)
9999 call psb_error_handler(ctxt,err_act)
return
@ -231,7 +231,8 @@ subroutine psb_egatherv(globx, locx, desc_a, info, iroot)
! locals
integer(psb_mpk_) :: ictxt, np, me, root, iiroot, icomm, myrank, rootrank
type(psb_ctxt_type) :: ctxt
integer(psb_mpk_) :: np, me, root, iiroot, icomm, myrank, rootrank
integer(psb_ipk_) :: ierr(5), err_act, lda_locx, lda_globx, lock, globk,&
& maxk, k, jlx, ilx, i, j
integer(psb_lpk_) :: m, n, ilocx, jlocx, idx, iglobx, jglobx
@ -245,10 +246,10 @@ subroutine psb_egatherv(globx, locx, desc_a, info, iroot)
info = psb_err_internal_error_ ; goto 9999
end if
ictxt=desc_a%get_context()
ctxt=desc_a%get_context()
! check on blacs grid
call psb_info(ictxt, me, np)
call psb_info(ctxt, me, np)
if (np == -1) then
info = psb_err_context_error_
call psb_errpush(info,name)
@ -322,12 +323,12 @@ subroutine psb_egatherv(globx, locx, desc_a, info, iroot)
end if
end do
call psb_sum(ictxt,globx(1:m),root=root)
call psb_sum(ctxt,globx(1:m),root=root)
call psb_erractionrestore(err_act)
return
9999 call psb_error_handler(ione*ictxt,err_act)
9999 call psb_error_handler(ctxt,err_act)
return

@ -65,7 +65,8 @@ subroutine psb_ehalom(x,desc_a,info,jx,ik,work,tran,mode,data)
character, intent(in), optional :: tran
! locals
integer(psb_mpk_) :: ictxt, np, me
type(psb_ctxt_type) :: ctxt
integer(psb_mpk_) :: np, me
integer(psb_ipk_) :: err_act, iix, jjx, k, maxk, nrow, imode, i,&
& liwork,data_, ldx
integer(psb_lpk_) :: m, n, ix, ijx
@ -81,10 +82,10 @@ subroutine psb_ehalom(x,desc_a,info,jx,ik,work,tran,mode,data)
info = psb_err_internal_error_ ; goto 9999
end if
ictxt=desc_a%get_context()
ctxt=desc_a%get_context()
! check on blacs grid
call psb_info(ictxt, me, np)
call psb_info(ctxt, me, np)
if (np == -1) then
info = psb_err_context_error_
call psb_errpush(info,name)
@ -192,7 +193,7 @@ subroutine psb_ehalom(x,desc_a,info,jx,ik,work,tran,mode,data)
call psb_erractionrestore(err_act)
return
9999 call psb_error_handler(ione*ictxt,err_act)
9999 call psb_error_handler(ctxt,err_act)
return
end subroutine psb_ehalom
@ -266,7 +267,8 @@ subroutine psb_ehalov(x,desc_a,info,work,tran,mode,data)
character, intent(in), optional :: tran
! locals
integer(psb_mpk_) :: ictxt, np, me
type(psb_ctxt_type) :: ctxt
integer(psb_mpk_) :: np, me
integer(psb_ipk_) :: err_act, ldx, iix, jjx, nrow, imode, liwork,data_
integer(psb_lpk_) :: m, n, ix, ijx
integer(psb_epk_),pointer :: iwork(:)
@ -281,10 +283,10 @@ subroutine psb_ehalov(x,desc_a,info,work,tran,mode,data)
info = psb_err_internal_error_ ; goto 9999
end if
ictxt=desc_a%get_context()
ctxt=desc_a%get_context()
! check on blacs grid
call psb_info(ictxt, me, np)
call psb_info(ctxt, me, np)
if (np == -1) then
info = psb_err_context_error_
call psb_errpush(info,name)
@ -373,7 +375,7 @@ subroutine psb_ehalov(x,desc_a,info,work,tran,mode,data)
call psb_erractionrestore(err_act)
return
9999 call psb_error_handler(ione*ictxt,err_act)
9999 call psb_error_handler(ctxt,err_act)
return
end subroutine psb_ehalov

@ -76,7 +76,8 @@ subroutine psb_eovrlm(x,desc_a,info,jx,ik,work,update,mode)
integer(psb_ipk_), intent(in), optional :: update,jx,ik,mode
! locals
integer(psb_mpk_) :: ictxt, np, me
type(psb_ctxt_type) :: ctxt
integer(psb_mpk_) :: np, me
integer(psb_ipk_) :: err_act, iix, jjx, nrow, ncol, k, maxk, update_,&
& mode_, liwork, ldx
integer(psb_lpk_) :: m, n, ix, ijx
@ -92,10 +93,10 @@ subroutine psb_eovrlm(x,desc_a,info,jx,ik,work,update,mode)
info = psb_err_internal_error_ ; goto 9999
end if
ictxt=desc_a%get_context()
ctxt=desc_a%get_context()
! check on blacs grid
call psb_info(ictxt, me, np)
call psb_info(ctxt, me, np)
if (np == -1) then
info = psb_err_context_error_
call psb_errpush(info,name)
@ -187,7 +188,7 @@ subroutine psb_eovrlm(x,desc_a,info,jx,ik,work,update,mode)
call psb_erractionrestore(err_act)
return
9999 call psb_error_handler(ione*ictxt,err_act)
9999 call psb_error_handler(ctxt,err_act)
return
end subroutine psb_eovrlm
@ -265,7 +266,8 @@ subroutine psb_eovrlv(x,desc_a,info,work,update,mode)
integer(psb_ipk_), intent(in), optional :: update,mode
! locals
integer(psb_ipk_) :: ictxt, np, me, err_act, iix, jjx, nrow, ncol, &
type(psb_ctxt_type) :: ctxt
integer(psb_ipk_) :: np, me, err_act, iix, jjx, nrow, ncol, &
& k, update_, mode_, liwork, ldx
integer(psb_lpk_) :: m, n, ix, ijx
integer(psb_epk_),pointer :: iwork(:)
@ -280,10 +282,10 @@ subroutine psb_eovrlv(x,desc_a,info,work,update,mode)
info = psb_err_internal_error_ ; goto 9999
end if
ictxt=desc_a%get_context()
ctxt=desc_a%get_context()
! check on blacs grid
call psb_info(ictxt, me, np)
call psb_info(ctxt, me, np)
if (np == -1) then
info = psb_err_context_error_
call psb_errpush(info,name)
@ -368,7 +370,7 @@ subroutine psb_eovrlv(x,desc_a,info,work,update,mode)
call psb_erractionrestore(err_act)
return
9999 call psb_error_handler(ione*ictxt,err_act)
9999 call psb_error_handler(ctxt,err_act)
return
end subroutine psb_eovrlv

@ -62,7 +62,8 @@ subroutine psb_escatterm(globx, locx, desc_a, info, root)
! locals
integer(psb_mpk_) :: ictxt, np, me, iroot, icomm, myrank, rootrank, iam, nlr
type(psb_ctxt_type) :: ctxt
integer(psb_mpk_) :: np, me, iroot, icomm, myrank, rootrank, iam, nlr
integer(psb_ipk_) :: ierr(5), err_act, nrow,&
& ilocx, jlocx, lda_locx, lda_globx, lock, globk, k, maxk, &
& col,pos
@ -79,10 +80,10 @@ subroutine psb_escatterm(globx, locx, desc_a, info, root)
info = psb_err_internal_error_ ; goto 9999
end if
ictxt=desc_a%get_context()
ctxt=desc_a%get_context()
! check on blacs grid
call psb_info(ictxt, iam, np)
call psb_info(ctxt, iam, np)
if (np == -1) then
info = psb_err_context_error_
call psb_errpush(info,name)
@ -107,8 +108,8 @@ subroutine psb_escatterm(globx, locx, desc_a, info, root)
m = desc_a%get_global_rows()
n = desc_a%get_global_cols()
icomm = psb_get_mpi_comm(ictxt)
myrank = psb_get_mpi_rank(ictxt,me)
icomm = psb_get_mpi_comm(ctxt)
myrank = psb_get_mpi_rank(ctxt,me)
if (iroot==-1) then
lda_globx = size(globx, 1)
@ -159,7 +160,7 @@ subroutine psb_escatterm(globx, locx, desc_a, info, root)
end do
else
rootrank = psb_get_mpi_rank(ictxt,iroot)
rootrank = psb_get_mpi_rank(ctxt,iroot)
!
! This is potentially unsafe when IPK=8
! But then, IPK=8 is highly experimental anyway.
@ -235,7 +236,7 @@ subroutine psb_escatterm(globx, locx, desc_a, info, root)
call psb_erractionrestore(err_act)
return
9999 call psb_error_handler(ione*ictxt,err_act)
9999 call psb_error_handler(ctxt,err_act)
return
@ -306,7 +307,8 @@ subroutine psb_escatterv(globx, locx, desc_a, info, root)
! locals
integer(psb_mpk_) :: ictxt, np, iam, iroot, iiroot, icomm, myrank, rootrank, nlr
type(psb_ctxt_type) :: ctxt
integer(psb_mpk_) :: np, iam, iroot, iiroot, icomm, myrank, rootrank, nlr
integer(psb_ipk_) :: ierr(5), err_act, nrow,&
& ilocx, jlocx, lda_locx, lda_globx, k, pos, ilx, jlx
integer(psb_lpk_) :: m, n, i, j, idx, iglobx, jglobx
@ -322,13 +324,13 @@ subroutine psb_escatterv(globx, locx, desc_a, info, root)
if (psb_errstatus_fatal()) then
info = psb_err_internal_error_ ; goto 9999
end if
ictxt=desc_a%get_context()
ctxt=desc_a%get_context()
debug_unit = psb_get_debug_unit()
debug_level = psb_get_debug_level()
! check on blacs grid
call psb_info(ictxt, iam, np)
call psb_info(ctxt, iam, np)
if (np == -1) then
info = psb_err_context_error_
call psb_errpush(info,name)
@ -347,8 +349,8 @@ subroutine psb_escatterv(globx, locx, desc_a, info, root)
iroot = psb_root_
end if
icomm = psb_get_mpi_comm(ictxt)
myrank = psb_get_mpi_rank(ictxt,iam)
icomm = psb_get_mpi_comm(ctxt)
myrank = psb_get_mpi_rank(ctxt,iam)
iglobx = 1
jglobx = 1
@ -394,7 +396,7 @@ subroutine psb_escatterv(globx, locx, desc_a, info, root)
locx(i)=globx(ltg(i))
end do
else
rootrank = psb_get_mpi_rank(ictxt,iroot)
rootrank = psb_get_mpi_rank(ctxt,iroot)
!
! This is potentially unsafe when IPK=8
! But then, IPK=8 is highly experimental anyway.
@ -472,7 +474,7 @@ subroutine psb_escatterv(globx, locx, desc_a, info, root)
call psb_erractionrestore(err_act)
return
9999 call psb_error_handler(ione*ictxt,err_act)
9999 call psb_error_handler(ctxt,err_act)
return

@ -57,12 +57,12 @@ subroutine psb_i2gatherm(globx, locx, desc_a, info, iroot)
! locals
integer(psb_mpk_) :: ictxt, np, me, root, iiroot, icomm, myrank, rootrank
type(psb_ctxt_type) :: ctxt
integer(psb_mpk_) :: np, me, root, iiroot, icomm, myrank, rootrank
integer(psb_ipk_) :: ierr(5), err_act, lda_locx, lda_globx, lock, globk,&
& maxk, k, jlx, ilx, i, j
integer(psb_lpk_) :: m, n, ilocx, jlocx, idx, iglobx, jglobx
character(len=20) :: name, ch_err
character(len=20) :: name, ch_err
name='psb_i2gatherm'
info=psb_success_
@ -71,9 +71,9 @@ subroutine psb_i2gatherm(globx, locx, desc_a, info, iroot)
info = psb_err_internal_error_ ; goto 9999
end if
ictxt=desc_a%get_context()
ctxt=desc_a%get_context()
! check on blacs grid
call psb_info(ictxt, me, np)
call psb_info(ctxt, me, np)
if (np == -1) then
info = psb_err_context_error_
call psb_errpush(info,name)
@ -110,7 +110,7 @@ subroutine psb_i2gatherm(globx, locx, desc_a, info, iroot)
maxk = lock
k = maxk
call psb_bcast(ictxt,k,root=iiroot)
call psb_bcast(ctxt,k,root=iiroot)
! there should be a global check on k here!!!
@ -157,12 +157,12 @@ subroutine psb_i2gatherm(globx, locx, desc_a, info, iroot)
end do
end do
call psb_sum(ictxt,globx(1:m,1:k),root=root)
call psb_sum(ctxt,globx(1:m,1:k),root=root)
call psb_erractionrestore(err_act)
return
9999 call psb_error_handler(ione*ictxt,err_act)
9999 call psb_error_handler(ctxt,err_act)
return
@ -231,7 +231,8 @@ subroutine psb_i2gatherv(globx, locx, desc_a, info, iroot)
! locals
integer(psb_mpk_) :: ictxt, np, me, root, iiroot, icomm, myrank, rootrank
type(psb_ctxt_type) :: ctxt
integer(psb_mpk_) :: np, me, root, iiroot, icomm, myrank, rootrank
integer(psb_ipk_) :: ierr(5), err_act, lda_locx, lda_globx, lock, globk,&
& maxk, k, jlx, ilx, i, j
integer(psb_lpk_) :: m, n, ilocx, jlocx, idx, iglobx, jglobx
@ -245,10 +246,10 @@ subroutine psb_i2gatherv(globx, locx, desc_a, info, iroot)
info = psb_err_internal_error_ ; goto 9999
end if
ictxt=desc_a%get_context()
ctxt=desc_a%get_context()
! check on blacs grid
call psb_info(ictxt, me, np)
call psb_info(ctxt, me, np)
if (np == -1) then
info = psb_err_context_error_
call psb_errpush(info,name)
@ -322,12 +323,12 @@ subroutine psb_i2gatherv(globx, locx, desc_a, info, iroot)
end if
end do
call psb_sum(ictxt,globx(1:m),root=root)
call psb_sum(ctxt,globx(1:m),root=root)
call psb_erractionrestore(err_act)
return
9999 call psb_error_handler(ione*ictxt,err_act)
9999 call psb_error_handler(ctxt,err_act)
return

@ -65,7 +65,8 @@ subroutine psb_i2halom(x,desc_a,info,jx,ik,work,tran,mode,data)
character, intent(in), optional :: tran
! locals
integer(psb_mpk_) :: ictxt, np, me
type(psb_ctxt_type) :: ctxt
integer(psb_mpk_) :: np, me
integer(psb_ipk_) :: err_act, iix, jjx, k, maxk, nrow, imode, i,&
& liwork,data_, ldx
integer(psb_lpk_) :: m, n, ix, ijx
@ -81,10 +82,10 @@ subroutine psb_i2halom(x,desc_a,info,jx,ik,work,tran,mode,data)
info = psb_err_internal_error_ ; goto 9999
end if
ictxt=desc_a%get_context()
ctxt=desc_a%get_context()
! check on blacs grid
call psb_info(ictxt, me, np)
call psb_info(ctxt, me, np)
if (np == -1) then
info = psb_err_context_error_
call psb_errpush(info,name)
@ -192,7 +193,7 @@ subroutine psb_i2halom(x,desc_a,info,jx,ik,work,tran,mode,data)
call psb_erractionrestore(err_act)
return
9999 call psb_error_handler(ione*ictxt,err_act)
9999 call psb_error_handler(ctxt,err_act)
return
end subroutine psb_i2halom
@ -266,7 +267,8 @@ subroutine psb_i2halov(x,desc_a,info,work,tran,mode,data)
character, intent(in), optional :: tran
! locals
integer(psb_mpk_) :: ictxt, np, me
type(psb_ctxt_type) :: ctxt
integer(psb_mpk_) :: np, me
integer(psb_ipk_) :: err_act, ldx, iix, jjx, nrow, imode, liwork,data_
integer(psb_lpk_) :: m, n, ix, ijx
integer(psb_i2pk_),pointer :: iwork(:)
@ -281,10 +283,10 @@ subroutine psb_i2halov(x,desc_a,info,work,tran,mode,data)
info = psb_err_internal_error_ ; goto 9999
end if
ictxt=desc_a%get_context()
ctxt=desc_a%get_context()
! check on blacs grid
call psb_info(ictxt, me, np)
call psb_info(ctxt, me, np)
if (np == -1) then
info = psb_err_context_error_
call psb_errpush(info,name)
@ -373,7 +375,7 @@ subroutine psb_i2halov(x,desc_a,info,work,tran,mode,data)
call psb_erractionrestore(err_act)
return
9999 call psb_error_handler(ione*ictxt,err_act)
9999 call psb_error_handler(ctxt,err_act)
return
end subroutine psb_i2halov

@ -76,7 +76,8 @@ subroutine psb_i2ovrlm(x,desc_a,info,jx,ik,work,update,mode)
integer(psb_ipk_), intent(in), optional :: update,jx,ik,mode
! locals
integer(psb_mpk_) :: ictxt, np, me
type(psb_ctxt_type) :: ctxt
integer(psb_mpk_) :: np, me
integer(psb_ipk_) :: err_act, iix, jjx, nrow, ncol, k, maxk, update_,&
& mode_, liwork, ldx
integer(psb_lpk_) :: m, n, ix, ijx
@ -92,10 +93,10 @@ subroutine psb_i2ovrlm(x,desc_a,info,jx,ik,work,update,mode)
info = psb_err_internal_error_ ; goto 9999
end if
ictxt=desc_a%get_context()
ctxt=desc_a%get_context()
! check on blacs grid
call psb_info(ictxt, me, np)
call psb_info(ctxt, me, np)
if (np == -1) then
info = psb_err_context_error_
call psb_errpush(info,name)
@ -187,7 +188,7 @@ subroutine psb_i2ovrlm(x,desc_a,info,jx,ik,work,update,mode)
call psb_erractionrestore(err_act)
return
9999 call psb_error_handler(ione*ictxt,err_act)
9999 call psb_error_handler(ctxt,err_act)
return
end subroutine psb_i2ovrlm
@ -265,7 +266,8 @@ subroutine psb_i2ovrlv(x,desc_a,info,work,update,mode)
integer(psb_ipk_), intent(in), optional :: update,mode
! locals
integer(psb_ipk_) :: ictxt, np, me, err_act, iix, jjx, nrow, ncol, &
type(psb_ctxt_type) :: ctxt
integer(psb_ipk_) :: np, me, err_act, iix, jjx, nrow, ncol, &
& k, update_, mode_, liwork, ldx
integer(psb_lpk_) :: m, n, ix, ijx
integer(psb_i2pk_),pointer :: iwork(:)
@ -280,10 +282,10 @@ subroutine psb_i2ovrlv(x,desc_a,info,work,update,mode)
info = psb_err_internal_error_ ; goto 9999
end if
ictxt=desc_a%get_context()
ctxt=desc_a%get_context()
! check on blacs grid
call psb_info(ictxt, me, np)
call psb_info(ctxt, me, np)
if (np == -1) then
info = psb_err_context_error_
call psb_errpush(info,name)
@ -368,7 +370,7 @@ subroutine psb_i2ovrlv(x,desc_a,info,work,update,mode)
call psb_erractionrestore(err_act)
return
9999 call psb_error_handler(ione*ictxt,err_act)
9999 call psb_error_handler(ctxt,err_act)
return
end subroutine psb_i2ovrlv

@ -62,7 +62,8 @@ subroutine psb_i2scatterm(globx, locx, desc_a, info, root)
! locals
integer(psb_mpk_) :: ictxt, np, me, iroot, icomm, myrank, rootrank, iam, nlr
type(psb_ctxt_type) :: ctxt
integer(psb_mpk_) :: np, me, iroot, icomm, myrank, rootrank, iam, nlr
integer(psb_ipk_) :: ierr(5), err_act, nrow,&
& ilocx, jlocx, lda_locx, lda_globx, lock, globk, k, maxk, &
& col,pos
@ -79,10 +80,10 @@ subroutine psb_i2scatterm(globx, locx, desc_a, info, root)
info = psb_err_internal_error_ ; goto 9999
end if
ictxt=desc_a%get_context()
ctxt=desc_a%get_context()
! check on blacs grid
call psb_info(ictxt, iam, np)
call psb_info(ctxt, iam, np)
if (np == -1) then
info = psb_err_context_error_
call psb_errpush(info,name)
@ -107,8 +108,8 @@ subroutine psb_i2scatterm(globx, locx, desc_a, info, root)
m = desc_a%get_global_rows()
n = desc_a%get_global_cols()
icomm = psb_get_mpi_comm(ictxt)
myrank = psb_get_mpi_rank(ictxt,me)
icomm = psb_get_mpi_comm(ctxt)
myrank = psb_get_mpi_rank(ctxt,me)
if (iroot==-1) then
lda_globx = size(globx, 1)
@ -159,7 +160,7 @@ subroutine psb_i2scatterm(globx, locx, desc_a, info, root)
end do
else
rootrank = psb_get_mpi_rank(ictxt,iroot)
rootrank = psb_get_mpi_rank(ctxt,iroot)
!
! This is potentially unsafe when IPK=8
! But then, IPK=8 is highly experimental anyway.
@ -235,7 +236,7 @@ subroutine psb_i2scatterm(globx, locx, desc_a, info, root)
call psb_erractionrestore(err_act)
return
9999 call psb_error_handler(ione*ictxt,err_act)
9999 call psb_error_handler(ctxt,err_act)
return
@ -306,7 +307,8 @@ subroutine psb_i2scatterv(globx, locx, desc_a, info, root)
! locals
integer(psb_mpk_) :: ictxt, np, iam, iroot, iiroot, icomm, myrank, rootrank, nlr
type(psb_ctxt_type) :: ctxt
integer(psb_mpk_) :: np, iam, iroot, iiroot, icomm, myrank, rootrank, nlr
integer(psb_ipk_) :: ierr(5), err_act, nrow,&
& ilocx, jlocx, lda_locx, lda_globx, k, pos, ilx, jlx
integer(psb_lpk_) :: m, n, i, j, idx, iglobx, jglobx
@ -322,13 +324,13 @@ subroutine psb_i2scatterv(globx, locx, desc_a, info, root)
if (psb_errstatus_fatal()) then
info = psb_err_internal_error_ ; goto 9999
end if
ictxt=desc_a%get_context()
ctxt=desc_a%get_context()
debug_unit = psb_get_debug_unit()
debug_level = psb_get_debug_level()
! check on blacs grid
call psb_info(ictxt, iam, np)
call psb_info(ctxt, iam, np)
if (np == -1) then
info = psb_err_context_error_
call psb_errpush(info,name)
@ -347,8 +349,8 @@ subroutine psb_i2scatterv(globx, locx, desc_a, info, root)
iroot = psb_root_
end if
icomm = psb_get_mpi_comm(ictxt)
myrank = psb_get_mpi_rank(ictxt,iam)
icomm = psb_get_mpi_comm(ctxt)
myrank = psb_get_mpi_rank(ctxt,iam)
iglobx = 1
jglobx = 1
@ -394,7 +396,7 @@ subroutine psb_i2scatterv(globx, locx, desc_a, info, root)
locx(i)=globx(ltg(i))
end do
else
rootrank = psb_get_mpi_rank(ictxt,iroot)
rootrank = psb_get_mpi_rank(ctxt,iroot)
!
! This is potentially unsafe when IPK=8
! But then, IPK=8 is highly experimental anyway.
@ -472,7 +474,7 @@ subroutine psb_i2scatterv(globx, locx, desc_a, info, root)
call psb_erractionrestore(err_act)
return
9999 call psb_error_handler(ione*ictxt,err_act)
9999 call psb_error_handler(ctxt,err_act)
return

@ -57,7 +57,8 @@ subroutine psb_igather_vect(globx, locx, desc_a, info, iroot)
! locals
integer(psb_mpk_) :: ictxt, np, me, root, iiroot, icomm, myrank, rootrank
type(psb_ctxt_type) :: ctxt
integer(psb_mpk_) :: np, me, root, iiroot, icomm, myrank, rootrank
integer(psb_ipk_) :: ierr(5), err_act, jlx, ilx, lda_locx, lda_globx, i
integer(psb_lpk_) :: m, n, k, ilocx, jlocx, idx, iglobx, jglobx
integer(psb_ipk_), allocatable :: llocx(:)
@ -70,10 +71,10 @@ subroutine psb_igather_vect(globx, locx, desc_a, info, iroot)
info = psb_err_internal_error_ ; goto 9999
end if
ictxt=desc_a%get_context()
ctxt=desc_a%get_context()
! check on blacs grid
call psb_info(ictxt, me, np)
call psb_info(ctxt, me, np)
if (np == -1) then
info = psb_err_context_error_
call psb_errpush(info,name)
@ -148,12 +149,12 @@ subroutine psb_igather_vect(globx, locx, desc_a, info, iroot)
end if
end do
call psb_sum(ictxt,globx(1:m),root=root)
call psb_sum(ctxt,globx(1:m),root=root)
call psb_erractionrestore(err_act)
return
9999 call psb_error_handler(ione*ictxt,err_act)
9999 call psb_error_handler(ctxt,err_act)
return
@ -174,7 +175,8 @@ subroutine psb_igather_multivect(globx, locx, desc_a, info, iroot)
! locals
integer(psb_mpk_) :: ictxt, np, me, root, iiroot, icomm, myrank, rootrank
type(psb_ctxt_type) :: ctxt
integer(psb_mpk_) :: np, me, root, iiroot, icomm, myrank, rootrank
integer(psb_ipk_) :: ierr(5), err_act, jlx, ilx, lda_locx, lda_globx, i
integer(psb_lpk_) :: m, n, k, ilocx, jlocx, idx, iglobx, jglobx
integer(psb_ipk_), allocatable :: llocx(:,:)
@ -187,10 +189,10 @@ subroutine psb_igather_multivect(globx, locx, desc_a, info, iroot)
info = psb_err_internal_error_ ; goto 9999
end if
ictxt=desc_a%get_context()
ctxt=desc_a%get_context()
! check on blacs grid
call psb_info(ictxt, me, np)
call psb_info(ctxt, me, np)
if (np == -1) then
info = psb_err_context_error_
call psb_errpush(info,name)
@ -264,12 +266,12 @@ subroutine psb_igather_multivect(globx, locx, desc_a, info, iroot)
end if
end do
call psb_sum(ictxt,globx(1:m,1:k),root=root)
call psb_sum(ctxt,globx(1:m,1:k),root=root)
call psb_erractionrestore(err_act)
return
9999 call psb_error_handler(ione*ictxt,err_act)
9999 call psb_error_handler(ctxt,err_act)
return

@ -65,7 +65,8 @@ subroutine psb_ihalo_vect(x,desc_a,info,work,tran,mode,data)
character, intent(in), optional :: tran
! locals
integer(psb_ipk_) :: ictxt, np, me, err_act, iix, jjx, &
type(psb_ctxt_type) :: ctxt
integer(psb_ipk_) :: np, me, err_act, iix, jjx, &
& nrow, ncol, lldx, imode, liwork,data_
integer(psb_lpk_) :: m, n, ix, ijx
integer(psb_ipk_),pointer :: iwork(:)
@ -80,10 +81,10 @@ subroutine psb_ihalo_vect(x,desc_a,info,work,tran,mode,data)
info = psb_err_internal_error_ ; goto 9999
end if
ictxt=desc_a%get_context()
ctxt=desc_a%get_context()
! check on blacs grid
call psb_info(ictxt, me, np)
call psb_info(ctxt, me, np)
if (np == -1) then
info = psb_err_context_error_
call psb_errpush(info,name)
@ -179,7 +180,7 @@ subroutine psb_ihalo_vect(x,desc_a,info,work,tran,mode,data)
call psb_erractionrestore(err_act)
return
9999 call psb_error_handler(ione*ictxt,err_act)
9999 call psb_error_handler(ctxt,err_act)
return
end subroutine psb_ihalo_vect
@ -219,7 +220,8 @@ subroutine psb_ihalo_multivect(x,desc_a,info,work,tran,mode,data)
character, intent(in), optional :: tran
! locals
integer(psb_ipk_) :: ictxt, np, me, err_act, iix, jjx, &
type(psb_ctxt_type) :: ctxt
integer(psb_ipk_) :: np, me, err_act, iix, jjx, &
& nrow, ncol, lldx, imode, liwork,data_
integer(psb_lpk_) :: m, n, ix, ijx
integer(psb_ipk_),pointer :: iwork(:)
@ -234,10 +236,10 @@ subroutine psb_ihalo_multivect(x,desc_a,info,work,tran,mode,data)
info = psb_err_internal_error_ ; goto 9999
end if
ictxt=desc_a%get_context()
ctxt=desc_a%get_context()
! check on blacs grid
call psb_info(ictxt, me, np)
call psb_info(ctxt, me, np)
if (np == -1) then
info = psb_err_context_error_
call psb_errpush(info,name)
@ -334,7 +336,7 @@ subroutine psb_ihalo_multivect(x,desc_a,info,work,tran,mode,data)
call psb_erractionrestore(err_act)
return
9999 call psb_error_handler(ione*ictxt,err_act)
9999 call psb_error_handler(ctxt,err_act)
return
end subroutine psb_ihalo_multivect

@ -75,7 +75,8 @@ subroutine psb_iovrl_vect(x,desc_a,info,work,update,mode)
integer(psb_ipk_), intent(in), optional :: update,mode
! locals
integer(psb_ipk_) :: ictxt, np, me, err_act, k, iix, jjx, &
type(psb_ctxt_type) :: ctxt
integer(psb_ipk_) :: np, me, err_act, k, iix, jjx, &
& nrow, ncol, ldx, liwork, data_, update_, mode_
integer(psb_lpk_) :: m, n, ix, ijx
integer(psb_ipk_),pointer :: iwork(:)
@ -90,10 +91,10 @@ subroutine psb_iovrl_vect(x,desc_a,info,work,update,mode)
info = psb_err_internal_error_ ; goto 9999
end if
ictxt=desc_a%get_context()
ctxt=desc_a%get_context()
! check on blacs grid
call psb_info(ictxt, me, np)
call psb_info(ctxt, me, np)
if (np == -1) then
info = psb_err_context_error_
call psb_errpush(info,name)
@ -175,7 +176,7 @@ subroutine psb_iovrl_vect(x,desc_a,info,work,update,mode)
call psb_erractionrestore(err_act)
return
9999 call psb_error_handler(ione*ictxt,err_act)
9999 call psb_error_handler(ctxt,err_act)
return
end subroutine psb_iovrl_vect
@ -224,7 +225,8 @@ subroutine psb_iovrl_multivect(x,desc_a,info,work,update,mode)
integer(psb_ipk_), intent(in), optional :: update,mode
! locals
integer(psb_ipk_) :: ictxt, np, me, err_act, k, iix, jjx, &
type(psb_ctxt_type) :: ctxt
integer(psb_ipk_) :: np, me, err_act, k, iix, jjx, &
& nrow, ncol, ldx, liwork, data_, update_, mode_
integer(psb_lpk_) :: m, n, ix, ijx
integer(psb_ipk_),pointer :: iwork(:)
@ -239,10 +241,10 @@ subroutine psb_iovrl_multivect(x,desc_a,info,work,update,mode)
info = psb_err_internal_error_ ; goto 9999
end if
ictxt=desc_a%get_context()
ctxt=desc_a%get_context()
! check on blacs grid
call psb_info(ictxt, me, np)
call psb_info(ctxt, me, np)
if (np == -1) then
info = psb_err_context_error_
call psb_errpush(info,name)
@ -326,7 +328,7 @@ subroutine psb_iovrl_multivect(x,desc_a,info,work,update,mode)
call psb_erractionrestore(err_act)
return
9999 call psb_error_handler(ione*ictxt,err_act)
9999 call psb_error_handler(ctxt,err_act)
return
end subroutine psb_iovrl_multivect

@ -54,7 +54,8 @@ subroutine psb_iscatter_vect(globx, locx, desc_a, info, root, mold)
class(psb_i_base_vect_type), intent(in), optional :: mold
! locals
integer(psb_mpk_) :: ictxt, np, me, icomm, myrank, rootrank
type(psb_ctxt_type) :: ctxt
integer(psb_mpk_) :: np, me, icomm, myrank, rootrank
integer(psb_ipk_) :: ierr(5), err_act, m, n, i, j, idx, nrow, iglobx, jglobx,&
& ilocx, jlocx, lda_locx, lda_globx, k, pos, ilx, jlx
integer(psb_ipk_), allocatable :: vlocx(:)
@ -67,13 +68,13 @@ subroutine psb_iscatter_vect(globx, locx, desc_a, info, root, mold)
if (psb_errstatus_fatal()) then
info = psb_err_internal_error_ ; goto 9999
end if
ictxt=desc_a%get_context()
ctxt=desc_a%get_context()
debug_unit = psb_get_debug_unit()
debug_level = psb_get_debug_level()
! check on blacs grid
call psb_info(ictxt, me, np)
call psb_info(ctxt, me, np)
if (np == -1) then
info = psb_err_context_error_
call psb_errpush(info,name)
@ -92,7 +93,7 @@ subroutine psb_iscatter_vect(globx, locx, desc_a, info, root, mold)
call psb_erractionrestore(err_act)
return
9999 call psb_error_handler(ione*ictxt,err_act)
9999 call psb_error_handler(ctxt,err_act)
return

@ -67,7 +67,8 @@ subroutine psb_isp_allgather(globa, loca, desc_a, info, root, dupl,keepnum,keep
integer(psb_ipk_) :: err_act, dupl_
integer(psb_ipk_) :: ip,naggrm1,naggrp1, i, j, k
logical :: keepnum_, keeploc_
integer(psb_mpk_) :: ictxt,np,me
type(psb_ctxt_type) :: ctxt
integer(psb_mpk_) :: np, me
integer(psb_mpk_) :: icomm, minfo, ndx, root_
integer(psb_mpk_), allocatable :: nzbr(:), idisp(:)
integer(psb_lpk_), allocatable :: locia(:), locja(:), glbia(:), glbja(:)
@ -82,9 +83,9 @@ subroutine psb_isp_allgather(globa, loca, desc_a, info, root, dupl,keepnum,keep
if (psb_errstatus_fatal()) then
info = psb_err_internal_error_ ; goto 9999
end if
ictxt = desc_a%get_context()
ctxt = desc_a%get_context()
icomm = desc_a%get_mpic()
call psb_info(ictxt, me, np)
call psb_info(ctxt, me, np)
if (present(keepnum)) then
keepnum_ = keepnum
@ -128,7 +129,7 @@ subroutine psb_isp_allgather(globa, loca, desc_a, info, root, dupl,keepnum,keep
call psb_loc_to_glob(loc_coo%ja(1:nzl),locja(1:nzl),desc_a,info,iact='I')
nzbr(:) = 0
nzbr(me+1) = nzl
call psb_sum(ictxt,nzbr(1:np))
call psb_sum(ctxt,nzbr(1:np))
nzg = sum(nzbr)
if (nzg <0) then
info = psb_err_mpi_int_ovflw_
@ -216,7 +217,7 @@ subroutine psb_isp_allgather(globa, loca, desc_a, info, root, dupl,keepnum,keep
9999 continue
call psb_errpush(info,name)
call psb_error_handler(ione*ictxt,err_act)
call psb_error_handler(ctxt,err_act)
return
@ -249,7 +250,8 @@ subroutine psb_@LX@sp_allgather(globa, loca, desc_a, info, root, dupl,keepnum,k
integer(psb_ipk_) :: err_act, dupl_
integer(psb_ipk_) :: ip,naggrm1,naggrp1, i, j, k, nzl
logical :: keepnum_, keeploc_
integer(psb_mpk_) :: ictxt,np,me
type(psb_ctxt_type) :: ctxt
integer(psb_ipk_) :: np, me
integer(psb_mpk_) :: icomm, minfo, ndx, root_
integer(psb_mpk_), allocatable :: nzbr(:), idisp(:)
integer(psb_lpk_), allocatable :: lnzbr(:)
@ -264,9 +266,9 @@ subroutine psb_@LX@sp_allgather(globa, loca, desc_a, info, root, dupl,keepnum,k
if (psb_errstatus_fatal()) then
info = psb_err_internal_error_ ; goto 9999
end if
ictxt = desc_a%get_context()
ctxt = desc_a%get_context()
icomm = desc_a%get_mpic()
call psb_info(ictxt, me, np)
call psb_info(ctxt, me, np)
if (present(keepnum)) then
keepnum_ = keepnum
@ -308,7 +310,7 @@ subroutine psb_@LX@sp_allgather(globa, loca, desc_a, info, root, dupl,keepnum,k
call psb_loc_to_glob(loc_coo%ja(1:nzl),desc_a,info,iact='I')
nzbr(:) = 0
nzbr(me+1) = nzl
call psb_sum(ictxt,nzbr(1:np))
call psb_sum(ctxt,nzbr(1:np))
lnzbr = nzbr
nzg = sum(nzbr)
if ((nzg < 0).or.(nzg /= sum(lnzbr))) then
@ -388,7 +390,7 @@ subroutine psb_@LX@sp_allgather(globa, loca, desc_a, info, root, dupl,keepnum,k
9999 continue
call psb_errpush(info,name)
call psb_error_handler(ione*ictxt,err_act)
call psb_error_handler(ctxt,err_act)
return
@ -420,7 +422,8 @@ subroutine psb_@LX@@LX@sp_allgather(globa, loca, desc_a, info, root, dupl,keepn
integer(psb_ipk_) :: err_act, dupl_
integer(psb_lpk_) :: ip,naggrm1,naggrp1, i, j, k, nzl
logical :: keepnum_, keeploc_
integer(psb_mpk_) :: ictxt,np,me
type(psb_ctxt_type) :: ctxt
integer(psb_ipk_) :: np, me
integer(psb_mpk_) :: icomm, minfo, ndx, root_
integer(psb_mpk_), allocatable :: nzbr(:), idisp(:)
integer(psb_lpk_), allocatable :: lnzbr(:)
@ -435,9 +438,9 @@ subroutine psb_@LX@@LX@sp_allgather(globa, loca, desc_a, info, root, dupl,keepn
if (psb_errstatus_fatal()) then
info = psb_err_internal_error_ ; goto 9999
end if
ictxt = desc_a%get_context()
ctxt = desc_a%get_context()
icomm = desc_a%get_mpic()
call psb_info(ictxt, me, np)
call psb_info(ctxt, me, np)
if (present(keepnum)) then
keepnum_ = keepnum
@ -479,7 +482,7 @@ subroutine psb_@LX@@LX@sp_allgather(globa, loca, desc_a, info, root, dupl,keepn
call psb_loc_to_glob(loc_coo%ja(1:nzl),desc_a,info,iact='I')
nzbr(:) = 0
nzbr(me+1) = nzl
call psb_sum(ictxt,nzbr(1:np))
call psb_sum(ctxt,nzbr(1:np))
lnzbr = nzbr
nzg = sum(nzbr)
if ((nzg < 0).or.(nzg /= sum(lnzbr))) then
@ -554,7 +557,7 @@ subroutine psb_@LX@@LX@sp_allgather(globa, loca, desc_a, info, root, dupl,keepn
9999 continue
call psb_errpush(info,name)
call psb_error_handler(ione*ictxt,err_act)
call psb_error_handler(ctxt,err_act)
return

@ -57,7 +57,8 @@ subroutine psb_lgather_vect(globx, locx, desc_a, info, iroot)
! locals
integer(psb_mpk_) :: ictxt, np, me, root, iiroot, icomm, myrank, rootrank
type(psb_ctxt_type) :: ctxt
integer(psb_mpk_) :: np, me, root, iiroot, icomm, myrank, rootrank
integer(psb_ipk_) :: ierr(5), err_act, jlx, ilx, lda_locx, lda_globx, i
integer(psb_lpk_) :: m, n, k, ilocx, jlocx, idx, iglobx, jglobx
integer(psb_lpk_), allocatable :: llocx(:)
@ -70,10 +71,10 @@ subroutine psb_lgather_vect(globx, locx, desc_a, info, iroot)
info = psb_err_internal_error_ ; goto 9999
end if
ictxt=desc_a%get_context()
ctxt=desc_a%get_context()
! check on blacs grid
call psb_info(ictxt, me, np)
call psb_info(ctxt, me, np)
if (np == -1) then
info = psb_err_context_error_
call psb_errpush(info,name)
@ -148,12 +149,12 @@ subroutine psb_lgather_vect(globx, locx, desc_a, info, iroot)
end if
end do
call psb_sum(ictxt,globx(1:m),root=root)
call psb_sum(ctxt,globx(1:m),root=root)
call psb_erractionrestore(err_act)
return
9999 call psb_error_handler(ione*ictxt,err_act)
9999 call psb_error_handler(ctxt,err_act)
return
@ -174,7 +175,8 @@ subroutine psb_lgather_multivect(globx, locx, desc_a, info, iroot)
! locals
integer(psb_mpk_) :: ictxt, np, me, root, iiroot, icomm, myrank, rootrank
type(psb_ctxt_type) :: ctxt
integer(psb_mpk_) :: np, me, root, iiroot, icomm, myrank, rootrank
integer(psb_ipk_) :: ierr(5), err_act, jlx, ilx, lda_locx, lda_globx, i
integer(psb_lpk_) :: m, n, k, ilocx, jlocx, idx, iglobx, jglobx
integer(psb_lpk_), allocatable :: llocx(:,:)
@ -187,10 +189,10 @@ subroutine psb_lgather_multivect(globx, locx, desc_a, info, iroot)
info = psb_err_internal_error_ ; goto 9999
end if
ictxt=desc_a%get_context()
ctxt=desc_a%get_context()
! check on blacs grid
call psb_info(ictxt, me, np)
call psb_info(ctxt, me, np)
if (np == -1) then
info = psb_err_context_error_
call psb_errpush(info,name)
@ -264,12 +266,12 @@ subroutine psb_lgather_multivect(globx, locx, desc_a, info, iroot)
end if
end do
call psb_sum(ictxt,globx(1:m,1:k),root=root)
call psb_sum(ctxt,globx(1:m,1:k),root=root)
call psb_erractionrestore(err_act)
return
9999 call psb_error_handler(ione*ictxt,err_act)
9999 call psb_error_handler(ctxt,err_act)
return

@ -65,7 +65,8 @@ subroutine psb_lhalo_vect(x,desc_a,info,work,tran,mode,data)
character, intent(in), optional :: tran
! locals
integer(psb_ipk_) :: ictxt, np, me, err_act, iix, jjx, &
type(psb_ctxt_type) :: ctxt
integer(psb_ipk_) :: np, me, err_act, iix, jjx, &
& nrow, ncol, lldx, imode, liwork,data_
integer(psb_lpk_) :: m, n, ix, ijx
integer(psb_lpk_),pointer :: iwork(:)
@ -80,10 +81,10 @@ subroutine psb_lhalo_vect(x,desc_a,info,work,tran,mode,data)
info = psb_err_internal_error_ ; goto 9999
end if
ictxt=desc_a%get_context()
ctxt=desc_a%get_context()
! check on blacs grid
call psb_info(ictxt, me, np)
call psb_info(ctxt, me, np)
if (np == -1) then
info = psb_err_context_error_
call psb_errpush(info,name)
@ -179,7 +180,7 @@ subroutine psb_lhalo_vect(x,desc_a,info,work,tran,mode,data)
call psb_erractionrestore(err_act)
return
9999 call psb_error_handler(ione*ictxt,err_act)
9999 call psb_error_handler(ctxt,err_act)
return
end subroutine psb_lhalo_vect
@ -219,7 +220,8 @@ subroutine psb_lhalo_multivect(x,desc_a,info,work,tran,mode,data)
character, intent(in), optional :: tran
! locals
integer(psb_ipk_) :: ictxt, np, me, err_act, iix, jjx, &
type(psb_ctxt_type) :: ctxt
integer(psb_ipk_) :: np, me, err_act, iix, jjx, &
& nrow, ncol, lldx, imode, liwork,data_
integer(psb_lpk_) :: m, n, ix, ijx
integer(psb_lpk_),pointer :: iwork(:)
@ -234,10 +236,10 @@ subroutine psb_lhalo_multivect(x,desc_a,info,work,tran,mode,data)
info = psb_err_internal_error_ ; goto 9999
end if
ictxt=desc_a%get_context()
ctxt=desc_a%get_context()
! check on blacs grid
call psb_info(ictxt, me, np)
call psb_info(ctxt, me, np)
if (np == -1) then
info = psb_err_context_error_
call psb_errpush(info,name)
@ -334,7 +336,7 @@ subroutine psb_lhalo_multivect(x,desc_a,info,work,tran,mode,data)
call psb_erractionrestore(err_act)
return
9999 call psb_error_handler(ione*ictxt,err_act)
9999 call psb_error_handler(ctxt,err_act)
return
end subroutine psb_lhalo_multivect

@ -75,7 +75,8 @@ subroutine psb_lovrl_vect(x,desc_a,info,work,update,mode)
integer(psb_ipk_), intent(in), optional :: update,mode
! locals
integer(psb_ipk_) :: ictxt, np, me, err_act, k, iix, jjx, &
type(psb_ctxt_type) :: ctxt
integer(psb_ipk_) :: np, me, err_act, k, iix, jjx, &
& nrow, ncol, ldx, liwork, data_, update_, mode_
integer(psb_lpk_) :: m, n, ix, ijx
integer(psb_lpk_),pointer :: iwork(:)
@ -90,10 +91,10 @@ subroutine psb_lovrl_vect(x,desc_a,info,work,update,mode)
info = psb_err_internal_error_ ; goto 9999
end if
ictxt=desc_a%get_context()
ctxt=desc_a%get_context()
! check on blacs grid
call psb_info(ictxt, me, np)
call psb_info(ctxt, me, np)
if (np == -1) then
info = psb_err_context_error_
call psb_errpush(info,name)
@ -175,7 +176,7 @@ subroutine psb_lovrl_vect(x,desc_a,info,work,update,mode)
call psb_erractionrestore(err_act)
return
9999 call psb_error_handler(ione*ictxt,err_act)
9999 call psb_error_handler(ctxt,err_act)
return
end subroutine psb_lovrl_vect
@ -224,7 +225,8 @@ subroutine psb_lovrl_multivect(x,desc_a,info,work,update,mode)
integer(psb_ipk_), intent(in), optional :: update,mode
! locals
integer(psb_ipk_) :: ictxt, np, me, err_act, k, iix, jjx, &
type(psb_ctxt_type) :: ctxt
integer(psb_ipk_) :: np, me, err_act, k, iix, jjx, &
& nrow, ncol, ldx, liwork, data_, update_, mode_
integer(psb_lpk_) :: m, n, ix, ijx
integer(psb_lpk_),pointer :: iwork(:)
@ -239,10 +241,10 @@ subroutine psb_lovrl_multivect(x,desc_a,info,work,update,mode)
info = psb_err_internal_error_ ; goto 9999
end if
ictxt=desc_a%get_context()
ctxt=desc_a%get_context()
! check on blacs grid
call psb_info(ictxt, me, np)
call psb_info(ctxt, me, np)
if (np == -1) then
info = psb_err_context_error_
call psb_errpush(info,name)
@ -326,7 +328,7 @@ subroutine psb_lovrl_multivect(x,desc_a,info,work,update,mode)
call psb_erractionrestore(err_act)
return
9999 call psb_error_handler(ione*ictxt,err_act)
9999 call psb_error_handler(ctxt,err_act)
return
end subroutine psb_lovrl_multivect

@ -54,7 +54,8 @@ subroutine psb_lscatter_vect(globx, locx, desc_a, info, root, mold)
class(psb_l_base_vect_type), intent(in), optional :: mold
! locals
integer(psb_mpk_) :: ictxt, np, me, icomm, myrank, rootrank
type(psb_ctxt_type) :: ctxt
integer(psb_mpk_) :: np, me, icomm, myrank, rootrank
integer(psb_ipk_) :: ierr(5), err_act, m, n, i, j, idx, nrow, iglobx, jglobx,&
& ilocx, jlocx, lda_locx, lda_globx, k, pos, ilx, jlx
integer(psb_lpk_), allocatable :: vlocx(:)
@ -67,13 +68,13 @@ subroutine psb_lscatter_vect(globx, locx, desc_a, info, root, mold)
if (psb_errstatus_fatal()) then
info = psb_err_internal_error_ ; goto 9999
end if
ictxt=desc_a%get_context()
ctxt=desc_a%get_context()
debug_unit = psb_get_debug_unit()
debug_level = psb_get_debug_level()
! check on blacs grid
call psb_info(ictxt, me, np)
call psb_info(ctxt, me, np)
if (np == -1) then
info = psb_err_context_error_
call psb_errpush(info,name)
@ -92,7 +93,7 @@ subroutine psb_lscatter_vect(globx, locx, desc_a, info, root, mold)
call psb_erractionrestore(err_act)
return
9999 call psb_error_handler(ione*ictxt,err_act)
9999 call psb_error_handler(ctxt,err_act)
return

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save