Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion benchmark/rescue_idz/230406/fortran/common/powalg.f90
Original file line number Diff line number Diff line change
Expand Up @@ -362,7 +362,7 @@ subroutine qrexc_Rdiag(A, Q, Rdiag, i) ! Used in COBYLA
! After this is done for each K = 1, ..., N-1, we obtain the QR factorization of the matrix that
! rearranges columns [I, I+1, ..., N] of A as [I+1, ..., N, I].
! Powell's code, however, is slightly different: before everything, he first exchanged columns K and
! K+1 of Q (as well as rows K and K+1 of R). This makes sure that the entires of the update RDIAG
! K+1 of Q (as well as rows K and K+1 of R). This makes sure that the entries of the updated RDIAG
! are all positive if it is the case for the original RDIAG.
do k = i, n-1_IK
!hypt = hypotenuse(Rdiag(k+1), inprod(Q(:, k), A(:, k+1)))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ SUBROUTINE PRELIM (N,NPT,X,XL,XU,RHOBEG,IPRINT,MAXFUN,XBASE,
C GOPT is usually the gradient of the quadratic model at XOPT+XBASE, but
C it is set by PRELIM to the gradient of the quadratic model at XBASE.
C If XOPT is nonzero, BOBYQB will change it to its usual value later.
C NF is maintaned as the number of calls of CALFUN so far.
C NF is maintained as the number of calls of CALFUN so far.
C KOPT will be such that the least calculated value of F so far is at
C the point XPT(KOPT,.)+XBASE in the space of the variables.
C
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ SUBROUTINE BIGDEN (N,NPT,XOPT,XPT,BMAT,ZMAT,IDZ,NDIM,KOPT,
WVEC(IP,4)=ZERO
120 WVEC(IP,5)=ZERO
C
C Put the coefficents of THETA*Wcheck in PROD.
C Put the coefficients of THETA*Wcheck in PROD.
C
DO 190 JC=1,5
NW=NPT
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -884,7 +884,7 @@
wid = sprintf('%s:InvalidSolver', invoker);
wmsg = sprintf('%s: a solver different from %s is specified; it is ignored.', invoker, invoker);
% Do not display the value of solver in last message, because it
% can be 'unknow_solver'.
% can be 'unknown_solver'.
warning(wid, '%s', wmsg);
warnings = [warnings, wmsg];
end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,7 @@ subroutine qrexc_Rdiag(A, Q, Rdiag, i) ! Used in COBYLA
! After this is done for each K = 1, ..., N-1, we obtain the QR factorization of the matrix that
! rearranges columns [I, I+1, ..., N] of A as [I+1, ..., N, I].
! Powell's code, however, is slightly different: before everything, he first exchanged columns K and
! K+1 of Q (as well as rows K and K+1 of R). This makes sure that the entires of the update RDIAG
! K+1 of Q (as well as rows K and K+1 of R). This makes sure that the entries of the updated RDIAG
! are all positive if it is the case for the original RDIAG.
do k = i, n - 1_IK
!hypt = hypotenuse(Rdiag(k + 1), inprod(Q(:, k), A(:, k + 1)))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ SUBROUTINE PRELIM (N,NPT,X,XL,XU,RHOBEG,IPRINT,MAXFUN,XBASE,
C GOPT is usually the gradient of the quadratic model at XOPT+XBASE, but
C it is set by PRELIM to the gradient of the quadratic model at XBASE.
C If XOPT is nonzero, BOBYQB will change it to its usual value later.
C NF is maintaned as the number of calls of CALFUN so far.
C NF is maintained as the number of calls of CALFUN so far.
C KOPT will be such that the least calculated value of F so far is at
C the point XPT(KOPT,.)+XBASE in the space of the variables.
C
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ SUBROUTINE BIGDEN (N,NPT,XOPT,XPT,BMAT,ZMAT,IDZ,NDIM,KOPT,
WVEC(IP,4)=ZERO
120 WVEC(IP,5)=ZERO
C
C Put the coefficents of THETA*Wcheck in PROD.
C Put the coefficients of THETA*Wcheck in PROD.
C
DO 190 JC=1,5
NW=NPT
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -884,7 +884,7 @@
wid = sprintf('%s:InvalidSolver', invoker);
wmsg = sprintf('%s: a solver different from %s is specified; it is ignored.', invoker, invoker);
% Do not display the value of solver in last message, because it
% can be 'unknow_solver'.
% can be 'unknown_solver'.
warning(wid, '%s', wmsg);
warnings = [warnings, wmsg];
end
Expand Down
2 changes: 1 addition & 1 deletion fortran/common/powalg.f90
Original file line number Diff line number Diff line change
Expand Up @@ -364,7 +364,7 @@ subroutine qrexc_Rdiag(A, Q, Rdiag, i) ! Used in COBYLA
! After this is done for each K = 1, ..., N-1, we obtain the QR factorization of the matrix that
! rearranges columns [I, I+1, ..., N] of A as [I+1, ..., N, I].
! Powell's code, however, is slightly different: before everything, he first exchanged columns K and
! K+1 of Q (as well as rows K and K+1 of R). This makes sure that the entires of the update RDIAG
! K+1 of Q (as well as rows K and K+1 of R). This makes sure that the entries of the updated RDIAG
! are all positive if it is the case for the original RDIAG.
! Zaikun 20230903: It turns out that Powell's code does not ensure that the original RDIAG is
! positive (see QRADD_RDIAG), and hence the updated RDIAG may contain negative values.
Expand Down
2 changes: 1 addition & 1 deletion fortran/original/bobyqa/prelim.f
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ SUBROUTINE PRELIM (N,NPT,X,XL,XU,RHOBEG,IPRINT,MAXFUN,XBASE,
C GOPT is usually the gradient of the quadratic model at XOPT+XBASE, but
C it is set by PRELIM to the gradient of the quadratic model at XBASE.
C If XOPT is nonzero, BOBYQB will change it to its usual value later.
C NF is maintaned as the number of calls of CALFUN so far.
C NF is maintained as the number of calls of CALFUN so far.
C KOPT will be such that the least calculated value of F so far is at
C the point XPT(KOPT,.)+XBASE in the space of the variables.
C
Expand Down
2 changes: 1 addition & 1 deletion fortran/original/lincoa/lincoa.f
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ SUBROUTINE LINCOA (N,NPT,M,A,IA,B,X,RHOBEG,RHOEND,IPRINT,
C NPT must be set to the number of interpolation conditions, which is
C required to be in the interval [N+2,(N+1)(N+2)/2]. Typical choices
C of the author are NPT=N+6 and NPT=2*N+1. Larger values tend to be
C highly inefficent when the number of variables is substantial, due
C highly inefficient when the number of variables is substantial, due
C to the amount of work and extra difficulty of adjusting more points.
C M must be set to the number of linear inequality constraints.
C A is a matrix whose columns are the constraint gradients, which are
Expand Down
2 changes: 1 addition & 1 deletion fortran/original/newuoa/bigden.f
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ SUBROUTINE BIGDEN (N,NPT,XOPT,XPT,BMAT,ZMAT,IDZ,NDIM,KOPT,
WVEC(IP,4)=ZERO
120 WVEC(IP,5)=ZERO
C
C Put the coefficents of THETA*Wcheck in PROD.
C Put the coefficients of THETA*Wcheck in PROD.
C
DO 190 JC=1,5
NW=NPT
Expand Down
6 changes: 3 additions & 3 deletions fortran/tests/tools/flsrc
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

DIR="$(realpath "$1")"
LINALG="$DIR/common/linalg.f90"
#GET_INTRISIC_LINALG="$DIR/common/get_intrinsic_linalg"
#GET_INTRINSIC_LINALG="$DIR/common/get_intrinsic_linalg"
#INTRINSIC_LINALG="$DIR/common/intrinsic_linalg.f90"

if [[ "$(uname)" == Darwin || "$(uname)" == FreeBSD ]] ; then
Expand Down Expand Up @@ -34,8 +34,8 @@ if [[ -f "$LINALG" ]] ; then
# # The following is a workaround the replaces matprod with the intrinsic matmul.
# # Remove this and test again when flang is updated.
# Update 20250906: With flang 21.1.0, matprod seems to work fine now.
# if [[ -f "$GET_INTRISIC_LINALG" ]] ; then
# bash "$GET_INTRISIC_LINALG"
# if [[ -f "$GET_INTRINSIC_LINALG" ]] ; then
# bash "$GET_INTRINSIC_LINALG"
# mv "$INTRINSIC_LINALG" "$LINALG"
# fi
fi
Expand Down
2 changes: 1 addition & 1 deletion matlab/interfaces/private/preprima.m
Original file line number Diff line number Diff line change
Expand Up @@ -979,7 +979,7 @@
wid = sprintf('%s:InvalidSolver', invoker);
wmsg = sprintf('%s: a solver different from %s is specified; it is ignored.', invoker, invoker);
% Do not display the value of solver in last message, because it
% can be 'unknow_solver'.
% can be 'unknown_solver'.
warning(wid, '%s', wmsg);
warnings = [warnings, wmsg];
end
Expand Down
2 changes: 1 addition & 1 deletion pyprima/src/pyprima/cobyla/trustregion.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ def trstlp(A, b, delta, g):
icon is the index of a most violated constraint if cviol is positive.

nact is the number of constraints in the active set and iact[0], ..., iact[nact-1] are their indices,
while the remainder of the iact contains a permutation of the remaining constraint indicies.
while the remainder of the iact contains a permutation of the remaining constraint indices.
N.B.: nact <= min(num_constraints, num_vars). Obviously nact <= num_constraints. In addition, the constraints
in iact[0, ..., nact-1] have linearly independent gradients (see the comments above the instruction
that delete a constraint from the active set to make room for the new active constraint with index iact[icon]);
Expand Down
2 changes: 1 addition & 1 deletion pyprima/src/pyprima/common/selectx.py
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ def selectx(fhist: npt.NDArray, chist: npt.NDArray, cweight: float, ctol: float)
# N.B.:
# 1. This process is the opposite of selecting kworst in savefilt
# 2. In finite-precision arithmetic, phi_2 == phi_2 and cstrv_shift_1 == cstrv_shifted_2 do
# not ensure thatn f_1 == f_2!
# not ensure that f_1 == f_2!
phimin = np.min(phi[np.logical_and(fhist < fref, chist_shifted <= cref)])
cref = np.min(chist_shifted[np.logical_and(fhist < fref, phi <= phimin)])
fref = np.min(fhist[chist_shifted <= cref])
Expand Down