[UPDATE] Removed work/aux buffer from vector routines that use psb_x_vect_type encapsulation for data exchange

This commit is contained in:
Stack-1
2026-03-19 17:36:44 +01:00
parent dc61cbb0a2
commit 461a6a325f
143 changed files with 3051 additions and 3129 deletions
+5 -10
View File
@@ -121,13 +121,13 @@ Subroutine psb_dcgstabl_vect(a,prec,b,x,eps,desc_a,info,&
integer(psb_ipk_), Optional, Intent(out) :: iter
Real(psb_dpk_), Optional, Intent(out) :: err
! = local data
real(psb_dpk_), allocatable, target :: aux(:), gamma(:),&
real(psb_dpk_), allocatable, target :: gamma(:),&
& gamma1(:), gamma2(:), taum(:,:), sigma(:)
type(psb_d_vect_type), allocatable, target :: wwrk(:),uh(:), rh(:)
type(psb_d_vect_type), Pointer :: ww, q, r, rt0, p, v, &
& s, t, z, f
integer(psb_ipk_) :: itmax_, naux, it, itrace_,&
integer(psb_ipk_) :: itmax_, it, itrace_,&
& n_row, n_col, nl, err_act
integer(psb_lpk_) :: mglob
Logical, Parameter :: exchange=.True., noexchange=.False.
@@ -213,10 +213,6 @@ Subroutine psb_dcgstabl_vect(a,prec,b,x,eps,desc_a,info,&
goto 9999
end if
naux=4*n_col
allocate(aux(naux),gamma(0:nl),gamma1(nl),&
&gamma2(nl),taum(nl,nl),sigma(nl), stat=info)
if (info /= psb_success_) then
info=psb_err_alloc_dealloc_
call psb_errpush(info,name)
@@ -263,7 +259,7 @@ Subroutine psb_dcgstabl_vect(a,prec,b,x,eps,desc_a,info,&
it = 0
call psb_geaxpby(done,b,dzero,r,desc_a,info)
if (info == psb_success_) call psb_spmm(-done,a,x,done,r,desc_a,info,work=aux)
if (info == psb_success_) call psb_spmm(-done,a,x,done,r,desc_a,info)
if (info == psb_success_) call prec%apply(r,desc_a,info)
@@ -318,7 +314,7 @@ Subroutine psb_dcgstabl_vect(a,prec,b,x,eps,desc_a,info,&
! = call psb_geaxpby(done,rh(:,0:j),-beta,uh(:,0:j),desc_a,info)
call psb_geaxpby(done,rh(k),-beta,uh(k),desc_a,info)
end do
call psb_spmm(done,a,uh(j),dzero,uh(j+1),desc_a,info,work=aux)
call psb_spmm(done,a,uh(j),dzero,uh(j+1),desc_a,info)
call prec%apply(uh(j+1),desc_a,info)
@@ -340,7 +336,7 @@ Subroutine psb_dcgstabl_vect(a,prec,b,x,eps,desc_a,info,&
call psb_geaxpby(-alpha,uh(k+1),done,rh(k),desc_a,info)
end do
call psb_geaxpby(alpha,uh(0),done,x,desc_a,info)
call psb_spmm(done,a,rh(j),dzero,rh(j+1),desc_a,info,work=aux)
call psb_spmm(done,a,rh(j),dzero,rh(j+1),desc_a,info)
call prec%apply(rh(j+1),desc_a,info)
@@ -403,7 +399,6 @@ Subroutine psb_dcgstabl_vect(a,prec,b,x,eps,desc_a,info,&
if (info == psb_success_) call psb_gefree(uh,desc_a,info)
if (info == psb_success_) call psb_gefree(rh,desc_a,info)
if (info == psb_success_) call psb_gefree(wwrk,desc_a,info)
if (info == psb_success_) deallocate(aux,stat=info)
if (info /= psb_success_) then
call psb_errpush(info,name)
goto 9999