I have a program that runs through R but uses the BLAS routines. It runs through correctly ab开发者_StackOverflowout 8 times but then throws an error:
BLAS/LAPACK routine 'DGEMV ' gave error code -6
What does this error code mean?
R defines the XERBLA function as
void F77_NAME(xerbla)(const char *srname, int *info)
{
/* srname is not null-terminated. It should be 6 characters. */
char buf[7];
strncpy(buf, srname, 6);
buf[6] = '\0';
error(_("BLAS/LAPACK routine '%6s' gave error code %d"), buf, -(*info));
}
from the src/main/print.c file.
the Netlib version of dgemv.f shows that only the input parameters are checked. A code of 6 shows a problem with either the LDA or M parameter.
*...
ELSE IF (LDA.LT.MAX(1,M)) THEN
INFO = 6
*...
END IF
IF (INFO.NE.0) THEN
CALL XERBLA('DGEMV ',INFO)
RETURN
So it appears that R takes the negative of the BLAS error code, which I think causes lots of confusion. I think this answers my question but not my problem, since it works several times with the same parameters before the error is thrown.
DGEMV does not return any error codes.
This bug implies that the error is coming from R
itself.
Perhaps you should file a bug against R
.
精彩评论