[Rd] calling fortran functions CHOL and DPOTRF form Fortran

Gilles GUILLOT gilles.guillot at inapg.inra.fr
Tue Jul 5 13:12:48 CEST 2005

Hi all,

I'm working out some Fortran code for which 
I want to compute the Choleski decomposition of a covariance matrix
in Fortran.

I tried to do it by two methods :

1) Calling the lapack function DPOTRF.
I can see the source code and check that my call is correct,
but it does not compile with:
system("R CMD SHLIB ~/main.f")

I get:
Error in dyn.load(x, as.logical(local), as.logical(now)) :
        unable to load shared library 
 undefined symbol: dpotrf_

Could anyone point out how to compile with such a call to lapack?

2) Calling the Fortran function CHOL
The previous combination of R CMD SHLIB  and dyn.load 
compiles fine but  I would like to see the source code of this function 
to check if my call is correct. I've not been able to find it in  the R source 
Could anyone point the place of that file? 

Thanks in advance,



INRA -Département Mathématiques et Informatique Appliquées
Unité Mixte de Recherche INRA - INAPG - ENGREF

Institut National Agronomique de Paris-Grignon
16, rue Claude Bernard
75231 Paris cedex 5 France

phone 33 1 44 08 18 42
fax   33 1 44 08 16 66

More information about the R-devel mailing list