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

lbfgs: fix check_work #6

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

edwintorok
Copy link
Contributor

I got this error, which doesn't make sense because 2 is <= 2:

Fatal error: exception Failure("Lbfgs.min: dim of work too small for problem size n = 2, valid n <= 2")

iwa is allocated as 3n, and upstream L-BFGS-ocaml checks for 3n too, the check against 3corrections seems to be a typo, looking at lbfgsb.f says '3nmax' and the code has iwa.(2*n+1) so clearly related to 'n' and not 'corrections'.

I got this error, which doesn't make sense because 2 is <= 2:
```
Fatal error: exception Failure("Lbfgs.min: dim of work too small for problem size n = 2, valid n <= 2")
```

iwa is allocated as 3*n, and upstream L-BFGS-ocaml checks for 3*n too,
the check against 3*corrections seems to be a typo, looking at lbfgsb.f
says '3*nmax' and the code has `iwa.(2*n+1)` so clearly related to 'n'
and not 'corrections'.

Signed-off-by: Edwin Török <edwin@etorok.net>
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

Successfully merging this pull request may close these issues.

1 participant