Further fix for gather.

maint-3.8.1 v3.8.1-rc1-1
sfilippone 1 year ago
parent 5caee551e5
commit baf18cebd7

@ -60,7 +60,7 @@ subroutine psb_cgatherm(globx, locx, desc_a, info, iroot)
type(psb_ctxt_type) :: ctxt type(psb_ctxt_type) :: ctxt
integer(psb_mpk_) :: np, me, root, iiroot, icomm, myrank, rootrank integer(psb_mpk_) :: np, me, root, iiroot, icomm, myrank, rootrank
integer(psb_ipk_) :: ierr(5), err_act, lda_locx, lda_globx, lock, globk,& integer(psb_ipk_) :: ierr(5), err_act, lda_locx, lda_globx, lock, globk,&
& maxk, k, jlx, ilx, i, j, loc_rows & maxk, k, jlx, ilx, i, j
integer(psb_lpk_) :: m, n, ilocx, jlocx, idx, iglobx, jglobx integer(psb_lpk_) :: m, n, ilocx, jlocx, idx, iglobx, jglobx
character(len=20) :: name, ch_err character(len=20) :: name, ch_err
@ -232,11 +232,11 @@ subroutine psb_cgatherv(globx, locx, desc_a, info, iroot)
! locals ! locals
type(psb_ctxt_type) :: ctxt type(psb_ctxt_type) :: ctxt
integer(psb_mpk_) :: np, me, root, iiroot, icomm, myrank, rootrank, loc_rows integer(psb_mpk_) :: np, me, root, iiroot, icomm, myrank, rootrank
integer(psb_ipk_) :: ierr(5), err_act, lda_locx, lda_globx, lock, globk,& integer(psb_ipk_) :: ierr(5), err_act, lda_locx, lda_globx, lock, globk,&
& maxk, k, jlx, ilx, i, j & maxk, k, jlx, ilx, i, j
integer(psb_lpk_) :: m, n, ilocx, jlocx, idx, iglobx, jglobx integer(psb_lpk_) :: m, n, ilocx, jlocx, idx, iglobx, jglobx
integer(psb_mpk_), allocatable :: szs(:)
character(len=20) :: name, ch_err character(len=20) :: name, ch_err
name='psb_cgatherv' name='psb_cgatherv'
@ -307,32 +307,23 @@ subroutine psb_cgatherv(globx, locx, desc_a, info, iroot)
goto 9999 goto 9999
end if end if
globx(:)=czero
do i=1,desc_a%get_local_rows()
call psb_loc_to_glob(i,idx,desc_a,info)
globx(idx) = locx(i)
end do
! adjust overlapped elements ! adjust overlapped elements
do i=1, size(desc_a%ovrlap_elem,1) do i=1, size(desc_a%ovrlap_elem,1)
if (me /= desc_a%ovrlap_elem(i,3)) then if (me /= desc_a%ovrlap_elem(i,3)) then
idx = desc_a%ovrlap_elem(i,1) idx = desc_a%ovrlap_elem(i,1)
locx(idx) = czero call psb_loc_to_glob(idx,desc_a,info)
globx(idx) = czero
end if end if
end do end do
loc_rows = desc_a%get_local_rows()
if ((me == root).or.(root == -1)) then call psb_sum(ctxt,globx(1:m),root=root)
allocate(szs(np))
end if
call psb_gather(ctxt,loc_rows,szs,root=root)
if ((me == root).or.(root == -1)) then
if (sum(szs) /= m) then
info=psb_err_internal_error_
call psb_errpush(info,name)
goto 9999
end if
call psb_realloc(m,globx,info)
if (info /= psb_success_) then
info=psb_err_alloc_dealloc_
call psb_errpush(info,name)
goto 9999
end if
end if
call psb_gatherv(ctxt,locx(1:loc_rows),globx,szs,root=root)
call psb_erractionrestore(err_act) call psb_erractionrestore(err_act)
return return

