Closed jschueller closed 11 months ago
hi, what about this one @zaikunzhang ?
Hi @jschueller , I am a bit hesitating about this point. In this implementation, I try to keep things as straightforwrd as possible. To this end, I purposely used automatic arrays rather than allocatable ones whenever possible.
UOBYQA is not designed for problems with more than a few tens of variables. NEWUOA is designed for that. The current implementation of UOBYQA will not encounter any problem when the dimension is not more than 150 according to the stress test.
I think we should make an exception for this one as its unusually big O(N^4), or another option is to cap N<150
I think we should make an exception for this one as its unusually big O(N^4), or another option is to cap N<150
OK. I agree with you. I have done it manually in https://github.com/libprima/prima/commit/a69d22dddb99d3c0dacccbb30b50758caa1f1dd3 , using safealloc
, which is a wrapper of allocate
with some checking. It will raise an error if the allocation fails.
If you think it is fine, I will close this. Thanks.
fine with me
Thank you.
allows to return an error instead of crashing when N is too large