diff --git a/base/comm/psb_chalo.f90 b/base/comm/psb_chalo.f90 index 6bd6ce3d..267ddef4 100644 --- a/base/comm/psb_chalo.f90 +++ b/base/comm/psb_chalo.f90 @@ -67,7 +67,7 @@ subroutine psb_chalo_vect(x,desc_a,info,work,tran,mode,data) ! locals integer(psb_ipk_) :: ictxt, np, me, err_act, iix, jjx, & - & nrow, imode, err, liwork,data_ + & nrow, ncol, lldx, imode, err, liwork,data_ integer(psb_lpk_) :: m, n, ix, ijx complex(psb_spk_),pointer :: iwork(:) character :: tran_ @@ -98,11 +98,12 @@ subroutine psb_chalo_vect(x,desc_a,info,work,tran,mode,data) endif ix = 1 - ijx = 1 m = desc_a%get_global_rows() n = desc_a%get_global_cols() nrow = desc_a%get_local_rows() + ncol = desc_a%get_local_cols() + lldx = x%get_nrows() if (present(tran)) then tran_ = psb_toupper(tran) @@ -120,23 +121,14 @@ subroutine psb_chalo_vect(x,desc_a,info,work,tran,mode,data) imode = IOR(psb_swap_send_,psb_swap_recv_) endif - ! check vector correctness - call psb_chkvect(m,lone,x%get_nrows(),ix,ijx,desc_a,info,iix,jjx) + if ((info == 0).and.(lldx= liwork) then @@ -208,7 +200,7 @@ subroutine psb_chalo_multivect(x,desc_a,info,work,tran,mode,data) ! locals integer(psb_ipk_) :: ictxt, np, me, err_act, iix, jjx, & - & nrow, imode, err, liwork,data_ + & nrow, ncol, lldx, imode, err, liwork,data_ integer(psb_lpk_) :: m, n, ix, ijx complex(psb_spk_),pointer :: iwork(:) character :: tran_ @@ -244,6 +236,8 @@ subroutine psb_chalo_multivect(x,desc_a,info,work,tran,mode,data) m = desc_a%get_global_rows() n = desc_a%get_global_cols() nrow = desc_a%get_local_rows() + ncol = desc_a%get_local_cols() + lldx = x%get_nrows() if (present(tran)) then tran_ = psb_toupper(tran) @@ -261,23 +255,14 @@ subroutine psb_chalo_multivect(x,desc_a,info,work,tran,mode,data) imode = IOR(psb_swap_send_,psb_swap_recv_) endif - ! check vector correctness - call psb_chkvect(m,lone,x%get_nrows(),ix,ijx,desc_a,info,iix,jjx) + if (lldx < ncol) call x%reall(ncol,x%get_ncols(),info) + if(info /= psb_success_) then - info=psb_err_from_subroutine_ - ch_err='psb_chkvect' + info=psb_err_from_subroutine_; ch_err='psb_reall' call psb_errpush(info,name,a_err=ch_err) + goto 9999 end if - if (iix /= 1) then - info=psb_err_ix_n1_iy_n1_unsupported_ - call psb_errpush(info,name) - end if - - err=info - call psb_errcomm(ictxt,err) - if(err /= 0) goto 9999 - liwork=nrow if (present(work)) then if(size(work) >= liwork) then diff --git a/base/comm/psb_chalo_a.f90 b/base/comm/psb_chalo_a.f90 index 5deff1b1..cf34a90c 100644 --- a/base/comm/psb_chalo_a.f90 +++ b/base/comm/psb_chalo_a.f90 @@ -132,22 +132,13 @@ subroutine psb_chalom(x,desc_a,info,jx,ik,work,tran,mode,data) endif ldx = size(x,1) ! check vector correctness - call psb_chkvect(m,lone,ldx,ix,ijx,desc_a,info,iix,jjx) + call psb_chkvect(m,lone,ldx,ix,ijx,desc_a,info,iix,jjx,check_halo=.true.) if(info /= psb_success_) then - info=psb_err_from_subroutine_ - ch_err='psb_chkvect' + info=psb_err_from_subroutine_ ; ch_err='psb_chkvect' call psb_errpush(info,name,a_err=ch_err) + goto 9999 end if - if (iix /= 1) then - info=psb_err_ix_n1_iy_n1_unsupported_ - call psb_errpush(info,name) - end if - - err=info - call psb_errcomm(ictxt,err) - if(err /= 0) goto 9999 - liwork=nrow if (present(work)) then if(size(work) >= liwork) then @@ -324,22 +315,13 @@ subroutine psb_chalov(x,desc_a,info,work,tran,mode,data) endif ldx = size(x,1) ! check vector correctness - call psb_chkvect(m,lone,ldx,ix,ijx,desc_a,info,iix,jjx) + call psb_chkvect(m,lone,ldx,ix,ijx,desc_a,info,iix,jjx,check_halo=.true.) if(info /= psb_success_) then - info=psb_err_from_subroutine_ - ch_err='psb_chkvect' + info=psb_err_from_subroutine_ ; ch_err='psb_chkvect' call psb_errpush(info,name,a_err=ch_err) + goto 9999 end if - if (iix /= 1) then - info=psb_err_ix_n1_iy_n1_unsupported_ - call psb_errpush(info,name) - end if - - err=info - call psb_errcomm(ictxt,err) - if(err /= 0) goto 9999 - liwork=nrow if (present(work)) then if(size(work) >= liwork) then diff --git a/base/comm/psb_covrl.f90 b/base/comm/psb_covrl.f90 index ee59ec4d..ae6f7206 100644 --- a/base/comm/psb_covrl.f90 +++ b/base/comm/psb_covrl.f90 @@ -76,7 +76,7 @@ subroutine psb_covrl_vect(x,desc_a,info,work,update,mode) ! locals integer(psb_ipk_) :: ictxt, np, me, err_act, k, iix, jjx, & - & nrow, imode, err, liwork,data_, update_, mode_, ncol + & nrow, ncol, imode, err,liwork_, data_, update_, mode integer(psb_lpk_) :: m, n, ix, ijx complex(psb_spk_),pointer :: iwork(:) logical :: do_swap @@ -106,13 +106,12 @@ subroutine psb_covrl_vect(x,desc_a,info,work,update,mode) endif ix = 1 - ijx = 1 m = desc_a%get_global_rows() n = desc_a%get_global_cols() nrow = desc_a%get_local_rows() ncol = desc_a%get_local_cols() - + ldx = x%get_nrows() k = 1 if (present(update)) then @@ -129,22 +128,14 @@ subroutine psb_covrl_vect(x,desc_a,info,work,update,mode) do_swap = (mode_ /= 0) ! check vector correctness - call psb_chkvect(m,lone,x%get_nrows(),ix,ijx,desc_a,info,iix,jjx) + + if ((info == 0).and.(ldx= liwork) then @@ -208,7 +200,7 @@ subroutine psb_dhalo_multivect(x,desc_a,info,work,tran,mode,data) ! locals integer(psb_ipk_) :: ictxt, np, me, err_act, iix, jjx, & - & nrow, imode, err, liwork,data_ + & nrow, ncol, lldx, imode, err, liwork,data_ integer(psb_lpk_) :: m, n, ix, ijx real(psb_dpk_),pointer :: iwork(:) character :: tran_ @@ -244,6 +236,8 @@ subroutine psb_dhalo_multivect(x,desc_a,info,work,tran,mode,data) m = desc_a%get_global_rows() n = desc_a%get_global_cols() nrow = desc_a%get_local_rows() + ncol = desc_a%get_local_cols() + lldx = x%get_nrows() if (present(tran)) then tran_ = psb_toupper(tran) @@ -261,23 +255,14 @@ subroutine psb_dhalo_multivect(x,desc_a,info,work,tran,mode,data) imode = IOR(psb_swap_send_,psb_swap_recv_) endif - ! check vector correctness - call psb_chkvect(m,lone,x%get_nrows(),ix,ijx,desc_a,info,iix,jjx) + if (lldx < ncol) call x%reall(ncol,x%get_ncols(),info) + if(info /= psb_success_) then - info=psb_err_from_subroutine_ - ch_err='psb_chkvect' + info=psb_err_from_subroutine_; ch_err='psb_reall' call psb_errpush(info,name,a_err=ch_err) + goto 9999 end if - if (iix /= 1) then - info=psb_err_ix_n1_iy_n1_unsupported_ - call psb_errpush(info,name) - end if - - err=info - call psb_errcomm(ictxt,err) - if(err /= 0) goto 9999 - liwork=nrow if (present(work)) then if(size(work) >= liwork) then diff --git a/base/comm/psb_dhalo_a.f90 b/base/comm/psb_dhalo_a.f90 index 9f7b9ee1..f850c99e 100644 --- a/base/comm/psb_dhalo_a.f90 +++ b/base/comm/psb_dhalo_a.f90 @@ -132,22 +132,13 @@ subroutine psb_dhalom(x,desc_a,info,jx,ik,work,tran,mode,data) endif ldx = size(x,1) ! check vector correctness - call psb_chkvect(m,lone,ldx,ix,ijx,desc_a,info,iix,jjx) + call psb_chkvect(m,lone,ldx,ix,ijx,desc_a,info,iix,jjx,check_halo=.true.) if(info /= psb_success_) then - info=psb_err_from_subroutine_ - ch_err='psb_chkvect' + info=psb_err_from_subroutine_ ; ch_err='psb_chkvect' call psb_errpush(info,name,a_err=ch_err) + goto 9999 end if - if (iix /= 1) then - info=psb_err_ix_n1_iy_n1_unsupported_ - call psb_errpush(info,name) - end if - - err=info - call psb_errcomm(ictxt,err) - if(err /= 0) goto 9999 - liwork=nrow if (present(work)) then if(size(work) >= liwork) then @@ -324,22 +315,13 @@ subroutine psb_dhalov(x,desc_a,info,work,tran,mode,data) endif ldx = size(x,1) ! check vector correctness - call psb_chkvect(m,lone,ldx,ix,ijx,desc_a,info,iix,jjx) + call psb_chkvect(m,lone,ldx,ix,ijx,desc_a,info,iix,jjx,check_halo=.true.) if(info /= psb_success_) then - info=psb_err_from_subroutine_ - ch_err='psb_chkvect' + info=psb_err_from_subroutine_ ; ch_err='psb_chkvect' call psb_errpush(info,name,a_err=ch_err) + goto 9999 end if - if (iix /= 1) then - info=psb_err_ix_n1_iy_n1_unsupported_ - call psb_errpush(info,name) - end if - - err=info - call psb_errcomm(ictxt,err) - if(err /= 0) goto 9999 - liwork=nrow if (present(work)) then if(size(work) >= liwork) then diff --git a/base/comm/psb_dovrl.f90 b/base/comm/psb_dovrl.f90 index 07b75156..3ad0456a 100644 --- a/base/comm/psb_dovrl.f90 +++ b/base/comm/psb_dovrl.f90 @@ -76,7 +76,7 @@ subroutine psb_dovrl_vect(x,desc_a,info,work,update,mode) ! locals integer(psb_ipk_) :: ictxt, np, me, err_act, k, iix, jjx, & - & nrow, imode, err, liwork,data_, update_, mode_, ncol + & nrow, ncol, imode, err,liwork_, data_, update_, mode integer(psb_lpk_) :: m, n, ix, ijx real(psb_dpk_),pointer :: iwork(:) logical :: do_swap @@ -106,13 +106,12 @@ subroutine psb_dovrl_vect(x,desc_a,info,work,update,mode) endif ix = 1 - ijx = 1 m = desc_a%get_global_rows() n = desc_a%get_global_cols() nrow = desc_a%get_local_rows() ncol = desc_a%get_local_cols() - + ldx = x%get_nrows() k = 1 if (present(update)) then @@ -129,22 +128,14 @@ subroutine psb_dovrl_vect(x,desc_a,info,work,update,mode) do_swap = (mode_ /= 0) ! check vector correctness - call psb_chkvect(m,lone,x%get_nrows(),ix,ijx,desc_a,info,iix,jjx) + + if ((info == 0).and.(ldx= liwork) then @@ -324,22 +315,13 @@ subroutine psb_ehalov(x,desc_a,info,work,tran,mode,data) endif ldx = size(x,1) ! check vector correctness - call psb_chkvect(m,lone,ldx,ix,ijx,desc_a,info,iix,jjx) + call psb_chkvect(m,lone,ldx,ix,ijx,desc_a,info,iix,jjx,check_halo=.true.) if(info /= psb_success_) then - info=psb_err_from_subroutine_ - ch_err='psb_chkvect' + info=psb_err_from_subroutine_ ; ch_err='psb_chkvect' call psb_errpush(info,name,a_err=ch_err) + goto 9999 end if - if (iix /= 1) then - info=psb_err_ix_n1_iy_n1_unsupported_ - call psb_errpush(info,name) - end if - - err=info - call psb_errcomm(ictxt,err) - if(err /= 0) goto 9999 - liwork=nrow if (present(work)) then if(size(work) >= liwork) then diff --git a/base/comm/psb_eovrl_a.f90 b/base/comm/psb_eovrl_a.f90 index 282c0b33..630438b5 100644 --- a/base/comm/psb_eovrl_a.f90 +++ b/base/comm/psb_eovrl_a.f90 @@ -142,20 +142,11 @@ subroutine psb_eovrlm(x,desc_a,info,jx,ik,work,update,mode) ! check vector correctness call psb_chkvect(m,lone,ldx,ix,ijx,desc_a,info,iix,jjx) if(info /= psb_success_) then - info=psb_err_from_subroutine_ - ch_err='psb_chkvect' + info=psb_err_from_subroutine_ ; ch_err='psb_chkvect' call psb_errpush(info,name,a_err=ch_err) + goto 9999 end if - if (iix /= 1) then - info=psb_err_ix_n1_iy_n1_unsupported_ - call psb_errpush(info,name) - end if - - err=info - call psb_errcomm(ictxt,err) - if(err /= 0) goto 9999 - ! check for presence/size of a work area liwork=ncol if (present(work)) then @@ -332,12 +323,11 @@ subroutine psb_eovrlv(x,desc_a,info,work,update,mode) if (iix /= 1) then info=psb_err_ix_n1_iy_n1_unsupported_ - call psb_errpush(info,name) + call psb_errpush(info,name) end if + + if(info /= 0) goto 9999 - err=info - call psb_errcomm(ictxt,err) - if(err /= 0) goto 9999 ! check for presence/size of a work area liwork=ncol diff --git a/base/comm/psb_ihalo.f90 b/base/comm/psb_ihalo.f90 index ab1141ea..1d58cab7 100644 --- a/base/comm/psb_ihalo.f90 +++ b/base/comm/psb_ihalo.f90 @@ -67,7 +67,7 @@ subroutine psb_ihalo_vect(x,desc_a,info,work,tran,mode,data) ! locals integer(psb_ipk_) :: ictxt, np, me, err_act, iix, jjx, & - & nrow, imode, err, liwork,data_ + & nrow, ncol, lldx, imode, err, liwork,data_ integer(psb_lpk_) :: m, n, ix, ijx integer(psb_ipk_),pointer :: iwork(:) character :: tran_ @@ -98,11 +98,12 @@ subroutine psb_ihalo_vect(x,desc_a,info,work,tran,mode,data) endif ix = 1 - ijx = 1 m = desc_a%get_global_rows() n = desc_a%get_global_cols() nrow = desc_a%get_local_rows() + ncol = desc_a%get_local_cols() + lldx = x%get_nrows() if (present(tran)) then tran_ = psb_toupper(tran) @@ -120,23 +121,14 @@ subroutine psb_ihalo_vect(x,desc_a,info,work,tran,mode,data) imode = IOR(psb_swap_send_,psb_swap_recv_) endif - ! check vector correctness - call psb_chkvect(m,lone,x%get_nrows(),ix,ijx,desc_a,info,iix,jjx) + if ((info == 0).and.(lldx= liwork) then @@ -208,7 +200,7 @@ subroutine psb_ihalo_multivect(x,desc_a,info,work,tran,mode,data) ! locals integer(psb_ipk_) :: ictxt, np, me, err_act, iix, jjx, & - & nrow, imode, err, liwork,data_ + & nrow, ncol, lldx, imode, err, liwork,data_ integer(psb_lpk_) :: m, n, ix, ijx integer(psb_ipk_),pointer :: iwork(:) character :: tran_ @@ -244,6 +236,8 @@ subroutine psb_ihalo_multivect(x,desc_a,info,work,tran,mode,data) m = desc_a%get_global_rows() n = desc_a%get_global_cols() nrow = desc_a%get_local_rows() + ncol = desc_a%get_local_cols() + lldx = x%get_nrows() if (present(tran)) then tran_ = psb_toupper(tran) @@ -261,23 +255,14 @@ subroutine psb_ihalo_multivect(x,desc_a,info,work,tran,mode,data) imode = IOR(psb_swap_send_,psb_swap_recv_) endif - ! check vector correctness - call psb_chkvect(m,lone,x%get_nrows(),ix,ijx,desc_a,info,iix,jjx) + if (lldx < ncol) call x%reall(ncol,x%get_ncols(),info) + if(info /= psb_success_) then - info=psb_err_from_subroutine_ - ch_err='psb_chkvect' + info=psb_err_from_subroutine_; ch_err='psb_reall' call psb_errpush(info,name,a_err=ch_err) + goto 9999 end if - if (iix /= 1) then - info=psb_err_ix_n1_iy_n1_unsupported_ - call psb_errpush(info,name) - end if - - err=info - call psb_errcomm(ictxt,err) - if(err /= 0) goto 9999 - liwork=nrow if (present(work)) then if(size(work) >= liwork) then diff --git a/base/comm/psb_iovrl.f90 b/base/comm/psb_iovrl.f90 index 385d5c24..37e39b5d 100644 --- a/base/comm/psb_iovrl.f90 +++ b/base/comm/psb_iovrl.f90 @@ -76,7 +76,7 @@ subroutine psb_iovrl_vect(x,desc_a,info,work,update,mode) ! locals integer(psb_ipk_) :: ictxt, np, me, err_act, k, iix, jjx, & - & nrow, imode, err, liwork,data_, update_, mode_, ncol + & nrow, ncol, imode, err,liwork_, data_, update_, mode integer(psb_lpk_) :: m, n, ix, ijx integer(psb_ipk_),pointer :: iwork(:) logical :: do_swap @@ -106,13 +106,12 @@ subroutine psb_iovrl_vect(x,desc_a,info,work,update,mode) endif ix = 1 - ijx = 1 m = desc_a%get_global_rows() n = desc_a%get_global_cols() nrow = desc_a%get_local_rows() ncol = desc_a%get_local_cols() - + ldx = x%get_nrows() k = 1 if (present(update)) then @@ -129,22 +128,14 @@ subroutine psb_iovrl_vect(x,desc_a,info,work,update,mode) do_swap = (mode_ /= 0) ! check vector correctness - call psb_chkvect(m,lone,x%get_nrows(),ix,ijx,desc_a,info,iix,jjx) + + if ((info == 0).and.(ldx= liwork) then @@ -208,7 +200,7 @@ subroutine psb_lhalo_multivect(x,desc_a,info,work,tran,mode,data) ! locals integer(psb_ipk_) :: ictxt, np, me, err_act, iix, jjx, & - & nrow, imode, err, liwork,data_ + & nrow, ncol, lldx, imode, err, liwork,data_ integer(psb_lpk_) :: m, n, ix, ijx integer(psb_lpk_),pointer :: iwork(:) character :: tran_ @@ -244,6 +236,8 @@ subroutine psb_lhalo_multivect(x,desc_a,info,work,tran,mode,data) m = desc_a%get_global_rows() n = desc_a%get_global_cols() nrow = desc_a%get_local_rows() + ncol = desc_a%get_local_cols() + lldx = x%get_nrows() if (present(tran)) then tran_ = psb_toupper(tran) @@ -261,23 +255,14 @@ subroutine psb_lhalo_multivect(x,desc_a,info,work,tran,mode,data) imode = IOR(psb_swap_send_,psb_swap_recv_) endif - ! check vector correctness - call psb_chkvect(m,lone,x%get_nrows(),ix,ijx,desc_a,info,iix,jjx) + if (lldx < ncol) call x%reall(ncol,x%get_ncols(),info) + if(info /= psb_success_) then - info=psb_err_from_subroutine_ - ch_err='psb_chkvect' + info=psb_err_from_subroutine_; ch_err='psb_reall' call psb_errpush(info,name,a_err=ch_err) + goto 9999 end if - if (iix /= 1) then - info=psb_err_ix_n1_iy_n1_unsupported_ - call psb_errpush(info,name) - end if - - err=info - call psb_errcomm(ictxt,err) - if(err /= 0) goto 9999 - liwork=nrow if (present(work)) then if(size(work) >= liwork) then diff --git a/base/comm/psb_lovrl.f90 b/base/comm/psb_lovrl.f90 index 52fe7f69..646dd6b7 100644 --- a/base/comm/psb_lovrl.f90 +++ b/base/comm/psb_lovrl.f90 @@ -76,7 +76,7 @@ subroutine psb_lovrl_vect(x,desc_a,info,work,update,mode) ! locals integer(psb_ipk_) :: ictxt, np, me, err_act, k, iix, jjx, & - & nrow, imode, err, liwork,data_, update_, mode_, ncol + & nrow, ncol, imode, err,liwork_, data_, update_, mode integer(psb_lpk_) :: m, n, ix, ijx integer(psb_lpk_),pointer :: iwork(:) logical :: do_swap @@ -106,13 +106,12 @@ subroutine psb_lovrl_vect(x,desc_a,info,work,update,mode) endif ix = 1 - ijx = 1 m = desc_a%get_global_rows() n = desc_a%get_global_cols() nrow = desc_a%get_local_rows() ncol = desc_a%get_local_cols() - + ldx = x%get_nrows() k = 1 if (present(update)) then @@ -129,22 +128,14 @@ subroutine psb_lovrl_vect(x,desc_a,info,work,update,mode) do_swap = (mode_ /= 0) ! check vector correctness - call psb_chkvect(m,lone,x%get_nrows(),ix,ijx,desc_a,info,iix,jjx) + + if ((info == 0).and.(ldx= liwork) then @@ -324,22 +315,13 @@ subroutine psb_mhalov(x,desc_a,info,work,tran,mode,data) endif ldx = size(x,1) ! check vector correctness - call psb_chkvect(m,lone,ldx,ix,ijx,desc_a,info,iix,jjx) + call psb_chkvect(m,lone,ldx,ix,ijx,desc_a,info,iix,jjx,check_halo=.true.) if(info /= psb_success_) then - info=psb_err_from_subroutine_ - ch_err='psb_chkvect' + info=psb_err_from_subroutine_ ; ch_err='psb_chkvect' call psb_errpush(info,name,a_err=ch_err) + goto 9999 end if - if (iix /= 1) then - info=psb_err_ix_n1_iy_n1_unsupported_ - call psb_errpush(info,name) - end if - - err=info - call psb_errcomm(ictxt,err) - if(err /= 0) goto 9999 - liwork=nrow if (present(work)) then if(size(work) >= liwork) then diff --git a/base/comm/psb_movrl_a.f90 b/base/comm/psb_movrl_a.f90 index 2b1b8054..9eb67ab7 100644 --- a/base/comm/psb_movrl_a.f90 +++ b/base/comm/psb_movrl_a.f90 @@ -142,20 +142,11 @@ subroutine psb_movrlm(x,desc_a,info,jx,ik,work,update,mode) ! check vector correctness call psb_chkvect(m,lone,ldx,ix,ijx,desc_a,info,iix,jjx) if(info /= psb_success_) then - info=psb_err_from_subroutine_ - ch_err='psb_chkvect' + info=psb_err_from_subroutine_ ; ch_err='psb_chkvect' call psb_errpush(info,name,a_err=ch_err) + goto 9999 end if - if (iix /= 1) then - info=psb_err_ix_n1_iy_n1_unsupported_ - call psb_errpush(info,name) - end if - - err=info - call psb_errcomm(ictxt,err) - if(err /= 0) goto 9999 - ! check for presence/size of a work area liwork=ncol if (present(work)) then @@ -332,12 +323,11 @@ subroutine psb_movrlv(x,desc_a,info,work,update,mode) if (iix /= 1) then info=psb_err_ix_n1_iy_n1_unsupported_ - call psb_errpush(info,name) + call psb_errpush(info,name) end if + + if(info /= 0) goto 9999 - err=info - call psb_errcomm(ictxt,err) - if(err /= 0) goto 9999 ! check for presence/size of a work area liwork=ncol diff --git a/base/comm/psb_shalo.f90 b/base/comm/psb_shalo.f90 index c1852414..a7fbf055 100644 --- a/base/comm/psb_shalo.f90 +++ b/base/comm/psb_shalo.f90 @@ -67,7 +67,7 @@ subroutine psb_shalo_vect(x,desc_a,info,work,tran,mode,data) ! locals integer(psb_ipk_) :: ictxt, np, me, err_act, iix, jjx, & - & nrow, imode, err, liwork,data_ + & nrow, ncol, lldx, imode, err, liwork,data_ integer(psb_lpk_) :: m, n, ix, ijx real(psb_spk_),pointer :: iwork(:) character :: tran_ @@ -98,11 +98,12 @@ subroutine psb_shalo_vect(x,desc_a,info,work,tran,mode,data) endif ix = 1 - ijx = 1 m = desc_a%get_global_rows() n = desc_a%get_global_cols() nrow = desc_a%get_local_rows() + ncol = desc_a%get_local_cols() + lldx = x%get_nrows() if (present(tran)) then tran_ = psb_toupper(tran) @@ -120,23 +121,14 @@ subroutine psb_shalo_vect(x,desc_a,info,work,tran,mode,data) imode = IOR(psb_swap_send_,psb_swap_recv_) endif - ! check vector correctness - call psb_chkvect(m,lone,x%get_nrows(),ix,ijx,desc_a,info,iix,jjx) + if ((info == 0).and.(lldx= liwork) then @@ -208,7 +200,7 @@ subroutine psb_shalo_multivect(x,desc_a,info,work,tran,mode,data) ! locals integer(psb_ipk_) :: ictxt, np, me, err_act, iix, jjx, & - & nrow, imode, err, liwork,data_ + & nrow, ncol, lldx, imode, err, liwork,data_ integer(psb_lpk_) :: m, n, ix, ijx real(psb_spk_),pointer :: iwork(:) character :: tran_ @@ -244,6 +236,8 @@ subroutine psb_shalo_multivect(x,desc_a,info,work,tran,mode,data) m = desc_a%get_global_rows() n = desc_a%get_global_cols() nrow = desc_a%get_local_rows() + ncol = desc_a%get_local_cols() + lldx = x%get_nrows() if (present(tran)) then tran_ = psb_toupper(tran) @@ -261,23 +255,14 @@ subroutine psb_shalo_multivect(x,desc_a,info,work,tran,mode,data) imode = IOR(psb_swap_send_,psb_swap_recv_) endif - ! check vector correctness - call psb_chkvect(m,lone,x%get_nrows(),ix,ijx,desc_a,info,iix,jjx) + if (lldx < ncol) call x%reall(ncol,x%get_ncols(),info) + if(info /= psb_success_) then - info=psb_err_from_subroutine_ - ch_err='psb_chkvect' + info=psb_err_from_subroutine_; ch_err='psb_reall' call psb_errpush(info,name,a_err=ch_err) + goto 9999 end if - if (iix /= 1) then - info=psb_err_ix_n1_iy_n1_unsupported_ - call psb_errpush(info,name) - end if - - err=info - call psb_errcomm(ictxt,err) - if(err /= 0) goto 9999 - liwork=nrow if (present(work)) then if(size(work) >= liwork) then diff --git a/base/comm/psb_shalo_a.f90 b/base/comm/psb_shalo_a.f90 index 14d97025..906638fd 100644 --- a/base/comm/psb_shalo_a.f90 +++ b/base/comm/psb_shalo_a.f90 @@ -132,22 +132,13 @@ subroutine psb_shalom(x,desc_a,info,jx,ik,work,tran,mode,data) endif ldx = size(x,1) ! check vector correctness - call psb_chkvect(m,lone,ldx,ix,ijx,desc_a,info,iix,jjx) + call psb_chkvect(m,lone,ldx,ix,ijx,desc_a,info,iix,jjx,check_halo=.true.) if(info /= psb_success_) then - info=psb_err_from_subroutine_ - ch_err='psb_chkvect' + info=psb_err_from_subroutine_ ; ch_err='psb_chkvect' call psb_errpush(info,name,a_err=ch_err) + goto 9999 end if - if (iix /= 1) then - info=psb_err_ix_n1_iy_n1_unsupported_ - call psb_errpush(info,name) - end if - - err=info - call psb_errcomm(ictxt,err) - if(err /= 0) goto 9999 - liwork=nrow if (present(work)) then if(size(work) >= liwork) then @@ -324,22 +315,13 @@ subroutine psb_shalov(x,desc_a,info,work,tran,mode,data) endif ldx = size(x,1) ! check vector correctness - call psb_chkvect(m,lone,ldx,ix,ijx,desc_a,info,iix,jjx) + call psb_chkvect(m,lone,ldx,ix,ijx,desc_a,info,iix,jjx,check_halo=.true.) if(info /= psb_success_) then - info=psb_err_from_subroutine_ - ch_err='psb_chkvect' + info=psb_err_from_subroutine_ ; ch_err='psb_chkvect' call psb_errpush(info,name,a_err=ch_err) + goto 9999 end if - if (iix /= 1) then - info=psb_err_ix_n1_iy_n1_unsupported_ - call psb_errpush(info,name) - end if - - err=info - call psb_errcomm(ictxt,err) - if(err /= 0) goto 9999 - liwork=nrow if (present(work)) then if(size(work) >= liwork) then diff --git a/base/comm/psb_sovrl.f90 b/base/comm/psb_sovrl.f90 index 0635a03b..b398fc8d 100644 --- a/base/comm/psb_sovrl.f90 +++ b/base/comm/psb_sovrl.f90 @@ -76,7 +76,7 @@ subroutine psb_sovrl_vect(x,desc_a,info,work,update,mode) ! locals integer(psb_ipk_) :: ictxt, np, me, err_act, k, iix, jjx, & - & nrow, imode, err, liwork,data_, update_, mode_, ncol + & nrow, ncol, imode, err,liwork_, data_, update_, mode integer(psb_lpk_) :: m, n, ix, ijx real(psb_spk_),pointer :: iwork(:) logical :: do_swap @@ -106,13 +106,12 @@ subroutine psb_sovrl_vect(x,desc_a,info,work,update,mode) endif ix = 1 - ijx = 1 m = desc_a%get_global_rows() n = desc_a%get_global_cols() nrow = desc_a%get_local_rows() ncol = desc_a%get_local_cols() - + ldx = x%get_nrows() k = 1 if (present(update)) then @@ -129,22 +128,14 @@ subroutine psb_sovrl_vect(x,desc_a,info,work,update,mode) do_swap = (mode_ /= 0) ! check vector correctness - call psb_chkvect(m,lone,x%get_nrows(),ix,ijx,desc_a,info,iix,jjx) + + if ((info == 0).and.(ldx= liwork) then @@ -208,7 +200,7 @@ subroutine psb_zhalo_multivect(x,desc_a,info,work,tran,mode,data) ! locals integer(psb_ipk_) :: ictxt, np, me, err_act, iix, jjx, & - & nrow, imode, err, liwork,data_ + & nrow, ncol, lldx, imode, err, liwork,data_ integer(psb_lpk_) :: m, n, ix, ijx complex(psb_dpk_),pointer :: iwork(:) character :: tran_ @@ -244,6 +236,8 @@ subroutine psb_zhalo_multivect(x,desc_a,info,work,tran,mode,data) m = desc_a%get_global_rows() n = desc_a%get_global_cols() nrow = desc_a%get_local_rows() + ncol = desc_a%get_local_cols() + lldx = x%get_nrows() if (present(tran)) then tran_ = psb_toupper(tran) @@ -261,23 +255,14 @@ subroutine psb_zhalo_multivect(x,desc_a,info,work,tran,mode,data) imode = IOR(psb_swap_send_,psb_swap_recv_) endif - ! check vector correctness - call psb_chkvect(m,lone,x%get_nrows(),ix,ijx,desc_a,info,iix,jjx) + if (lldx < ncol) call x%reall(ncol,x%get_ncols(),info) + if(info /= psb_success_) then - info=psb_err_from_subroutine_ - ch_err='psb_chkvect' + info=psb_err_from_subroutine_; ch_err='psb_reall' call psb_errpush(info,name,a_err=ch_err) + goto 9999 end if - if (iix /= 1) then - info=psb_err_ix_n1_iy_n1_unsupported_ - call psb_errpush(info,name) - end if - - err=info - call psb_errcomm(ictxt,err) - if(err /= 0) goto 9999 - liwork=nrow if (present(work)) then if(size(work) >= liwork) then diff --git a/base/comm/psb_zhalo_a.f90 b/base/comm/psb_zhalo_a.f90 index ed94747b..a08a631c 100644 --- a/base/comm/psb_zhalo_a.f90 +++ b/base/comm/psb_zhalo_a.f90 @@ -132,22 +132,13 @@ subroutine psb_zhalom(x,desc_a,info,jx,ik,work,tran,mode,data) endif ldx = size(x,1) ! check vector correctness - call psb_chkvect(m,lone,ldx,ix,ijx,desc_a,info,iix,jjx) + call psb_chkvect(m,lone,ldx,ix,ijx,desc_a,info,iix,jjx,check_halo=.true.) if(info /= psb_success_) then - info=psb_err_from_subroutine_ - ch_err='psb_chkvect' + info=psb_err_from_subroutine_ ; ch_err='psb_chkvect' call psb_errpush(info,name,a_err=ch_err) + goto 9999 end if - if (iix /= 1) then - info=psb_err_ix_n1_iy_n1_unsupported_ - call psb_errpush(info,name) - end if - - err=info - call psb_errcomm(ictxt,err) - if(err /= 0) goto 9999 - liwork=nrow if (present(work)) then if(size(work) >= liwork) then @@ -324,22 +315,13 @@ subroutine psb_zhalov(x,desc_a,info,work,tran,mode,data) endif ldx = size(x,1) ! check vector correctness - call psb_chkvect(m,lone,ldx,ix,ijx,desc_a,info,iix,jjx) + call psb_chkvect(m,lone,ldx,ix,ijx,desc_a,info,iix,jjx,check_halo=.true.) if(info /= psb_success_) then - info=psb_err_from_subroutine_ - ch_err='psb_chkvect' + info=psb_err_from_subroutine_ ; ch_err='psb_chkvect' call psb_errpush(info,name,a_err=ch_err) + goto 9999 end if - if (iix /= 1) then - info=psb_err_ix_n1_iy_n1_unsupported_ - call psb_errpush(info,name) - end if - - err=info - call psb_errcomm(ictxt,err) - if(err /= 0) goto 9999 - liwork=nrow if (present(work)) then if(size(work) >= liwork) then diff --git a/base/comm/psb_zovrl.f90 b/base/comm/psb_zovrl.f90 index 88707d9d..26e85780 100644 --- a/base/comm/psb_zovrl.f90 +++ b/base/comm/psb_zovrl.f90 @@ -76,7 +76,7 @@ subroutine psb_zovrl_vect(x,desc_a,info,work,update,mode) ! locals integer(psb_ipk_) :: ictxt, np, me, err_act, k, iix, jjx, & - & nrow, imode, err, liwork,data_, update_, mode_, ncol + & nrow, ncol, imode, err,liwork_, data_, update_, mode integer(psb_lpk_) :: m, n, ix, ijx complex(psb_dpk_),pointer :: iwork(:) logical :: do_swap @@ -106,13 +106,12 @@ subroutine psb_zovrl_vect(x,desc_a,info,work,update,mode) endif ix = 1 - ijx = 1 m = desc_a%get_global_rows() n = desc_a%get_global_cols() nrow = desc_a%get_local_rows() ncol = desc_a%get_local_cols() - + ldx = x%get_nrows() k = 1 if (present(update)) then @@ -129,22 +128,14 @@ subroutine psb_zovrl_vect(x,desc_a,info,work,update,mode) do_swap = (mode_ /= 0) ! check vector correctness - call psb_chkvect(m,lone,x%get_nrows(),ix,ijx,desc_a,info,iix,jjx) + + if ((info == 0).and.(ldx