@ -60,7 +60,7 @@ subroutine psb_dgatherm(globx, locx, desc_a, info, iroot)
type(psb_ctxt_type) :: ctxt type(psb_ctxt_type) :: ctxt
integer(psb_mpk_) :: np, me, root, iiroot, icomm, myrank, rootrank integer(psb_mpk_) :: np, me, root, iiroot, icomm, myrank, rootrank
integer(psb_ipk_) :: ierr(5), err_act, lda_locx, lda_globx, lock, globk,& integer(psb_ipk_) :: ierr(5), err_act, lda_locx, lda_globx, lock, globk,&
& maxk, k, jlx, ilx, i, j, loc_rows & maxk, k, jlx, ilx, i, j
integer(psb_lpk_) :: m, n, ilocx, jlocx, idx, iglobx, jglobx integer(psb_lpk_) :: m, n, ilocx, jlocx, idx, iglobx, jglobx
character(len=20) :: name, ch_err character(len=20) :: name, ch_err
@ -232,11 +232,11 @@ subroutine psb_dgatherv(globx, locx, desc_a, info, iroot)
! locals ! locals
type(psb_ctxt_type) :: ctxt type(psb_ctxt_type) :: ctxt
integer(psb_mpk_) :: np, me, root, iiroot, icomm, myrank, rootrank, loc_rows integer(psb_mpk_) :: np, me, root, iiroot, icomm, myrank, rootrank
integer(psb_ipk_) :: ierr(5), err_act, lda_locx, lda_globx, lock, globk,& integer(psb_ipk_) :: ierr(5), err_act, lda_locx, lda_globx, lock, globk,&
& maxk, k, jlx, ilx, i, j & maxk, k, jlx, ilx, i, j
integer(psb_lpk_) :: m, n, ilocx, jlocx, idx, iglobx, jglobx integer(psb_lpk_) :: m, n, ilocx, jlocx, idx, iglobx, jglobx
integer(psb_mpk_), allocatable :: szs(:)
character(len=20) :: name, ch_err character(len=20) :: name, ch_err
name='psb_dgatherv' name='psb_dgatherv'
@ -307,32 +307,23 @@ subroutine psb_dgatherv(globx, locx, desc_a, info, iroot)
goto 9999 goto 9999
end if end if
globx(:)=dzero
do i=1,desc_a%get_local_rows()
call psb_loc_to_glob(i,idx,desc_a,info)
globx(idx) = locx(i)
end do
! adjust overlapped elements ! adjust overlapped elements
do i=1, size(desc_a%ovrlap_elem,1) do i=1, size(desc_a%ovrlap_elem,1)
if (me /= desc_a%ovrlap_elem(i,3)) then if (me /= desc_a%ovrlap_elem(i,3)) then
idx = desc_a%ovrlap_elem(i,1) idx = desc_a%ovrlap_elem(i,1)
locx(idx) = dzero call psb_loc_to_glob(idx,desc_a,info)
globx(idx) = dzero
end if end if
end do end do
loc_rows = desc_a%get_local_rows()
if ((me == root).or.(root == -1)) then call psb_sum(ctxt,globx(1:m),root=root)
allocate(szs(np))
end if
call psb_gather(ctxt,loc_rows,szs,root=root)
if ((me == root).or.(root == -1)) then
if (sum(szs) /= m) then
info=psb_err_internal_error_
call psb_errpush(info,name)
goto 9999
end if
call psb_realloc(m,globx,info)
if (info /= psb_success_) then
info=psb_err_alloc_dealloc_
call psb_errpush(info,name)
goto 9999
end if
end if
call psb_gatherv(ctxt,locx(1:loc_rows),globx,szs,root=root)
call psb_erractionrestore(err_act) call psb_erractionrestore(err_act)
return return

