문제

I have a program that runs through R but uses the BLAS routines. It runs through correctly about 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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top