[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
+8 -12
View File
@@ -110,11 +110,10 @@ Subroutine psb_dcgstab_vect(a,prec,b,x,eps,desc_a,info,itmax,iter,err,itrace,ist
integer(psb_ipk_), Optional, Intent(out) :: iter
Real(psb_dpk_), Optional, Intent(out) :: err
! = Local data
real(psb_dpk_), allocatable, target :: aux(:),wwrk(:,:)
real(psb_dpk_), allocatable, target :: wwrk(:,:)
type(psb_d_vect_type) :: q, r, p, v, s, t, z, f
integer(psb_ipk_) :: itmax_, naux, it,itrace_,&
& n_row, n_col
integer(psb_ipk_) :: itmax_, it, itrace_, n_row, n_col
integer(psb_lpk_) :: mglob
integer(psb_ipk_) :: debug_level, debug_unit
Logical, Parameter :: exchange=.True., noexchange=.False., debug1 = .False.
@@ -179,8 +178,7 @@ Subroutine psb_dcgstab_vect(a,prec,b,x,eps,desc_a,info,itmax,iter,err,itrace,ist
call psb_errpush(info,name,a_err='psb_chkvect on B')
goto 9999
end if
naux=6*n_col
if (info == psb_success_) allocate(aux(naux),stat=info)
if (info /= psb_success_) then
info=psb_err_alloc_dealloc_
call psb_errpush(info,name)
@@ -230,7 +228,7 @@ Subroutine psb_dcgstab_vect(a,prec,b,x,eps,desc_a,info,itmax,iter,err,itrace,ist
it = 0
call psb_geaxpby(done,b,dzero,r,desc_a,info)
call psb_spmm(-done,a,x,done,r,desc_a,info,work=aux)
call psb_spmm(-done,a,x,done,r,desc_a,info)
call psb_geaxpby(done,r,dzero,q,desc_a,info)
! Perhaps we already satisfy the convergence criterion...
@@ -279,10 +277,9 @@ Subroutine psb_dcgstab_vect(a,prec,b,x,eps,desc_a,info,itmax,iter,err,itrace,ist
call psb_geaxpby(done,r,beta,p,desc_a,info)
End If
call prec%apply(p,f,desc_a,info,work=aux)
call prec%apply(p,f,desc_a,info)
call psb_spmm(done,a,f,dzero,v,desc_a,info,&
& work=aux)
call psb_spmm(done,a,f,dzero,v,desc_a,info)
sigma = psb_gedot(q,v,desc_a,info)
@@ -316,8 +313,8 @@ Subroutine psb_dcgstab_vect(a,prec,b,x,eps,desc_a,info,itmax,iter,err,itrace,ist
end if
call prec%apply(s,z,desc_a,info,work=aux)
Call psb_spmm(done,a,z,dzero,t,desc_a,info,work=aux)
call prec%apply(s,z,desc_a,info)
Call psb_spmm(done,a,z,dzero,t,desc_a,info)
if(psb_errstatus_fatal()) then
call psb_errpush(psb_err_from_subroutine_,name,a_err='precaply/spmm')
@@ -367,7 +364,6 @@ Subroutine psb_dcgstab_vect(a,prec,b,x,eps,desc_a,info,itmax,iter,err,itrace,ist
call psb_end_conv(methdname,itx,desc_a,stopdat,info,derr,iter)
if (present(err)) err = derr
deallocate(aux,stat=info)
call x%sync()
call psb_gefree(q,desc_a,info)