Skip to content

Commit

Permalink
240405.095203.HKT revise the thresholds for the closeness between x a…
Browse files Browse the repository at this point in the history
…nd xpt in uobyqb.f90
  • Loading branch information
zaikunzhang committed Apr 5, 2024
1 parent f3fd9c6 commit ad74f64
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 10 deletions.
2 changes: 1 addition & 1 deletion .development
7 changes: 4 additions & 3 deletions fortran/common/debug.F90
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ module debug_mod
!
! Started: July 2020.
!
! Last Modified: Saturday, September 16, 2023 AM09:14:37
! Last Modified: Thursday, April 04, 2024 PM11:00:27
!--------------------------------------------------------------------------------------------------!
implicit none
private
Expand Down Expand Up @@ -150,8 +150,9 @@ subroutine backtr()
use, non_intrinsic :: ifcore, only : tracebackqq
implicit none
call tracebackqq(user_exit_code=-1)
! According to "Intel Fortran Compiler 19.1 Developer Guide and Reference", item "TRACEBACKQQ":
! By specifying a user exit code of -1, control returns to the calling program. Specifying a user
! According to
! https://www.intel.com/content/www/us/en/docs/fortran-compiler/developer-guide-reference/2024-1/tracebackqq.html,
! by specifying a user exit code of -1, control returns to the calling program. Specifying a user
! exit code with a positive value requests that specified value be returned to the operating system.
! The default value is 0, which causes the application to abort execution.
#endif
Expand Down
6 changes: 3 additions & 3 deletions fortran/uobyqa/uobyqb.f90
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ module uobyqb_mod
!
! Started: February 2022
!
! Last Modified: Thursday, April 04, 2024 PM10:25:46
! Last Modified: Friday, April 05, 2024 AM09:50:59
!--------------------------------------------------------------------------------------------------!

implicit none
Expand Down Expand Up @@ -309,7 +309,7 @@ subroutine uobyqb(calfun, iprint, maxfun, eta1, eta2, ftarget, gamma1, gamma2, r
distsq = [(sum((x - (xbase + xpt(:, k)))**2, dim=1), k=1, npt)] ! Implied do-loop
!!MATLAB: distsq = sum((x - (xbase + xpt))**2, 1) % Implicit expansion
k = int(minloc(distsq, dim=1), kind(k))
if (distsq(k) <= (1.0E-3 * rhoend)**2) then
if (distsq(k) <= (1.0E-4 * rhoend)**2) then
f = fval(k)
else
! Evaluate the objective function at X, taking care of possible Inf/NaN values.
Expand Down Expand Up @@ -473,7 +473,7 @@ subroutine uobyqb(calfun, iprint, maxfun, eta1, eta2, ftarget, gamma1, gamma2, r
distsq = [(sum((x - (xbase + xpt(:, k)))**2, dim=1), k=1, npt)] ! Implied do-loop
!!MATLAB: distsq = sum((x - (xbase + xpt))**2, 1) % Implicit expansion
k = int(minloc(distsq, dim=1), kind(k))
if (distsq(k) <= (1.0E-3 * rhoend)**2) then
if (distsq(k) <= (1.0E-4 * rhoend)**2) then
f = fval(k)
else
! Evaluate the objective function at X, taking care of possible Inf/NaN values.
Expand Down
7 changes: 4 additions & 3 deletions matlab/mex_gateways/debug.F90
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ module debug_mod
!
! Started in July 2020
!
! Last Modified: Monday, January 08, 2024 AM04:12:18
! Last Modified: Thursday, April 04, 2024 PM10:59:38
!--------------------------------------------------------------------------------------------------!

implicit none
Expand Down Expand Up @@ -155,8 +155,9 @@ subroutine backtr
use, non_intrinsic :: ifcore, only : tracebackqq
implicit none
call tracebackqq(user_exit_code=-1)
! According to "Intel Fortran Compiler 19.1 Developer Guide and Reference", item "TRACEBACKQQ":
! By specifying a user exit code of -1, control returns to the calling program. Specifying a user
! According to
! https://www.intel.com/content/www/us/en/docs/fortran-compiler/developer-guide-reference/2024-1/tracebackqq.html,
! by specifying a user exit code of -1, control returns to the calling program. Specifying a user
! exit code with a positive value requests that specified value be returned to the operating system.
! The default value is 0, which causes the application to abort execution.
#endif
Expand Down

0 comments on commit ad74f64

Please sign in to comment.