@ -60,7 +60,7 @@ subroutine psb_egatherm(globx, locx, desc_a, info, iroot)
type(psb_ctxt_type) :: ctxt type(psb_ctxt_type) :: ctxt
integer(psb_mpk_) :: np, me, root, iiroot, icomm, myrank, rootrank integer(psb_mpk_) :: np, me, root, iiroot, icomm, myrank, rootrank
integer(psb_ipk_) :: ierr(5), err_act, lda_locx, lda_globx, lock, globk,& integer(psb_ipk_) :: ierr(5), err_act, lda_locx, lda_globx, lock, globk,&
& maxk, k, jlx, ilx, i, j, loc_rows & maxk, k, jlx, ilx, i, j
integer(psb_lpk_) :: m, n, ilocx, jlocx, idx, iglobx, jglobx integer(psb_lpk_) :: m, n, ilocx, jlocx, idx, iglobx, jglobx
character(len=20) :: name, ch_err character(len=20) :: name, ch_err
@ -232,11 +232,11 @@ subroutine psb_egatherv(globx, locx, desc_a, info, iroot)
! locals ! locals
type(psb_ctxt_type) :: ctxt type(psb_ctxt_type) :: ctxt
integer(psb_mpk_) :: np, me, root, iiroot, icomm, myrank, rootrank, loc_rows integer(psb_mpk_) :: np, me, root, iiroot, icomm, myrank, rootrank
integer(psb_ipk_) :: ierr(5), err_act, lda_locx, lda_globx, lock, globk,& integer(psb_ipk_) :: ierr(5), err_act, lda_locx, lda_globx, lock, globk,&
& maxk, k, jlx, ilx, i, j & maxk, k, jlx, ilx, i, j
integer(psb_lpk_) :: m, n, ilocx, jlocx, idx, iglobx, jglobx integer(psb_lpk_) :: m, n, ilocx, jlocx, idx, iglobx, jglobx
integer(psb_mpk_), allocatable :: szs(:)
character(len=20) :: name, ch_err character(len=20) :: name, ch_err
name='psb_egatherv' name='psb_egatherv'
@ -307,32 +307,23 @@ subroutine psb_egatherv(globx, locx, desc_a, info, iroot)
goto 9999 goto 9999
end if end if
globx(:)=ezero
do i=1,desc_a%get_local_rows()
call psb_loc_to_glob(i,idx,desc_a,info)
globx(idx) = locx(i)
end do
! adjust overlapped elements ! adjust overlapped elements
do i=1, size(desc_a%ovrlap_elem,1) do i=1, size(desc_a%ovrlap_elem,1)
if (me /= desc_a%ovrlap_elem(i,3)) then if (me /= desc_a%ovrlap_elem(i,3)) then
idx = desc_a%ovrlap_elem(i,1) idx = desc_a%ovrlap_elem(i,1)
locx(idx) = ezero call psb_loc_to_glob(idx,desc_a,info)
globx(idx) = ezero
end if end if
end do end do
loc_rows = desc_a%get_local_rows()
if ((me == root).or.(root == -1)) then call psb_sum(ctxt,globx(1:m),root=root)
allocate(szs(np))
end if
call psb_gather(ctxt,loc_rows,szs,root=root)
if ((me == root).or.(root == -1)) then
if (sum(szs) /= m) then
info=psb_err_internal_error_
call psb_errpush(info,name)
goto 9999
end if
call psb_realloc(m,globx,info)
if (info /= psb_success_) then
info=psb_err_alloc_dealloc_
call psb_errpush(info,name)
goto 9999
end if
end if
call psb_gatherv(ctxt,locx(1:loc_rows),globx,szs,root=root)
call psb_erractionrestore(err_act) call psb_erractionrestore(err_act)
return return

