Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pybobyqa is slowing down noticeably with the input dimension #6

Open
fkarger opened this issue Feb 14, 2019 · 2 comments
Open

pybobyqa is slowing down noticeably with the input dimension #6

fkarger opened this issue Feb 14, 2019 · 2 comments
Assignees

Comments

@fkarger
Copy link

fkarger commented Feb 14, 2019

I tested bybobyqa e.g. with the rastrigin function for different input dimensions.
The numerical results were very good but I got an increasingly strong speed penalty.
For 50 dimensions it was already very noticeably.
I also tested the BOBYQA implementation of apache.commons.math (Java) which does not seem to have this issue (but other issues).
Probably a profiler could easily pinpoint the reason.

@lindonroberts lindonroberts self-assigned this Feb 15, 2019
@lindonroberts
Copy link
Collaborator

lindonroberts commented Feb 15, 2019

This implementation doesn't include all of the original code's linear algebra tricks which help it scale, so the per-iteration cost is roughly cubic with the input dimension (if you use the default npt=2n+1, worse if objfun_has_noise=True). Improving scalability is an ongoing project for me, but in the meantime you could try reducing npt.

Also, on my machine, I sometimes have an issue with NumPy calling LAPACK, and LAPACK unnecessarily using too many cores, making it much slower than it should be. Setting the environment variables export OPENBLAS_NUM_THREADS=1 and export NUMEXPR_NUM_THREADS=1 helps a lot in this case.

@fkarger
Copy link
Author

fkarger commented Feb 15, 2019

Thank you very much for the hints!
I am really looking forward to the better scaling version :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants