diff --git a/base/psblas/psb_cinv_vect.f90 b/base/psblas/psb_cinv_vect.f90 index f7285e0c..27f04681 100644 --- a/base/psblas/psb_cinv_vect.f90 +++ b/base/psblas/psb_cinv_vect.f90 @@ -112,6 +112,7 @@ subroutine psb_cinv_vect_check(x,y,desc_a,info,flag) type(psb_desc_type), intent (in) :: desc_a integer(psb_ipk_), intent(out) :: info logical, intent(in) :: flag + logical :: check ! locals integer(psb_ipk_) :: ictxt, np, me,& @@ -169,6 +170,20 @@ subroutine psb_cinv_vect_check(x,y,desc_a,info,flag) call y%inv(x,info,flag) end if + if (info == 1_psb_ipk_) then + check = .FALSE. + else + check = .TRUE. + end if + + call psb_lallreduceand(ictxt,check) + + if (check) then + info = 1_psb_ipk_ + else + info = 0_psb_ipk_ + end if + call psb_erractionrestore(err_act) return diff --git a/base/psblas/psb_dinv_vect.f90 b/base/psblas/psb_dinv_vect.f90 index 787f4cab..89b25e38 100644 --- a/base/psblas/psb_dinv_vect.f90 +++ b/base/psblas/psb_dinv_vect.f90 @@ -112,6 +112,7 @@ subroutine psb_dinv_vect_check(x,y,desc_a,info,flag) type(psb_desc_type), intent (in) :: desc_a integer(psb_ipk_), intent(out) :: info logical, intent(in) :: flag + logical :: check ! locals integer(psb_ipk_) :: ictxt, np, me,& @@ -169,6 +170,20 @@ subroutine psb_dinv_vect_check(x,y,desc_a,info,flag) call y%inv(x,info,flag) end if + if (info == 1_psb_ipk_) then + check = .FALSE. + else + check = .TRUE. + end if + + call psb_lallreduceand(ictxt,check) + + if (check) then + info = 1_psb_ipk_ + else + info = 0_psb_ipk_ + end if + call psb_erractionrestore(err_act) return diff --git a/base/psblas/psb_sinv_vect.f90 b/base/psblas/psb_sinv_vect.f90 index 0be53a70..5666a821 100644 --- a/base/psblas/psb_sinv_vect.f90 +++ b/base/psblas/psb_sinv_vect.f90 @@ -112,6 +112,7 @@ subroutine psb_sinv_vect_check(x,y,desc_a,info,flag) type(psb_desc_type), intent (in) :: desc_a integer(psb_ipk_), intent(out) :: info logical, intent(in) :: flag + logical :: check ! locals integer(psb_ipk_) :: ictxt, np, me,& @@ -169,6 +170,20 @@ subroutine psb_sinv_vect_check(x,y,desc_a,info,flag) call y%inv(x,info,flag) end if + if (info == 1_psb_ipk_) then + check = .FALSE. + else + check = .TRUE. + end if + + call psb_lallreduceand(ictxt,check) + + if (check) then + info = 1_psb_ipk_ + else + info = 0_psb_ipk_ + end if + call psb_erractionrestore(err_act) return diff --git a/base/psblas/psb_zinv_vect.f90 b/base/psblas/psb_zinv_vect.f90 index 4e61379c..bb37ee69 100644 --- a/base/psblas/psb_zinv_vect.f90 +++ b/base/psblas/psb_zinv_vect.f90 @@ -112,6 +112,7 @@ subroutine psb_zinv_vect_check(x,y,desc_a,info,flag) type(psb_desc_type), intent (in) :: desc_a integer(psb_ipk_), intent(out) :: info logical, intent(in) :: flag + logical :: check ! locals integer(psb_ipk_) :: ictxt, np, me,& @@ -169,6 +170,20 @@ subroutine psb_zinv_vect_check(x,y,desc_a,info,flag) call y%inv(x,info,flag) end if + if (info == 1_psb_ipk_) then + check = .FALSE. + else + check = .TRUE. + end if + + call psb_lallreduceand(ictxt,check) + + if (check) then + info = 1_psb_ipk_ + else + info = 0_psb_ipk_ + end if + call psb_erractionrestore(err_act) return