@ -60,7 +60,7 @@ subroutine psb_i2gatherm(globx, locx, desc_a, info, iroot)
type(psb_ctxt_type) :: ctxt type(psb_ctxt_type) :: ctxt
integer(psb_mpk_) :: np, me, root, iiroot, icomm, myrank, rootrank integer(psb_mpk_) :: np, me, root, iiroot, icomm, myrank, rootrank
integer(psb_ipk_) :: ierr(5), err_act, lda_locx, lda_globx, lock, globk,& integer(psb_ipk_) :: ierr(5), err_act, lda_locx, lda_globx, lock, globk,&
& maxk, k, jlx, ilx, i, j, loc_rows & maxk, k, jlx, ilx, i, j
integer(psb_lpk_) :: m, n, ilocx, jlocx, idx, iglobx, jglobx integer(psb_lpk_) :: m, n, ilocx, jlocx, idx, iglobx, jglobx
character(len=20) :: name, ch_err character(len=20) :: name, ch_err
@ -232,11 +232,11 @@ subroutine psb_i2gatherv(globx, locx, desc_a, info, iroot)
! locals ! locals
type(psb_ctxt_type) :: ctxt type(psb_ctxt_type) :: ctxt
integer(psb_mpk_) :: np, me, root, iiroot, icomm, myrank, rootrank, loc_rows integer(psb_mpk_) :: np, me, root, iiroot, icomm, myrank, rootrank
integer(psb_ipk_) :: ierr(5), err_act, lda_locx, lda_globx, lock, globk,& integer(psb_ipk_) :: ierr(5), err_act, lda_locx, lda_globx, lock, globk,&
& maxk, k, jlx, ilx, i, j & maxk, k, jlx, ilx, i, j
integer(psb_lpk_) :: m, n, ilocx, jlocx, idx, iglobx, jglobx integer(psb_lpk_) :: m, n, ilocx, jlocx, idx, iglobx, jglobx
integer(psb_mpk_), allocatable :: szs(:)
character(len=20) :: name, ch_err character(len=20) :: name, ch_err
name='psb_i2gatherv' name='psb_i2gatherv'
@ -307,32 +307,23 @@ subroutine psb_i2gatherv(globx, locx, desc_a, info, iroot)
goto 9999 goto 9999
end if end if
globx(:)=i2zero
do i=1,desc_a%get_local_rows()
call psb_loc_to_glob(i,idx,desc_a,info)
globx(idx) = locx(i)
end do
! adjust overlapped elements ! adjust overlapped elements
do i=1, size(desc_a%ovrlap_elem,1) do i=1, size(desc_a%ovrlap_elem,1)
if (me /= desc_a%ovrlap_elem(i,3)) then if (me /= desc_a%ovrlap_elem(i,3)) then
idx = desc_a%ovrlap_elem(i,1) idx = desc_a%ovrlap_elem(i,1)
locx(idx) = i2zero call psb_loc_to_glob(idx,desc_a,info)
globx(idx) = i2zero
end if end if
end do end do
loc_rows = desc_a%get_local_rows()
if ((me == root).or.(root == -1)) then call psb_sum(ctxt,globx(1:m),root=root)
allocate(szs(np))
end if
call psb_gather(ctxt,loc_rows,szs,root=root)
if ((me == root).or.(root == -1)) then
if (sum(szs) /= m) then
info=psb_err_internal_error_
call psb_errpush(info,name)
goto 9999
end if
call psb_realloc(m,globx,info)
if (info /= psb_success_) then
info=psb_err_alloc_dealloc_
call psb_errpush(info,name)
goto 9999
end if
end if
call psb_gatherv(ctxt,locx(1:loc_rows),globx,szs,root=root)
call psb_erractionrestore(err_act) call psb_erractionrestore(err_act)
return return

@ -60,7 +60,7 @@ subroutine psb_mgatherm(globx, locx, desc_a, info, iroot)
type(psb_ctxt_type) :: ctxt type(psb_ctxt_type) :: ctxt
integer(psb_mpk_) :: np, me, root, iiroot, icomm, myrank, rootrank integer(psb_mpk_) :: np, me, root, iiroot, icomm, myrank, rootrank
integer(psb_ipk_) :: ierr(5), err_act, lda_locx, lda_globx, lock, globk,& integer(psb_ipk_) :: ierr(5), err_act, lda_locx, lda_globx, lock, globk,&
& maxk, k, jlx, ilx, i, j, loc_rows & maxk, k, jlx, ilx, i, j
integer(psb_lpk_) :: m, n, ilocx, jlocx, idx, iglobx, jglobx integer(psb_lpk_) :: m, n, ilocx, jlocx, idx, iglobx, jglobx
character(len=20) :: name, ch_err character(len=20) :: name, ch_err
@ -232,11 +232,11 @@ subroutine psb_mgatherv(globx, locx, desc_a, info, iroot)
! locals ! locals
type(psb_ctxt_type) :: ctxt type(psb_ctxt_type) :: ctxt
integer(psb_mpk_) :: np, me, root, iiroot, icomm, myrank, rootrank, loc_rows integer(psb_mpk_) :: np, me, root, iiroot, icomm, myrank, rootrank
integer(psb_ipk_) :: ierr(5), err_act, lda_locx, lda_globx, lock, globk,& integer(psb_ipk_) :: ierr(5), err_act, lda_locx, lda_globx, lock, globk,&
& maxk, k, jlx, ilx, i, j & maxk, k, jlx, ilx, i, j
integer(psb_lpk_) :: m, n, ilocx, jlocx, idx, iglobx, jglobx integer(psb_lpk_) :: m, n, ilocx, jlocx, idx, iglobx, jglobx
integer(psb_mpk_), allocatable :: szs(:)
character(len=20) :: name, ch_err character(len=20) :: name, ch_err
name='psb_mgatherv' name='psb_mgatherv'
@ -307,32 +307,23 @@ subroutine psb_mgatherv(globx, locx, desc_a, info, iroot)
goto 9999 goto 9999
end if end if
globx(:)=mzero
do i=1,desc_a%get_local_rows()
call psb_loc_to_glob(i,idx,desc_a,info)
globx(idx) = locx(i)
end do
! adjust overlapped elements ! adjust overlapped elements
do i=1, size(desc_a%ovrlap_elem,1) do i=1, size(desc_a%ovrlap_elem,1)
if (me /= desc_a%ovrlap_elem(i,3)) then if (me /= desc_a%ovrlap_elem(i,3)) then
idx = desc_a%ovrlap_elem(i,1) idx = desc_a%ovrlap_elem(i,1)
locx(idx) = mzero call psb_loc_to_glob(idx,desc_a,info)
globx(idx) = mzero
end if end if
end do end do
loc_rows = desc_a%get_local_rows()
if ((me == root).or.(root == -1)) then call psb_sum(ctxt,globx(1:m),root=root)
allocate(szs(np))
end if
call psb_gather(ctxt,loc_rows,szs,root=root)
if ((me == root).or.(root == -1)) then
if (sum(szs) /= m) then
info=psb_err_internal_error_
call psb_errpush(info,name)
goto 9999
end if
call psb_realloc(m,globx,info)
if (info /= psb_success_) then
info=psb_err_alloc_dealloc_
call psb_errpush(info,name)
goto 9999
end if
end if
call psb_gatherv(ctxt,locx(1:loc_rows),globx,szs,root=root)
call psb_erractionrestore(err_act) call psb_erractionrestore(err_act)
return return

