Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package nlopt for openSUSE:Factory checked in at 2026-06-11 17:30:02 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/nlopt (Old) and /work/SRC/openSUSE:Factory/.nlopt.new.1981 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "nlopt" Thu Jun 11 17:30:02 2026 rev:25 rq:1358725 version:2.11.0 Changes: -------- --- /work/SRC/openSUSE:Factory/nlopt/nlopt.changes 2026-02-24 15:40:30.015143804 +0100 +++ /work/SRC/openSUSE:Factory/.nlopt.new.1981/nlopt.changes 2026-06-11 17:31:25.576559591 +0200 @@ -1,0 +2,9 @@ +Wed Jun 10 15:51:26 UTC 2026 - Atri Bhattacharya <[email protected]> + +- Update to version 2.11.0: + * New CCSA and MMA parameters inner_gradients and always_improve + (gh#stevengj/nlopt#623). + * Various minor bugfixes (gh#stevengj/nlopt#637, + gh#stevengj/nlopt#640). + +------------------------------------------------------------------- Old: ---- nlopt-2.10.1.tar.gz New: ---- nlopt-2.11.0.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ nlopt.spec ++++++ --- /var/tmp/diff_new_pack.CY51iR/_old 2026-06-11 17:31:26.144583416 +0200 +++ /var/tmp/diff_new_pack.CY51iR/_new 2026-06-11 17:31:26.148583584 +0200 @@ -33,7 +33,7 @@ %endif Name: nlopt%{?psuffix} -Version: 2.10.1 +Version: 2.11.0 Release: 0 Summary: A library for nonlinear optimization License: LGPL-2.1-or-later @@ -187,7 +187,7 @@ %files -n %{pname}-devel %license COPYING %doc AUTHORS NEWS.md README.md TODO -%{_includedir}/* +%{_includedir}/%{pname}.* %{_libdir}/*.so %{_libdir}/pkgconfig/%{pname}.pc %{_libdir}/cmake/%{pname}/ @@ -199,7 +199,7 @@ %license COPYING %{python_sitearch}/nlopt-%{version}*.*-info/ %{python_sitearch}/nlopt.py -%{python_sitearch}/*.so +%{python_sitearch}/_nlopt.so %files -n octave-nlopt_optimize %license COPYING ++++++ nlopt-2.10.1.tar.gz -> nlopt-2.11.0.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/nlopt-2.10.1/CMakeLists.txt new/nlopt-2.11.0/CMakeLists.txt --- old/nlopt-2.10.1/CMakeLists.txt 2026-02-09 21:30:18.000000000 +0100 +++ new/nlopt-2.11.0/CMakeLists.txt 2026-06-05 20:42:06.000000000 +0200 @@ -21,15 +21,15 @@ #============================================================================== # version set (NLOPT_MAJOR_VERSION "2") -set (NLOPT_MINOR_VERSION "10") -set (NLOPT_BUGFIX_VERSION "1") +set (NLOPT_MINOR_VERSION "11") +set (NLOPT_BUGFIX_VERSION "0") set (NLOPT_VERSION_STRING ${NLOPT_MAJOR_VERSION}.${NLOPT_MINOR_VERSION}.${NLOPT_BUGFIX_VERSION}) message (STATUS "NLopt version ${NLOPT_VERSION_STRING}") # This is the ABI version number, which differes from the API version above # (it indicates ABI compatibility), but they are typically incremented together. set(SO_MAJOR 1) -set(SO_MINOR 0) +set(SO_MINOR 1) set(SO_PATCH 0) #============================================================================== @@ -230,7 +230,7 @@ target_compile_definitions (${nlopt_lib} PRIVATE NLOPT_LUKSAN) endif () if (M_LIBRARY) - target_link_libraries (${nlopt_lib} ${M_LIBRARY}) + target_link_libraries (${nlopt_lib} PRIVATE ${M_LIBRARY}) endif () set_target_properties (${nlopt_lib} PROPERTIES SOVERSION ${SO_MAJOR}) set_target_properties (${nlopt_lib} PROPERTIES VERSION "${SO_MAJOR}.${SO_MINOR}.${SO_PATCH}") diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/nlopt-2.10.1/NEWS.md new/nlopt-2.11.0/NEWS.md --- old/nlopt-2.10.1/NEWS.md 2026-02-09 21:30:18.000000000 +0100 +++ new/nlopt-2.11.0/NEWS.md 2026-06-05 20:42:06.000000000 +0200 @@ -1,5 +1,13 @@ # NLopt Release Notes +## NLopt 2.11 + +5 June 2026 + +* New CCSA and MMA parameters `inner_gradients` and `always_improve` ([#623]). + +* Various minor bugfixes ([35df45](https://github.com/stevengj/nlopt/commit/35df45ca2247f17d7550c60f449f834cdf0ec1ed), [#637], [#640]). + ## NLopt 2.10.1 9 February 2026 @@ -563,3 +571,10 @@ [#580]: https://github.com/stevengj/nlopt/issues/580 [#585]: https://github.com/stevengj/nlopt/issues/585 [#587]: https://github.com/stevengj/nlopt/issues/587 +[#598]: https://github.com/stevengj/nlopt/issues/598 +[#606]: https://github.com/stevengj/nlopt/issues/606 +[#616]: https://github.com/stevengj/nlopt/issues/616 +[#623]: https://github.com/stevengj/nlopt/issues/623 +[#627]: https://github.com/stevengj/nlopt/issues/627 +[#637]: https://github.com/stevengj/nlopt/issues/637 +[#640]: https://github.com/stevengj/nlopt/issues/640 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/nlopt-2.10.1/cmake/FindOctave.cmake new/nlopt-2.11.0/cmake/FindOctave.cmake --- old/nlopt-2.10.1/cmake/FindOctave.cmake 2026-02-09 21:30:18.000000000 +0100 +++ new/nlopt-2.11.0/cmake/FindOctave.cmake 2026-06-05 20:42:06.000000000 +0200 @@ -175,7 +175,7 @@ endif () endforeach () add_library (${FUNCTIONNAME} SHARED ${_SOURCES}) - target_link_libraries (${FUNCTIONNAME} ${OCTAVE_LIBRARIES} ${_LINK_LIBRARIES}) + target_link_libraries (${FUNCTIONNAME} PRIVATE ${OCTAVE_LIBRARIES} ${_LINK_LIBRARIES}) set_target_properties (${FUNCTIONNAME} PROPERTIES PREFIX "" SUFFIX ".${_OCT_EXTENSION}" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/nlopt-2.10.1/doc/docs/NLopt_Algorithms.md new/nlopt-2.11.0/doc/docs/NLopt_Algorithms.md --- old/nlopt-2.10.1/doc/docs/NLopt_Algorithms.md 2026-02-09 21:30:18.000000000 +0100 +++ new/nlopt-2.11.0/doc/docs/NLopt_Algorithms.md 2026-06-05 20:42:06.000000000 +0200 @@ -337,6 +337,8 @@ * `dual_algorithm` (defaults to `NLOPT_LD_MMA`), `dual_ftol_rel` (defaults to `1e-14`), `dual_ftol_abs` (defaults to `0`), `dual_xtol_rel` (defaults to `0`), `dual_xtol_abs` (defaults to `0`), `dual_maxeval` (defaults to `100000`): These specify how the algorithm internally solves the "dual" optimization problem for its approximate objective. Because this subsidiary solve requires no evaluations of the user's objective function, it is typically fast enough that we can solve it to high precision without worrying too much about the details. Howeve,r in high-dimensional problems you may notice that MMA/CCSA is taking a long time between optimization steps, in which case you may want to increase `dual_ftol_rel` or make other changes. If these parameters are not specified, NLopt takes them from the [subsidiary-optimizer algorithm](NLopt_Reference.md#localsubsidiary-optimization-algorithm) if that has been specified, and otherwise uses the defaults indicated here. * `verbosity`: If > 0, causes the algorithm to print internal status information on each iteration. * `rho_init`: if specified, should be a rough upper bound for the second derivative (the biggest eigenvalue of the Hessian of the objective or constraints); defaults to `1.0`. CCSA/MMA will adaptively adjust this as the optimization progresses, so even it if `rho_init` is completely wrong the algorithm will still converge. A `rho_init` that is too large will cause the algorithm to take overly small steps at the beginning, while a `rho_init` that is too small will cause it to take overly large steps (and have to backtrack) at the beginning. Similarly, you can also use the "initial stepsize" option ([NLopt reference](NLopt_Reference.md#initial-step-size)) to control the maximum size of the initial steps (half the diameter of the trust region). +* `inner_gradients` (defaults to `1`): if `0`, the gradient is *not* computed on "inner" iterations of the CCSA algorithm. This can be useful in order to save computations on inner iterations, and also for the caller to distinguish inner and outer iterations. However, that means that your functions are called twice on outer iterations: once for the last inner iteration (without gradients), and again with the gradient; to save wasted computation, you may want to cache the last function value and not recompute it (only compute the gradient) if `x` does not change between subsequent calls. +* `always_improve` (defaults to `1`): if `0`, only update the current point (whence the gradients and model) on outer iterations, as in the original Svanberg paper; if `1`, we are slightly more aggressive about updating the current point, even doing so on inner iterations if the new point is strictly better (e.g. feasible and better objective) than the previous point. ### SLSQP diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/nlopt-2.10.1/doc/docs/NLopt_Installation.md new/nlopt-2.11.0/doc/docs/NLopt_Installation.md --- old/nlopt-2.10.1/doc/docs/NLopt_Installation.md 2026-02-09 21:30:18.000000000 +0100 +++ new/nlopt-2.11.0/doc/docs/NLopt_Installation.md 2026-06-05 20:42:06.000000000 +0200 @@ -103,6 +103,7 @@ ``` Some versions of Matlab also require that you compile NLopt as a shared library in order to produce a Matlab plugin; see below. +You can manually disable the Matlab-plugin build with `-DNLOPT_MATLAB=OFF`. The Matlab plugins (along with help files and other `.m` files) are installed into `INSTALL_MEX_DIR`. You can override the default by passing a `INSTALL_MEX_DIR` to `cmake`, via (in addition to other `cmake` arguments): @@ -128,6 +129,8 @@ cmake -DINSTALL_OCT_DIR=octdir -DINSTALL_M_DIR=mdir .. ``` +You can manually disable the Octave-plugin build with `-DNLOPT_OCTAVE=OFF`. + Python plugins -------------- @@ -139,6 +142,8 @@ cmake -DPython_EXECUTABLE=/usr/bin/python .. ``` +You can manually disable the Python-plugin build with `-DNLOPT_PYTHON=OFF`. + GNU Guile plugins ----------------- @@ -158,6 +163,8 @@ Note, however, that if you do this then Guile may not know where to load the `nlopt` module from. You can [update the Guile load path](http://www.gnu.org/software/guile/manual/html_node/Build-Config.html) by changing the `%load-path` variable in Guile or using the `GUILE_LOAD_PATH` environment variable. +You can manually disable the Guile-plugin build with `-DNLOPT_GUILE=OFF`. + NLopt with C++ algorithms ------------------------- diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/nlopt-2.10.1/src/algs/cdirect/cdirect.c new/nlopt-2.11.0/src/algs/cdirect/cdirect.c --- old/nlopt-2.10.1/src/algs/cdirect/cdirect.c 2026-02-09 21:30:18.000000000 +0100 +++ new/nlopt-2.11.0/src/algs/cdirect/cdirect.c 2026-06-05 20:42:06.000000000 +0200 @@ -194,6 +194,8 @@ rdiv[2] = p->age++; node = nlopt_rb_tree_resort(&p->rtree, node); for (k = 0; k <= 1; ++k) { + if (!isfinite(fv[2*isort[i]+k])) + return NLOPT_FAILURE; double *rnew; ALLOC_RECT(rnew, L); memcpy(rnew, rdiv, sizeof(double) * L); @@ -233,6 +235,10 @@ rnew[3 + i] += w[i] * (2*k-1); FUNCTION_EVAL(rnew[1], rnew + 3, p, rnew); rnew[2] = p->age++; + if (!isfinite(rnew[1])) { + free(rnew); + return NLOPT_FAILURE; + } if (!nlopt_rb_tree_insert(&p->rtree, rnew)) { free(rnew); return NLOPT_OUT_OF_MEMORY; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/nlopt-2.10.1/src/algs/mma/ccsa_quadratic.c new/nlopt-2.11.0/src/algs/mma/ccsa_quadratic.c --- old/nlopt-2.10.1/src/algs/mma/ccsa_quadratic.c 2026-02-09 21:30:18.000000000 +0100 +++ new/nlopt-2.11.0/src/algs/mma/ccsa_quadratic.c 2026-06-05 20:42:06.000000000 +0200 @@ -219,6 +219,7 @@ double *minf, nlopt_stopping *stop, nlopt_opt dual_opt, int inner_maxeval, unsigned verbose, double rho_init, + int inner_gradients, int always_improve, double sigma_min, const double *sigma_init) { nlopt_result ret = NLOPT_SUCCESS; @@ -329,6 +330,7 @@ sigma[j] = 1.0; /* arbitrary default */ else sigma[j] = 0.5 * (ub[j] - lb[j]); + sigma[j] = MAX(sigma[j], sigma_min); } rho = rho_init; for (i = 0; i < m; ++i) { @@ -446,7 +448,7 @@ i, y[i], i, dd.gcval[i]); } - fcur = f(n, xcur, dfdx_cur, f_data); + fcur = f(n, xcur, inner_gradients ? dfdx_cur : NULL, f_data); ++ *(stop->nevals_p); ++inner_nevals; if (nlopt_stop_forced(stop)) { @@ -454,7 +456,8 @@ feasible_cur = 1; infeasibility_cur = 0; inner_done = dd.gval >= fcur; for (i = ifc = 0; ifc < mfc; ++ifc) { - nlopt_eval_constraint(fcval_cur + i, dfcdx_cur + i*n, + nlopt_eval_constraint(fcval_cur + i, + inner_gradients ? dfcdx_cur + i*n : NULL, fc + ifc, n, xcur); i += fc[ifc].m; if (nlopt_stop_forced(stop)) { @@ -474,10 +477,45 @@ inner_done = inner_done || (inner_maxeval > 0 && inner_nevals == inner_maxeval); - if ((fcur < *minf && (inner_done || feasible_cur || !feasible)) - || (!feasible && infeasibility_cur < infeasibility)) { + /* update the current point. If always_improve (the default), use an aggressive + strategy that always accepts an improvement even if !inner_done, + otherwise only update the current point if inner_done (= outer iteration), + more like the original Svanberg paper */ + if (always_improve ? + (fcur < *minf && (inner_done || feasible_cur || !feasible)) + || (!feasible && infeasibility_cur < infeasibility) : inner_done) { if (verbose && !feasible_cur) printf("CCSA - using infeasible point?\n"); + + if (!inner_gradients) { /* evaluate again, this time with gradients */ + fcur = f(n, xcur, dfdx_cur, f_data); + /* don't update *(stop->nevals_p) -- hope user caches xcur + so that they don't actually recompute f */ + if (nlopt_stop_forced(stop)) { + ret = NLOPT_FORCED_STOP; goto done; } + feasible_cur = 1; infeasibility_cur = 0; + for (i = ifc = 0; ifc < mfc; ++ifc) { + nlopt_eval_constraint(fcval_cur + i, + dfcdx_cur + i*n, + fc + ifc, n, xcur); + i += fc[ifc].m; + if (nlopt_stop_forced(stop)) { + ret = NLOPT_FORCED_STOP; goto done; } + } + /* recompute feasible_cur etc in case the caller + has changed the objective function for an outer iteration, + but don't change inner_done in that case */ + for (i = ifc = 0; ifc < mfc; ++ifc) { + unsigned i0 = i, inext = i + fc[ifc].m; + for (; i < inext; ++i) { + feasible_cur = feasible_cur + && fcval_cur[i] <= fc[ifc].tol[i-i0]; + if (fcval_cur[i] > infeasibility_cur) + infeasibility_cur = fcval_cur[i]; + } + } + } + dd.fval = *minf = fcur; infeasibility = infeasibility_cur; memcpy(fcval, fcval_cur, sizeof(double)*m); @@ -548,6 +586,7 @@ 0.01*(ub-lb), which seems unnecessarily large */ sigma[j] = MAX(sigma[j], 1e-8*(ub[j]-lb[j])); } + sigma[j] = MAX(sigma[j], sigma_min); } for (j = 0; j < MIN(verbose, n); ++j) printf(" CCSA sigma[%u] -> %g\n", diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/nlopt-2.10.1/src/algs/mma/mma.c new/nlopt-2.11.0/src/algs/mma/mma.c --- old/nlopt-2.10.1/src/algs/mma/mma.c 2026-02-09 21:30:18.000000000 +0100 +++ new/nlopt-2.11.0/src/algs/mma/mma.c 2026-06-05 20:42:06.000000000 +0200 @@ -149,6 +149,7 @@ double *minf, nlopt_stopping *stop, nlopt_opt dual_opt, int inner_maxeval, unsigned verbose, double rho_init, + int inner_gradients, int always_improve, double sigma_min, const double *sigma_init) { nlopt_result ret = NLOPT_SUCCESS; @@ -205,6 +206,7 @@ sigma[j] = 1.0; /* arbitrary default */ else sigma[j] = 0.5 * (ub[j] - lb[j]); + sigma[j] = MAX(sigma[j], sigma_min); } rho = rho_init; for (i = 0; i < m; ++i) { @@ -292,7 +294,7 @@ i, y[i], i, dd.gcval[i]); } - fcur = f(n, xcur, dfdx_cur, f_data); + fcur = f(n, xcur, inner_gradients ? dfdx_cur : NULL, f_data); ++ *(stop->nevals_p); ++inner_nevals; if (nlopt_stop_forced(stop)) { @@ -301,7 +303,7 @@ new_infeasible_constraint = 0; inner_done = dd.gval >= fcur; for (i = ifc = 0; ifc < mfc; ++ifc) { - nlopt_eval_constraint(fcval_cur + i, dfcdx_cur + i*n, + nlopt_eval_constraint(fcval_cur + i, inner_gradients ? dfcdx_cur + i*n : NULL, fc + ifc, n, xcur); i += fc[ifc].m; if (nlopt_stop_forced(stop)) { @@ -325,10 +327,48 @@ inner_done = inner_done || (inner_maxeval > 0 && inner_nevals == inner_maxeval); - if ((fcur < *minf && (inner_done || feasible_cur || !feasible)) - || (!feasible && infeasibility_cur < infeasibility)) { + /* update the current point. If always_improve (the default), use an aggressive + strategy that always accepts an improvement even if !inner_done, + otherwise only update the current point if inner_done (= outer iteration), + more like the original Svanberg paper */ + if (always_improve ? (fcur < *minf && (inner_done || feasible_cur || !feasible)) + || (!feasible && infeasibility_cur < infeasibility) : inner_done) { if (verbose && !feasible_cur) printf("MMA - using infeasible point?\n"); + + if (!inner_gradients) { /* evaluate again, this time with gradients */ + fcur = f(n, xcur, dfdx_cur, f_data); + /* don't update *(stop->nevals_p) -- hope user caches xcur + so that they don't actually recompute f */ + if (nlopt_stop_forced(stop)) { + ret = NLOPT_FORCED_STOP; goto done; } + feasible_cur = 1; infeasibility_cur = 0; + new_infeasible_constraint = 0; + inner_done = dd.gval >= fcur; + for (i = ifc = 0; ifc < mfc; ++ifc) { + nlopt_eval_constraint(fcval_cur + i, dfcdx_cur + i*n, + fc + ifc, n, xcur); + i += fc[ifc].m; + if (nlopt_stop_forced(stop)) { + ret = NLOPT_FORCED_STOP; goto done; } + } + /* recompute feasible_cur etc in case the caller + has changed the objective function for an outer iteration, + but don't change inner_done in that case */ + for (i = ifc = 0; ifc < mfc; ++ifc) { + unsigned i0 = i, inext = i + fc[ifc].m; + for (; i < inext; ++i) + if (!nlopt_isnan(fcval_cur[i])) { + feasible_cur = feasible_cur + && (fcval_cur[i] <= fc[ifc].tol[i-i0]); + if (nlopt_isnan(fcval[i]) && fcval_cur[i] > 0) + new_infeasible_constraint = 1; + if (fcval_cur[i] > infeasibility_cur) + infeasibility_cur = fcval_cur[i]; + } + } + } + dd.fval = *minf = fcur; infeasibility = infeasibility_cur; memcpy(fcval, fcval_cur, sizeof(double)*m); @@ -398,6 +438,7 @@ sigma[j] = MIN(sigma[j], 10*(ub[j]-lb[j])); sigma[j] = MAX(sigma[j], 0.01*(ub[j]-lb[j])); } + sigma[j] = MAX(sigma[j], sigma_min); } for (j = 0; j < MIN(verbose, n); ++j) printf(" MMA sigma[%u] -> %g\n", diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/nlopt-2.10.1/src/algs/mma/mma.h new/nlopt-2.11.0/src/algs/mma/mma.h --- old/nlopt-2.10.1/src/algs/mma/mma.h 2026-02-09 21:30:18.000000000 +0100 +++ new/nlopt-2.11.0/src/algs/mma/mma.h 2026-06-05 20:42:06.000000000 +0200 @@ -41,6 +41,7 @@ double *minf, nlopt_stopping *stop, nlopt_opt dual_opt, int inner_maxeval, unsigned verbose, double rho_init, + int inner_gradients, int always_improve, double sigma_min, const double *sigma_init); nlopt_result ccsa_quadratic_minimize( @@ -54,6 +55,7 @@ double *minf, nlopt_stopping *stop, nlopt_opt dual_opt, int inner_maxeval, unsigned verbose, double rho_init, + int inner_gradients, int always_improve, double sigma_min, const double *sigma_init); #ifdef __cplusplus diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/nlopt-2.10.1/src/api/optimize.c new/nlopt-2.11.0/src/api/optimize.c --- old/nlopt-2.10.1/src/api/optimize.c 2026-02-09 21:30:18.000000000 +0100 +++ new/nlopt-2.11.0/src/api/optimize.c 2026-06-05 20:42:06.000000000 +0200 @@ -798,11 +798,20 @@ int inner_maxeval = (int)nlopt_get_param(opt, "inner_maxeval",0); int verbosity = (int)nlopt_get_param(opt, "verbosity",0); double rho_init = nlopt_get_param(opt, "rho_init",1.0); + int inner_gradients = (int)nlopt_get_param(opt, "inner_gradients",1); + int always_improve = (int)nlopt_get_param(opt, "always_improve",1); + double sigma_min = nlopt_get_param(opt, "sigma_min",0.0); nlopt_opt dual_opt; nlopt_result ret; if (!(rho_init > 0) && !nlopt_isinf(rho_init)) RETURN_ERR(NLOPT_INVALID_ARGS, opt, "rho_init must be positive and finite"); + if (inner_gradients != 0 && inner_gradients != 1) + RETURN_ERR(NLOPT_INVALID_ARGS, opt, "inner_gradients must be 0 or 1"); + if (always_improve != 0 && always_improve != 1) + RETURN_ERR(NLOPT_INVALID_ARGS, opt, "always_improve must be 0 or 1"); + if (sigma_min < 0.0) + RETURN_ERR(NLOPT_INVALID_ARGS, opt, "sigma_min must be non-negative"); verbosity = verbosity < 0 ? 0 : verbosity; #define LO(param, def) (opt->local_opt ? opt->local_opt->param : (def)) @@ -817,9 +826,9 @@ nlopt_set_maxeval(dual_opt, (int)nlopt_get_param(opt, "dual_maxeval", LO(maxeval, 100000))); #undef LO if (algorithm == NLOPT_LD_MMA) - ret = mma_minimize(n, f, f_data, opt->m, opt->fc, lb, ub, x, minf, &stop, dual_opt, inner_maxeval, (unsigned)verbosity, rho_init, opt->dx); + ret = mma_minimize(n, f, f_data, opt->m, opt->fc, lb, ub, x, minf, &stop, dual_opt, inner_maxeval, (unsigned)verbosity, rho_init, inner_gradients, always_improve, sigma_min, opt->dx); else - ret = ccsa_quadratic_minimize(n, f, f_data, opt->m, opt->fc, opt->pre, lb, ub, x, minf, &stop, dual_opt, inner_maxeval, (unsigned)verbosity, rho_init, opt->dx); + ret = ccsa_quadratic_minimize(n, f, f_data, opt->m, opt->fc, opt->pre, lb, ub, x, minf, &stop, dual_opt, inner_maxeval, (unsigned)verbosity, rho_init, inner_gradients, always_improve, sigma_min, opt->dx); nlopt_destroy(dual_opt); return ret; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/nlopt-2.10.1/src/swig/CMakeLists.txt new/nlopt-2.11.0/src/swig/CMakeLists.txt --- old/nlopt-2.10.1/src/swig/CMakeLists.txt 2026-02-09 21:30:18.000000000 +0100 +++ new/nlopt-2.11.0/src/swig/CMakeLists.txt 2026-06-05 20:42:06.000000000 +0200 @@ -25,9 +25,9 @@ OUTPUT_DIR ${CMAKE_CURRENT_BINARY_DIR}/python OUTFILE_DIR ${CMAKE_CURRENT_BINARY_DIR}) - target_link_libraries (nlopt_python ${nlopt_lib}) - target_link_libraries (nlopt_python Python::NumPy) - target_link_libraries (nlopt_python Python::Module) + target_link_libraries (nlopt_python PRIVATE ${nlopt_lib}) + target_link_libraries (nlopt_python PRIVATE Python::NumPy) + target_link_libraries (nlopt_python PRIVATE Python::Module) set_target_properties (nlopt_python PROPERTIES OUTPUT_NAME nlopt) set_target_properties (nlopt_python PROPERTIES COMPILE_FLAGS "${SWIG_COMPILE_FLAGS}") @@ -54,8 +54,8 @@ target_include_directories (nlopt_guile PRIVATE ${GUILE_INCLUDE_DIRS}) - target_link_libraries (nlopt_guile ${nlopt_lib}) - target_link_libraries (nlopt_guile ${GUILE_LIBRARIES}) + target_link_libraries (nlopt_guile PRIVATE ${nlopt_lib}) + target_link_libraries (nlopt_guile PRIVATE ${GUILE_LIBRARIES}) set_target_properties (nlopt_guile PROPERTIES COMPILE_FLAGS "${SWIG_COMPILE_FLAGS}") file (RELATIVE_PATH _REL_GUILE_SITE_PATH ${GUILE_ROOT_DIR} ${GUILE_SITE_DIR}) @@ -83,8 +83,8 @@ set (CMAKE_SWIG_FLAGS) - target_link_libraries (nlopt_java ${nlopt_lib}) - target_link_libraries (nlopt_java JNI::JNI) + target_link_libraries (nlopt_java PRIVATE ${nlopt_lib}) + target_link_libraries (nlopt_java PRIVATE JNI::JNI) set_target_properties (nlopt_java PROPERTIES OUTPUT_NAME nloptjni) if (CMAKE_CXX_COMPILER_ID MATCHES "Clang|GNU") diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/nlopt-2.10.1/test/CMakeLists.txt new/nlopt-2.11.0/test/CMakeLists.txt --- old/nlopt-2.10.1/test/CMakeLists.txt 2026-02-09 21:30:18.000000000 +0100 +++ new/nlopt-2.11.0/test/CMakeLists.txt 2026-06-05 20:42:06.000000000 +0200 @@ -3,7 +3,7 @@ macro(NLOPT_add_cpp_test test_name) if (NLOPT_CXX) add_executable (${test_name} ${test_name}.cxx) - target_link_libraries (${test_name} ${nlopt_lib}) + target_link_libraries (${test_name} PRIVATE ${nlopt_lib}) add_dependencies (tests ${test_name}) target_include_directories (${test_name} PRIVATE ${NLOPT_PRIVATE_INCLUDE_DIRS}) foreach(arg IN ITEMS ${ARGN}) @@ -28,7 +28,7 @@ list (APPEND testopt_sources ${PROJECT_SOURCE_DIR}/src/util/nlopt-getopt.c) endif () add_executable (testopt ${testopt_sources}) -target_link_libraries (testopt ${nlopt_lib}) +target_link_libraries (testopt PRIVATE ${nlopt_lib}) target_include_directories (testopt PRIVATE ${NLOPT_PRIVATE_INCLUDE_DIRS}) add_dependencies (tests testopt) @@ -118,7 +118,7 @@ if (NLOPT_FORTRAN) add_executable (t_fortran t_fortran.f90) - target_link_libraries (t_fortran ${nlopt_lib}) + target_link_libraries (t_fortran PRIVATE ${nlopt_lib}) target_include_directories (t_fortran PRIVATE ${NLOPT_PRIVATE_INCLUDE_DIRS}) add_test (NAME test_fortran COMMAND t_fortran) endif ()
