diff --git a/benchmark/rescue_idz/230406/fortran/common/powalg.f90 b/benchmark/rescue_idz/230406/fortran/common/powalg.f90 index 64b6d21822..92a9cba8bd 100644 --- a/benchmark/rescue_idz/230406/fortran/common/powalg.f90 +++ b/benchmark/rescue_idz/230406/fortran/common/powalg.f90 @@ -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))) diff --git a/benchmark/rescue_idz/230406/fortran/original/bobyqa/prelim.f b/benchmark/rescue_idz/230406/fortran/original/bobyqa/prelim.f index f5d04e5287..50f296cc3b 100644 --- a/benchmark/rescue_idz/230406/fortran/original/bobyqa/prelim.f +++ b/benchmark/rescue_idz/230406/fortran/original/bobyqa/prelim.f @@ -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 diff --git a/benchmark/rescue_idz/230406/fortran/original/newuoa/bigden.f b/benchmark/rescue_idz/230406/fortran/original/newuoa/bigden.f index 290cadd7ce..3e8b262d01 100644 --- a/benchmark/rescue_idz/230406/fortran/original/newuoa/bigden.f +++ b/benchmark/rescue_idz/230406/fortran/original/newuoa/bigden.f @@ -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 diff --git a/benchmark/rescue_idz/230406/matlab/interfaces/private/preprima.m b/benchmark/rescue_idz/230406/matlab/interfaces/private/preprima.m index bfab83195e..169c2baebd 100644 --- a/benchmark/rescue_idz/230406/matlab/interfaces/private/preprima.m +++ b/benchmark/rescue_idz/230406/matlab/interfaces/private/preprima.m @@ -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 diff --git a/benchmark/rescue_idz/230406/norma/fortran/common/powalg.f90 b/benchmark/rescue_idz/230406/norma/fortran/common/powalg.f90 index ca6f4615b2..7f7f71772c 100644 --- a/benchmark/rescue_idz/230406/norma/fortran/common/powalg.f90 +++ b/benchmark/rescue_idz/230406/norma/fortran/common/powalg.f90 @@ -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))) diff --git a/benchmark/rescue_idz/230406/norma/fortran/original/bobyqa/prelim.f b/benchmark/rescue_idz/230406/norma/fortran/original/bobyqa/prelim.f index f5d04e5287..50f296cc3b 100644 --- a/benchmark/rescue_idz/230406/norma/fortran/original/bobyqa/prelim.f +++ b/benchmark/rescue_idz/230406/norma/fortran/original/bobyqa/prelim.f @@ -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 diff --git a/benchmark/rescue_idz/230406/norma/fortran/original/newuoa/bigden.f b/benchmark/rescue_idz/230406/norma/fortran/original/newuoa/bigden.f index 290cadd7ce..3e8b262d01 100644 --- a/benchmark/rescue_idz/230406/norma/fortran/original/newuoa/bigden.f +++ b/benchmark/rescue_idz/230406/norma/fortran/original/newuoa/bigden.f @@ -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 diff --git a/benchmark/rescue_idz/230406/norma/matlab/interfaces/private/preprima_norma.m b/benchmark/rescue_idz/230406/norma/matlab/interfaces/private/preprima_norma.m index 4f8e223421..ecf60c5e98 100644 --- a/benchmark/rescue_idz/230406/norma/matlab/interfaces/private/preprima_norma.m +++ b/benchmark/rescue_idz/230406/norma/matlab/interfaces/private/preprima_norma.m @@ -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 diff --git a/fortran/common/powalg.f90 b/fortran/common/powalg.f90 index 646b2ffbd7..78b342c917 100644 --- a/fortran/common/powalg.f90 +++ b/fortran/common/powalg.f90 @@ -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. diff --git a/fortran/original/bobyqa/prelim.f b/fortran/original/bobyqa/prelim.f index f5d04e5287..50f296cc3b 100644 --- a/fortran/original/bobyqa/prelim.f +++ b/fortran/original/bobyqa/prelim.f @@ -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 diff --git a/fortran/original/lincoa/lincoa.f b/fortran/original/lincoa/lincoa.f index 40597ffec7..129123c20a 100644 --- a/fortran/original/lincoa/lincoa.f +++ b/fortran/original/lincoa/lincoa.f @@ -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 diff --git a/fortran/original/newuoa/bigden.f b/fortran/original/newuoa/bigden.f index 290cadd7ce..3e8b262d01 100644 --- a/fortran/original/newuoa/bigden.f +++ b/fortran/original/newuoa/bigden.f @@ -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 diff --git a/fortran/tests/tools/flsrc b/fortran/tests/tools/flsrc index 2840a7bff5..66eb8f6f26 100755 --- a/fortran/tests/tools/flsrc +++ b/fortran/tests/tools/flsrc @@ -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 @@ -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 diff --git a/matlab/interfaces/private/preprima.m b/matlab/interfaces/private/preprima.m index 4e9d3d058c..b5e53409cf 100644 --- a/matlab/interfaces/private/preprima.m +++ b/matlab/interfaces/private/preprima.m @@ -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 diff --git a/pyprima/src/pyprima/cobyla/trustregion.py b/pyprima/src/pyprima/cobyla/trustregion.py index 3e97d7c0b5..6238ee7c77 100644 --- a/pyprima/src/pyprima/cobyla/trustregion.py +++ b/pyprima/src/pyprima/cobyla/trustregion.py @@ -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]); diff --git a/pyprima/src/pyprima/common/selectx.py b/pyprima/src/pyprima/common/selectx.py index 63d76ad709..4e932c7b5c 100644 --- a/pyprima/src/pyprima/common/selectx.py +++ b/pyprima/src/pyprima/common/selectx.py @@ -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])