libprima / prima

PRIMA is a package for solving general nonlinear optimization problems without using derivatives. It provides the reference implementation for Powell's derivative-free optimization methods, i.e., COBYLA, UOBYQA, NEWUOA, BOBYQA, and LINCOA. PRIMA means Reference Implementation for Powell's methods with Modernization and Amelioration, P for Powell.
http://libprima.net
BSD 3-Clause "New" or "Revised" License
304 stars 40 forks source link

The Fortran 77 version of UOBYQA encounters infinite cyclings very often if `PRIMA_REAL_PRECISION` is 32 #98

Open zaikunzhang opened 12 months ago

zaikunzhang commented 12 months ago

The Fortran 77 version of UOBYQA encounters infinite cyclings very often if PRIMA_REAL_PRECISION is 32. This has been observed on the following CUTEst problems:

BEALE
BENNETT5LS
BOXBODLS
BROWNBS
CUBE
EXP2
HIELOW
HIMMELBB
JUDGE
S308
PRICE4

There do exist problems where the solver works, e.g., HILBERTA and PRICE3, but they seem to be rare among problems under 3 dimensions.

This is observed via the workflow https://github.com/fortlab/prima/actions/workflows/profile_uobyqa_small_sq.yml with https://github.com/libprima/prima/commit/2394f479d3780d362712d9b270966d93d478c5c8 . To reproduce it locally, do the following in a MATLAB command window.

! git clone https://github.com/libprima/prima.git
cd('prima');
! git checkout 2337c68
options.classical = true; options.single = true;
setup('uobyqa', options);
problem = macup('beale');  % This needs MatCUTEst at https://github.com/matcutest/matcutest_compiled
problem.options.classical = true; problem.options.precision = 'single'; 
uobyqa(problem);

This will drive UOBYQA into an infinite cycling.

Surely, this is not a concern for us, because it happens only to the original Fortran 77 implementation. Nevertheless, it is still interesting to investigate the reason underneath, to further understand the shortcomings of the original Fortran 77 implementation.