Skip to content

Commit

Permalink
240123.195815.HKT further fix failure of assertion in UPDATEH and UPD…
Browse files Browse the repository at this point in the history
…ATEH_RSC regarding the columns of H
  • Loading branch information
zaikunzhang committed Jan 23, 2024
1 parent d3cf2a6 commit f83aed0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions fortran/bobyqa/rescue.f90
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ module rescue_mod
!
! Started: February 2022
!
! Last Modified: Tuesday, January 23, 2024 PM07:51:47
! Last Modified: Tuesday, January 23, 2024 PM07:57:03
!--------------------------------------------------------------------------------------------------!

implicit none
Expand Down Expand Up @@ -770,7 +770,7 @@ subroutine updateh_rsc(knew, beta, vlag_in, bmat, zmat, info)
do j = 1, npt
hcol(1:npt) = matprod(zmat, zmat(j, :))
hcol(npt + 1:npt + n) = bmat(:, j)
call assert(sum(abs(hcol)) > 0, 'Column '//num2str(j)//' of H is nonzero', srname)
call assert(RP == kind(0.0) .or. sum(abs(hcol)) > 0, 'Column '//num2str(j)//' of H is nonzero', srname)
end do

! The following is too expensive to check.
Expand Down
6 changes: 3 additions & 3 deletions fortran/bobyqa/update.f90
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ module update_bobyqa_mod
!
! Started: February 2022
!
! Last Modified: Wednesday, October 18, 2023 PM10:15:42
! Last Modified: Tuesday, January 23, 2024 PM07:56:39
!--------------------------------------------------------------------------------------------------!

implicit none
Expand Down Expand Up @@ -90,7 +90,7 @@ subroutine updateh(knew, kopt, d, xpt, bmat, zmat, info)
do j = 1, npt
hcol(1:npt) = matprod(zmat, zmat(j, :))
hcol(npt + 1:npt + n) = bmat(:, j)
call assert(sum(abs(hcol)) > 0, 'Column '//num2str(j)//' of H is nonzero', srname)
call assert(RP == kind(0.0) .or. sum(abs(hcol)) > 0, 'Column '//num2str(j)//' of H is nonzero', srname)
end do

call assert(all(is_finite(xpt)), 'XPT is finite', srname)
Expand Down Expand Up @@ -182,7 +182,7 @@ subroutine updateh(knew, kopt, d, xpt, bmat, zmat, info)
do j = 1, npt
hcol(1:npt) = matprod(zmat, zmat(j, :))
hcol(npt + 1:npt + n) = bmat(:, j)
call assert(sum(abs(hcol)) > 0, 'Column '//num2str(j)//' of H is nonzero', srname)
call assert(RP == kind(0.0) .or. sum(abs(hcol)) > 0, 'Column '//num2str(j)//' of H is nonzero', srname)
end do

! The following is too expensive to check.
Expand Down

0 comments on commit f83aed0

Please sign in to comment.