Correction to the psb_geinv implementation for out flag handling

This commit is contained in:
Cirdans-Home
2020-02-25 14:09:25 +01:00
parent 92fddf917b
commit 15f89400c3
4 changed files with 60 additions and 0 deletions
+15
View File
@@ -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
+15
View File
@@ -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
+15
View File
@@ -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
+15
View File
@@ -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