@ -60,7 +60,7 @@ subroutine psb_sgatherm(globx, locx, desc_a, info, iroot)
type(psb_ctxt_type) :: ctxt type(psb_ctxt_type) :: ctxt
integer(psb_mpk_) :: np, me, root, iiroot, icomm, myrank, rootrank integer(psb_mpk_) :: np, me, root, iiroot, icomm, myrank, rootrank
integer(psb_ipk_) :: ierr(5), err_act, lda_locx, lda_globx, lock, globk,& integer(psb_ipk_) :: ierr(5), err_act, lda_locx, lda_globx, lock, globk,&
& maxk, k, jlx, ilx, i, j, loc_rows & maxk, k, jlx, ilx, i, j
integer(psb_lpk_) :: m, n, ilocx, jlocx, idx, iglobx, jglobx integer(psb_lpk_) :: m, n, ilocx, jlocx, idx, iglobx, jglobx
character(len=20) :: name, ch_err character(len=20) :: name, ch_err
@ -232,11 +232,11 @@ subroutine psb_sgatherv(globx, locx, desc_a, info, iroot)
! locals ! locals
type(psb_ctxt_type) :: ctxt type(psb_ctxt_type) :: ctxt
integer(psb_mpk_) :: np, me, root, iiroot, icomm, myrank, rootrank, loc_rows integer(psb_mpk_) :: np, me, root, iiroot, icomm, myrank, rootrank
integer(psb_ipk_) :: ierr(5), err_act, lda_locx, lda_globx, lock, globk,& integer(psb_ipk_) :: ierr(5), err_act, lda_locx, lda_globx, lock, globk,&
& maxk, k, jlx, ilx, i, j & maxk, k, jlx, ilx, i, j
integer(psb_lpk_) :: m, n, ilocx, jlocx, idx, iglobx, jglobx integer(psb_lpk_) :: m, n, ilocx, jlocx, idx, iglobx, jglobx
integer(psb_mpk_), allocatable :: szs(:)
character(len=20) :: name, ch_err character(len=20) :: name, ch_err
name='psb_sgatherv' name='psb_sgatherv'
@ -307,32 +307,23 @@ subroutine psb_sgatherv(globx, locx, desc_a, info, iroot)
goto 9999 goto 9999
end if end if
globx(:)=szero
do i=1,desc_a%get_local_rows()
call psb_loc_to_glob(i,idx,desc_a,info)
globx(idx) = locx(i)
end do
! adjust overlapped elements ! adjust overlapped elements
do i=1, size(desc_a%ovrlap_elem,1) do i=1, size(desc_a%ovrlap_elem,1)
if (me /= desc_a%ovrlap_elem(i,3)) then if (me /= desc_a%ovrlap_elem(i,3)) then
idx = desc_a%ovrlap_elem(i,1) idx = desc_a%ovrlap_elem(i,1)
locx(idx) = szero call psb_loc_to_glob(idx,desc_a,info)
globx(idx) = szero
end if end if
end do end do
loc_rows = desc_a%get_local_rows()
if ((me == root).or.(root == -1)) then call psb_sum(ctxt,globx(1:m),root=root)
allocate(szs(np))
end if
call psb_gather(ctxt,loc_rows,szs,root=root)
if ((me == root).or.(root == -1)) then
if (sum(szs) /= m) then
info=psb_err_internal_error_
call psb_errpush(info,name)
goto 9999
end if
call psb_realloc(m,globx,info)
if (info /= psb_success_) then
info=psb_err_alloc_dealloc_
call psb_errpush(info,name)
goto 9999
end if
end if
call psb_gatherv(ctxt,locx(1:loc_rows),globx,szs,root=root)
call psb_erractionrestore(err_act) call psb_erractionrestore(err_act)
return return

