[Rd] Lapack / dgesvx function declaration

Kristian Buchardt kristian at buchardt.net
Wed Jun 4 11:53:41 CEST 2014


Hello there

I'm writing some c-code to solve a numerically tough problem for me in 
R. Looking in Lapack.h, i find the following line

F77_NAME(dgesvx)(const int* fact, const char* trans, const int* n,

and I believe that "fact" should've been char instead of int, i.e.

F77_NAME(dgesvx)(const char* fact, const char* trans, const int* n,


My reasoning: In the R-source:
src/modules/lapack/dlapack.f

I find the following lines:

*       SUBROUTINE DGESVX( FACT, TRANS, N, NRHS, A, LDA, AF, LDAF, IPIV,
*                          EQUED, R, C, B, LDB, X, LDX, RCOND, FERR, BERR,
*                          WORK, IWORK, INFO )
*
*       .. Scalar Arguments ..
*       CHARACTER          EQUED, FACT, TRANS
*       INTEGER            INFO, LDA, LDAF, LDB, LDX, N, NRHS
*       DOUBLE PRECISION   RCOND

where FACT is specified to a char.


Might this simply be an error in Lapack.h? And can I just edit my 
Lapack.h and compile?

-- 
Best Regards
Kristian Buchardt

Ph.d.-student
http://math.ku.dk/~buchardt

Department of Mathematical Sciences, University of Copenhagen
Universitetsparken 5, DK-2100 Copenhagen O

PFA Pension
Sundkrogsgade 4, DK-2100 Copenhagen O



More information about the R-devel mailing list