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
292 stars 36 forks source link

maxfun=8000 for cobyla in `t_large.c` #66

Closed zaikunzhang closed 10 months ago

zaikunzhang commented 10 months ago

Hi @jschueller ,

Is there a particular reason for setting maxfun=8000 for cobyla in t_large.c, but not others? Will it be OK if we simply use the same maxfun as other solvers in t_large.c?

BTW, would you mind if this file is renamed to stress.c?

Thanks.

Zaikun

jschueller commented 10 months ago

yes, I set it to 8000 so it doesnt exceed the CI 6h time limit (should run for ~5h according to my experimentations)

zaikunzhang commented 10 months ago

With https://github.com/equipez/github_actions_scripts/blob/de1b45b9fd667a9fe42cd7d5ecec4318f60d9117/check_success_timeout, it does not matter if the job takes more than 6 hours. It will be canceled and marked as a success.

zaikunzhang commented 10 months ago

I made the above-mentioned changes in https://github.com/libprima/prima/commit/eb5707c152b52f1b8061d89968d27786e994d831. I hope this is fine with you. We can still make changes if you would like.

BTW, I modified the value of maxfun in the C examples, in order to show to the user that it is sensible to set maxfun to a multiple of n.

In addition, I removed the initialization of nf in the C examples, as it will be set by the solver anyway. I hope this is not considered bad practice in C.

Tell me if any of the above points is problematic to you. Otherwise, you may close this issue.

Thank you.

jschueller commented 10 months ago

its fine

zaikunzhang commented 10 months ago

In addition, I removed the initialization of nf in the C examples, as it will be set by the solver anyway. I hope this is not considered bad practice in C.

Indeed, I was wrong here. It was not initialization but declaration. Corrected.