I was feeling masochistic the other day and we have been having some wierd 
memory problems so I started digging into the source for L-BFGS-B. In the 
lbgfsb.c file I see the following code:

/*     Cholesky factorization of (2,2) block of wn. */
    F77_CALL(dpofa)(&wn[*col + 1 + (*col + 1) * wn_dim1], &m2, col, info);
    if (*info != 0) {
        *info = -2;
        return;
    }

If I am not mistaken this says that there is a m2 * col matrix that starts at 
'col + 1 + (col + 1) * wn_dm1. Where wn_dm1 is 2 * m. My first question is to 
verify that statement. 
Say I am trying to optimize the "banana function" as given in the 
documentation. In that case n = 2 and the default m = 5. So m2 is 10 and 
wn_dim1 is 20 and the dimension of wn is 100 (this is all by deduction. So if 
col is 5 then the offset into the array is 55 and there is not room in the 
vector for a 10 x 5 array. I am worried that the optimizer will silently write 
info memory that it shouldn't but more than likely it is something that I don't 
understand. So please vefify my first statement.

Thank you.

Kevin

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to