@ -60,7 +60,7 @@ subroutine psb_zgatherm(globx, locx, desc_a, info, iroot)
type(psb_ctxt_type) :: ctxt type(psb_ctxt_type) :: ctxt
integer(psb_mpk_) :: np, me, root, iiroot, icomm, myrank, rootrank integer(psb_mpk_) :: np, me, root, iiroot, icomm, myrank, rootrank
integer(psb_ipk_) :: ierr(5), err_act, lda_locx, lda_globx, lock, globk,& integer(psb_ipk_) :: ierr(5), err_act, lda_locx, lda_globx, lock, globk,&
& maxk, k, jlx, ilx, i, j, loc_rows & maxk, k, jlx, ilx, i, j
integer(psb_lpk_) :: m, n, ilocx, jlocx, idx, iglobx, jglobx integer(psb_lpk_) :: m, n, ilocx, jlocx, idx, iglobx, jglobx
character(len=20) :: name, ch_err character(len=20) :: name, ch_err
@ -232,11 +232,11 @@ subroutine psb_zgatherv(globx, locx, desc_a, info, iroot)
! locals ! locals
type(psb_ctxt_type) :: ctxt type(psb_ctxt_type) :: ctxt
integer(psb_mpk_) :: np, me, root, iiroot, icomm, myrank, rootrank, loc_rows integer(psb_mpk_) :: np, me, root, iiroot, icomm, myrank, rootrank
integer(psb_ipk_) :: ierr(5), err_act, lda_locx, lda_globx, lock, globk,& integer(psb_ipk_) :: ierr(5), err_act, lda_locx, lda_globx, lock, globk,&
& maxk, k, jlx, ilx, i, j & maxk, k, jlx, ilx, i, j
integer(psb_lpk_) :: m, n, ilocx, jlocx, idx, iglobx, jglobx integer(psb_lpk_) :: m, n, ilocx, jlocx, idx, iglobx, jglobx
integer(psb_mpk_), allocatable :: szs(:)
character(len=20) :: name, ch_err character(len=20) :: name, ch_err
name='psb_zgatherv' name='psb_zgatherv'
@ -307,32 +307,23 @@ subroutine psb_zgatherv(globx, locx, desc_a, info, iroot)
goto 9999 goto 9999
end if end if
globx(:)=zzero
do i=1,desc_a%get_local_rows()
call psb_loc_to_glob(i,idx,desc_a,info)
globx(idx) = locx(i)
end do
! adjust overlapped elements ! adjust overlapped elements
do i=1, size(desc_a%ovrlap_elem,1) do i=1, size(desc_a%ovrlap_elem,1)
if (me /= desc_a%ovrlap_elem(i,3)) then if (me /= desc_a%ovrlap_elem(i,3)) then
idx = desc_a%ovrlap_elem(i,1) idx = desc_a%ovrlap_elem(i,1)
locx(idx) = zzero call psb_loc_to_glob(idx,desc_a,info)
globx(idx) = zzero
end if end if
end do end do
loc_rows = desc_a%get_local_rows()
if ((me == root).or.(root == -1)) then call psb_sum(ctxt,globx(1:m),root=root)
allocate(szs(np))
end if
call psb_gather(ctxt,loc_rows,szs,root=root)
if ((me == root).or.(root == -1)) then
if (sum(szs) /= m) then
info=psb_err_internal_error_
call psb_errpush(info,name)
goto 9999
end if
call psb_realloc(m,globx,info)
if (info /= psb_success_) then
info=psb_err_alloc_dealloc_
call psb_errpush(info,name)
goto 9999
end if
end if
call psb_gatherv(ctxt,locx(1:loc_rows),globx,szs,root=root)
call psb_erractionrestore(err_act) call psb_erractionrestore(err_act)
return return

Loading…
Cancel
Save