Fixed misalignment problems.

psblas-3.0-maint
Salvatore Filippone 13 years ago
commit 52be8bc7a5

@ -51,7 +51,7 @@ subroutine psb_igatherm(globx, locx, desc_a, info, iroot)
implicit none
integer(psb_ipk_), intent(in) :: locx(:,:)
integer(psb_ipk_), intent(out) :: globx(:,:)
integer(psb_ipk_), intent(out), allocatable :: globx(:,:)
type(psb_desc_type), intent(in) :: desc_a
integer(psb_ipk_), intent(out) :: info
integer(psb_ipk_), intent(in), optional :: iroot
@ -100,16 +100,13 @@ subroutine psb_igatherm(globx, locx, desc_a, info, iroot)
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
lda_globx = m
lda_locx = size(locx, 1)
lock = size(locx,2)
maxk = lock
k = maxk
call psb_bcast(ictxt,k,root=iiroot)
@ -130,13 +127,20 @@ subroutine psb_igatherm(globx, locx, desc_a, info, iroot)
call psb_errpush(info,name)
goto 9999
end if
call psb_realloc(m,k,globx,info)
if (info /= psb_success_) then
info=psb_err_alloc_dealloc_
call psb_errpush(info,name)
goto 9999
end if
globx(:,:)=0
globx(:,:)=izero
do j=1,k
do i=1,desc_a%get_local_rows()
call psb_loc_to_glob(i,idx,desc_a,info)
globx(idx,jglobx+j-1) = locx(i,jlx+j-1)
globx(idx,j) = locx(i,jlx+j-1)
end do
end do
@ -146,12 +150,12 @@ subroutine psb_igatherm(globx, locx, desc_a, info, iroot)
if (me /= desc_a%ovrlap_elem(i,3)) then
idx = desc_a%ovrlap_elem(i,1)
call psb_loc_to_glob(idx,desc_a,info)
globx(idx,jglobx+j-1) = izero
globx(idx,j) = izero
end if
end do
end do
call psb_sum(ictxt,globx(1:m,jglobx:jglobx+k-1),root=root)
call psb_sum(ictxt,globx(1:m,1:k),root=root)
call psb_erractionrestore(err_act)
return
@ -222,7 +226,7 @@ subroutine psb_igatherv(globx, locx, desc_a, info, iroot)
implicit none
integer(psb_ipk_), intent(in) :: locx(:)
integer(psb_ipk_), intent(out) :: globx(:)
integer(psb_ipk_), intent(out), allocatable :: globx(:)
type(psb_desc_type), intent(in) :: desc_a
integer(psb_ipk_), intent(out) :: info
integer(psb_ipk_), intent(in), optional :: iroot
@ -294,7 +298,7 @@ subroutine psb_igatherv(globx, locx, desc_a, info, iroot)
goto 9999
end if
globx(:)=0
globx(:)=izero
do i=1,desc_a%get_local_rows()
call psb_loc_to_glob(i,idx,desc_a,info)

@ -62,7 +62,7 @@ subroutine psb_ihalom(x,desc_a,info,alpha,jx,ik,work,tran,mode,data)
integer(psb_ipk_), intent(inout), target :: x(:,:)
type(psb_desc_type), intent(in) :: desc_a
integer(psb_ipk_), intent(out) :: info
real(psb_dpk_), intent(in), optional :: alpha
integer(psb_ipk_), intent(in), optional :: alpha
integer(psb_ipk_), intent(inout), optional, target :: work(:)
integer(psb_ipk_), intent(in), optional :: mode,jx,ik,data
character, intent(in), optional :: tran
@ -287,7 +287,7 @@ subroutine psb_ihalov(x,desc_a,info,alpha,work,tran,mode,data)
integer(psb_ipk_), intent(inout) :: x(:)
type(psb_desc_type), intent(in) :: desc_a
integer(psb_ipk_), intent(out) :: info
real(psb_dpk_), intent(in), optional :: alpha
integer(psb_ipk_), intent(in), optional :: alpha
integer(psb_ipk_), intent(inout), optional, target :: work(:)
integer(psb_ipk_), intent(in), optional :: mode,data
character, intent(in), optional :: tran

@ -33,7 +33,7 @@ UTIL_MODS = psb_string_mod.o psb_desc_const_mod.o psb_indx_map_mod.o\
MODULES=$(BASIC_MODS) $(UTIL_MODS)
OBJS = error.o psb_base_mod.o $(EXTRA_COBJS) cutil.o
OBJS = error.o psb_base_mod.o $(EXTRA_COBJS) cutil.o
LIBDIR=..
CINCLUDES=-I.
FINCLUDES=$(FMFLAG)$(LIBDIR) $(FMFLAG). $(FIFLAG).

Loading…
Cancel
Save