From 745384c8fc2aaf5f985de980cd8f71d34076c21b Mon Sep 17 00:00:00 2001 From: Salvatore Filippone Date: Tue, 8 Dec 2015 16:31:01 +0000 Subject: [PATCH] psblas-3.3-maint: base/comm/psb_cscatter.F90 base/comm/psb_dscatter.F90 base/comm/psb_iscatter.F90 base/comm/psb_sscatter.F90 base/comm/psb_zscatter.F90 base/modules/psb_i_comm_mod.f90 docs/psblas-3.3.pdf docs/src/commrout.tex docs/src/datastruct.tex Make LOCX an ALLOCATABLE arg. --- base/comm/psb_cscatter.F90 | 210 ++++++++--------- base/comm/psb_dscatter.F90 | 210 ++++++++--------- base/comm/psb_iscatter.F90 | 388 ++++++++++++++++++++---------- base/comm/psb_sscatter.F90 | 210 ++++++++--------- base/comm/psb_zscatter.F90 | 210 ++++++++--------- base/modules/psb_i_comm_mod.f90 | 15 +- docs/psblas-3.3.pdf | 402 +++++++++++++++++--------------- docs/src/commrout.tex | 5 +- docs/src/datastruct.tex | 1 + 9 files changed, 886 insertions(+), 765 deletions(-) diff --git a/base/comm/psb_cscatter.F90 b/base/comm/psb_cscatter.F90 index a0015996..bb01bba0 100644 --- a/base/comm/psb_cscatter.F90 +++ b/base/comm/psb_cscatter.F90 @@ -43,7 +43,7 @@ ! iroot - integer(optional). The process that owns the global matrix. ! If -1 all the processes have a copy. ! Default -1 -subroutine psb_cscatterm(globx, locx, desc_a, info, iroot) +subroutine psb_cscatterm(globx, locx, desc_a, info, root) use psb_base_mod, psb_protect_name => psb_cscatterm #ifdef MPI_MOD @@ -54,18 +54,18 @@ subroutine psb_cscatterm(globx, locx, desc_a, info, iroot) include 'mpif.h' #endif - complex(psb_spk_), intent(out) :: locx(:,:) + complex(psb_spk_), intent(out), allocatable :: locx(:,:) complex(psb_spk_), intent(in) :: globx(:,:) type(psb_desc_type), intent(in) :: desc_a integer(psb_ipk_), intent(out) :: info - integer(psb_ipk_), intent(in), optional :: iroot + integer(psb_ipk_), intent(in), optional :: root ! locals - integer(psb_mpik_) :: ictxt, np, me, root, iiroot, icomm, myrank, rootrank + integer(psb_mpik_) :: ictxt, np, me, iroot, icomm, myrank, rootrank, iam integer(psb_ipk_) :: ierr(5), err_act, m, n, i, j, idx, nrow, iglobx, jglobx,& - & ilocx, jlocx, lda_locx, lda_globx, lock, globk, k, maxk, ilx,& - & jlx, c, pos + & ilocx, jlocx, lda_locx, lda_globx, lock, globk, k, maxk, & + & col,pos complex(psb_spk_),allocatable :: scatterv(:) integer(psb_ipk_), allocatable :: displ(:), l_t_g_all(:), all_dim(:), ltg(:) character(len=20) :: name, ch_err @@ -78,101 +78,90 @@ subroutine psb_cscatterm(globx, locx, desc_a, info, iroot) ictxt=desc_a%get_context() ! check on blacs grid - call psb_info(ictxt, me, np) + call psb_info(ictxt, iam, np) if (np == -1) then info = psb_err_context_error_ call psb_errpush(info,name) goto 9999 endif - if (present(iroot)) then - root = iroot - if((root < -1).or.(root > np)) then + if (present(root)) then + iroot = root + if((iroot < -1).or.(iroot >= np)) then info=psb_err_input_value_invalid_i_ ierr(1)=5; ierr(2)=root call psb_errpush(info,name,i_err=ierr) goto 9999 end if else - root = -1 + iroot = psb_root_ end if - if (root == -1) then - iiroot = psb_root_ - endif iglobx = 1 jglobx = 1 - ilocx = 1 - jlocx = 1 lda_globx = size(globx,1) - lda_locx = size(locx, 1) m = desc_a%get_global_rows() n = desc_a%get_global_cols() - - lock=size(locx,2)-jlocx+1 - globk=size(globx,2)-jglobx+1 - maxk=min(lock,globk) - k = maxk call psb_get_mpicomm(ictxt,icomm) call psb_get_rank(myrank,ictxt,me) - - lda_globx = size(globx) - lda_locx = size(locx) - + if (iroot==-1) then + lda_globx = size(globx, 1) + k = size(globx,2) + else + if (iam==iroot) then + k = size(globx,2) + lda_globx = size(globx, 1) + end if + call psb_bcast(ictxt,k,root=iroot) + call psb_bcast(ictxt,lda_globx,root=iroot) + end if + m = desc_a%get_global_rows() n = desc_a%get_global_cols() - call psb_bcast(ictxt,k,root=iiroot) ! there should be a global check on k here!!! - call psb_chkglobvect(m,n,lda_globx,iglobx,jglobx,desc_a,info) - if (info == psb_success_) call psb_chkvect(m,n,lda_locx,ilocx,jlocx,desc_a,info,ilx,jlx) if(info /= psb_success_) then info=psb_err_from_subroutine_ ch_err='psb_chk(glob)vect' call psb_errpush(info,name,a_err=ch_err) goto 9999 end if - - if ((ilx /= 1).or.(iglobx /= 1)) then - info=psb_err_ix_n1_iy_n1_unsupported_ - call psb_errpush(info,name) + + nrow=desc_a%get_local_rows() + ! root has to gather size information + allocate(displ(np),all_dim(np),ltg(nrow),stat=info) + if(info /= psb_success_) then + info=psb_err_from_subroutine_ + ch_err='Allocate' + call psb_errpush(info,name,a_err=ch_err) goto 9999 end if + do i=1, nrow + ltg(i) = i + end do + call psb_loc_to_glob(ltg(1:nrow),desc_a,info) - nrow=desc_a%get_local_rows() - - if ((root == -1).or.(np == 1)) then + call psb_geall(locx,desc_a,info,n=k) + + if ((iroot == -1).or.(np == 1)) then ! extract my chunk do j=1,k do i=1, nrow - call psb_loc_to_glob(i,idx,desc_a,info) - locx(i,jlocx+j-1)=globx(idx,jglobx+j-1) + locx(i,j)=globx(ltg(i),j) end do end do else - call psb_get_rank(rootrank,ictxt,root) - - ! root has to gather size information - allocate(displ(np),all_dim(np),ltg(nrow),stat=info) - if(info /= psb_success_) then - info=psb_err_from_subroutine_ - ch_err='Allocate' - call psb_errpush(info,name,a_err=ch_err) - goto 9999 - end if - do i=1, nrow - ltg(i) = i - end do - call psb_loc_to_glob(ltg(1:nrow),desc_a,info) + + call psb_get_rank(rootrank,ictxt,iroot) call mpi_gather(nrow,1,psb_mpi_ipk_integer,all_dim,& & 1,psb_mpi_ipk_integer,rootrank,icomm,info) - if (me == root) then + if (iam == iroot) then displ(1)=0 do i=2,np displ(i)=displ(i-1)+all_dim(i-1) @@ -200,27 +189,26 @@ subroutine psb_cscatterm(globx, locx, desc_a, info, iroot) & psb_mpi_ipk_integer,l_t_g_all,all_dim,& & displ,psb_mpi_ipk_integer,rootrank,icomm,info) - - do c=1, k + do col=1, k ! prepare vector to scatter - if(me == root) then + if(iam == iroot) then do i=1,np pos=displ(i) do j=1, all_dim(i) idx=l_t_g_all(pos+j) - scatterv(pos+j)=globx(idx,jglobx+c-1) + scatterv(pos+j)=globx(idx,col) end do end do end if - ! scatter !!! + ! scatter call mpi_scatterv(scatterv,all_dim,displ,& - & psb_mpi_c_spk_,locx(1,jlocx+c-1),nrow,& + & psb_mpi_c_spk_,locx(1,col),nrow,& & psb_mpi_c_spk_,rootrank,icomm,info) end do - deallocate(all_dim, l_t_g_all, displ, ltg, scatterv,stat=info) + deallocate(l_t_g_all, scatterv,stat=info) if(info /= psb_success_) then info=psb_err_from_subroutine_ ch_err='deallocate' @@ -229,6 +217,13 @@ subroutine psb_cscatterm(globx, locx, desc_a, info, iroot) end if end if + deallocate(all_dim, displ, ltg,stat=info) + if(info /= psb_success_) then + info=psb_err_from_subroutine_ + ch_err='deallocate' + call psb_errpush(info,name,a_err=ch_err) + goto 9999 + end if call psb_erractionrestore(err_act) return @@ -286,7 +281,7 @@ end subroutine psb_cscatterm ! iroot - integer(optional). The process that owns the global vector. If -1 all ! the processes have a copy. ! -subroutine psb_cscatterv(globx, locx, desc_a, info, iroot) +subroutine psb_cscatterv(globx, locx, desc_a, info, root) use psb_base_mod, psb_protect_name => psb_cscatterv #ifdef MPI_MOD use mpi @@ -296,15 +291,15 @@ subroutine psb_cscatterv(globx, locx, desc_a, info, iroot) include 'mpif.h' #endif - complex(psb_spk_), intent(out) :: locx(:) + complex(psb_spk_), intent(out), allocatable :: locx(:) complex(psb_spk_), intent(in) :: globx(:) type(psb_desc_type), intent(in) :: desc_a integer(psb_ipk_), intent(out) :: info - integer(psb_ipk_), intent(in), optional :: iroot + integer(psb_ipk_), intent(in), optional :: root ! locals - integer(psb_mpik_) :: ictxt, np, me, root, iiroot, icomm, myrank, rootrank + integer(psb_mpik_) :: ictxt, np, iam, iroot, iiroot, 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 :: scatterv(:) @@ -322,34 +317,33 @@ subroutine psb_cscatterv(globx, locx, desc_a, info, iroot) ! check on blacs grid - call psb_info(ictxt, me, np) + call psb_info(ictxt, iam, np) if (np == -1) then info = psb_err_context_error_ call psb_errpush(info,name) goto 9999 endif - if (present(iroot)) then - root = iroot - if((root < -1).or.(root > np)) then + if (present(root)) then + iroot = root + if((iroot < -1).or.(iroot > np)) then info=psb_err_input_value_invalid_i_ - ierr(1) = 5; ierr(2)=root + ierr(1) = 5; ierr(2)=iroot call psb_errpush(info,name,i_err=ierr) goto 9999 end if else - root = -1 + iroot = psb_root_ end if call psb_get_mpicomm(ictxt,icomm) - call psb_get_rank(myrank,ictxt,me) + call psb_get_rank(myrank,ictxt,iam) iglobx = 1 jglobx = 1 ilocx = 1 jlocx = 1 - lda_globx = size(globx) - lda_locx = size(locx) + lda_globx = size(globx, 1) m = desc_a%get_global_rows() n = desc_a%get_global_cols() @@ -358,8 +352,6 @@ subroutine psb_cscatterv(globx, locx, desc_a, info, iroot) ! there should be a global check on k here!!! call psb_chkglobvect(m,n,lda_globx,iglobx,jglobx,desc_a,info) - if (info == psb_success_) & - & call psb_chkvect(m,n,lda_locx,ilocx,jlocx,desc_a,info,ilx,jlx) if(info /= psb_success_) then info=psb_err_from_subroutine_ ch_err='psb_chk(glob)vect' @@ -367,48 +359,39 @@ subroutine psb_cscatterv(globx, locx, desc_a, info, iroot) goto 9999 end if - if ((ilx /= 1).or.(iglobx /= 1)) then - info=psb_err_ix_n1_iy_n1_unsupported_ - call psb_errpush(info,name) - goto 9999 - end if - nrow = desc_a%get_local_rows() + allocate(displ(np),all_dim(np),ltg(nrow),stat=info) + if(info /= psb_success_) then + info=psb_err_from_subroutine_ + ch_err='Allocate' + call psb_errpush(info,name,a_err=ch_err) + goto 9999 + end if - if ((root == -1).or.(np == 1)) then + do i=1, nrow + ltg(i) = i + end do + call psb_loc_to_glob(ltg(1:nrow),desc_a,info) + call psb_geall(locx,desc_a,info) + + if ((iroot == -1).or.(np == 1)) then ! extract my chunk do i=1, nrow - call psb_loc_to_glob(i,idx,desc_a,info) - locx(i)=globx(idx) + locx(i)=globx(ltg(i)) end do else - call psb_get_rank(rootrank,ictxt,root) - - ! root has to gather size information - allocate(displ(np),all_dim(np),ltg(nrow),stat=info) - if(info /= psb_success_) then - info=psb_err_from_subroutine_ - ch_err='Allocate' - call psb_errpush(info,name,a_err=ch_err) - goto 9999 - end if - - do i=1, nrow - ltg(i) = i - end do - call psb_loc_to_glob(ltg(1:nrow),desc_a,info) - + call psb_get_rank(rootrank,ictxt,iroot) call mpi_gather(nrow,1,psb_mpi_ipk_integer,all_dim,& & 1,psb_mpi_ipk_integer,rootrank,icomm,info) - if(me == root) then + if(iam == iroot) then displ(1)=0 do i=2,np displ(i)=displ(i-1) + all_dim(i-1) end do if (debug_level >= psb_debug_inner_) then - write(debug_unit,*) me,' ',trim(name),' displ:',displ(1:np), & + write(debug_unit,*) iam,' ',trim(name),' displ:',displ(1:np), & &' dim',all_dim(1:np), sum(all_dim) endif @@ -436,7 +419,7 @@ subroutine psb_cscatterv(globx, locx, desc_a, info, iroot) & displ,psb_mpi_ipk_integer,rootrank,icomm,info) ! prepare vector to scatter - if (me == root) then + if (iam == iroot) then do i=1,np pos=displ(i) do j=1, all_dim(i) @@ -451,7 +434,7 @@ subroutine psb_cscatterv(globx, locx, desc_a, info, iroot) & psb_mpi_c_spk_,locx,nrow,& & psb_mpi_c_spk_,rootrank,icomm,info) - deallocate(all_dim, l_t_g_all, displ, ltg, scatterv,stat=info) + deallocate(l_t_g_all, scatterv,stat=info) if(info /= psb_success_) then info=psb_err_from_subroutine_ ch_err='deallocate' @@ -460,6 +443,14 @@ subroutine psb_cscatterv(globx, locx, desc_a, info, iroot) end if end if + deallocate(all_dim, displ, ltg,stat=info) + if(info /= psb_success_) then + info=psb_err_from_subroutine_ + ch_err='deallocate' + call psb_errpush(info,name,a_err=ch_err) + goto 9999 + end if + call psb_erractionrestore(err_act) return @@ -513,18 +504,18 @@ end subroutine psb_cscatterv ! iroot - integer(optional). The process that owns the global vector. If -1 all ! the processes have a copy. ! -subroutine psb_cscatter_vect(globx, locx, desc_a, info, iroot, mold) +subroutine psb_cscatter_vect(globx, locx, desc_a, info, root, mold) use psb_base_mod, psb_protect_name => psb_cscatter_vect implicit none type(psb_c_vect_type), intent(inout) :: locx complex(psb_spk_), intent(in) :: globx(:) type(psb_desc_type), intent(in) :: desc_a integer(psb_ipk_), intent(out) :: info - integer(psb_ipk_), intent(in), optional :: iroot + integer(psb_ipk_), intent(in), optional :: root class(psb_c_base_vect_type), intent(in), optional :: mold ! locals - integer(psb_mpik_) :: ictxt, np, me, root, iiroot, icomm, myrank, rootrank + integer(psb_mpik_) :: ictxt, 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(:) @@ -547,16 +538,15 @@ subroutine psb_cscatter_vect(globx, locx, desc_a, info, iroot, mold) call psb_errpush(info,name) goto 9999 endif - call psb_geall(vlocx,desc_a,info) - if (info == psb_success_) call psb_scatter(globx, vlocx, desc_a, info, iroot) + if (info == psb_success_) call psb_scatter(globx, vlocx, desc_a, info, root=root) if (info /= psb_success_) then info = psb_err_from_subroutine_ call psb_errpush(info,name,a_err='psb_scatterv') goto 9999 endif - call locx%bld(vlocx,mold) + call locx%bld(vlocx,mold=mold) call psb_erractionrestore(err_act) return diff --git a/base/comm/psb_dscatter.F90 b/base/comm/psb_dscatter.F90 index f60abfa0..14af5671 100644 --- a/base/comm/psb_dscatter.F90 +++ b/base/comm/psb_dscatter.F90 @@ -43,7 +43,7 @@ ! iroot - integer(optional). The process that owns the global matrix. ! If -1 all the processes have a copy. ! Default -1 -subroutine psb_dscatterm(globx, locx, desc_a, info, iroot) +subroutine psb_dscatterm(globx, locx, desc_a, info, root) use psb_base_mod, psb_protect_name => psb_dscatterm #ifdef MPI_MOD @@ -54,18 +54,18 @@ subroutine psb_dscatterm(globx, locx, desc_a, info, iroot) include 'mpif.h' #endif - real(psb_dpk_), intent(out) :: locx(:,:) + real(psb_dpk_), intent(out), allocatable :: locx(:,:) real(psb_dpk_), intent(in) :: globx(:,:) type(psb_desc_type), intent(in) :: desc_a integer(psb_ipk_), intent(out) :: info - integer(psb_ipk_), intent(in), optional :: iroot + integer(psb_ipk_), intent(in), optional :: root ! locals - integer(psb_mpik_) :: ictxt, np, me, root, iiroot, icomm, myrank, rootrank + integer(psb_mpik_) :: ictxt, np, me, iroot, icomm, myrank, rootrank, iam integer(psb_ipk_) :: ierr(5), err_act, m, n, i, j, idx, nrow, iglobx, jglobx,& - & ilocx, jlocx, lda_locx, lda_globx, lock, globk, k, maxk, ilx,& - & jlx, c, pos + & ilocx, jlocx, lda_locx, lda_globx, lock, globk, k, maxk, & + & col,pos real(psb_dpk_),allocatable :: scatterv(:) integer(psb_ipk_), allocatable :: displ(:), l_t_g_all(:), all_dim(:), ltg(:) character(len=20) :: name, ch_err @@ -78,101 +78,90 @@ subroutine psb_dscatterm(globx, locx, desc_a, info, iroot) ictxt=desc_a%get_context() ! check on blacs grid - call psb_info(ictxt, me, np) + call psb_info(ictxt, iam, np) if (np == -1) then info = psb_err_context_error_ call psb_errpush(info,name) goto 9999 endif - if (present(iroot)) then - root = iroot - if((root < -1).or.(root > np)) then + if (present(root)) then + iroot = root + if((iroot < -1).or.(iroot >= np)) then info=psb_err_input_value_invalid_i_ ierr(1)=5; ierr(2)=root call psb_errpush(info,name,i_err=ierr) goto 9999 end if else - root = -1 + iroot = psb_root_ end if - if (root == -1) then - iiroot = psb_root_ - endif iglobx = 1 jglobx = 1 - ilocx = 1 - jlocx = 1 lda_globx = size(globx,1) - lda_locx = size(locx, 1) m = desc_a%get_global_rows() n = desc_a%get_global_cols() - - lock=size(locx,2)-jlocx+1 - globk=size(globx,2)-jglobx+1 - maxk=min(lock,globk) - k = maxk call psb_get_mpicomm(ictxt,icomm) call psb_get_rank(myrank,ictxt,me) - - lda_globx = size(globx) - lda_locx = size(locx) - + if (iroot==-1) then + lda_globx = size(globx, 1) + k = size(globx,2) + else + if (iam==iroot) then + k = size(globx,2) + lda_globx = size(globx, 1) + end if + call psb_bcast(ictxt,k,root=iroot) + call psb_bcast(ictxt,lda_globx,root=iroot) + end if + m = desc_a%get_global_rows() n = desc_a%get_global_cols() - call psb_bcast(ictxt,k,root=iiroot) ! there should be a global check on k here!!! - call psb_chkglobvect(m,n,lda_globx,iglobx,jglobx,desc_a,info) - if (info == psb_success_) call psb_chkvect(m,n,lda_locx,ilocx,jlocx,desc_a,info,ilx,jlx) if(info /= psb_success_) then info=psb_err_from_subroutine_ ch_err='psb_chk(glob)vect' call psb_errpush(info,name,a_err=ch_err) goto 9999 end if - - if ((ilx /= 1).or.(iglobx /= 1)) then - info=psb_err_ix_n1_iy_n1_unsupported_ - call psb_errpush(info,name) + + nrow=desc_a%get_local_rows() + ! root has to gather size information + allocate(displ(np),all_dim(np),ltg(nrow),stat=info) + if(info /= psb_success_) then + info=psb_err_from_subroutine_ + ch_err='Allocate' + call psb_errpush(info,name,a_err=ch_err) goto 9999 end if + do i=1, nrow + ltg(i) = i + end do + call psb_loc_to_glob(ltg(1:nrow),desc_a,info) - nrow=desc_a%get_local_rows() - - if ((root == -1).or.(np == 1)) then + call psb_geall(locx,desc_a,info,n=k) + + if ((iroot == -1).or.(np == 1)) then ! extract my chunk do j=1,k do i=1, nrow - call psb_loc_to_glob(i,idx,desc_a,info) - locx(i,jlocx+j-1)=globx(idx,jglobx+j-1) + locx(i,j)=globx(ltg(i),j) end do end do else - call psb_get_rank(rootrank,ictxt,root) - - ! root has to gather size information - allocate(displ(np),all_dim(np),ltg(nrow),stat=info) - if(info /= psb_success_) then - info=psb_err_from_subroutine_ - ch_err='Allocate' - call psb_errpush(info,name,a_err=ch_err) - goto 9999 - end if - do i=1, nrow - ltg(i) = i - end do - call psb_loc_to_glob(ltg(1:nrow),desc_a,info) + + call psb_get_rank(rootrank,ictxt,iroot) call mpi_gather(nrow,1,psb_mpi_ipk_integer,all_dim,& & 1,psb_mpi_ipk_integer,rootrank,icomm,info) - if (me == root) then + if (iam == iroot) then displ(1)=0 do i=2,np displ(i)=displ(i-1)+all_dim(i-1) @@ -200,27 +189,26 @@ subroutine psb_dscatterm(globx, locx, desc_a, info, iroot) & psb_mpi_ipk_integer,l_t_g_all,all_dim,& & displ,psb_mpi_ipk_integer,rootrank,icomm,info) - - do c=1, k + do col=1, k ! prepare vector to scatter - if(me == root) then + if(iam == iroot) then do i=1,np pos=displ(i) do j=1, all_dim(i) idx=l_t_g_all(pos+j) - scatterv(pos+j)=globx(idx,jglobx+c-1) + scatterv(pos+j)=globx(idx,col) end do end do end if - ! scatter !!! + ! scatter call mpi_scatterv(scatterv,all_dim,displ,& - & psb_mpi_r_dpk_,locx(1,jlocx+c-1),nrow,& + & psb_mpi_r_dpk_,locx(1,col),nrow,& & psb_mpi_r_dpk_,rootrank,icomm,info) end do - deallocate(all_dim, l_t_g_all, displ, ltg, scatterv,stat=info) + deallocate(l_t_g_all, scatterv,stat=info) if(info /= psb_success_) then info=psb_err_from_subroutine_ ch_err='deallocate' @@ -229,6 +217,13 @@ subroutine psb_dscatterm(globx, locx, desc_a, info, iroot) end if end if + deallocate(all_dim, displ, ltg,stat=info) + if(info /= psb_success_) then + info=psb_err_from_subroutine_ + ch_err='deallocate' + call psb_errpush(info,name,a_err=ch_err) + goto 9999 + end if call psb_erractionrestore(err_act) return @@ -286,7 +281,7 @@ end subroutine psb_dscatterm ! iroot - integer(optional). The process that owns the global vector. If -1 all ! the processes have a copy. ! -subroutine psb_dscatterv(globx, locx, desc_a, info, iroot) +subroutine psb_dscatterv(globx, locx, desc_a, info, root) use psb_base_mod, psb_protect_name => psb_dscatterv #ifdef MPI_MOD use mpi @@ -296,15 +291,15 @@ subroutine psb_dscatterv(globx, locx, desc_a, info, iroot) include 'mpif.h' #endif - real(psb_dpk_), intent(out) :: locx(:) + real(psb_dpk_), intent(out), allocatable :: locx(:) real(psb_dpk_), intent(in) :: globx(:) type(psb_desc_type), intent(in) :: desc_a integer(psb_ipk_), intent(out) :: info - integer(psb_ipk_), intent(in), optional :: iroot + integer(psb_ipk_), intent(in), optional :: root ! locals - integer(psb_mpik_) :: ictxt, np, me, root, iiroot, icomm, myrank, rootrank + integer(psb_mpik_) :: ictxt, np, iam, iroot, iiroot, 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 :: scatterv(:) @@ -322,34 +317,33 @@ subroutine psb_dscatterv(globx, locx, desc_a, info, iroot) ! check on blacs grid - call psb_info(ictxt, me, np) + call psb_info(ictxt, iam, np) if (np == -1) then info = psb_err_context_error_ call psb_errpush(info,name) goto 9999 endif - if (present(iroot)) then - root = iroot - if((root < -1).or.(root > np)) then + if (present(root)) then + iroot = root + if((iroot < -1).or.(iroot > np)) then info=psb_err_input_value_invalid_i_ - ierr(1) = 5; ierr(2)=root + ierr(1) = 5; ierr(2)=iroot call psb_errpush(info,name,i_err=ierr) goto 9999 end if else - root = -1 + iroot = psb_root_ end if call psb_get_mpicomm(ictxt,icomm) - call psb_get_rank(myrank,ictxt,me) + call psb_get_rank(myrank,ictxt,iam) iglobx = 1 jglobx = 1 ilocx = 1 jlocx = 1 - lda_globx = size(globx) - lda_locx = size(locx) + lda_globx = size(globx, 1) m = desc_a%get_global_rows() n = desc_a%get_global_cols() @@ -358,8 +352,6 @@ subroutine psb_dscatterv(globx, locx, desc_a, info, iroot) ! there should be a global check on k here!!! call psb_chkglobvect(m,n,lda_globx,iglobx,jglobx,desc_a,info) - if (info == psb_success_) & - & call psb_chkvect(m,n,lda_locx,ilocx,jlocx,desc_a,info,ilx,jlx) if(info /= psb_success_) then info=psb_err_from_subroutine_ ch_err='psb_chk(glob)vect' @@ -367,48 +359,39 @@ subroutine psb_dscatterv(globx, locx, desc_a, info, iroot) goto 9999 end if - if ((ilx /= 1).or.(iglobx /= 1)) then - info=psb_err_ix_n1_iy_n1_unsupported_ - call psb_errpush(info,name) - goto 9999 - end if - nrow = desc_a%get_local_rows() + allocate(displ(np),all_dim(np),ltg(nrow),stat=info) + if(info /= psb_success_) then + info=psb_err_from_subroutine_ + ch_err='Allocate' + call psb_errpush(info,name,a_err=ch_err) + goto 9999 + end if - if ((root == -1).or.(np == 1)) then + do i=1, nrow + ltg(i) = i + end do + call psb_loc_to_glob(ltg(1:nrow),desc_a,info) + call psb_geall(locx,desc_a,info) + + if ((iroot == -1).or.(np == 1)) then ! extract my chunk do i=1, nrow - call psb_loc_to_glob(i,idx,desc_a,info) - locx(i)=globx(idx) + locx(i)=globx(ltg(i)) end do else - call psb_get_rank(rootrank,ictxt,root) - - ! root has to gather size information - allocate(displ(np),all_dim(np),ltg(nrow),stat=info) - if(info /= psb_success_) then - info=psb_err_from_subroutine_ - ch_err='Allocate' - call psb_errpush(info,name,a_err=ch_err) - goto 9999 - end if - - do i=1, nrow - ltg(i) = i - end do - call psb_loc_to_glob(ltg(1:nrow),desc_a,info) - + call psb_get_rank(rootrank,ictxt,iroot) call mpi_gather(nrow,1,psb_mpi_ipk_integer,all_dim,& & 1,psb_mpi_ipk_integer,rootrank,icomm,info) - if(me == root) then + if(iam == iroot) then displ(1)=0 do i=2,np displ(i)=displ(i-1) + all_dim(i-1) end do if (debug_level >= psb_debug_inner_) then - write(debug_unit,*) me,' ',trim(name),' displ:',displ(1:np), & + write(debug_unit,*) iam,' ',trim(name),' displ:',displ(1:np), & &' dim',all_dim(1:np), sum(all_dim) endif @@ -436,7 +419,7 @@ subroutine psb_dscatterv(globx, locx, desc_a, info, iroot) & displ,psb_mpi_ipk_integer,rootrank,icomm,info) ! prepare vector to scatter - if (me == root) then + if (iam == iroot) then do i=1,np pos=displ(i) do j=1, all_dim(i) @@ -451,7 +434,7 @@ subroutine psb_dscatterv(globx, locx, desc_a, info, iroot) & psb_mpi_r_dpk_,locx,nrow,& & psb_mpi_r_dpk_,rootrank,icomm,info) - deallocate(all_dim, l_t_g_all, displ, ltg, scatterv,stat=info) + deallocate(l_t_g_all, scatterv,stat=info) if(info /= psb_success_) then info=psb_err_from_subroutine_ ch_err='deallocate' @@ -460,6 +443,14 @@ subroutine psb_dscatterv(globx, locx, desc_a, info, iroot) end if end if + deallocate(all_dim, displ, ltg,stat=info) + if(info /= psb_success_) then + info=psb_err_from_subroutine_ + ch_err='deallocate' + call psb_errpush(info,name,a_err=ch_err) + goto 9999 + end if + call psb_erractionrestore(err_act) return @@ -513,18 +504,18 @@ end subroutine psb_dscatterv ! iroot - integer(optional). The process that owns the global vector. If -1 all ! the processes have a copy. ! -subroutine psb_dscatter_vect(globx, locx, desc_a, info, iroot, mold) +subroutine psb_dscatter_vect(globx, locx, desc_a, info, root, mold) use psb_base_mod, psb_protect_name => psb_dscatter_vect implicit none type(psb_d_vect_type), intent(inout) :: locx real(psb_dpk_), intent(in) :: globx(:) type(psb_desc_type), intent(in) :: desc_a integer(psb_ipk_), intent(out) :: info - integer(psb_ipk_), intent(in), optional :: iroot + integer(psb_ipk_), intent(in), optional :: root class(psb_d_base_vect_type), intent(in), optional :: mold ! locals - integer(psb_mpik_) :: ictxt, np, me, root, iiroot, icomm, myrank, rootrank + integer(psb_mpik_) :: ictxt, 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(:) @@ -547,16 +538,15 @@ subroutine psb_dscatter_vect(globx, locx, desc_a, info, iroot, mold) call psb_errpush(info,name) goto 9999 endif - call psb_geall(vlocx,desc_a,info) - if (info == psb_success_) call psb_scatter(globx, vlocx, desc_a, info, iroot) + if (info == psb_success_) call psb_scatter(globx, vlocx, desc_a, info, root=root) if (info /= psb_success_) then info = psb_err_from_subroutine_ call psb_errpush(info,name,a_err='psb_scatterv') goto 9999 endif - call locx%bld(vlocx,mold) + call locx%bld(vlocx,mold=mold) call psb_erractionrestore(err_act) return diff --git a/base/comm/psb_iscatter.F90 b/base/comm/psb_iscatter.F90 index 8adde4a7..73b72538 100644 --- a/base/comm/psb_iscatter.F90 +++ b/base/comm/psb_iscatter.F90 @@ -36,14 +36,15 @@ ! into pieces that are local to alle the processes. ! ! Arguments: -! globx - integer(psb_ipk_),dimension(:,:). The global matrix to scatter. -! locx - integer(psb_ipk_),dimension(:,:). The local piece of the ditributed matrix. +! globx - integer,dimension(:,:). The global matrix to scatter. +! locx - integer,dimension(:,:). The local piece of the distributed matrix. ! desc_a - type(psb_desc_type). The communication descriptor. ! info - integer. Error code. -! iroot - integer(optional). The process that owns the global matrix. If -1 all -! the processes have a copy. -! -subroutine psb_iscatterm(globx, locx, desc_a, info, iroot) +! iroot - integer(optional). The process that owns the global matrix. +! If -1 all the processes have a copy. +! Default -1 +subroutine psb_iscatterm(globx, locx, desc_a, info, root) + use psb_base_mod, psb_protect_name => psb_iscatterm #ifdef MPI_MOD use mpi @@ -53,19 +54,20 @@ subroutine psb_iscatterm(globx, locx, desc_a, info, iroot) include 'mpif.h' #endif - integer(psb_ipk_), intent(out) :: locx(:,:) + integer(psb_ipk_), intent(out), allocatable :: locx(:,:) integer(psb_ipk_), intent(in) :: globx(:,:) type(psb_desc_type), intent(in) :: desc_a integer(psb_ipk_), intent(out) :: info - integer(psb_ipk_), intent(in), optional :: iroot + integer(psb_ipk_), intent(in), optional :: root + ! locals - integer(psb_mpik_) :: ictxt, np, me, root, iiroot, icomm, myrank, rootrank + integer(psb_mpik_) :: ictxt, np, me, iroot, icomm, myrank, rootrank, iam integer(psb_ipk_) :: ierr(5), err_act, m, n, i, j, idx, nrow, iglobx, jglobx,& - & ilocx, jlocx, lda_locx, lda_globx, lock, globk, k, maxk, ilx,& - & jlx, c, pos - integer(psb_ipk_), allocatable :: scatterv(:) - integer(psb_ipk_), allocatable :: displ(:), l_t_g_all(:), all_dim(:), ltg(:) + & ilocx, jlocx, lda_locx, lda_globx, lock, globk, k, maxk, & + & col,pos + integer(psb_ipk_),allocatable :: scatterv(:) + integer(psb_ipk_), allocatable :: displ(:), l_t_g_all(:), all_dim(:), ltg(:) character(len=20) :: name, ch_err name='psb_scatterm' @@ -76,101 +78,90 @@ subroutine psb_iscatterm(globx, locx, desc_a, info, iroot) ictxt=desc_a%get_context() ! check on blacs grid - call psb_info(ictxt, me, np) + call psb_info(ictxt, iam, np) if (np == -1) then info = psb_err_context_error_ call psb_errpush(info,name) goto 9999 endif - if (present(iroot)) then - root = iroot - if((root < -1).or.(root > np)) then + if (present(root)) then + iroot = root + if((iroot < -1).or.(iroot >= np)) then info=psb_err_input_value_invalid_i_ - ierr(1)=5; ierr(2)= root + ierr(1)=5; ierr(2)=root call psb_errpush(info,name,i_err=ierr) goto 9999 end if else - root = -1 + iroot = psb_root_ end if - if (root == -1) then - iiroot = psb_root_ - endif iglobx = 1 jglobx = 1 - ilocx = 1 - jlocx = 1 lda_globx = size(globx,1) - lda_locx = size(locx, 1) m = desc_a%get_global_rows() n = desc_a%get_global_cols() - - lock=size(locx,2)-jlocx+1 - globk=size(globx,2)-jglobx+1 - maxk=min(lock,globk) - k = maxk call psb_get_mpicomm(ictxt,icomm) call psb_get_rank(myrank,ictxt,me) - - lda_globx = size(globx) - lda_locx = size(locx) - + if (iroot==-1) then + lda_globx = size(globx, 1) + k = size(globx,2) + else + if (iam==iroot) then + k = size(globx,2) + lda_globx = size(globx, 1) + end if + call psb_bcast(ictxt,k,root=iroot) + call psb_bcast(ictxt,lda_globx,root=iroot) + end if + m = desc_a%get_global_rows() n = desc_a%get_global_cols() - call psb_bcast(ictxt,k,root=iiroot) ! there should be a global check on k here!!! - call psb_chkglobvect(m,n,lda_globx,iglobx,jglobx,desc_a,info) - if (info == psb_success_) call psb_chkvect(m,n,lda_locx,ilocx,jlocx,desc_a,info,ilx,jlx) if(info /= psb_success_) then info=psb_err_from_subroutine_ ch_err='psb_chk(glob)vect' call psb_errpush(info,name,a_err=ch_err) goto 9999 end if - - if ((ilx /= 1).or.(iglobx /= 1)) then - info=psb_err_ix_n1_iy_n1_unsupported_ - call psb_errpush(info,name) + + nrow=desc_a%get_local_rows() + ! root has to gather size information + allocate(displ(np),all_dim(np),ltg(nrow),stat=info) + if(info /= psb_success_) then + info=psb_err_from_subroutine_ + ch_err='Allocate' + call psb_errpush(info,name,a_err=ch_err) goto 9999 end if - - nrow=desc_a%get_local_rows() - - if ((root == -1).or.(np == 1)) then + do i=1, nrow + ltg(i) = i + end do + call psb_loc_to_glob(ltg(1:nrow),desc_a,info) + + call psb_geall(locx,desc_a,info,n=k) + + if ((iroot == -1).or.(np == 1)) then ! extract my chunk do j=1,k do i=1, nrow - call psb_loc_to_glob(i,idx,desc_a,info) - locx(i,jlocx+j-1)=globx(idx,jglobx+j-1) + locx(i,j)=globx(ltg(i),j) end do end do else - call psb_get_rank(rootrank,ictxt,root) - - ! root has to gather size information - allocate(displ(np),all_dim(np),ltg(nrow),stat=info) - if(info /= psb_success_) then - info=psb_err_from_subroutine_ - ch_err='Allocate' - call psb_errpush(info,name,a_err=ch_err) - goto 9999 - end if - do i=1, nrow - ltg(i) = i - end do - call psb_loc_to_glob(ltg(1:nrow),desc_a,info) + + call psb_get_rank(rootrank,ictxt,iroot) call mpi_gather(nrow,1,psb_mpi_ipk_integer,all_dim,& & 1,psb_mpi_ipk_integer,rootrank,icomm,info) - if (me == root) then + if (iam == iroot) then displ(1)=0 do i=2,np displ(i)=displ(i-1)+all_dim(i-1) @@ -178,40 +169,60 @@ subroutine psb_iscatterm(globx, locx, desc_a, info, iroot) ! root has to gather loc_glob from each process allocate(l_t_g_all(sum(all_dim)),scatterv(sum(all_dim)),stat=info) - if(info /= psb_success_) then - info=psb_err_from_subroutine_ - ch_err='Allocate' - call psb_errpush(info,name,a_err=ch_err) - goto 9999 - end if - + else + ! + ! This is to keep debugging compilers from being upset by + ! calling an external MPI function with an unallocated array; + ! the Fortran side would complain even if the MPI side does + ! not use the unallocated stuff. + ! + allocate(l_t_g_all(1),scatterv(1),stat=info) + end if + if(info /= psb_success_) then + info=psb_err_from_subroutine_ + ch_err='Allocate' + call psb_errpush(info,name,a_err=ch_err) + goto 9999 end if call mpi_gatherv(ltg,nrow,& & psb_mpi_ipk_integer,l_t_g_all,all_dim,& & displ,psb_mpi_ipk_integer,rootrank,icomm,info) - - do c=1, k + do col=1, k ! prepare vector to scatter - if(me == root) then + if(iam == iroot) then do i=1,np pos=displ(i) do j=1, all_dim(i) idx=l_t_g_all(pos+j) - scatterv(pos+j)=globx(idx,jglobx+c-1) + scatterv(pos+j)=globx(idx,col) end do end do end if - ! scatter !!! + ! scatter call mpi_scatterv(scatterv,all_dim,displ,& - & psb_mpi_ipk_integer,locx(1,jlocx+c-1),nrow,& + & psb_mpi_ipk_integer,locx(1,col),nrow,& & psb_mpi_ipk_integer,rootrank,icomm,info) end do - if (me == root) deallocate(all_dim, l_t_g_all, displ, scatterv) + deallocate(l_t_g_all, scatterv,stat=info) + if(info /= psb_success_) then + info=psb_err_from_subroutine_ + ch_err='deallocate' + call psb_errpush(info,name,a_err=ch_err) + goto 9999 + end if + + end if + deallocate(all_dim, displ, ltg,stat=info) + if(info /= psb_success_) then + info=psb_err_from_subroutine_ + ch_err='deallocate' + call psb_errpush(info,name,a_err=ch_err) + goto 9999 end if call psb_erractionrestore(err_act) @@ -263,14 +274,14 @@ end subroutine psb_iscatterm ! into pieces that are local to alle the processes. ! ! Arguments: -! globx - integer(psb_ipk_),dimension(:). The global vector to scatter. -! locx - integer(psb_ipk_),dimension(:). The local piece of the ditributed vector. +! globx - integer,dimension(:). The global vector to scatter. +! locx - integer,dimension(:). The local piece of the ditributed vector. ! desc_a - type(psb_desc_type). The communication descriptor. -! info - integer. Error code. +! info - integer. Return code ! iroot - integer(optional). The process that owns the global vector. If -1 all ! the processes have a copy. ! -subroutine psb_iscatterv(globx, locx, desc_a, info, iroot) +subroutine psb_iscatterv(globx, locx, desc_a, info, root) use psb_base_mod, psb_protect_name => psb_iscatterv #ifdef MPI_MOD use mpi @@ -280,20 +291,20 @@ subroutine psb_iscatterv(globx, locx, desc_a, info, iroot) include 'mpif.h' #endif - integer(psb_ipk_), intent(out) :: locx(:) + integer(psb_ipk_), intent(out), allocatable :: locx(:) integer(psb_ipk_), intent(in) :: globx(:) type(psb_desc_type), intent(in) :: desc_a integer(psb_ipk_), intent(out) :: info - integer(psb_ipk_), intent(in), optional :: iroot + integer(psb_ipk_), intent(in), optional :: root ! locals - integer(psb_mpik_) :: ictxt, np, me, root, iiroot, icomm, myrank, rootrank + integer(psb_mpik_) :: ictxt, np, iam, iroot, iiroot, 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 :: scatterv(:) - integer(psb_ipk_), allocatable :: displ(:), l_t_g_all(:), all_dim(:), ltg(:) - character(len=20) :: name, ch_err + integer(psb_ipk_), allocatable :: displ(:), l_t_g_all(:), all_dim(:), ltg(:) + character(len=20) :: name, ch_err integer(psb_ipk_) :: debug_level, debug_unit name='psb_scatterv' @@ -306,34 +317,33 @@ subroutine psb_iscatterv(globx, locx, desc_a, info, iroot) ! check on blacs grid - call psb_info(ictxt, me, np) + call psb_info(ictxt, iam, np) if (np == -1) then info = psb_err_context_error_ call psb_errpush(info,name) goto 9999 endif - if (present(iroot)) then - root = iroot - if((root < -1).or.(root > np)) then - info=psb_err_input_value_invalid_i_ - ierr(1) = 5; ierr(2) = root - call psb_errpush(info,name,i_err=ierr) - goto 9999 - end if + if (present(root)) then + iroot = root + if((iroot < -1).or.(iroot > np)) then + info=psb_err_input_value_invalid_i_ + ierr(1) = 5; ierr(2)=iroot + call psb_errpush(info,name,i_err=ierr) + goto 9999 + end if else - root = -1 + iroot = psb_root_ end if - + call psb_get_mpicomm(ictxt,icomm) - call psb_get_rank(myrank,ictxt,me) + call psb_get_rank(myrank,ictxt,iam) iglobx = 1 jglobx = 1 ilocx = 1 jlocx = 1 - lda_globx = size(globx) - lda_locx = size(locx) + lda_globx = size(globx, 1) m = desc_a%get_global_rows() n = desc_a%get_global_cols() @@ -342,55 +352,66 @@ subroutine psb_iscatterv(globx, locx, desc_a, info, iroot) ! there should be a global check on k here!!! call psb_chkglobvect(m,n,lda_globx,iglobx,jglobx,desc_a,info) - if (info == psb_success_) & - & call psb_chkvect(m,n,lda_locx,ilocx,jlocx,desc_a,info,ilx,jlx) if(info /= psb_success_) then - info=psb_err_from_subroutine_ - ch_err='psb_chk(glob)vect' - call psb_errpush(info,name,a_err=ch_err) - goto 9999 + info=psb_err_from_subroutine_ + ch_err='psb_chk(glob)vect' + call psb_errpush(info,name,a_err=ch_err) + goto 9999 end if - if ((ilx /= 1).or.(iglobx /= 1)) then - info=psb_err_ix_n1_iy_n1_unsupported_ - call psb_errpush(info,name) + nrow = desc_a%get_local_rows() + allocate(displ(np),all_dim(np),ltg(nrow),stat=info) + if(info /= psb_success_) then + info=psb_err_from_subroutine_ + ch_err='Allocate' + call psb_errpush(info,name,a_err=ch_err) goto 9999 end if - nrow = desc_a%get_local_rows() - - if ((root == -1).or.(np == 1)) then + do i=1, nrow + ltg(i) = i + end do + call psb_loc_to_glob(ltg(1:nrow),desc_a,info) + call psb_geall(locx,desc_a,info) + + if ((iroot == -1).or.(np == 1)) then ! extract my chunk do i=1, nrow - call psb_loc_to_glob(i,idx,desc_a,info) - locx(i)=globx(idx) + locx(i)=globx(ltg(i)) end do else - call psb_get_rank(rootrank,ictxt,root) - - ! root has to gather size information - allocate(displ(np),all_dim(np),ltg(nrow)) - do i=1, nrow - ltg(i) = i - end do - call psb_loc_to_glob(ltg(1:nrow),desc_a,info) - + call psb_get_rank(rootrank,ictxt,iroot) call mpi_gather(nrow,1,psb_mpi_ipk_integer,all_dim,& & 1,psb_mpi_ipk_integer,rootrank,icomm,info) - if(me == root) then + if(iam == iroot) then displ(1)=0 do i=2,np displ(i)=displ(i-1) + all_dim(i-1) end do if (debug_level >= psb_debug_inner_) then - write(debug_unit,*) me,' ',trim(name),' displ:',displ(1:np), & + write(debug_unit,*) iam,' ',trim(name),' displ:',displ(1:np), & &' dim',all_dim(1:np), sum(all_dim) endif - + ! root has to gather loc_glob from each process - allocate(l_t_g_all(sum(all_dim)),scatterv(sum(all_dim))) + allocate(l_t_g_all(sum(all_dim)),scatterv(sum(all_dim)),stat=info) + + else + ! + ! This is to keep debugging compilers from being upset by + ! calling an external MPI function with an unallocated array; + ! the Fortran side would complain even if the MPI side does + ! not use the unallocated stuff. + ! + allocate(l_t_g_all(1),scatterv(1),stat=info) + end if + if(info /= psb_success_) then + info=psb_err_from_subroutine_ + ch_err='Allocate' + call psb_errpush(info,name,a_err=ch_err) + goto 9999 end if call mpi_gatherv(ltg,nrow,& @@ -398,7 +419,7 @@ subroutine psb_iscatterv(globx, locx, desc_a, info, iroot) & displ,psb_mpi_ipk_integer,rootrank,icomm,info) ! prepare vector to scatter - if (me == root) then + if (iam == iroot) then do i=1,np pos=displ(i) do j=1, all_dim(i) @@ -413,7 +434,21 @@ subroutine psb_iscatterv(globx, locx, desc_a, info, iroot) & psb_mpi_ipk_integer,locx,nrow,& & psb_mpi_ipk_integer,rootrank,icomm,info) - if (me == root) deallocate(all_dim, l_t_g_all, displ, scatterv) + deallocate(l_t_g_all, scatterv,stat=info) + if(info /= psb_success_) then + info=psb_err_from_subroutine_ + ch_err='deallocate' + call psb_errpush(info,name,a_err=ch_err) + goto 9999 + end if + end if + + deallocate(all_dim, displ, ltg,stat=info) + if(info /= psb_success_) then + info=psb_err_from_subroutine_ + ch_err='deallocate' + call psb_errpush(info,name,a_err=ch_err) + goto 9999 end if call psb_erractionrestore(err_act) @@ -424,3 +459,100 @@ subroutine psb_iscatterv(globx, locx, desc_a, info, iroot) return end subroutine psb_iscatterv + +!!$ +!!$ Parallel Sparse BLAS version 3.1 +!!$ (C) Copyright 2006, 2007, 2008, 2009, 2010, 2012, 2013 +!!$ Salvatore Filippone University of Rome Tor Vergata +!!$ Alfredo Buttari CNRS-IRIT, Toulouse +!!$ +!!$ Redistribution and use in source and binary forms, with or without +!!$ modification, are permitted provided that the following conditions +!!$ are met: +!!$ 1. Redistributions of source code must retain the above copyright +!!$ notice, this list of conditions and the following disclaimer. +!!$ 2. Redistributions in binary form must reproduce the above copyright +!!$ notice, this list of conditions, and the following disclaimer in the +!!$ documentation and/or other materials provided with the distribution. +!!$ 3. The name of the PSBLAS group or the names of its contributors may +!!$ not be used to endorse or promote products derived from this +!!$ software without specific written permission. +!!$ +!!$ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +!!$ ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED +!!$ TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +!!$ PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE PSBLAS GROUP OR ITS CONTRIBUTORS +!!$ BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +!!$ CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +!!$ SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +!!$ INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +!!$ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +!!$ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +!!$ POSSIBILITY OF SUCH DAMAGE. +!!$ +!!$ + +! Subroutine: psb_iscatterv +! This subroutine scatters a global vector locally owned by one process +! into pieces that are local to alle the processes. +! +! Arguments: +! globx - integer,dimension(:). The global vector to scatter. +! locx - integer,dimension(:). The local piece of the ditributed vector. +! desc_a - type(psb_desc_type). The communication descriptor. +! info - integer. Return code +! iroot - integer(optional). The process that owns the global vector. If -1 all +! the processes have a copy. +! +subroutine psb_iscatter_vect(globx, locx, desc_a, info, root, mold) + use psb_base_mod, psb_protect_name => psb_iscatter_vect + implicit none + type(psb_i_vect_type), intent(inout) :: locx + integer(psb_ipk_), intent(in) :: globx(:) + type(psb_desc_type), intent(in) :: desc_a + integer(psb_ipk_), intent(out) :: info + integer(psb_ipk_), intent(in), optional :: root + class(psb_i_base_vect_type), intent(in), optional :: mold + + ! locals + integer(psb_mpik_) :: ictxt, 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(:) + character(len=20) :: name, ch_err + integer(psb_ipk_) :: debug_level, debug_unit + + name='psb_scatter_vect' + if (psb_get_errstatus() /= 0) return + info=psb_success_ + call psb_erractionsave(err_act) + ictxt=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) + if (np == -1) then + info = psb_err_context_error_ + call psb_errpush(info,name) + goto 9999 + endif + + if (info == psb_success_) call psb_scatter(globx, vlocx, desc_a, info, root=root) + if (info /= psb_success_) then + info = psb_err_from_subroutine_ + call psb_errpush(info,name,a_err='psb_scatterv') + goto 9999 + endif + + call locx%bld(vlocx,mold=mold) + + call psb_erractionrestore(err_act) + return + +9999 call psb_error_handler(ictxt,err_act) + + return + +end subroutine psb_iscatter_vect diff --git a/base/comm/psb_sscatter.F90 b/base/comm/psb_sscatter.F90 index 99a42cfe..f634a0e1 100644 --- a/base/comm/psb_sscatter.F90 +++ b/base/comm/psb_sscatter.F90 @@ -43,7 +43,7 @@ ! iroot - integer(optional). The process that owns the global matrix. ! If -1 all the processes have a copy. ! Default -1 -subroutine psb_sscatterm(globx, locx, desc_a, info, iroot) +subroutine psb_sscatterm(globx, locx, desc_a, info, root) use psb_base_mod, psb_protect_name => psb_sscatterm #ifdef MPI_MOD @@ -54,18 +54,18 @@ subroutine psb_sscatterm(globx, locx, desc_a, info, iroot) include 'mpif.h' #endif - real(psb_spk_), intent(out) :: locx(:,:) + real(psb_spk_), intent(out), allocatable :: locx(:,:) real(psb_spk_), intent(in) :: globx(:,:) type(psb_desc_type), intent(in) :: desc_a integer(psb_ipk_), intent(out) :: info - integer(psb_ipk_), intent(in), optional :: iroot + integer(psb_ipk_), intent(in), optional :: root ! locals - integer(psb_mpik_) :: ictxt, np, me, root, iiroot, icomm, myrank, rootrank + integer(psb_mpik_) :: ictxt, np, me, iroot, icomm, myrank, rootrank, iam integer(psb_ipk_) :: ierr(5), err_act, m, n, i, j, idx, nrow, iglobx, jglobx,& - & ilocx, jlocx, lda_locx, lda_globx, lock, globk, k, maxk, ilx,& - & jlx, c, pos + & ilocx, jlocx, lda_locx, lda_globx, lock, globk, k, maxk, & + & col,pos real(psb_spk_),allocatable :: scatterv(:) integer(psb_ipk_), allocatable :: displ(:), l_t_g_all(:), all_dim(:), ltg(:) character(len=20) :: name, ch_err @@ -78,101 +78,90 @@ subroutine psb_sscatterm(globx, locx, desc_a, info, iroot) ictxt=desc_a%get_context() ! check on blacs grid - call psb_info(ictxt, me, np) + call psb_info(ictxt, iam, np) if (np == -1) then info = psb_err_context_error_ call psb_errpush(info,name) goto 9999 endif - if (present(iroot)) then - root = iroot - if((root < -1).or.(root > np)) then + if (present(root)) then + iroot = root + if((iroot < -1).or.(iroot >= np)) then info=psb_err_input_value_invalid_i_ ierr(1)=5; ierr(2)=root call psb_errpush(info,name,i_err=ierr) goto 9999 end if else - root = -1 + iroot = psb_root_ end if - if (root == -1) then - iiroot = psb_root_ - endif iglobx = 1 jglobx = 1 - ilocx = 1 - jlocx = 1 lda_globx = size(globx,1) - lda_locx = size(locx, 1) m = desc_a%get_global_rows() n = desc_a%get_global_cols() - - lock=size(locx,2)-jlocx+1 - globk=size(globx,2)-jglobx+1 - maxk=min(lock,globk) - k = maxk call psb_get_mpicomm(ictxt,icomm) call psb_get_rank(myrank,ictxt,me) - - lda_globx = size(globx) - lda_locx = size(locx) - + if (iroot==-1) then + lda_globx = size(globx, 1) + k = size(globx,2) + else + if (iam==iroot) then + k = size(globx,2) + lda_globx = size(globx, 1) + end if + call psb_bcast(ictxt,k,root=iroot) + call psb_bcast(ictxt,lda_globx,root=iroot) + end if + m = desc_a%get_global_rows() n = desc_a%get_global_cols() - call psb_bcast(ictxt,k,root=iiroot) ! there should be a global check on k here!!! - call psb_chkglobvect(m,n,lda_globx,iglobx,jglobx,desc_a,info) - if (info == psb_success_) call psb_chkvect(m,n,lda_locx,ilocx,jlocx,desc_a,info,ilx,jlx) if(info /= psb_success_) then info=psb_err_from_subroutine_ ch_err='psb_chk(glob)vect' call psb_errpush(info,name,a_err=ch_err) goto 9999 end if - - if ((ilx /= 1).or.(iglobx /= 1)) then - info=psb_err_ix_n1_iy_n1_unsupported_ - call psb_errpush(info,name) + + nrow=desc_a%get_local_rows() + ! root has to gather size information + allocate(displ(np),all_dim(np),ltg(nrow),stat=info) + if(info /= psb_success_) then + info=psb_err_from_subroutine_ + ch_err='Allocate' + call psb_errpush(info,name,a_err=ch_err) goto 9999 end if + do i=1, nrow + ltg(i) = i + end do + call psb_loc_to_glob(ltg(1:nrow),desc_a,info) - nrow=desc_a%get_local_rows() - - if ((root == -1).or.(np == 1)) then + call psb_geall(locx,desc_a,info,n=k) + + if ((iroot == -1).or.(np == 1)) then ! extract my chunk do j=1,k do i=1, nrow - call psb_loc_to_glob(i,idx,desc_a,info) - locx(i,jlocx+j-1)=globx(idx,jglobx+j-1) + locx(i,j)=globx(ltg(i),j) end do end do else - call psb_get_rank(rootrank,ictxt,root) - - ! root has to gather size information - allocate(displ(np),all_dim(np),ltg(nrow),stat=info) - if(info /= psb_success_) then - info=psb_err_from_subroutine_ - ch_err='Allocate' - call psb_errpush(info,name,a_err=ch_err) - goto 9999 - end if - do i=1, nrow - ltg(i) = i - end do - call psb_loc_to_glob(ltg(1:nrow),desc_a,info) + + call psb_get_rank(rootrank,ictxt,iroot) call mpi_gather(nrow,1,psb_mpi_ipk_integer,all_dim,& & 1,psb_mpi_ipk_integer,rootrank,icomm,info) - if (me == root) then + if (iam == iroot) then displ(1)=0 do i=2,np displ(i)=displ(i-1)+all_dim(i-1) @@ -200,27 +189,26 @@ subroutine psb_sscatterm(globx, locx, desc_a, info, iroot) & psb_mpi_ipk_integer,l_t_g_all,all_dim,& & displ,psb_mpi_ipk_integer,rootrank,icomm,info) - - do c=1, k + do col=1, k ! prepare vector to scatter - if(me == root) then + if(iam == iroot) then do i=1,np pos=displ(i) do j=1, all_dim(i) idx=l_t_g_all(pos+j) - scatterv(pos+j)=globx(idx,jglobx+c-1) + scatterv(pos+j)=globx(idx,col) end do end do end if - ! scatter !!! + ! scatter call mpi_scatterv(scatterv,all_dim,displ,& - & psb_mpi_r_spk_,locx(1,jlocx+c-1),nrow,& + & psb_mpi_r_spk_,locx(1,col),nrow,& & psb_mpi_r_spk_,rootrank,icomm,info) end do - deallocate(all_dim, l_t_g_all, displ, ltg, scatterv,stat=info) + deallocate(l_t_g_all, scatterv,stat=info) if(info /= psb_success_) then info=psb_err_from_subroutine_ ch_err='deallocate' @@ -229,6 +217,13 @@ subroutine psb_sscatterm(globx, locx, desc_a, info, iroot) end if end if + deallocate(all_dim, displ, ltg,stat=info) + if(info /= psb_success_) then + info=psb_err_from_subroutine_ + ch_err='deallocate' + call psb_errpush(info,name,a_err=ch_err) + goto 9999 + end if call psb_erractionrestore(err_act) return @@ -286,7 +281,7 @@ end subroutine psb_sscatterm ! iroot - integer(optional). The process that owns the global vector. If -1 all ! the processes have a copy. ! -subroutine psb_sscatterv(globx, locx, desc_a, info, iroot) +subroutine psb_sscatterv(globx, locx, desc_a, info, root) use psb_base_mod, psb_protect_name => psb_sscatterv #ifdef MPI_MOD use mpi @@ -296,15 +291,15 @@ subroutine psb_sscatterv(globx, locx, desc_a, info, iroot) include 'mpif.h' #endif - real(psb_spk_), intent(out) :: locx(:) + real(psb_spk_), intent(out), allocatable :: locx(:) real(psb_spk_), intent(in) :: globx(:) type(psb_desc_type), intent(in) :: desc_a integer(psb_ipk_), intent(out) :: info - integer(psb_ipk_), intent(in), optional :: iroot + integer(psb_ipk_), intent(in), optional :: root ! locals - integer(psb_mpik_) :: ictxt, np, me, root, iiroot, icomm, myrank, rootrank + integer(psb_mpik_) :: ictxt, np, iam, iroot, iiroot, 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_spk_), allocatable :: scatterv(:) @@ -322,34 +317,33 @@ subroutine psb_sscatterv(globx, locx, desc_a, info, iroot) ! check on blacs grid - call psb_info(ictxt, me, np) + call psb_info(ictxt, iam, np) if (np == -1) then info = psb_err_context_error_ call psb_errpush(info,name) goto 9999 endif - if (present(iroot)) then - root = iroot - if((root < -1).or.(root > np)) then + if (present(root)) then + iroot = root + if((iroot < -1).or.(iroot > np)) then info=psb_err_input_value_invalid_i_ - ierr(1) = 5; ierr(2)=root + ierr(1) = 5; ierr(2)=iroot call psb_errpush(info,name,i_err=ierr) goto 9999 end if else - root = -1 + iroot = psb_root_ end if call psb_get_mpicomm(ictxt,icomm) - call psb_get_rank(myrank,ictxt,me) + call psb_get_rank(myrank,ictxt,iam) iglobx = 1 jglobx = 1 ilocx = 1 jlocx = 1 - lda_globx = size(globx) - lda_locx = size(locx) + lda_globx = size(globx, 1) m = desc_a%get_global_rows() n = desc_a%get_global_cols() @@ -358,8 +352,6 @@ subroutine psb_sscatterv(globx, locx, desc_a, info, iroot) ! there should be a global check on k here!!! call psb_chkglobvect(m,n,lda_globx,iglobx,jglobx,desc_a,info) - if (info == psb_success_) & - & call psb_chkvect(m,n,lda_locx,ilocx,jlocx,desc_a,info,ilx,jlx) if(info /= psb_success_) then info=psb_err_from_subroutine_ ch_err='psb_chk(glob)vect' @@ -367,48 +359,39 @@ subroutine psb_sscatterv(globx, locx, desc_a, info, iroot) goto 9999 end if - if ((ilx /= 1).or.(iglobx /= 1)) then - info=psb_err_ix_n1_iy_n1_unsupported_ - call psb_errpush(info,name) - goto 9999 - end if - nrow = desc_a%get_local_rows() + allocate(displ(np),all_dim(np),ltg(nrow),stat=info) + if(info /= psb_success_) then + info=psb_err_from_subroutine_ + ch_err='Allocate' + call psb_errpush(info,name,a_err=ch_err) + goto 9999 + end if - if ((root == -1).or.(np == 1)) then + do i=1, nrow + ltg(i) = i + end do + call psb_loc_to_glob(ltg(1:nrow),desc_a,info) + call psb_geall(locx,desc_a,info) + + if ((iroot == -1).or.(np == 1)) then ! extract my chunk do i=1, nrow - call psb_loc_to_glob(i,idx,desc_a,info) - locx(i)=globx(idx) + locx(i)=globx(ltg(i)) end do else - call psb_get_rank(rootrank,ictxt,root) - - ! root has to gather size information - allocate(displ(np),all_dim(np),ltg(nrow),stat=info) - if(info /= psb_success_) then - info=psb_err_from_subroutine_ - ch_err='Allocate' - call psb_errpush(info,name,a_err=ch_err) - goto 9999 - end if - - do i=1, nrow - ltg(i) = i - end do - call psb_loc_to_glob(ltg(1:nrow),desc_a,info) - + call psb_get_rank(rootrank,ictxt,iroot) call mpi_gather(nrow,1,psb_mpi_ipk_integer,all_dim,& & 1,psb_mpi_ipk_integer,rootrank,icomm,info) - if(me == root) then + if(iam == iroot) then displ(1)=0 do i=2,np displ(i)=displ(i-1) + all_dim(i-1) end do if (debug_level >= psb_debug_inner_) then - write(debug_unit,*) me,' ',trim(name),' displ:',displ(1:np), & + write(debug_unit,*) iam,' ',trim(name),' displ:',displ(1:np), & &' dim',all_dim(1:np), sum(all_dim) endif @@ -436,7 +419,7 @@ subroutine psb_sscatterv(globx, locx, desc_a, info, iroot) & displ,psb_mpi_ipk_integer,rootrank,icomm,info) ! prepare vector to scatter - if (me == root) then + if (iam == iroot) then do i=1,np pos=displ(i) do j=1, all_dim(i) @@ -451,7 +434,7 @@ subroutine psb_sscatterv(globx, locx, desc_a, info, iroot) & psb_mpi_r_spk_,locx,nrow,& & psb_mpi_r_spk_,rootrank,icomm,info) - deallocate(all_dim, l_t_g_all, displ, ltg, scatterv,stat=info) + deallocate(l_t_g_all, scatterv,stat=info) if(info /= psb_success_) then info=psb_err_from_subroutine_ ch_err='deallocate' @@ -460,6 +443,14 @@ subroutine psb_sscatterv(globx, locx, desc_a, info, iroot) end if end if + deallocate(all_dim, displ, ltg,stat=info) + if(info /= psb_success_) then + info=psb_err_from_subroutine_ + ch_err='deallocate' + call psb_errpush(info,name,a_err=ch_err) + goto 9999 + end if + call psb_erractionrestore(err_act) return @@ -513,18 +504,18 @@ end subroutine psb_sscatterv ! iroot - integer(optional). The process that owns the global vector. If -1 all ! the processes have a copy. ! -subroutine psb_sscatter_vect(globx, locx, desc_a, info, iroot, mold) +subroutine psb_sscatter_vect(globx, locx, desc_a, info, root, mold) use psb_base_mod, psb_protect_name => psb_sscatter_vect implicit none type(psb_s_vect_type), intent(inout) :: locx real(psb_spk_), intent(in) :: globx(:) type(psb_desc_type), intent(in) :: desc_a integer(psb_ipk_), intent(out) :: info - integer(psb_ipk_), intent(in), optional :: iroot + integer(psb_ipk_), intent(in), optional :: root class(psb_s_base_vect_type), intent(in), optional :: mold ! locals - integer(psb_mpik_) :: ictxt, np, me, root, iiroot, icomm, myrank, rootrank + integer(psb_mpik_) :: ictxt, 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_spk_), allocatable :: vlocx(:) @@ -547,16 +538,15 @@ subroutine psb_sscatter_vect(globx, locx, desc_a, info, iroot, mold) call psb_errpush(info,name) goto 9999 endif - call psb_geall(vlocx,desc_a,info) - if (info == psb_success_) call psb_scatter(globx, vlocx, desc_a, info, iroot) + if (info == psb_success_) call psb_scatter(globx, vlocx, desc_a, info, root=root) if (info /= psb_success_) then info = psb_err_from_subroutine_ call psb_errpush(info,name,a_err='psb_scatterv') goto 9999 endif - call locx%bld(vlocx,mold) + call locx%bld(vlocx,mold=mold) call psb_erractionrestore(err_act) return diff --git a/base/comm/psb_zscatter.F90 b/base/comm/psb_zscatter.F90 index 4e851233..0b771831 100644 --- a/base/comm/psb_zscatter.F90 +++ b/base/comm/psb_zscatter.F90 @@ -43,7 +43,7 @@ ! iroot - integer(optional). The process that owns the global matrix. ! If -1 all the processes have a copy. ! Default -1 -subroutine psb_zscatterm(globx, locx, desc_a, info, iroot) +subroutine psb_zscatterm(globx, locx, desc_a, info, root) use psb_base_mod, psb_protect_name => psb_zscatterm #ifdef MPI_MOD @@ -54,18 +54,18 @@ subroutine psb_zscatterm(globx, locx, desc_a, info, iroot) include 'mpif.h' #endif - complex(psb_dpk_), intent(out) :: locx(:,:) + complex(psb_dpk_), intent(out), allocatable :: locx(:,:) complex(psb_dpk_), intent(in) :: globx(:,:) type(psb_desc_type), intent(in) :: desc_a integer(psb_ipk_), intent(out) :: info - integer(psb_ipk_), intent(in), optional :: iroot + integer(psb_ipk_), intent(in), optional :: root ! locals - integer(psb_mpik_) :: ictxt, np, me, root, iiroot, icomm, myrank, rootrank + integer(psb_mpik_) :: ictxt, np, me, iroot, icomm, myrank, rootrank, iam integer(psb_ipk_) :: ierr(5), err_act, m, n, i, j, idx, nrow, iglobx, jglobx,& - & ilocx, jlocx, lda_locx, lda_globx, lock, globk, k, maxk, ilx,& - & jlx, c, pos + & ilocx, jlocx, lda_locx, lda_globx, lock, globk, k, maxk, & + & col,pos complex(psb_dpk_),allocatable :: scatterv(:) integer(psb_ipk_), allocatable :: displ(:), l_t_g_all(:), all_dim(:), ltg(:) character(len=20) :: name, ch_err @@ -78,101 +78,90 @@ subroutine psb_zscatterm(globx, locx, desc_a, info, iroot) ictxt=desc_a%get_context() ! check on blacs grid - call psb_info(ictxt, me, np) + call psb_info(ictxt, iam, np) if (np == -1) then info = psb_err_context_error_ call psb_errpush(info,name) goto 9999 endif - if (present(iroot)) then - root = iroot - if((root < -1).or.(root > np)) then + if (present(root)) then + iroot = root + if((iroot < -1).or.(iroot >= np)) then info=psb_err_input_value_invalid_i_ ierr(1)=5; ierr(2)=root call psb_errpush(info,name,i_err=ierr) goto 9999 end if else - root = -1 + iroot = psb_root_ end if - if (root == -1) then - iiroot = psb_root_ - endif iglobx = 1 jglobx = 1 - ilocx = 1 - jlocx = 1 lda_globx = size(globx,1) - lda_locx = size(locx, 1) m = desc_a%get_global_rows() n = desc_a%get_global_cols() - - lock=size(locx,2)-jlocx+1 - globk=size(globx,2)-jglobx+1 - maxk=min(lock,globk) - k = maxk call psb_get_mpicomm(ictxt,icomm) call psb_get_rank(myrank,ictxt,me) - - lda_globx = size(globx) - lda_locx = size(locx) - + if (iroot==-1) then + lda_globx = size(globx, 1) + k = size(globx,2) + else + if (iam==iroot) then + k = size(globx,2) + lda_globx = size(globx, 1) + end if + call psb_bcast(ictxt,k,root=iroot) + call psb_bcast(ictxt,lda_globx,root=iroot) + end if + m = desc_a%get_global_rows() n = desc_a%get_global_cols() - call psb_bcast(ictxt,k,root=iiroot) ! there should be a global check on k here!!! - call psb_chkglobvect(m,n,lda_globx,iglobx,jglobx,desc_a,info) - if (info == psb_success_) call psb_chkvect(m,n,lda_locx,ilocx,jlocx,desc_a,info,ilx,jlx) if(info /= psb_success_) then info=psb_err_from_subroutine_ ch_err='psb_chk(glob)vect' call psb_errpush(info,name,a_err=ch_err) goto 9999 end if - - if ((ilx /= 1).or.(iglobx /= 1)) then - info=psb_err_ix_n1_iy_n1_unsupported_ - call psb_errpush(info,name) + + nrow=desc_a%get_local_rows() + ! root has to gather size information + allocate(displ(np),all_dim(np),ltg(nrow),stat=info) + if(info /= psb_success_) then + info=psb_err_from_subroutine_ + ch_err='Allocate' + call psb_errpush(info,name,a_err=ch_err) goto 9999 end if + do i=1, nrow + ltg(i) = i + end do + call psb_loc_to_glob(ltg(1:nrow),desc_a,info) - nrow=desc_a%get_local_rows() - - if ((root == -1).or.(np == 1)) then + call psb_geall(locx,desc_a,info,n=k) + + if ((iroot == -1).or.(np == 1)) then ! extract my chunk do j=1,k do i=1, nrow - call psb_loc_to_glob(i,idx,desc_a,info) - locx(i,jlocx+j-1)=globx(idx,jglobx+j-1) + locx(i,j)=globx(ltg(i),j) end do end do else - call psb_get_rank(rootrank,ictxt,root) - - ! root has to gather size information - allocate(displ(np),all_dim(np),ltg(nrow),stat=info) - if(info /= psb_success_) then - info=psb_err_from_subroutine_ - ch_err='Allocate' - call psb_errpush(info,name,a_err=ch_err) - goto 9999 - end if - do i=1, nrow - ltg(i) = i - end do - call psb_loc_to_glob(ltg(1:nrow),desc_a,info) + + call psb_get_rank(rootrank,ictxt,iroot) call mpi_gather(nrow,1,psb_mpi_ipk_integer,all_dim,& & 1,psb_mpi_ipk_integer,rootrank,icomm,info) - if (me == root) then + if (iam == iroot) then displ(1)=0 do i=2,np displ(i)=displ(i-1)+all_dim(i-1) @@ -200,27 +189,26 @@ subroutine psb_zscatterm(globx, locx, desc_a, info, iroot) & psb_mpi_ipk_integer,l_t_g_all,all_dim,& & displ,psb_mpi_ipk_integer,rootrank,icomm,info) - - do c=1, k + do col=1, k ! prepare vector to scatter - if(me == root) then + if(iam == iroot) then do i=1,np pos=displ(i) do j=1, all_dim(i) idx=l_t_g_all(pos+j) - scatterv(pos+j)=globx(idx,jglobx+c-1) + scatterv(pos+j)=globx(idx,col) end do end do end if - ! scatter !!! + ! scatter call mpi_scatterv(scatterv,all_dim,displ,& - & psb_mpi_c_dpk_,locx(1,jlocx+c-1),nrow,& + & psb_mpi_c_dpk_,locx(1,col),nrow,& & psb_mpi_c_dpk_,rootrank,icomm,info) end do - deallocate(all_dim, l_t_g_all, displ, ltg, scatterv,stat=info) + deallocate(l_t_g_all, scatterv,stat=info) if(info /= psb_success_) then info=psb_err_from_subroutine_ ch_err='deallocate' @@ -229,6 +217,13 @@ subroutine psb_zscatterm(globx, locx, desc_a, info, iroot) end if end if + deallocate(all_dim, displ, ltg,stat=info) + if(info /= psb_success_) then + info=psb_err_from_subroutine_ + ch_err='deallocate' + call psb_errpush(info,name,a_err=ch_err) + goto 9999 + end if call psb_erractionrestore(err_act) return @@ -286,7 +281,7 @@ end subroutine psb_zscatterm ! iroot - integer(optional). The process that owns the global vector. If -1 all ! the processes have a copy. ! -subroutine psb_zscatterv(globx, locx, desc_a, info, iroot) +subroutine psb_zscatterv(globx, locx, desc_a, info, root) use psb_base_mod, psb_protect_name => psb_zscatterv #ifdef MPI_MOD use mpi @@ -296,15 +291,15 @@ subroutine psb_zscatterv(globx, locx, desc_a, info, iroot) include 'mpif.h' #endif - complex(psb_dpk_), intent(out) :: locx(:) + complex(psb_dpk_), intent(out), allocatable :: locx(:) complex(psb_dpk_), intent(in) :: globx(:) type(psb_desc_type), intent(in) :: desc_a integer(psb_ipk_), intent(out) :: info - integer(psb_ipk_), intent(in), optional :: iroot + integer(psb_ipk_), intent(in), optional :: root ! locals - integer(psb_mpik_) :: ictxt, np, me, root, iiroot, icomm, myrank, rootrank + integer(psb_mpik_) :: ictxt, np, iam, iroot, iiroot, 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_dpk_), allocatable :: scatterv(:) @@ -322,34 +317,33 @@ subroutine psb_zscatterv(globx, locx, desc_a, info, iroot) ! check on blacs grid - call psb_info(ictxt, me, np) + call psb_info(ictxt, iam, np) if (np == -1) then info = psb_err_context_error_ call psb_errpush(info,name) goto 9999 endif - if (present(iroot)) then - root = iroot - if((root < -1).or.(root > np)) then + if (present(root)) then + iroot = root + if((iroot < -1).or.(iroot > np)) then info=psb_err_input_value_invalid_i_ - ierr(1) = 5; ierr(2)=root + ierr(1) = 5; ierr(2)=iroot call psb_errpush(info,name,i_err=ierr) goto 9999 end if else - root = -1 + iroot = psb_root_ end if call psb_get_mpicomm(ictxt,icomm) - call psb_get_rank(myrank,ictxt,me) + call psb_get_rank(myrank,ictxt,iam) iglobx = 1 jglobx = 1 ilocx = 1 jlocx = 1 - lda_globx = size(globx) - lda_locx = size(locx) + lda_globx = size(globx, 1) m = desc_a%get_global_rows() n = desc_a%get_global_cols() @@ -358,8 +352,6 @@ subroutine psb_zscatterv(globx, locx, desc_a, info, iroot) ! there should be a global check on k here!!! call psb_chkglobvect(m,n,lda_globx,iglobx,jglobx,desc_a,info) - if (info == psb_success_) & - & call psb_chkvect(m,n,lda_locx,ilocx,jlocx,desc_a,info,ilx,jlx) if(info /= psb_success_) then info=psb_err_from_subroutine_ ch_err='psb_chk(glob)vect' @@ -367,48 +359,39 @@ subroutine psb_zscatterv(globx, locx, desc_a, info, iroot) goto 9999 end if - if ((ilx /= 1).or.(iglobx /= 1)) then - info=psb_err_ix_n1_iy_n1_unsupported_ - call psb_errpush(info,name) - goto 9999 - end if - nrow = desc_a%get_local_rows() + allocate(displ(np),all_dim(np),ltg(nrow),stat=info) + if(info /= psb_success_) then + info=psb_err_from_subroutine_ + ch_err='Allocate' + call psb_errpush(info,name,a_err=ch_err) + goto 9999 + end if - if ((root == -1).or.(np == 1)) then + do i=1, nrow + ltg(i) = i + end do + call psb_loc_to_glob(ltg(1:nrow),desc_a,info) + call psb_geall(locx,desc_a,info) + + if ((iroot == -1).or.(np == 1)) then ! extract my chunk do i=1, nrow - call psb_loc_to_glob(i,idx,desc_a,info) - locx(i)=globx(idx) + locx(i)=globx(ltg(i)) end do else - call psb_get_rank(rootrank,ictxt,root) - - ! root has to gather size information - allocate(displ(np),all_dim(np),ltg(nrow),stat=info) - if(info /= psb_success_) then - info=psb_err_from_subroutine_ - ch_err='Allocate' - call psb_errpush(info,name,a_err=ch_err) - goto 9999 - end if - - do i=1, nrow - ltg(i) = i - end do - call psb_loc_to_glob(ltg(1:nrow),desc_a,info) - + call psb_get_rank(rootrank,ictxt,iroot) call mpi_gather(nrow,1,psb_mpi_ipk_integer,all_dim,& & 1,psb_mpi_ipk_integer,rootrank,icomm,info) - if(me == root) then + if(iam == iroot) then displ(1)=0 do i=2,np displ(i)=displ(i-1) + all_dim(i-1) end do if (debug_level >= psb_debug_inner_) then - write(debug_unit,*) me,' ',trim(name),' displ:',displ(1:np), & + write(debug_unit,*) iam,' ',trim(name),' displ:',displ(1:np), & &' dim',all_dim(1:np), sum(all_dim) endif @@ -436,7 +419,7 @@ subroutine psb_zscatterv(globx, locx, desc_a, info, iroot) & displ,psb_mpi_ipk_integer,rootrank,icomm,info) ! prepare vector to scatter - if (me == root) then + if (iam == iroot) then do i=1,np pos=displ(i) do j=1, all_dim(i) @@ -451,7 +434,7 @@ subroutine psb_zscatterv(globx, locx, desc_a, info, iroot) & psb_mpi_c_dpk_,locx,nrow,& & psb_mpi_c_dpk_,rootrank,icomm,info) - deallocate(all_dim, l_t_g_all, displ, ltg, scatterv,stat=info) + deallocate(l_t_g_all, scatterv,stat=info) if(info /= psb_success_) then info=psb_err_from_subroutine_ ch_err='deallocate' @@ -460,6 +443,14 @@ subroutine psb_zscatterv(globx, locx, desc_a, info, iroot) end if end if + deallocate(all_dim, displ, ltg,stat=info) + if(info /= psb_success_) then + info=psb_err_from_subroutine_ + ch_err='deallocate' + call psb_errpush(info,name,a_err=ch_err) + goto 9999 + end if + call psb_erractionrestore(err_act) return @@ -513,18 +504,18 @@ end subroutine psb_zscatterv ! iroot - integer(optional). The process that owns the global vector. If -1 all ! the processes have a copy. ! -subroutine psb_zscatter_vect(globx, locx, desc_a, info, iroot, mold) +subroutine psb_zscatter_vect(globx, locx, desc_a, info, root, mold) use psb_base_mod, psb_protect_name => psb_zscatter_vect implicit none type(psb_z_vect_type), intent(inout) :: locx complex(psb_dpk_), intent(in) :: globx(:) type(psb_desc_type), intent(in) :: desc_a integer(psb_ipk_), intent(out) :: info - integer(psb_ipk_), intent(in), optional :: iroot + integer(psb_ipk_), intent(in), optional :: root class(psb_z_base_vect_type), intent(in), optional :: mold ! locals - integer(psb_mpik_) :: ictxt, np, me, root, iiroot, icomm, myrank, rootrank + integer(psb_mpik_) :: ictxt, 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_dpk_), allocatable :: vlocx(:) @@ -547,16 +538,15 @@ subroutine psb_zscatter_vect(globx, locx, desc_a, info, iroot, mold) call psb_errpush(info,name) goto 9999 endif - call psb_geall(vlocx,desc_a,info) - if (info == psb_success_) call psb_scatter(globx, vlocx, desc_a, info, iroot) + if (info == psb_success_) call psb_scatter(globx, vlocx, desc_a, info, root=root) if (info /= psb_success_) then info = psb_err_from_subroutine_ call psb_errpush(info,name,a_err='psb_scatterv') goto 9999 endif - call locx%bld(vlocx,mold) + call locx%bld(vlocx,mold=mold) call psb_erractionrestore(err_act) return diff --git a/base/modules/psb_i_comm_mod.f90 b/base/modules/psb_i_comm_mod.f90 index f1aa7c65..cc91bdf9 100644 --- a/base/modules/psb_i_comm_mod.f90 +++ b/base/modules/psb_i_comm_mod.f90 @@ -97,7 +97,7 @@ module psb_i_comm_mod interface psb_scatter subroutine psb_iscatterm(globx, locx, desc_a, info, root) use psb_desc_mod - integer(psb_ipk_), intent(out) :: locx(:,:) + integer(psb_ipk_), intent(out), allocatable :: locx(:,:) integer(psb_ipk_), intent(in) :: globx(:,:) type(psb_desc_type), intent(in) :: desc_a integer(psb_ipk_), intent(out) :: info @@ -105,12 +105,23 @@ module psb_i_comm_mod end subroutine psb_iscatterm subroutine psb_iscatterv(globx, locx, desc_a, info, root) use psb_desc_mod - integer(psb_ipk_), intent(out) :: locx(:) + integer(psb_ipk_), intent(out), allocatable :: locx(:) integer(psb_ipk_), intent(in) :: globx(:) type(psb_desc_type), intent(in) :: desc_a integer(psb_ipk_), intent(out) :: info integer(psb_ipk_), intent(in), optional :: root end subroutine psb_iscatterv + subroutine psb_iscatter_vect(globx, locx, desc_a, info, root, mold) + use psb_desc_mod + use psb_i_vect_mod + type(psb_i_vect_type), intent(inout) :: locx + integer(psb_ipk_), intent(in) :: globx(:) + type(psb_desc_type), intent(in) :: desc_a + integer(psb_ipk_), intent(out) :: info + integer(psb_ipk_), intent(in), optional :: root + class(psb_i_base_vect_type), intent(in), optional :: mold + end subroutine psb_iscatter_vect + end interface psb_scatter interface psb_gather diff --git a/docs/psblas-3.3.pdf b/docs/psblas-3.3.pdf index dcd6313d..172765a7 100644 --- a/docs/psblas-3.3.pdf +++ b/docs/psblas-3.3.pdf @@ -5327,7 +5327,7 @@ ET endstream endobj 851 0 obj << -/Length 7953 +/Length 8366 >> stream 0 g 0 G @@ -5364,213 +5364,230 @@ BT /F27 9.9626 Tf 234.585 706.129 Td [(threshold)-323(|)-324(Set)-323(threshold)-323(for)-324(index)-323(mapping)-324(switc)32(h)]TJ 0 g 0 G 0 g 0 G -/F30 9.9626 Tf -83.88 -19.211 Td [(call)-525(psb_cd_set_large_threshold\050ith\051)]TJ +/F30 9.9626 Tf -83.88 -18.72 Td [(call)-525(psb_cd_set_large_threshold\050ith\051)]TJ 0 g 0 G -/F27 9.9626 Tf 0 -23.242 Td [(T)32(yp)-32(e:)]TJ +/F27 9.9626 Tf 0 -22.45 Td [(T)32(yp)-32(e:)]TJ 0 g 0 G /F8 9.9626 Tf 33.797 0 Td [(Sync)28(hronous.)]TJ 0 g 0 G -/F27 9.9626 Tf -33.797 -21.69 Td [(On)-383(En)32(try)]TJ +/F27 9.9626 Tf -33.797 -20.635 Td [(On)-383(En)32(try)]TJ 0 g 0 G 0 g 0 G - 0 -21.691 Td [(ith)]TJ + 0 -20.635 Td [(ith)]TJ 0 g 0 G -/F8 9.9626 Tf 18.984 0 Td [(the)-333(new)-334(threshold)-333(for)-333(comm)27(un)1(ic)-1(ati)1(on)-334(descriptors.)]TJ 5.923 -11.955 Td [(Scop)-28(e:)]TJ/F27 9.9626 Tf 32.378 0 Td [(global)]TJ/F8 9.9626 Tf 29.756 0 Td [(.)]TJ -62.135 -11.955 Td [(T)28(yp)-28(e:)]TJ/F27 9.9626 Tf 29.612 0 Td [(required)]TJ/F8 9.9626 Tf 41.898 0 Td [(.)]TJ -71.51 -11.955 Td [(In)28(ten)28(t:)]TJ/F27 9.9626 Tf 33.486 0 Td [(in)]TJ/F8 9.9626 Tf 9.548 0 Td [(.)]TJ -43.034 -11.956 Td [(Sp)-28(eci\014ed)-333(as:)-445(an)-333(in)28(teger)-333(v)55(alue)-333(greater)-334(th)1(an)-334(zero.)]TJ -24.906 -23.683 Td [(Note:)-756(the)-490(thr)1(e)-1(shold)-489(v)56(alue)-489(is)-490(only)-489(queried)-489(b)28(y)-489(the)-490(library)-489(at)-489(the)-489(time)-490(a)-489(call)]TJ 0 -11.955 Td [(to)]TJ/F30 9.9626 Tf 13.431 0 Td [(psb_cdall)]TJ/F8 9.9626 Tf 51.648 0 Td [(is)-459(executed,)-491(therefore)-459(c)27(hanging)-459(the)-459(threshold)-459(has)-459(no)-460(e\013ect)-459(on)]TJ -65.079 -11.955 Td [(comm)28(unication)-464(descriptors)-465(that)-464(ha)28(v)28(e)-464(already)-464(b)-28(een)-464(initialized.)-837(Moreo)28(v)27(er)-464(the)]TJ 0 -11.955 Td [(threshold)-333(m)28(ust)-334(ha)28(v)28(e)-334(the)-333(same)-333(v)55(alue)-333(on)-333(all)-334(pro)-27(ce)-1(sses.)]TJ/F27 9.9626 Tf 0 -28.238 Td [(3.1.2)-1150(Named)-383(Constan)32(ts)]TJ +/F8 9.9626 Tf 18.984 0 Td [(the)-333(new)-334(threshold)-333(for)-333(comm)27(un)1(ic)-1(ati)1(on)-334(descriptors.)]TJ 5.923 -11.955 Td [(Scop)-28(e:)]TJ/F27 9.9626 Tf 32.378 0 Td [(global)]TJ/F8 9.9626 Tf 29.756 0 Td [(.)]TJ -62.135 -11.955 Td [(T)28(yp)-28(e:)]TJ/F27 9.9626 Tf 29.612 0 Td [(required)]TJ/F8 9.9626 Tf 41.898 0 Td [(.)]TJ -71.51 -11.955 Td [(In)28(ten)28(t:)]TJ/F27 9.9626 Tf 33.486 0 Td [(in)]TJ/F8 9.9626 Tf 9.548 0 Td [(.)]TJ -43.034 -11.956 Td [(Sp)-28(eci\014ed)-333(as:)-445(an)-333(in)28(teger)-333(v)55(alue)-333(greater)-334(th)1(an)-334(zero.)]TJ -24.906 -22.627 Td [(Note:)-756(the)-490(thr)1(e)-1(shold)-489(v)56(alue)-489(is)-490(only)-489(queried)-489(b)28(y)-489(the)-490(library)-489(at)-489(the)-489(time)-490(a)-489(call)]TJ 0 -11.955 Td [(to)]TJ/F30 9.9626 Tf 13.431 0 Td [(psb_cdall)]TJ/F8 9.9626 Tf 51.648 0 Td [(is)-459(executed,)-491(therefore)-459(c)27(hanging)-459(the)-459(threshold)-459(has)-459(no)-460(e\013ect)-459(on)]TJ -65.079 -11.955 Td [(comm)28(unication)-464(descriptors)-465(that)-464(ha)28(v)28(e)-464(already)-464(b)-28(een)-464(initialized.)-837(Moreo)28(v)27(er)-464(the)]TJ 0 -11.956 Td [(threshold)-333(m)28(ust)-334(ha)28(v)28(e)-334(the)-333(same)-333(v)55(alue)-333(on)-333(all)-334(pro)-27(ce)-1(sses.)]TJ/F27 9.9626 Tf 0 -26.837 Td [(3.1.2)-1150(Named)-383(Constan)32(ts)]TJ 0 g 0 G - 0 -19.21 Td [(psb)]TJ + 0 -18.72 Td [(psb)]TJ ET q -1 0 0 1 168.641 465.677 cm +1 0 0 1 168.641 472.018 cm []0 d 0 J 0.398 w 0 0 m 3.437 0 l S Q BT -/F27 9.9626 Tf 172.078 465.478 Td [(none)]TJ +/F27 9.9626 Tf 172.078 471.818 Td [(none)]TJ ET q -1 0 0 1 196.475 465.677 cm +1 0 0 1 196.475 472.018 cm []0 d 0 J 0.398 w 0 0 m 3.437 0 l S Q 0 g 0 G BT -/F8 9.9626 Tf 204.894 465.478 Td [(Generic)-333(no-op;)]TJ +/F8 9.9626 Tf 204.894 471.818 Td [(Generic)-333(no-op;)]TJ 0 g 0 G -/F27 9.9626 Tf -54.189 -21.691 Td [(psb)]TJ +/F27 9.9626 Tf -54.189 -20.635 Td [(psb)]TJ ET q -1 0 0 1 168.641 443.986 cm +1 0 0 1 168.641 451.383 cm []0 d 0 J 0.398 w 0 0 m 3.437 0 l S Q BT -/F27 9.9626 Tf 172.078 443.787 Td [(nohalo)]TJ +/F27 9.9626 Tf 172.078 451.183 Td [(ro)-32(ot)]TJ ET q -1 0 0 1 205.705 443.986 cm +1 0 0 1 193.715 451.383 cm []0 d 0 J 0.398 w 0 0 m 3.437 0 l S Q 0 g 0 G BT -/F8 9.9626 Tf 214.123 443.787 Td [(Do)-333(not)-334(fetc)28(h)-333(halo)-333(e)-1(l)1(e)-1(men)28(ts;)]TJ +/F8 9.9626 Tf 202.133 451.183 Td [(Default)-333(ro)-28(ot)-333(pro)-28(cess)-334(for)-333(broadcast)-333(and)-333(sc)-1(atter)-333(op)-28(erations;)]TJ 0 g 0 G -/F27 9.9626 Tf -63.418 -21.69 Td [(psb)]TJ +/F27 9.9626 Tf -51.428 -20.635 Td [(psb)]TJ ET q -1 0 0 1 168.641 422.296 cm +1 0 0 1 168.641 430.748 cm []0 d 0 J 0.398 w 0 0 m 3.437 0 l S Q BT -/F27 9.9626 Tf 172.078 422.097 Td [(halo)]TJ +/F27 9.9626 Tf 172.078 430.548 Td [(nohalo)]TJ ET q -1 0 0 1 193.611 422.296 cm +1 0 0 1 205.705 430.748 cm []0 d 0 J 0.398 w 0 0 m 3.437 0 l S Q 0 g 0 G BT -/F8 9.9626 Tf 202.03 422.097 Td [(F)83(etc)28(h)-333(halo)-333(e)-1(lemen)28(ts)-333(from)-333(neigh)27(b)-27(ouring)-334(pro)-27(cesse)-1(s;)]TJ +/F8 9.9626 Tf 214.123 430.548 Td [(Do)-333(not)-334(fetc)28(h)-333(halo)-333(e)-1(l)1(e)-1(men)28(ts;)]TJ 0 g 0 G -/F27 9.9626 Tf -51.325 -21.691 Td [(psb)]TJ +/F27 9.9626 Tf -63.418 -20.635 Td [(psb)]TJ ET q -1 0 0 1 168.641 400.605 cm +1 0 0 1 168.641 410.113 cm []0 d 0 J 0.398 w 0 0 m 3.437 0 l S Q BT -/F27 9.9626 Tf 172.078 400.406 Td [(sum)]TJ +/F27 9.9626 Tf 172.078 409.913 Td [(halo)]TJ ET q -1 0 0 1 193.197 400.605 cm +1 0 0 1 193.611 410.113 cm []0 d 0 J 0.398 w 0 0 m 3.437 0 l S Q 0 g 0 G BT -/F8 9.9626 Tf 201.616 400.406 Td [(Sum)-333(o)27(v)28(erlapp)-27(ed)-334(elemen)28(ts)]TJ +/F8 9.9626 Tf 202.03 409.913 Td [(F)83(etc)28(h)-333(halo)-333(e)-1(lemen)28(ts)-333(from)-333(neigh)27(b)-27(ouring)-334(pro)-27(cesse)-1(s;)]TJ 0 g 0 G -/F27 9.9626 Tf -50.911 -21.691 Td [(psb)]TJ +/F27 9.9626 Tf -51.325 -20.635 Td [(psb)]TJ ET q -1 0 0 1 168.641 378.915 cm +1 0 0 1 168.641 389.478 cm []0 d 0 J 0.398 w 0 0 m 3.437 0 l S Q BT -/F27 9.9626 Tf 172.078 378.715 Td [(a)32(vg)]TJ +/F27 9.9626 Tf 172.078 389.278 Td [(sum)]TJ ET q -1 0 0 1 189.792 378.915 cm +1 0 0 1 193.197 389.478 cm []0 d 0 J 0.398 w 0 0 m 3.437 0 l S Q 0 g 0 G BT -/F8 9.9626 Tf 198.211 378.715 Td [(Av)28(erage)-334(o)28(v)28(erlapp)-28(ed)-333(elemen)28(ts)]TJ +/F8 9.9626 Tf 201.616 389.278 Td [(Sum)-333(o)27(v)28(erlapp)-27(ed)-334(elemen)28(ts)]TJ 0 g 0 G -/F27 9.9626 Tf -47.506 -21.69 Td [(psb)]TJ +/F27 9.9626 Tf -50.911 -20.635 Td [(psb)]TJ ET q -1 0 0 1 168.641 357.224 cm +1 0 0 1 168.641 368.843 cm []0 d 0 J 0.398 w 0 0 m 3.437 0 l S Q BT -/F27 9.9626 Tf 172.078 357.025 Td [(comm)]TJ +/F27 9.9626 Tf 172.078 368.643 Td [(a)32(vg)]TJ ET q -1 0 0 1 202.681 357.224 cm +1 0 0 1 189.792 368.843 cm []0 d 0 J 0.398 w 0 0 m 3.437 0 l S Q +0 g 0 G BT -/F27 9.9626 Tf 206.118 357.025 Td [(halo)]TJ +/F8 9.9626 Tf 198.211 368.643 Td [(Av)28(erage)-334(o)28(v)28(erlapp)-28(ed)-333(elemen)28(ts)]TJ +0 g 0 G +/F27 9.9626 Tf -47.506 -20.635 Td [(psb)]TJ ET q -1 0 0 1 227.651 357.224 cm +1 0 0 1 168.641 348.208 cm +[]0 d 0 J 0.398 w 0 0 m 3.437 0 l S +Q +BT +/F27 9.9626 Tf 172.078 348.008 Td [(comm)]TJ +ET +q +1 0 0 1 202.681 348.208 cm +[]0 d 0 J 0.398 w 0 0 m 3.437 0 l S +Q +BT +/F27 9.9626 Tf 206.118 348.008 Td [(halo)]TJ +ET +q +1 0 0 1 227.651 348.208 cm []0 d 0 J 0.398 w 0 0 m 3.437 0 l S Q 0 g 0 G BT -/F8 9.9626 Tf 236.07 357.025 Td [(Exc)28(hange)-333(data)-334(based)-333(on)-333(the)]TJ/F30 9.9626 Tf 126.387 0 Td [(halo_index)]TJ/F8 9.9626 Tf 55.624 0 Td [(list;)]TJ +/F8 9.9626 Tf 236.07 348.008 Td [(Exc)28(hange)-333(data)-334(based)-333(on)-333(the)]TJ/F30 9.9626 Tf 126.387 0 Td [(halo_index)]TJ/F8 9.9626 Tf 55.624 0 Td [(list;)]TJ 0 g 0 G -/F27 9.9626 Tf -267.376 -21.691 Td [(psb)]TJ +/F27 9.9626 Tf -267.376 -20.635 Td [(psb)]TJ ET q -1 0 0 1 168.641 335.533 cm +1 0 0 1 168.641 327.573 cm []0 d 0 J 0.398 w 0 0 m 3.437 0 l S Q BT -/F27 9.9626 Tf 172.078 335.334 Td [(comm)]TJ +/F27 9.9626 Tf 172.078 327.373 Td [(comm)]TJ ET q -1 0 0 1 202.681 335.533 cm +1 0 0 1 202.681 327.573 cm []0 d 0 J 0.398 w 0 0 m 3.437 0 l S Q BT -/F27 9.9626 Tf 206.118 335.334 Td [(ext)]TJ +/F27 9.9626 Tf 206.118 327.373 Td [(ext)]TJ ET q -1 0 0 1 222.559 335.533 cm +1 0 0 1 222.559 327.573 cm []0 d 0 J 0.398 w 0 0 m 3.437 0 l S Q 0 g 0 G BT -/F8 9.9626 Tf 230.978 335.334 Td [(Exc)28(hange)-333(data)-334(based)-333(on)-333(the)]TJ/F30 9.9626 Tf 126.387 0 Td [(ext_index)]TJ/F8 9.9626 Tf 50.394 0 Td [(list;)]TJ +/F8 9.9626 Tf 230.978 327.373 Td [(Exc)28(hange)-333(data)-334(based)-333(on)-333(the)]TJ/F30 9.9626 Tf 126.387 0 Td [(ext_index)]TJ/F8 9.9626 Tf 50.394 0 Td [(list;)]TJ 0 g 0 G -/F27 9.9626 Tf -257.054 -21.691 Td [(psb)]TJ +/F27 9.9626 Tf -257.054 -20.635 Td [(psb)]TJ ET q -1 0 0 1 168.641 313.843 cm +1 0 0 1 168.641 306.938 cm []0 d 0 J 0.398 w 0 0 m 3.437 0 l S Q BT -/F27 9.9626 Tf 172.078 313.643 Td [(comm)]TJ +/F27 9.9626 Tf 172.078 306.738 Td [(comm)]TJ ET q -1 0 0 1 202.681 313.843 cm +1 0 0 1 202.681 306.938 cm []0 d 0 J 0.398 w 0 0 m 3.437 0 l S Q BT -/F27 9.9626 Tf 206.118 313.643 Td [(o)32(vr)]TJ +/F27 9.9626 Tf 206.118 306.738 Td [(o)32(vr)]TJ ET q -1 0 0 1 222.981 313.843 cm +1 0 0 1 222.981 306.938 cm []0 d 0 J 0.398 w 0 0 m 3.437 0 l S Q 0 g 0 G BT -/F8 9.9626 Tf 231.4 313.643 Td [(Exc)28(hange)-333(data)-334(based)-333(on)-333(the)]TJ/F30 9.9626 Tf 126.387 0 Td [(ovrlap_index)]TJ/F8 9.9626 Tf 66.085 0 Td [(list;)]TJ +/F8 9.9626 Tf 231.4 306.738 Td [(Exc)28(hange)-333(data)-334(based)-333(on)-333(the)]TJ/F30 9.9626 Tf 126.387 0 Td [(ovrlap_index)]TJ/F8 9.9626 Tf 66.085 0 Td [(list;)]TJ 0 g 0 G -/F27 9.9626 Tf -273.167 -21.69 Td [(psb)]TJ +/F27 9.9626 Tf -273.167 -20.635 Td [(psb)]TJ ET q -1 0 0 1 168.641 292.152 cm +1 0 0 1 168.641 286.302 cm []0 d 0 J 0.398 w 0 0 m 3.437 0 l S Q BT -/F27 9.9626 Tf 172.078 291.953 Td [(comm)]TJ +/F27 9.9626 Tf 172.078 286.103 Td [(comm)]TJ ET q -1 0 0 1 202.681 292.152 cm +1 0 0 1 202.681 286.302 cm []0 d 0 J 0.398 w 0 0 m 3.437 0 l S Q BT -/F27 9.9626 Tf 206.118 291.953 Td [(mo)32(v)]TJ +/F27 9.9626 Tf 206.118 286.103 Td [(mo)32(v)]TJ ET q -1 0 0 1 227.81 292.152 cm +1 0 0 1 227.81 286.302 cm []0 d 0 J 0.398 w 0 0 m 3.437 0 l S Q 0 g 0 G BT -/F8 9.9626 Tf 236.229 291.953 Td [(Exc)28(hange)-333(data)-334(based)-333(on)-333(the)]TJ/F30 9.9626 Tf 126.387 0 Td [(ovr_mst_idx)]TJ/F8 9.9626 Tf 60.855 0 Td [(list;)]TJ/F16 11.9552 Tf -272.766 -30.23 Td [(3.2)-1125(Sparse)-375(Matrix)-375(class)]TJ/F8 9.9626 Tf 0 -19.211 Td [(The)]TJ/F30 9.9626 Tf 20.653 0 Td [(psb)]TJ +/F8 9.9626 Tf 236.229 286.103 Td [(Exc)28(hange)-333(data)-334(based)-333(on)-333(the)]TJ/F30 9.9626 Tf 126.387 0 Td [(ovr_mst_idx)]TJ/F8 9.9626 Tf 60.855 0 Td [(list;)]TJ/F16 11.9552 Tf -272.766 -28.83 Td [(3.2)-1125(Sparse)-375(Matrix)-375(class)]TJ/F8 9.9626 Tf 0 -18.719 Td [(The)]TJ/F30 9.9626 Tf 20.653 0 Td [(psb)]TJ ET q -1 0 0 1 187.676 242.711 cm +1 0 0 1 187.676 238.753 cm []0 d 0 J 0.398 w 0 0 m 3.138 0 l S Q BT -/F30 9.9626 Tf 190.814 242.512 Td [(Tspmat)]TJ +/F30 9.9626 Tf 190.814 238.554 Td [(Tspmat)]TJ ET q -1 0 0 1 222.824 242.711 cm +1 0 0 1 222.824 238.753 cm []0 d 0 J 0.398 w 0 0 m 3.138 0 l S Q BT -/F30 9.9626 Tf 225.962 242.512 Td [(type)]TJ/F8 9.9626 Tf 24.416 0 Td [(class)-351(con)28(tains)-351(all)-351(information)-350(ab)-28(out)-351(the)-351(lo)-27(cal)-351(p)-28(ortion)-351(of)]TJ -99.673 -11.955 Td [(the)-249(sparse)-249(matrix)-248(and)-249(its)-249(storage)-249(mo)-27(de.)-417(Its)-248(design)-249(is)-249(based)-249(on)-248(the)-249(ST)83(A)84(TE)-249(design)]TJ 0 -11.955 Td [(pattern)-347([)]TJ +/F30 9.9626 Tf 225.962 238.554 Td [(type)]TJ/F8 9.9626 Tf 24.416 0 Td [(class)-351(con)28(tains)-351(all)-351(information)-350(ab)-28(out)-351(the)-351(lo)-27(cal)-351(p)-28(ortion)-351(of)]TJ -99.673 -11.955 Td [(the)-249(sparse)-249(matrix)-248(and)-249(its)-249(storage)-249(mo)-27(de.)-417(Its)-248(design)-249(is)-249(based)-249(on)-248(the)-249(ST)83(A)84(TE)-249(design)]TJ 0 -11.956 Td [(pattern)-347([)]TJ 1 0 0 rg 1 0 0 RG [(13)]TJ 0 g 0 G @@ -5584,19 +5601,19 @@ BT 0 g 0 G [-347(where)]TJ/F30 9.9626 Tf 0 -11.955 Td [(T)]TJ/F8 9.9626 Tf 8.551 0 Td [(is)-333(a)-334(placeholder)-333(for)-333(the)-334(data)-333(t)28(yp)-28(e)-333(and)-333(precision)-334(v)56(arian)28(ts)]TJ 0 g 0 G -/F27 9.9626 Tf -8.551 -21.25 Td [(S)]TJ +/F27 9.9626 Tf -8.551 -20.457 Td [(S)]TJ 0 g 0 G /F8 9.9626 Tf 11.346 0 Td [(Single)-333(precision)-334(real;)]TJ 0 g 0 G -/F27 9.9626 Tf -11.346 -21.69 Td [(D)]TJ +/F27 9.9626 Tf -11.346 -20.635 Td [(D)]TJ 0 g 0 G /F8 9.9626 Tf 13.768 0 Td [(Double)-333(precision)-334(real;)]TJ 0 g 0 G -/F27 9.9626 Tf -13.768 -21.691 Td [(C)]TJ +/F27 9.9626 Tf -13.768 -20.635 Td [(C)]TJ 0 g 0 G /F8 9.9626 Tf 13.256 0 Td [(Single)-333(precision)-334(complex;)]TJ 0 g 0 G -/F27 9.9626 Tf -13.256 -21.69 Td [(Z)]TJ +/F27 9.9626 Tf -13.256 -20.635 Td [(Z)]TJ 0 g 0 G /F8 9.9626 Tf 11.983 0 Td [(Double)-333(precision)-334(complex.)]TJ 0 g 0 G @@ -6622,19 +6639,19 @@ endobj /Type /ObjStm /N 100 /First 870 -/Length 8791 +/Length 8790 >> stream 807 0 805 134 809 281 35 337 39 392 810 447 806 504 814 622 812 756 816 903 817 960 818 1017 819 1074 820 1131 821 1188 822 1245 823 1302 824 1359 813 1416 826 1508 828 1622 829 1678 830 1734 831 1789 832 1845 833 1901 834 1957 825 2014 838 2106 835 2248 836 2395 840 2541 43 2598 47 2654 51 2710 55 2766 837 2822 842 2940 844 3054 59 3110 -63 3165 67 3220 71 3275 841 3330 850 3422 846 3572 847 3728 848 3878 852 4022 75 4079 -79 4135 83 4191 853 4247 849 4304 857 4409 859 4523 855 4579 860 4636 87 4693 91 4748 -856 4803 862 4895 864 5009 95 5066 99 5122 865 5178 103 5235 861 5292 867 5384 869 5498 -107 5554 111 5610 115 5666 866 5722 871 5814 873 5928 119 5985 123 6042 870 6099 875 6191 -877 6305 127 6361 131 6417 874 6473 880 6565 882 6679 135 6736 139 6793 879 6850 884 6942 -886 7056 143 7112 147 7168 151 7224 883 7280 890 7372 887 7514 888 7661 892 7807 155 7864 +63 3165 67 3220 71 3275 841 3330 850 3422 846 3572 847 3727 848 3876 852 4021 75 4078 +79 4134 83 4190 853 4246 849 4303 857 4408 859 4522 855 4578 860 4635 87 4692 91 4747 +856 4802 862 4894 864 5008 95 5065 99 5121 865 5177 103 5234 861 5291 867 5383 869 5497 +107 5553 111 5609 115 5665 866 5721 871 5813 873 5927 119 5984 123 6041 870 6098 875 6190 +877 6304 127 6360 131 6416 874 6472 880 6564 882 6678 135 6735 139 6792 879 6849 884 6941 +886 7055 143 7111 147 7167 151 7223 883 7279 890 7371 887 7513 888 7660 892 7806 155 7863 % 807 0 obj << /Type /Page @@ -6869,7 +6886,7 @@ stream /Type /Annot /Subtype /Link /Border[0 0 0]/H/I/C[0 1 0] -/Rect [188.06 217.606 200.015 226.019] +/Rect [188.06 213.647 200.015 222.06] /A << /S /GoTo /D (cite.DesignPatterns) >> >> % 847 0 obj @@ -6877,7 +6894,7 @@ stream /Type /Annot /Subtype /Link /Border[0 0 0]/H/I/C[0 1 0] -/Rect [268.904 217.606 280.86 226.019] +/Rect [268.904 213.647 280.86 222.06] /A << /S /GoTo /D (cite.Sparse03) >> >> % 848 0 obj @@ -6885,7 +6902,7 @@ stream /Type /Annot /Subtype /Link /Border[0 0 0]/H/I/C[1 0 0] -/Rect [459.496 215.115 466.47 227.07] +/Rect [459.496 211.157 466.47 223.112] /A << /S /GoTo /D (figure.4) >> >> % 852 0 obj @@ -6898,15 +6915,15 @@ stream >> % 79 0 obj << -/D [850 0 R /XYZ 150.705 495.148 null] +/D [850 0 R /XYZ 150.705 500.734 null] >> % 83 0 obj << -/D [850 0 R /XYZ 150.705 274.175 null] +/D [850 0 R /XYZ 150.705 269.461 null] >> % 853 0 obj << -/D [850 0 R /XYZ 171.358 242.512 null] +/D [850 0 R /XYZ 171.358 238.554 null] >> % 849 0 obj << @@ -12205,7 +12222,7 @@ ET endstream endobj 1171 0 obj << -/Length 7723 +/Length 7803 >> stream 0 g 0 G @@ -12218,52 +12235,52 @@ q []0 d 0 J 0.398 w 0 0 m 4.035 0 l S Q BT -/F16 11.9552 Tf 175.796 706.129 Td [(scatter)-375(|)-375(Scatter)-375(Global)-375(Dense)-375(Matrix)]TJ/F8 9.9626 Tf -25.091 -19.755 Td [(These)-315(subroutines)-315(scatters)-315(the)-315(p)-28(ortions)-315(of)-315(global)-315(dense)-315(matrix)-315(o)28(wned)-315(b)27(y)-315(a)-315(pro-)]TJ 0 -11.955 Td [(cess)-333(to)-334(all)-333(the)-333(pro)-28(cesses)-334(in)-333(the)-333(pro)-28(cesses)-334(grid.)]TJ/F11 9.9626 Tf 119.021 -26.056 Td [(l)-20(oc)]TJ +/F16 11.9552 Tf 175.796 706.129 Td [(scatter)-375(|)-375(Scatter)-375(Global)-375(Dense)-375(Matrix)]TJ/F8 9.9626 Tf -25.091 -19.28 Td [(These)-315(subroutines)-315(scatters)-315(the)-315(p)-28(ortions)-315(of)-315(global)-315(dense)-315(matrix)-315(o)28(wned)-315(b)27(y)-315(a)-315(pro-)]TJ 0 -11.955 Td [(cess)-333(to)-334(all)-333(the)-333(pro)-28(cesses)-334(in)-333(the)-333(pro)-28(cesses)-334(grid.)]TJ/F11 9.9626 Tf 119.021 -25.291 Td [(l)-20(oc)]TJ ET q -1 0 0 1 282.633 648.562 cm +1 0 0 1 282.633 649.802 cm []0 d 0 J 0.398 w 0 0 m 2.989 0 l S Q BT -/F11 9.9626 Tf 285.622 648.363 Td [(x)]TJ/F10 6.9738 Tf 5.694 -1.494 Td [(i)]TJ/F14 9.9626 Tf 6.084 1.494 Td [(\040)]TJ/F11 9.9626 Tf 12.73 0 Td [(scatter)]TJ/F8 9.9626 Tf 30.853 0 Td [(\050)]TJ/F11 9.9626 Tf 3.874 0 Td [(g)-36(l)-20(ob)]TJ +/F11 9.9626 Tf 285.622 649.603 Td [(x)]TJ/F10 6.9738 Tf 5.694 -1.494 Td [(i)]TJ/F14 9.9626 Tf 6.084 1.494 Td [(\040)]TJ/F11 9.9626 Tf 12.73 0 Td [(scatter)]TJ/F8 9.9626 Tf 30.853 0 Td [(\050)]TJ/F11 9.9626 Tf 3.874 0 Td [(g)-36(l)-20(ob)]TJ ET q -1 0 0 1 362.838 648.562 cm +1 0 0 1 362.838 649.802 cm []0 d 0 J 0.398 w 0 0 m 2.989 0 l S Q BT -/F11 9.9626 Tf 365.827 648.363 Td [(x)]TJ/F8 9.9626 Tf 5.693 0 Td [(\051)]TJ -220.815 -23.385 Td [(where:)]TJ +/F11 9.9626 Tf 365.827 649.603 Td [(x)]TJ/F8 9.9626 Tf 5.693 0 Td [(\051)]TJ -220.815 -22.875 Td [(where:)]TJ 0 g 0 G -/F11 9.9626 Tf 0 -22.126 Td [(g)-36(l)-19(o)-1(b)]TJ +/F11 9.9626 Tf 0 -21.361 Td [(g)-36(l)-19(o)-1(b)]TJ ET q -1 0 0 1 168.775 603.051 cm +1 0 0 1 168.775 605.567 cm []0 d 0 J 0.398 w 0 0 m 3.437 0 l S Q BT -/F11 9.9626 Tf 172.212 602.852 Td [(x)]TJ +/F11 9.9626 Tf 172.212 605.367 Td [(x)]TJ 0 g 0 G /F8 9.9626 Tf 10.675 0 Td [(is)-333(the)-334(global)-333(matrix)]TJ/F11 9.9626 Tf 88.917 0 Td [(g)-36(l)-20(ob)]TJ ET q -1 0 0 1 289.785 603.051 cm +1 0 0 1 289.785 605.567 cm []0 d 0 J 0.398 w 0 0 m 2.989 0 l S Q BT -/F11 9.9626 Tf 292.773 602.852 Td [(x)]TJ/F7 6.9738 Tf 5.694 -1.495 Td [(1:)]TJ/F10 6.9738 Tf 6.227 0 Td [(m;)]TJ/F7 6.9738 Tf 9.436 0 Td [(1:)]TJ/F10 6.9738 Tf 6.226 0 Td [(n)]TJ +/F11 9.9626 Tf 292.773 605.367 Td [(x)]TJ/F7 6.9738 Tf 5.694 -1.494 Td [(1:)]TJ/F10 6.9738 Tf 6.227 0 Td [(m;)]TJ/F7 6.9738 Tf 9.436 0 Td [(1:)]TJ/F10 6.9738 Tf 6.226 0 Td [(n)]TJ 0 g 0 G -/F11 9.9626 Tf -169.651 -21.365 Td [(l)-20(oc)]TJ +/F11 9.9626 Tf -169.651 -20.345 Td [(l)-20(oc)]TJ ET q -1 0 0 1 163.701 580.191 cm +1 0 0 1 163.701 583.727 cm []0 d 0 J 0.398 w 0 0 m 3.437 0 l S Q BT -/F11 9.9626 Tf 167.139 579.992 Td [(x)]TJ/F10 6.9738 Tf 5.693 -1.495 Td [(i)]TJ +/F11 9.9626 Tf 167.139 583.528 Td [(x)]TJ/F10 6.9738 Tf 5.693 -1.494 Td [(i)]TJ 0 g 0 G -/F8 9.9626 Tf 8.299 1.495 Td [(is)-333(the)-334(lo)-27(cal)-334(p)-28(or)1(tion)-334(of)-333(global)-333(dense)-334(matrix)-333(on)-333(pro)-28(cess)]TJ/F11 9.9626 Tf 234.703 0 Td [(i)]TJ/F8 9.9626 Tf 3.433 0 Td [(.)]TJ +/F8 9.9626 Tf 8.299 1.494 Td [(is)-333(the)-334(lo)-27(cal)-334(p)-28(or)1(tion)-334(of)-333(global)-333(dense)-334(matrix)-333(on)-333(pro)-28(cess)]TJ/F11 9.9626 Tf 234.703 0 Td [(i)]TJ/F8 9.9626 Tf 3.433 0 Td [(.)]TJ 0 g 0 G -/F11 9.9626 Tf -268.562 -22.86 Td [(scatter)]TJ +/F11 9.9626 Tf -268.562 -21.839 Td [(scatter)]TJ 0 g 0 G /F8 9.9626 Tf 35.834 0 Td [(is)-333(the)-334(scatter)-333(function.)]TJ 0 g 0 G @@ -12271,153 +12288,153 @@ BT 0 g 0 G ET q -1 0 0 1 228.797 534.073 cm +1 0 0 1 228.797 539.65 cm []0 d 0 J 0.398 w 0 0 m 187.526 0 l S Q BT -/F11 9.9626 Tf 234.775 525.505 Td [(x)]TJ/F10 6.9738 Tf 5.694 -1.494 Td [(i)]TJ/F11 9.9626 Tf 3.317 1.494 Td [(;)-167(y)]TJ/F27 9.9626 Tf 111.399 0 Td [(Subroutine)]TJ +/F11 9.9626 Tf 234.775 531.082 Td [(x)]TJ/F10 6.9738 Tf 5.694 -1.494 Td [(i)]TJ/F11 9.9626 Tf 3.317 1.494 Td [(;)-167(y)]TJ/F27 9.9626 Tf 111.399 0 Td [(Subroutine)]TJ ET q -1 0 0 1 228.797 521.719 cm +1 0 0 1 228.797 527.296 cm []0 d 0 J 0.398 w 0 0 m 187.526 0 l S Q BT -/F8 9.9626 Tf 234.775 513.151 Td [(In)28(teger)-9028(psb)]TJ +/F8 9.9626 Tf 234.775 518.729 Td [(In)28(teger)-9028(psb)]TJ ET q -1 0 0 1 370.782 513.351 cm +1 0 0 1 370.782 518.928 cm []0 d 0 J 0.398 w 0 0 m 2.989 0 l S Q BT -/F8 9.9626 Tf 373.771 513.151 Td [(scatter)]TJ -138.996 -11.955 Td [(Short)-333(Precision)-334(Real)-3102(psb)]TJ +/F8 9.9626 Tf 373.771 518.729 Td [(scatter)]TJ -138.996 -11.956 Td [(Short)-333(Precision)-334(Real)-3102(psb)]TJ ET q -1 0 0 1 370.782 501.395 cm +1 0 0 1 370.782 506.973 cm []0 d 0 J 0.398 w 0 0 m 2.989 0 l S Q BT -/F8 9.9626 Tf 373.771 501.196 Td [(scatter)]TJ -138.996 -11.955 Td [(Long)-333(Precision)-334(Real)-3314(psb)]TJ +/F8 9.9626 Tf 373.771 506.773 Td [(scatter)]TJ -138.996 -11.955 Td [(Long)-333(Precision)-334(Real)-3314(psb)]TJ ET q -1 0 0 1 370.782 489.44 cm +1 0 0 1 370.782 495.017 cm []0 d 0 J 0.398 w 0 0 m 2.989 0 l S Q BT -/F8 9.9626 Tf 373.771 489.241 Td [(scatter)]TJ -138.996 -11.955 Td [(Short)-333(Precision)-334(Complex)-1200(psb)]TJ +/F8 9.9626 Tf 373.771 494.818 Td [(scatter)]TJ -138.996 -11.955 Td [(Short)-333(Precision)-334(Complex)-1200(psb)]TJ ET q -1 0 0 1 370.782 477.485 cm +1 0 0 1 370.782 483.062 cm []0 d 0 J 0.398 w 0 0 m 2.989 0 l S Q BT -/F8 9.9626 Tf 373.771 477.286 Td [(scatter)]TJ -138.996 -11.955 Td [(Long)-333(Precision)-334(Complex)-1411(psb)]TJ +/F8 9.9626 Tf 373.771 482.863 Td [(scatter)]TJ -138.996 -11.955 Td [(Long)-333(Precision)-334(Complex)-1411(psb)]TJ ET q -1 0 0 1 370.782 465.53 cm +1 0 0 1 370.782 471.107 cm []0 d 0 J 0.398 w 0 0 m 2.989 0 l S Q BT -/F8 9.9626 Tf 373.771 465.331 Td [(scatter)]TJ +/F8 9.9626 Tf 373.771 470.908 Td [(scatter)]TJ ET q -1 0 0 1 228.797 461.545 cm +1 0 0 1 228.797 467.122 cm []0 d 0 J 0.398 w 0 0 m 187.526 0 l S Q 0 g 0 G BT -/F8 9.9626 Tf 276.386 433.506 Td [(T)83(able)-333(17:)-444(Data)-334(t)28(yp)-28(es)]TJ +/F8 9.9626 Tf 276.386 439.083 Td [(T)83(able)-333(17:)-444(Data)-334(t)28(yp)-28(es)]TJ 0 g 0 G 0 g 0 G -/F27 9.9626 Tf -124.304 -34.026 Td [(c)-138(a)-138(l)-139(l)]TJ/F8 9.9626 Tf 29.99 0 Td [(p)-148(s)-149(b)]TJ +/F27 9.9626 Tf -124.304 -33.261 Td [(c)-138(a)-138(l)-139(l)]TJ/F8 9.9626 Tf 29.99 0 Td [(p)-148(s)-149(b)]TJ ET q -1 0 0 1 202.107 399.679 cm +1 0 0 1 202.107 406.021 cm []0 d 0 J 0.398 w 0 0 m 2.989 0 l S Q BT -/F8 9.9626 Tf 206.575 399.48 Td [(s)-149(c)-148(a)-149(t)-148(t)-148(e)-149(r)-254(\050)-215(g)-110(l)-110(o)-110(b)]TJ +/F8 9.9626 Tf 206.575 405.822 Td [(s)-149(c)-148(a)-149(t)-148(t)-148(e)-149(r)-254(\050)-215(g)-110(l)-110(o)-110(b)]TJ ET q -1 0 0 1 276.66 399.679 cm +1 0 0 1 276.66 406.021 cm []0 d 0 J 0.398 w 0 0 m 2.989 0 l S Q BT -/F8 9.9626 Tf 280.744 399.48 Td [(x)-381(,)-888(l)-127(o)-127(c)]TJ +/F8 9.9626 Tf 280.744 405.822 Td [(x)-381(,)-888(l)-127(o)-127(c)]TJ ET q -1 0 0 1 317.987 399.679 cm +1 0 0 1 317.987 406.021 cm []0 d 0 J 0.398 w 0 0 m 2.989 0 l S Q BT -/F8 9.9626 Tf 322.243 399.48 Td [(x)-415(,)-874(d)-113(e)-112(s)-113(c)]TJ +/F8 9.9626 Tf 322.243 405.822 Td [(x)-415(,)-874(d)-113(e)-112(s)-113(c)]TJ ET q -1 0 0 1 366.519 399.679 cm +1 0 0 1 366.519 406.021 cm []0 d 0 J 0.398 w 0 0 m 2.989 0 l S Q BT -/F8 9.9626 Tf 370.63 399.48 Td [(a)-386(,)-888(i)-127(n)-127(f)-127(o)-415(,)-864(r)-103(o)-103(o)-104(t)-367(,)-808(m)-47(o)-46(l)-47(d)-152(\051)]TJ +/F8 9.9626 Tf 370.63 405.822 Td [(a)-386(,)-888(i)-127(n)-127(f)-127(o)-415(,)-864(r)-103(o)-103(o)-104(t)-367(,)-808(m)-47(o)-46(l)-47(d)-152(\051)]TJ 0 g 0 G 0 g 0 G 0 g 0 G -/F27 9.9626 Tf -219.925 -32.298 Td [(T)32(yp)-32(e:)]TJ +/F27 9.9626 Tf -219.925 -30.766 Td [(T)32(yp)-32(e:)]TJ 0 g 0 G /F8 9.9626 Tf 33.797 0 Td [(Sync)28(hronous.)]TJ 0 g 0 G -/F27 9.9626 Tf -33.797 -22.86 Td [(On)-383(En)32(try)]TJ +/F27 9.9626 Tf -33.797 -21.84 Td [(On)-383(En)32(try)]TJ 0 g 0 G 0 g 0 G - 0 -22.859 Td [(glob)]TJ + 0 -21.839 Td [(glob)]TJ ET q -1 0 0 1 172.397 321.662 cm +1 0 0 1 172.397 331.576 cm []0 d 0 J 0.398 w 0 0 m 3.437 0 l S Q BT -/F27 9.9626 Tf 175.834 321.463 Td [(x)]TJ +/F27 9.9626 Tf 175.834 331.377 Td [(x)]TJ 0 g 0 G -/F8 9.9626 Tf 11.028 0 Td [(The)-333(arra)27(y)-333(that)-333(m)28(ust)-334(b)-27(e)-334(scattered)-333(in)28(to)-334(lo)-28(cal)-333(pieces.)]TJ -11.251 -11.956 Td [(Scop)-28(e:)]TJ/F27 9.9626 Tf 32.379 0 Td [(global)]TJ/F8 9.9626 Tf -32.379 -11.955 Td [(T)28(yp)-28(e:)]TJ/F27 9.9626 Tf 29.612 0 Td [(required)]TJ/F8 9.9626 Tf -29.612 -11.955 Td [(In)28(ten)28(t:)]TJ/F27 9.9626 Tf 33.486 0 Td [(in)]TJ/F8 9.9626 Tf 9.548 0 Td [(.)]TJ -43.034 -11.955 Td [(Sp)-28(eci\014ed)-333(as:)-445(a)-333(rank)-333(one)-334(or)-333(t)28(w)28(o)-334(arra)28(y)84(.)]TJ +/F8 9.9626 Tf 11.028 0 Td [(The)-333(arra)27(y)-333(that)-333(m)28(ust)-334(b)-27(e)-334(scattered)-333(in)28(to)-334(lo)-28(cal)-333(pieces.)]TJ -11.251 -11.955 Td [(Scop)-28(e:)]TJ/F27 9.9626 Tf 32.379 0 Td [(global)]TJ/F8 9.9626 Tf -32.379 -11.956 Td [(T)28(yp)-28(e:)]TJ/F27 9.9626 Tf 29.612 0 Td [(required)]TJ/F8 9.9626 Tf -29.612 -11.955 Td [(In)28(ten)28(t:)]TJ/F27 9.9626 Tf 33.486 0 Td [(in)]TJ/F8 9.9626 Tf 9.548 0 Td [(.)]TJ -43.034 -11.955 Td [(Sp)-28(eci\014ed)-333(as:)-445(a)-333(rank)-333(one)-334(or)-333(t)28(w)28(o)-334(arra)28(y)84(.)]TJ 0 g 0 G -/F27 9.9626 Tf -24.906 -22.86 Td [(desc)]TJ +/F27 9.9626 Tf -24.906 -21.839 Td [(desc)]TJ ET q -1 0 0 1 172.619 250.981 cm +1 0 0 1 172.619 261.916 cm []0 d 0 J 0.398 w 0 0 m 3.437 0 l S Q BT -/F27 9.9626 Tf 176.057 250.782 Td [(a)]TJ +/F27 9.9626 Tf 176.057 261.717 Td [(a)]TJ 0 g 0 G -/F8 9.9626 Tf 10.55 0 Td [(con)28(tains)-334(data)-333(structures)-333(for)-333(c)-1(omm)28(unications.)]TJ -10.996 -11.955 Td [(Scop)-28(e:)]TJ/F27 9.9626 Tf 32.379 0 Td [(lo)-32(cal)]TJ/F8 9.9626 Tf -32.379 -11.955 Td [(T)28(yp)-28(e:)]TJ/F27 9.9626 Tf 29.612 0 Td [(required)]TJ/F8 9.9626 Tf -29.612 -11.956 Td [(In)28(ten)28(t:)]TJ/F27 9.9626 Tf 33.486 0 Td [(in)]TJ/F8 9.9626 Tf 9.548 0 Td [(.)]TJ -43.034 -11.955 Td [(Sp)-28(eci\014ed)-333(as:)-445(a)-333(structured)-333(data)-333(of)-334(t)28(yp)-28(e)]TJ +/F8 9.9626 Tf 10.55 0 Td [(con)28(tains)-334(data)-333(structures)-333(for)-333(c)-1(omm)28(unications.)]TJ -10.996 -11.955 Td [(Scop)-28(e:)]TJ/F27 9.9626 Tf 32.379 0 Td [(lo)-32(cal)]TJ/F8 9.9626 Tf -32.379 -11.956 Td [(T)28(yp)-28(e:)]TJ/F27 9.9626 Tf 29.612 0 Td [(required)]TJ/F8 9.9626 Tf -29.612 -11.955 Td [(In)28(ten)28(t:)]TJ/F27 9.9626 Tf 33.486 0 Td [(in)]TJ/F8 9.9626 Tf 9.548 0 Td [(.)]TJ -43.034 -11.955 Td [(Sp)-28(eci\014ed)-333(as:)-445(a)-333(structured)-333(data)-333(of)-334(t)28(yp)-28(e)]TJ 0 0 1 rg 0 0 1 RG /F30 9.9626 Tf 170.915 0 Td [(psb)]TJ ET q -1 0 0 1 362.845 203.161 cm +1 0 0 1 362.845 214.095 cm []0 d 0 J 0.398 w 0 0 m 3.138 0 l S Q BT -/F30 9.9626 Tf 365.983 202.961 Td [(desc)]TJ +/F30 9.9626 Tf 365.983 213.896 Td [(desc)]TJ ET q -1 0 0 1 387.532 203.161 cm +1 0 0 1 387.532 214.095 cm []0 d 0 J 0.398 w 0 0 m 3.138 0 l S Q BT -/F30 9.9626 Tf 390.67 202.961 Td [(type)]TJ +/F30 9.9626 Tf 390.67 213.896 Td [(type)]TJ 0 g 0 G /F8 9.9626 Tf 20.922 0 Td [(.)]TJ 0 g 0 G -/F27 9.9626 Tf -260.887 -22.86 Td [(ro)-32(ot)]TJ +/F27 9.9626 Tf -260.887 -21.839 Td [(ro)-32(ot)]TJ 0 g 0 G -/F8 9.9626 Tf 25.93 0 Td [(The)-420(pro)-27(ce)-1(ss)-419(that)-420(holds)-419(the)-420(global)-420(cop)28(y)83(.)-703(If)]TJ/F11 9.9626 Tf 194.21 0 Td [(r)-28(oot)]TJ/F8 9.9626 Tf 22.228 0 Td [(=)]TJ/F14 9.9626 Tf 11.949 0 Td [(\000)]TJ/F8 9.9626 Tf 7.749 0 Td [(1)-420(all)-419(the)-420(pro)-28(cesses)]TJ -237.16 -11.955 Td [(ha)28(v)28(e)-334(a)-333(cop)28(y)-334(of)-333(the)-333(global)-334(v)28(ector.)]TJ 0 -11.955 Td [(Scop)-28(e:)]TJ/F27 9.9626 Tf 32.379 0 Td [(global)]TJ/F8 9.9626 Tf -32.379 -11.955 Td [(T)28(yp)-28(e:)]TJ/F27 9.9626 Tf 29.612 0 Td [(optional)]TJ/F8 9.9626 Tf -29.612 -11.955 Td [(In)28(ten)28(t:)]TJ/F27 9.9626 Tf 33.486 0 Td [(in)]TJ/F8 9.9626 Tf 9.547 0 Td [(.)]TJ -43.033 -11.955 Td [(Sp)-28(eci\014ed)-333(as:)-445(an)-333(in)28(teger)-333(v)55(ariable)]TJ/F14 9.9626 Tf 142.079 0 Td [(\000)]TJ/F8 9.9626 Tf 7.749 0 Td [(1)]TJ/F14 9.9626 Tf 7.748 0 Td [(\024)]TJ/F11 9.9626 Tf 10.516 0 Td [(r)-28(oot)]TJ/F14 9.9626 Tf 20.795 0 Td [(\024)]TJ/F11 9.9626 Tf 10.516 0 Td [(np)]TJ/F14 9.9626 Tf 13.206 0 Td [(\000)]TJ/F8 9.9626 Tf 9.963 0 Td [(1,)-333(default)]TJ/F14 9.9626 Tf 44.555 0 Td [(\000)]TJ/F8 9.9626 Tf 7.749 0 Td [(1.)]TJ +/F8 9.9626 Tf 25.93 0 Td [(The)-420(pro)-27(ce)-1(ss)-419(that)-420(holds)-419(the)-420(global)-420(cop)28(y)83(.)-703(If)]TJ/F11 9.9626 Tf 194.21 0 Td [(r)-28(oot)]TJ/F8 9.9626 Tf 22.228 0 Td [(=)]TJ/F14 9.9626 Tf 11.949 0 Td [(\000)]TJ/F8 9.9626 Tf 7.749 0 Td [(1)-420(all)-419(the)-420(pro)-28(cesses)]TJ -237.16 -11.956 Td [(ha)28(v)28(e)-334(a)-333(cop)28(y)-334(of)-333(the)-333(global)-334(v)28(ector.)]TJ 0 -11.955 Td [(Scop)-28(e:)]TJ/F27 9.9626 Tf 32.379 0 Td [(global)]TJ/F8 9.9626 Tf -32.379 -11.955 Td [(T)28(yp)-28(e:)]TJ/F27 9.9626 Tf 29.612 0 Td [(optional)]TJ/F8 9.9626 Tf -29.612 -11.955 Td [(In)28(ten)28(t:)]TJ/F27 9.9626 Tf 33.486 0 Td [(in)]TJ/F8 9.9626 Tf 9.547 0 Td [(.)]TJ -43.033 -11.955 Td [(Sp)-28(eci\014ed)-344(as)-1(:)-467(an)-344(in)28(tege)-1(r)-344(v)55(ariabl)1(e)]TJ/F14 9.9626 Tf 142.757 0 Td [(\000)]TJ/F8 9.9626 Tf 7.749 0 Td [(1)]TJ/F14 9.9626 Tf 7.937 0 Td [(\024)]TJ/F11 9.9626 Tf 10.705 0 Td [(r)-28(oot)]TJ/F14 9.9626 Tf 20.983 0 Td [(\024)]TJ/F11 9.9626 Tf 10.704 0 Td [(np)]TJ/F14 9.9626 Tf 13.282 0 Td [(\000)]TJ/F8 9.9626 Tf 10.038 0 Td [(1,)-347(default)]TJ/F30 9.9626 Tf 44.809 0 Td [(psb_root_)]TJ/F8 9.9626 Tf 47.073 0 Td [(,)]TJ -316.037 -11.955 Td [(i.e.)-444(pro)-28(cess)-334(0.)]TJ 0 g 0 G - -132.908 -29.888 Td [(56)]TJ + 141.968 -29.888 Td [(56)]TJ 0 g 0 G ET endstream endobj 1180 0 obj << -/Length 4163 +/Length 4181 >> stream 0 g 0 G @@ -12507,38 +12524,38 @@ q []0 d 0 J 0.398 w 0 0 m 2.989 0 l S Q BT -/F11 9.9626 Tf 326.456 606.502 Td [(x)]TJ/F8 9.9626 Tf 5.694 0 Td [(.)]TJ -207.348 -11.955 Td [(Scop)-28(e:)]TJ/F27 9.9626 Tf 32.379 0 Td [(lo)-32(cal)]TJ/F8 9.9626 Tf -32.379 -11.955 Td [(T)28(yp)-28(e:)]TJ/F27 9.9626 Tf 29.611 0 Td [(required)]TJ/F8 9.9626 Tf -29.611 -11.955 Td [(In)28(ten)28(t:)]TJ/F27 9.9626 Tf 33.486 0 Td [(out)]TJ/F8 9.9626 Tf 16.549 0 Td [(.)]TJ -50.035 -11.955 Td [(Sp)-28(eci\014ed)-255(as:)-405(a)-255(rank)-254(one)-255(or)-255(t)28(w)27(o)-254(arra)27(y)-254(or)-255(an)-255(ob)-55(jec)-1(t)-254(of)-255(t)28(yp)-28(e)]TJ +/F11 9.9626 Tf 326.456 606.502 Td [(x)]TJ/F8 9.9626 Tf 5.694 0 Td [(.)]TJ -207.348 -11.955 Td [(Scop)-28(e:)]TJ/F27 9.9626 Tf 32.379 0 Td [(lo)-32(cal)]TJ/F8 9.9626 Tf -32.379 -11.955 Td [(T)28(yp)-28(e:)]TJ/F27 9.9626 Tf 29.611 0 Td [(required)]TJ/F8 9.9626 Tf -29.611 -11.955 Td [(In)28(ten)28(t:)]TJ/F27 9.9626 Tf 33.486 0 Td [(out)]TJ/F8 9.9626 Tf 16.549 0 Td [(.)]TJ -50.035 -11.955 Td [(Sp)-28(eci\014ed)-244(as:)-400(a)-244(ran)1(k)-244(one)-244(or)-244(t)27(w)28(o)-244(ALLOCA)83(T)84(ABLE)-244(arra)28(y)-244(or)-244(an)-244(ob)-56(ject)-244(of)-244(t)28(yp)-28(e)]TJ 0 0 1 rg 0 0 1 RG -/F30 9.9626 Tf 244.743 0 Td [(psb)]TJ +/F30 9.9626 Tf 0 -11.955 Td [(psb)]TJ ET q -1 0 0 1 385.864 558.881 cm +1 0 0 1 141.121 546.926 cm []0 d 0 J 0.398 w 0 0 m 3.138 0 l S Q BT -/F30 9.9626 Tf 389.002 558.682 Td [(T)]TJ +/F30 9.9626 Tf 144.259 546.727 Td [(T)]TJ ET q -1 0 0 1 394.86 558.881 cm +1 0 0 1 150.117 546.926 cm []0 d 0 J 0.398 w 0 0 m 3.138 0 l S Q BT -/F30 9.9626 Tf 397.998 558.682 Td [(vect)]TJ +/F30 9.9626 Tf 153.255 546.727 Td [(vect)]TJ ET q -1 0 0 1 419.547 558.881 cm +1 0 0 1 174.804 546.926 cm []0 d 0 J 0.398 w 0 0 m 3.138 0 l S Q BT -/F30 9.9626 Tf 422.685 558.682 Td [(type)]TJ +/F30 9.9626 Tf 177.942 546.727 Td [(type)]TJ 0 g 0 G -/F8 9.9626 Tf -297.883 -11.955 Td [(con)28(taining)-333(n)27(um)28(b)-28(ers)-333(of)-333(the)-334(t)28(yp)-28(e)-333(indicated)-333(in)-333(T)83(able)]TJ +/F8 9.9626 Tf 24.242 0 Td [(con)28(taining)-333(n)27(um)28(b)-28(ers)-333(of)-333(the)-334(t)28(yp)-28(e)-333(indicated)-333(in)-333(T)83(able)]TJ 0 0 1 rg 0 0 1 RG - [-333(17)]TJ + [-334(17)]TJ 0 g 0 G [(.)]TJ 0 g 0 G -/F27 9.9626 Tf -24.907 -19.926 Td [(info)]TJ +/F27 9.9626 Tf -102.289 -19.926 Td [(info)]TJ 0 g 0 G /F8 9.9626 Tf 23.758 0 Td [(Error)-333(co)-28(de.)]TJ 1.149 -11.955 Td [(Scop)-28(e:)]TJ/F27 9.9626 Tf 32.379 0 Td [(lo)-32(cal)]TJ/F8 9.9626 Tf -32.379 -11.955 Td [(T)28(yp)-28(e:)]TJ/F27 9.9626 Tf 29.611 0 Td [(required)]TJ/F8 9.9626 Tf -29.611 -11.955 Td [(In)28(ten)28(t:)]TJ/F27 9.9626 Tf 33.486 0 Td [(out)]TJ/F8 9.9626 Tf 16.549 0 Td [(.)]TJ -50.035 -11.955 Td [(An)-333(in)28(tege)-1(r)-333(v)56(alue;)-334(0)-333(means)-333(no)-334(error)-333(has)-333(b)-28(een)-333(detecte)-1(d)1(.)]TJ 0 g 0 G @@ -12908,7 +12925,7 @@ endobj /Type /ObjStm /N 100 /First 982 -/Length 10626 +/Length 10624 >> stream 1097 0 1099 146 1103 292 1104 351 1100 410 1111 558 1113 676 1110 734 1120 815 1116 972 @@ -12917,10 +12934,10 @@ stream 1139 3043 1144 3123 1147 3241 1148 3356 1149 3399 1150 3469 1146 3538 1138 3596 1143 3655 1155 3751 1151 3908 1152 4052 1153 4199 1157 4345 256 4404 1158 4462 1159 4521 1160 4580 1161 4639 1154 4698 1163 4855 1165 4973 1162 5031 1170 5124 1167 5263 1172 5409 260 5468 1173 5526 1174 5585 1175 5644 -1169 5703 1179 5860 1168 6017 1176 6161 1177 6305 1181 6452 1178 6510 1183 6616 1185 6734 264 6793 -268 6851 1182 6909 1188 7041 1186 7180 1190 7327 1191 7385 1187 7443 1194 7562 1192 7701 1196 7859 -1197 7918 1193 7977 1199 8109 1201 8227 1202 8285 1203 8343 1204 8401 1205 8459 1206 8517 1198 8573 -1210 8653 1208 8792 1212 8937 272 8996 1209 9054 1215 9173 1213 9312 1217 9470 1218 9528 1219 9586 +1169 5703 1179 5860 1168 6017 1176 6161 1177 6304 1181 6450 1178 6508 1183 6614 1185 6732 264 6791 +268 6849 1182 6907 1188 7039 1186 7178 1190 7325 1191 7383 1187 7441 1194 7560 1192 7699 1196 7857 +1197 7916 1193 7975 1199 8107 1201 8225 1202 8283 1203 8341 1204 8399 1205 8457 1206 8515 1198 8571 +1210 8651 1208 8790 1212 8935 272 8994 1209 9052 1215 9171 1213 9310 1217 9468 1218 9526 1219 9584 % 1097 0 obj << /Type /Annot @@ -13239,7 +13256,7 @@ stream /Type /Annot /Subtype /Link /Border[0 0 0]/H/I/C[1 0 0] -/Rect [345.53 199.751 412.588 210.876] +/Rect [345.53 210.686 412.588 221.811] /A << /S /GoTo /D (descdata) >> >> % 1172 0 obj @@ -13252,15 +13269,15 @@ stream >> % 1173 0 obj << -/D [1170 0 R /XYZ 320.941 445.461 null] +/D [1170 0 R /XYZ 320.941 451.038 null] >> % 1174 0 obj << -/D [1170 0 R /XYZ 150.705 411.435 null] +/D [1170 0 R /XYZ 150.705 417.777 null] >> % 1175 0 obj << -/D [1170 0 R /XYZ 150.705 411.435 null] +/D [1170 0 R /XYZ 150.705 417.777 null] >> % 1169 0 obj << @@ -13289,7 +13306,7 @@ stream /Type /Annot /Subtype /Link /Border[0 0 0]/H/I/C[1 0 0] -/Rect [368.549 555.472 444.603 566.597] +/Rect [123.806 543.516 199.86 554.641] /A << /S /GoTo /D (vdata) >> >> % 1177 0 obj @@ -13297,7 +13314,7 @@ stream /Type /Annot /Subtype /Link /Border[0 0 0]/H/I/C[1 0 0] -/Rect [345.558 543.793 357.513 554.641] +/Rect [422.94 543.516 434.896 554.641] /A << /S /GoTo /D (table.17) >> >> % 1181 0 obj @@ -26185,9 +26202,9 @@ stream endstream endobj 1890 0 obj << - /Title (Parallel Sparse BLAS V. 3.3) /Subject (Parallel Sparse Basic Linear Algebra Subroutines) /Keywords (Computer Science Linear Algebra Fluid Dynamics Parallel Linux MPI PSBLAS Iterative Solvers Preconditioners) /Creator (pdfLaTeX) /Producer ($Id: userguide.tex 7725 2014-03-21 08:58:20Z sfilippo $) /Author()/Title()/Subject()/Creator(LaTeX with hyperref package)/Producer(pdfTeX-1.40.11)/Keywords() -/CreationDate (D:20151204163032Z) -/ModDate (D:20151204163032Z) + /Title (Parallel Sparse BLAS V. 3.3) /Subject (Parallel Sparse Basic Linear Algebra Subroutines) /Keywords (Computer Science Linear Algebra Fluid Dynamics Parallel Linux MPI PSBLAS Iterative Solvers Preconditioners) /Creator (pdfLaTeX) /Producer ($Id: userguide.tex 9435 2015-12-04 17:16:14Z sfilippo $) /Author()/Title()/Subject()/Creator(LaTeX with hyperref package)/Producer(pdfTeX-1.40.11)/Keywords() +/CreationDate (D:20151208154516Z) +/ModDate (D:20151208154516Z) /Trapped /False /PTEX.Fullbanner (This is pdfTeX, Version 3.1415926-1.40.11-2.2 (TeX Live 2010) kpathsea version 6.0.0) >> endobj @@ -26236,7 +26253,7 @@ endobj /W [1 3 1] /Root 1889 0 R /Info 1890 0 R -/ID [ ] +/ID [ ] /Length 9460 >> stream @@ -26248,35 +26265,34 @@ stream WXYZ[\]^!_`%cab)bci-a1`5_9^?]  E\  K[ QZWY\XcW!V'U-T3S9R >Q!"EP#$LO%&RN'(YM)*_L+,mK-.mJ/0mI12mH34mG56m!F78m%E9:m,D;<=A$>?#&DB(3CFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcNNNNNNNNNN N N N N NNNE(NN0NNNNNNNNNNNNN N!N"N#N$N%N&N'N(N)N*N+N,N-N.N/N0N1N2N3N4N5N6N7N8N9N:N;N<N=N>N?N@NANENCNNBNFNGNHNINJNKNLNMNNNONPNQNRNSNTNUNVNWNXNYNZN[N\N]N^N_N`NaNbNcND>SQ -\    \"'mSmJm@mTmRmGmHmQmDmE-$"~%!mF%&+#'$ )*mP01v5,W23-./mCmB78:6 9F;<>?@ABCDEXVGHIJKLMNOPQRSTU(YcW5Z\]^_`a+++++++++ + -+ + + ++++++Y++++++++++$+(++++%+&)+-+.+/+5+,+0+4mO+8+<+6+7+9+C+=.+>+A+I+D>+E+N+JM+K+S+O^+P*+X+Tm'+U+^+Y~V+Z+`+a+_+b- ]  t%,+$"!%&(#'*+,-./3)v02641589:;<=A74/>@DBUJC,FGHLEWIKNOPTMsQSVWX\UY[^_`]\ac9  --  &!<! #$%&/-"R|')*+,01234568.oX7:@>9;=.ABCDEFH?GJKMI;LORN֮PTUVW^SuXZ[\]UiUU_UU`abcUUF@U/U U -U UURfU UUUUUUUUUsUUUUU%UUUU&UIU$U U!U"U#U(U)U*U1U'lU+U-U.U/U0U4U2>U30U6U>U<U5)U7U9U:U;U?U@UBU=UAUGUCUDUIULUHUJUKUNUQUM7UOUPUYUR_|USUTUUUVUWUX1U[U^UZjU\U`U_[UaUbUcE -  ʪ ׳2 !'"$%&)*/-(+:.+H0123456789<=@;CK>IA]BCDEFGH3KLOJfMQRVPrSUXY\WZ^_b]`2c222 - -2222 -2m242 2 22 222 w2222  222 )2222 2#2 ,2!2%2)2$ C2&2(52+2/2* P2,2.212520 d92224272;26 q282:2=2B2< 2>2@2A2D2I2C 2E2G2H2K2N2J 2L62T2O W2P2Q2R2S2V2W2X2[2U 2Y2_2\ i2]2` 22a2b2c P_  -4?   -55 7 -K/ -]" -n &# -wt$*' -|(.+ -j,82/ -r063 -4<7 -8:;B= ->@AHC -DFGNI -`JLM9TO -PRSYU VX^Z "[]`a_ 76b B t  -   $  "#:*% &()0+ 3,./61 245:7 D8<A; =?@CHB sDFG;JOI 9KMNUP QSTW\V pXZ[b] ^`amc vm Nmmm m ?mm<m m m mmm - Qommmmmmm mmmmm @mm"m Hm m&m# am$m(m)m*m2m0m' m+m-m.m/=m3m4m6m1 hm5m9m7 m8m<m: ٰm;mLm= <m>m?mAmImKmVmM mNmUmWmXmYmZm[m\m]m^m_m`mambmcw 8@ { ިGe D -   /I nWDt5±>?@ABC/ bcU  -    !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abc]]]]]eb +\    \"'mSmJm@mTmRmGmHmQmDmE-$"~%!mF%&+#'$ )*mP01v5,W23-./mCmB78:6 9F;<>?@ABCDEXVGHIJKLMNOPQRSTU(YcW5Z\]^_`a+++++H++++ + ++ + + ++++++Y++++++++++$+(++++%+&)+-+.+/+5+,+0+4mO+8+<+6r+7+9+C+=0+>+A+I+D@{+E+N+JO++K+S+O`8+P*+X+Tn+U+^+Y+Z+`+a+_+b   %+$"!%&(# t'*+,-./3)02643 589:;<=A75>@DBVC,FGHLEYIKNOPTMuQSVWX\UtY[^_`]ac=  +-  3(!>I! #$%&/-"T')*+,01234568.p7:@>9o;=.ABCDEFH?.GJKMILORNJPTUVW^SXZ[\]UUU_UU`abcUUGU/U U +U UUTU UUUUU|UUUUu`UUUUU%UUUU&UU$U U!U"U#U(U)U*U1U'U+U-U.U/U0U4U2U30U6U>U<U5U7U9U:U;U?U@UBU=|UAUGUC UDUIULUHUJUKUNUQUM9UOUPUYURazUSUTUUUVUWUX1U[U^UZlU\U`U_YUaUbUcA +  ̦ ٯ2 !'"$%&)*/-(+:.-D0123456789<=@;EG>IA_{BCDEFGH3KLOJhMQRVPtSUXY\WZ^_b]`2c222 + 2222 +2i242 2 22 222 s2222 222 +2222 2#2 .2!2%2)2$ E2&2(52+2/2* R2,2.212520 f52224272;26 s282:2=2B2< 2>2@2A2D2I2C 2E2G2H2K2N2J 2L62T2O S2P2Q2R2S2V2W2X2[2U 2Y2_2\ e2]2` .2a2b2c R[  +6;   +71 7 +M+ +_" +p &# +yp$*' +x(.+ +f,82/ +n063 +4<7 +8:;B= +>@AHC +DFGNI +\JLM9TO +PRSYU VX^Z $[]`a_ 92b > v  +   $  "#:*% {&()0+ /,./61 245:7 @8<A; =?@CHB oDFG;JOI 5KMNUP QSTW\V lXZ[b] ^`amc rm Jmmm m A mm<m m m mmm + Skmmmmmmm ommmm <mm"m Dm m&m# ]m$m(m)m*m2m0m' m+m-m.m/=m3m4m6m1 dm5m9m7 m8m<m: ۬m;mLm= 8m>m?mAmImKmVmM mNmUmWmXmYmZm[m\m]m^m_m`mambmcs :< w {Ig @ +  1E pSFv1ĭ>?@ABC1bcW  +    !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abc]]]]]a^ endstream endobj startxref -1155938 +1156446 %%EOF diff --git a/docs/src/commrout.tex b/docs/src/commrout.tex index 1ae441c6..07e1ea55 100644 --- a/docs/src/commrout.tex +++ b/docs/src/commrout.tex @@ -516,7 +516,8 @@ Specified as: a structured data of type \descdata. Scope: {\bf global} \\ Type: {\bf optional}\\ Intent: {\bf in}.\\ -Specified as: an integer variable $-1\le root\le np-1$, default $-1$. +Specified as: an integer variable $-1\le root\le np-1$, default +\verb|psb_root_|, i.e. process 0. \item[mold] The desired dynamic type for the internal vector storage.\\ Scope: {\bf local}.\\ Type: {\bf optional}.\\ @@ -553,7 +554,7 @@ $glob\_x$. \\ Scope: {\bf local} \\ Type: {\bf required}\\ Intent: {\bf out}.\\ -Specified as: a rank one or two array or an object of type \vdata\ containing numbers of the type +Specified as: a rank one or two ALLOCATABLE array or an object of type \vdata\ containing numbers of the type indicated in Table~\ref{tab:scatter}. \item[info] Error code.\\ Scope: {\bf local} \\ diff --git a/docs/src/datastruct.tex b/docs/src/datastruct.tex index 65f108e3..fca87e2e 100644 --- a/docs/src/datastruct.tex +++ b/docs/src/datastruct.tex @@ -368,6 +368,7 @@ processes. \label{sec:cd_constants} \begin{description} \item[psb\_none\_] Generic no-op; +\item[psb\_root\_] Default root process for broadcast and scatter operations; \item[psb\_nohalo\_] Do not fetch halo elements; \item[psb\_halo\_] Fetch halo elements from neighbouring processes; \item[psb\_sum\_] Sum overlapped elements