From 5d07ed92aa0a3c6adc71b5a21ae472d1fa40e6a6 Mon Sep 17 00:00:00 2001 From: Stack-1 Date: Mon, 15 Jun 2026 13:29:12 +0200 Subject: [PATCH] [UPDATE] Restored work argument for non _vect routines in preconditioners --- prec/impl/psb_c_prec_type_impl.f90 | 5 +++-- prec/impl/psb_d_prec_type_impl.f90 | 6 +++--- prec/impl/psb_s_prec_type_impl.f90 | 5 ++--- prec/impl/psb_z_prec_type_impl.f90 | 5 +++-- prec/psb_c_prec_type.f90 | 3 ++- prec/psb_d_prec_type.f90 | 2 +- prec/psb_s_prec_type.f90 | 2 +- prec/psb_z_prec_type.f90 | 3 ++- 8 files changed, 17 insertions(+), 14 deletions(-) diff --git a/prec/impl/psb_c_prec_type_impl.f90 b/prec/impl/psb_c_prec_type_impl.f90 index 436b56ee3..768a16677 100644 --- a/prec/impl/psb_c_prec_type_impl.f90 +++ b/prec/impl/psb_c_prec_type_impl.f90 @@ -158,7 +158,7 @@ subroutine psb_c_apply1_vect(prec,x,desc_data,info,trans) end subroutine psb_c_apply1_vect -subroutine psb_c_apply2v(prec,x,y,desc_data,info,trans) +subroutine psb_c_apply2v(prec,x,y,desc_data,info,trans,work) use psb_base_mod use psb_c_prec_type, psb_protect_name => psb_c_apply2v implicit none @@ -168,6 +168,7 @@ subroutine psb_c_apply2v(prec,x,y,desc_data,info,trans) complex(psb_spk_),intent(inout) :: y(:) integer(psb_ipk_), intent(out) :: info character(len=1), optional :: trans + complex(psb_spk_),intent(inout), optional, target :: work(:) character :: trans_ type(psb_ctxt_type) :: ctxt @@ -193,7 +194,7 @@ subroutine psb_c_apply2v(prec,x,y,desc_data,info,trans) call psb_errpush(info,name,a_err="preconditioner") goto 9999 end if - call prec%prec%apply(cone,x,czero,y,desc_data,info,trans_) + call prec%prec%apply(cone,x,czero,y,desc_data,info,trans_,work) call psb_erractionrestore(err_act) return diff --git a/prec/impl/psb_d_prec_type_impl.f90 b/prec/impl/psb_d_prec_type_impl.f90 index 1227a0eda..ebec98ec6 100644 --- a/prec/impl/psb_d_prec_type_impl.f90 +++ b/prec/impl/psb_d_prec_type_impl.f90 @@ -158,7 +158,7 @@ subroutine psb_d_apply1_vect(prec,x,desc_data,info,trans) end subroutine psb_d_apply1_vect -subroutine psb_d_apply2v(prec,x,y,desc_data,info,trans, work) +subroutine psb_d_apply2v(prec,x,y,desc_data,info,trans,work) use psb_base_mod use psb_d_prec_type, psb_protect_name => psb_d_apply2v implicit none @@ -167,8 +167,8 @@ subroutine psb_d_apply2v(prec,x,y,desc_data,info,trans, work) real(psb_dpk_),intent(inout) :: x(:) real(psb_dpk_),intent(inout) :: y(:) integer(psb_ipk_), intent(out) :: info - real(psb_dpk_),intent(inout), optional, target :: work(:) character(len=1), optional :: trans + real(psb_dpk_),intent(inout), optional, target :: work(:) character :: trans_ type(psb_ctxt_type) :: ctxt @@ -194,7 +194,7 @@ subroutine psb_d_apply2v(prec,x,y,desc_data,info,trans, work) call psb_errpush(info,name,a_err="preconditioner") goto 9999 end if - call prec%prec%apply(done,x,dzero,y,desc_data,info,trans_, work) + call prec%prec%apply(done,x,dzero,y,desc_data,info,trans_,work) call psb_erractionrestore(err_act) return diff --git a/prec/impl/psb_s_prec_type_impl.f90 b/prec/impl/psb_s_prec_type_impl.f90 index 606ac0e6e..7a902191c 100644 --- a/prec/impl/psb_s_prec_type_impl.f90 +++ b/prec/impl/psb_s_prec_type_impl.f90 @@ -158,7 +158,7 @@ subroutine psb_s_apply1_vect(prec,x,desc_data,info,trans) end subroutine psb_s_apply1_vect -subroutine psb_s_apply2v(prec,x,y,desc_data,info,trans, work) +subroutine psb_s_apply2v(prec,x,y,desc_data,info,trans,work) use psb_base_mod use psb_s_prec_type, psb_protect_name => psb_s_apply2v implicit none @@ -170,7 +170,6 @@ subroutine psb_s_apply2v(prec,x,y,desc_data,info,trans, work) character(len=1), optional :: trans real(psb_spk_),intent(inout), optional, target :: work(:) - character :: trans_ type(psb_ctxt_type) :: ctxt integer(psb_ipk_) :: np,me @@ -195,7 +194,7 @@ subroutine psb_s_apply2v(prec,x,y,desc_data,info,trans, work) call psb_errpush(info,name,a_err="preconditioner") goto 9999 end if - call prec%prec%apply(sone,x,szero,y,desc_data,info,trans_, work) + call prec%prec%apply(sone,x,szero,y,desc_data,info,trans_,work) call psb_erractionrestore(err_act) return diff --git a/prec/impl/psb_z_prec_type_impl.f90 b/prec/impl/psb_z_prec_type_impl.f90 index abbd2ace4..9ec1f13fa 100644 --- a/prec/impl/psb_z_prec_type_impl.f90 +++ b/prec/impl/psb_z_prec_type_impl.f90 @@ -158,7 +158,7 @@ subroutine psb_z_apply1_vect(prec,x,desc_data,info,trans) end subroutine psb_z_apply1_vect -subroutine psb_z_apply2v(prec,x,y,desc_data,info,trans) +subroutine psb_z_apply2v(prec,x,y,desc_data,info,trans,work) use psb_base_mod use psb_z_prec_type, psb_protect_name => psb_z_apply2v implicit none @@ -168,6 +168,7 @@ subroutine psb_z_apply2v(prec,x,y,desc_data,info,trans) complex(psb_dpk_),intent(inout) :: y(:) integer(psb_ipk_), intent(out) :: info character(len=1), optional :: trans + complex(psb_dpk_),intent(inout), optional, target :: work(:) character :: trans_ type(psb_ctxt_type) :: ctxt @@ -193,7 +194,7 @@ subroutine psb_z_apply2v(prec,x,y,desc_data,info,trans) call psb_errpush(info,name,a_err="preconditioner") goto 9999 end if - call prec%prec%apply(zone,x,zzero,y,desc_data,info,trans_) + call prec%prec%apply(zone,x,zzero,y,desc_data,info,trans_,work) call psb_erractionrestore(err_act) return diff --git a/prec/psb_c_prec_type.f90 b/prec/psb_c_prec_type.f90 index 1097ea67f..ea0dc6db4 100644 --- a/prec/psb_c_prec_type.f90 +++ b/prec/psb_c_prec_type.f90 @@ -131,7 +131,7 @@ module psb_c_prec_type end interface interface - subroutine psb_c_apply2v(prec,x,y,desc_data,info,trans) + subroutine psb_c_apply2v(prec,x,y,desc_data,info,trans,work) import :: psb_ipk_, psb_desc_type, psb_cprec_type, psb_c_vect_type, psb_spk_ type(psb_desc_type),intent(in) :: desc_data class(psb_cprec_type), intent(inout) :: prec @@ -139,6 +139,7 @@ module psb_c_prec_type complex(psb_spk_),intent(inout) :: y(:) integer(psb_ipk_), intent(out) :: info character(len=1), optional :: trans + complex(psb_spk_),intent(inout), optional, target :: work(:) end subroutine psb_c_apply2v end interface diff --git a/prec/psb_d_prec_type.f90 b/prec/psb_d_prec_type.f90 index d5319ff16..e4fb2f175 100644 --- a/prec/psb_d_prec_type.f90 +++ b/prec/psb_d_prec_type.f90 @@ -131,7 +131,7 @@ module psb_d_prec_type end interface interface - subroutine psb_d_apply2v(prec,x,y,desc_data,info,trans, work) + subroutine psb_d_apply2v(prec,x,y,desc_data,info,trans,work) import :: psb_ipk_, psb_desc_type, psb_dprec_type, psb_d_vect_type, psb_dpk_ type(psb_desc_type),intent(in) :: desc_data class(psb_dprec_type), intent(inout) :: prec diff --git a/prec/psb_s_prec_type.f90 b/prec/psb_s_prec_type.f90 index b09852e68..25339cf27 100644 --- a/prec/psb_s_prec_type.f90 +++ b/prec/psb_s_prec_type.f90 @@ -131,7 +131,7 @@ module psb_s_prec_type end interface interface - subroutine psb_s_apply2v(prec,x,y,desc_data,info,trans, work) + subroutine psb_s_apply2v(prec,x,y,desc_data,info,trans,work) import :: psb_ipk_, psb_desc_type, psb_sprec_type, psb_s_vect_type, psb_spk_ type(psb_desc_type),intent(in) :: desc_data class(psb_sprec_type), intent(inout) :: prec diff --git a/prec/psb_z_prec_type.f90 b/prec/psb_z_prec_type.f90 index 1f17896d3..afb870245 100644 --- a/prec/psb_z_prec_type.f90 +++ b/prec/psb_z_prec_type.f90 @@ -131,7 +131,7 @@ module psb_z_prec_type end interface interface - subroutine psb_z_apply2v(prec,x,y,desc_data,info,trans) + subroutine psb_z_apply2v(prec,x,y,desc_data,info,trans,work) import :: psb_ipk_, psb_desc_type, psb_zprec_type, psb_z_vect_type, psb_dpk_ type(psb_desc_type),intent(in) :: desc_data class(psb_zprec_type), intent(inout) :: prec @@ -139,6 +139,7 @@ module psb_z_prec_type complex(psb_dpk_),intent(inout) :: y(:) integer(psb_ipk_), intent(out) :: info character(len=1), optional :: trans + complex(psb_dpk_),intent(inout), optional, target :: work(:) end subroutine psb_z_apply2v end interface