Releases: libprima/prima
Version 0.7.2
Compared with v0.7.1, the major changes are as follows.
- Revise https://github.com/libprima/prima/blob/main/matlab/setup_tools/compile.m so that the MATLAB interface is thread-safe and recursion-safe, which are tested at https://github.com/zequipe/prima/actions/workflows/parallel_test_matlab.yml and https://github.com/zequipe/prima/actions/workflows/recursive_test_matlab.yml
 - Revise 
infnan.F90so that it works correctly withgfortran-13 -Ofast(see equipez/infnan#23). - Set 
eta1,eta2,gamma1, andgamma2explicitly in https://github.com/libprima/prima/blob/main/matlab/interfaces/private/preprima.m. Previously, they were set toNaN, which will be translated to the default values by the Fortran code. However, this will not work ifis_nandoes not work on the Fortran side, which did happen before point 2 was implemented ifgfortran-13is invoked with-Ofast. To avoid this problem, we set these parameters to the correct (default) values in the MATLAB interface. 
Version 0.7.1
Compared with v0.7, this release mainly makes the following changes, both by Julien @jschueller .
- Export symbols for DLL on Windows using 
.deffiles for CMake, resolving #70. - Remove the hint sizes in 
prima.handprima.c, resolving JuliaInterop/Clang.jl#443, in order to generate Julia wrappers. 
Version 0.7
Compared with the last release, the most important change is the C interface and CMake building system contributed by @jschueller .
In addition,  we can now input the commit hash when manually invoking a workflow. This is instrumental when we want to re-produce the result of a previous run. Note, however, that we have to make sure that the runner has the same status as before in order to reproduce the result. This may not be the case if we use actions like free-disk-space in the workflow now but not before. See b25e404 and jlumbroso/free-disk-space#12.
pl in the Fortran implementation of UOBYQA is changed to an allocatable array.
Version 0.6.2
Compared to the last release, this one updates hypotenuse, and changes nlconstr in fortran/cobyla/cobyla.f90 from an allocatable array to an automatic one.
Version 0.6.1
This release removed some large files that were added mistakenly.
Version 0.6
Compared to v0.5.1, the major changes are as follows.
lincoanow supports the following constraints:
Aineq*x <= bineq, Aeq*x = beq, xl <= x <= xu
cobylanow supports the following constraints:
nlconstr(x) <= 0, Aineq*x <= bineq, Aeq*x = beq, xl <= x <= xu
N.B.:
2.1. In Powell's implementation of cobyla, the constraints are constr(x) >= 0, where constr is a vector-valued function that wraps all constraints. In contrast, the nonlinear constraints we consider are nlconstr(x) <=0 (not >=0).
2.2. cobyla does not support nonlinear equality constraints directly. Such a constraint has to be wrapped as two inequality constraints before being passed to the Fortran code. The wrapping is left to be done by the MATLAB/Python/R/Julia interface. The MATLAB interface already does so.
constr_modifiedis removed from the output ofmatlab/lincoa, so is the warning "%s:ConstraintModified".
Version 0.5.1
Compared with Version 0.5, this release implements the following.
- Change the 
whileloop inbobyqa/rescue.f90to adoloop, completely eliminating the possibility of infinite cyclings. - Change the default value of 
ctolfromEPStosqrt(EPS).ctolis used only bylincoaandcobylainselectxwhen selecting the iterate to return. It is not used during the iterations of any algorithm. - Implement stress tests on large problems. The tests verify that PRIMA does not run into errors even if invoked on problems that are much larger than the dimension PRIMA can effectively handle.
 - Add 
-heap-arraysand/heap-arraysto the compilation options incompile.mfor macOS and Windows, respectively, with the Intel compiler. Without this, PRIMA will encounter stack overflows when handling large problems. 
Version 0.5
Compared to Version 0.4, the major changes are as follows.
- Use 
newunitinfprint.f90, addressing #22. - Revise 
fprint.f90to fix "buffer overflow" detected bynagfor. See 311f2b3. cobylais modified as follows concerningcpen.- Implement the update of 
cpenincobylb.f90into a functiongetcpen, eliminating acyclein the code. The flow of the algorithm becomes simpler. - Impose 
cpen >= cpenmin > 0, while Powell's code allowscpen = 0. - The initialization of 
cpentakes into accountfcratio, while Powell's code initializes it to zero. 
- Implement the update of 
 - Implement the boolean variable 
trfail.- For 
newuoa/bobyqa/lincoa,trfail = .not. (qred > 1.0E-5_RP * rho**2). In previous versions,trfailis essentially.not. (qred > 0)even though it was not defined explicitly. - For 
uobyqa,trfail = .not. (qred > EPS * rho**2). In previous versions,trfailis essentially.not. (qred > 0)even though it was not defined explicitly. - For 
cobyla,trfail = .not. (prerem > min(ONE, cpen) * rho**2). In previous versions,trfailis essentially.not. (max(prerec, preref) > 0)even though it was not defined explicitly. 
 - For 
 cobylanow tries the last trust-region step before returning, if this step was too short to try before.- The linting of Fortran and MEX gateways is now done on GitHub-hosted runners, except for the lining by 
nagfor. 
N.B.: This version still retains the RESCUE and IDZ techniques in Powell's original implementation. See the release notes of Version 0.3 for more details.
Version 0.4
Compared to Version 0.3, the major changes are as follows. Except for the first one, they are all improvements on the MATLAB interface rather than the Fortran code. This release also removes large unwanted files in the history of the repo, making its size reduced from 100+MB to ~15MB.
- 
The definition of
weightincobyla/setdrop_trwas buggy (our implementation of this function is completely different from the one by Powell, so Powell's original code does not have this problem). The problematic code was adopted from LINCOA, which does not have the same problem due to the definition ofxoptin this function. The bug has been fixed. See the comment inlincoa/setdrop_tr. - 
If
lbcontainsNaN, then we raise a warning "INVOKER:NaNInLB" and regard the constraints as infeasible. The same forub. See the functionpre_bconinpreprima.m. This is consistent with the behavior ofNaNin the floating point number system. In previous versions, theNaNin bounds is considered as no bound. - 
If
AineqorbineqcontainsNaN, then we raise a warning "INVOKER:NaNInequality" and regard the constraints as infeasible. Similar forAeqandbeq. See the functionpre_lconinpreprima.m. - 
If
Aineqcontains infinite values, orbineq = -Inf, then we raise a warning "INVOKER:InfInequality" and regard the constraints as infeasible. Similar forAeqandbeq. See the functionpre_lconinpreprima.m. - 
We allow
x0,bineq,beqto be rows. See the functionspre_x0,pre_lcon,pre_fun,pre_nonlconinpreprima.m. No matter whether they are rows or columns, we always requiresize(Aineq) = [length(bineq), length(x0)]andsize(Aeq) = [length(beq), length(x0)]. This is consistent with the behavior offmincon. We raise warnings "INVOKER:X0IsRow", "INVOKER:BineqIsRow", or "INVOKER:BeqIsRow" if they are rows. - 
iprintis fully implemented. The MATLAB version behaves exactly as the Fortran version regardingiprint, except ifclassicalis true, in which case the MATLAB version does not support a nonzeroiprint. - 
testprima: perturb is changed toepsthe perturbation ofx0is changed tox0 = x0 + perturb*max(norm(x0), 1)*r/norm(r);
In addition, the following is added to lines 122–124 to test
iprint:if ~release % 20230508: Test the newly implemented iprint. problem.options.iprint = round(4*(2*rand() - 1)); end
 
N.B.: This version still retains the RESCUE and IDZ techniques in Powell's original implementation. See the release notes of Version 0.3 for more details.
Version 0.3
This version provides miscellaneous improvements upon the last one. The major changes are as follows.
- Start profiling the solvers under various compilation options (
-O1,-O2,-Ofast, etc). This is to ensure that the modernized solvers' good performance does not depend on a specific optimization level. - Start profiling LINCOA and COBYLA with and without the optimization toolbox of MATLAB. The preprocessing of linearly constrained problems makes use of the toolbox if available. This is to make sure that its availability does not affect the good performance of the modernized solvers.
 - Start profiling the LINCOA and COBYLA with multiple penalty parameters in the merit function. This is to make sure that the good performance of the modernized solvers holds for a wide range of penalty parameters.
 - Implement start_time and end_time in the MATLAB tests. This helps us to monitor which problem takes excessive time or fails, which is nontrivial to detect if the problems are solved in parallel.
 - Implement 
GAMMA3in the Fortran code. This is the threshold for testing whetherDELTAis close enough toRHOafter an update (if yes,DELTAwill be reset toRHO). - Enable automatic spell-check using 
https://github.com/marketplace/actions/check-spelling - Switch the default Fortran standard to Fortran 2008, and drop the support for Fortran 2003.
 - Use the 
iso_fortran_envintrinsic module, especially forREAL64,INT32, etc. - Use the 
storage_sizeintrinsic function. - Use allocated characters for variable-length strings.
 - Use 
ERROR STOPinstead ofSTOPinERRSTOP. We prefer the former because it is more appropriate in this scenario, and, more importantly, Fortran 2018 allowsERROR STOPin PURE procedures, which enables us to achieve the purity of all functions later when we switch the default Fortran standard to Fortran 2018. 
In addition, we also profile BOBYQA, NEWUOAand LINCOA with and without RESCUE / IDZ techniques to see how much difference it makes. See benchmarking/rescue_idz/ for the results.  According to the test on 20230406, the techniques affect the performance only marginally. The settings of the test are as follows.
- Test problems: the CUTEst set.
 - Maximum dimension: 200.
 - Maximum number of linear constraints for LINCOA: 20000.
 - Tested features: plain, randomizex0-eps, perm, single, dnoise-1.0e-6, signif5, noise-1.0e-4.
 - Number of random tests when applicable: 3.
 - RHOEND: 1.0e-8.
 - Maximum number of function evaluations: 500*dimension.
 - Tolerance for the convergence tests in the performance profiles: 10^{-i}, i = 1, ..., 16.
 
Note that we purposely set the stopping criteria and convergence tolerance to observe the long-term behavior of the algorithms, as the techniques under consideration do not take effect unless we ask for very high precision.
The result: RESCUE and IDZ do not affect the performance of the algorithms significantly. For the classical version (i.e., Powell's implementation), the difference is barely observable. For the modernized version, the difference is more obvious, but still not significant.
Therefore, it seems safe to ignore these two techniques in the first implementation of algorithms based on the derivative-free PSB.
We plan to remove IDZ from NEWUOA and LINCOA, and modify the code of NEWUOA, BOYQA, and LINCOA to use RESCUE as a restarting technique. This will significantly simplify the code, and possibly unify the updating subroutines as well as shiftbase. We will also make sure that the modification will improve the performance of the solvers.  If this is implemented, then the current release is the last version that implements Powell's original RESCUE and IDZ techniques.
Update 20230510: Version 0.4 still retains RESCUE and IDZ.