From: Ian Scott <ian.scott@st...>  20070516 09:51:59

Mathieu Malaterre wrote: > [Hopefully the subject will not be considered as spam...] > > Hello, > > I am getting this weird error when using the vnl_lbfgs: > > > vnl_lbfgs: n = 3, memory = 5, Workspace = 43[ 0.000328064 MB], > ErrorScale = 1, xnorm = 7.59671 > vnl_lbfgs: 1:1.26056 1:53.808 1:0.24621 1:0.244475 1:0.261946 > 1:0.244681 1:0.244425 1:0.244519 1:0.244421 1:0.244466 1:0.244424 > 1:0.244421 1:0.244421 1:0.244421 1:0.244421 1:0.244421 1:0.244421 > 1:0.244421 1:0.244421 1:0.244421 1:0.244421 1:0.244421 1:0.244421 > vnl_lbfgs: ** EEEK ** > done > IFLAG= 1 LINE SEARCH FAILED. SEE DOCUMENTATION OF ROUTINE MCSRCH > ERROR RETURN OF LINE SEARCH: INFO= 3 POSSIBLE CAUSES: FUNCTION OR > GRADIENT ARE INCORRECT OR INCORRECT TOLERANCES > 3.20458 5.16978 4.68394 > 1 > Evaluations: 22 > > > As far as I understand INFO=3 means that "MORE THAN 20 FUNCTION > EVALUATIONS WERE REQUIRED AT THE PRESENT ITERATION.". Is there a way > to change this default value ? I assume that you have sensible tolerances, etc. It would seem unlikely that increasing the number of iterations in the line search would solve your problem. 20 iterations should be enough to find a minimum in a 1D problem. It is more likely that your function is behaving badly. However, if you dig into the netlib code, you should be able to find the value and change it. Either way, you really need to instrument your cost function. Print out x, f(x) (and f'(x) if you calculate it) at every evaluation. If it really is failing in a linesearch, then the last 20ish evaluations should have colinear values of x. If you plot the line position against f(x) you should be able to tell what it going on. If you are providing f'(x), it would probably also be a good idea to check the value against a forwarddifferences estimate. Ian. 