[R-SIG-Mac] Using LAPACK/BLAS with downloaded binary
Douglas Bates
bates at stat.wisc.edu
Thu May 11 23:58:36 CEST 2006
On 5/11/06, Rafael Kaufmann Nedal [Bill] <rafael.kaufmann at gmail.com> wrote:
> This is my first post on the list. I searched through the archives and
> didn't find anything up-to-date on this subject, so I figured I should
> ask.
Thanks for checking.
> I'm trying to run someone else's code that uses a LAPACK routine,
> using the downloaded R binary. Is it possible, or do I have to
> download the sources and make using the --with-blas="-framework
> vecLib" option?
The best way to do this is to create a package from the code and
include in the src directory a file called Makevars with the line
PKG_LIBS = $(LAPACK_LIBS) $(BLAS_LIBS)
See section 1.2.1 of the manual "Writing R Extensions" on any of the CRAN sites.
> By the way, I haven't figured out how the business of LAPACK driver
> routines works, nor have I found a direct explanation anywhere. Could
> somebody enlighten me?
By the LAPACK driver routines do you mean the C functions that are
called by R functions like `svd'? It is neither easy nor necessary to
understand how those work if you only want to call Lapack from
compiled code in a package. Those C functions are difficult to
understand because they must allow for internal or external Lapack and
BLAS libraries. In the case of code that will be compiled in a
package all that needs to be done is to link it against the correct
library at compile time, which is a much easier process.
> Thanks in advance,
>
> -- Rafael Kaufmann
> Rio de Janeiro, Brazil
>
> _______________________________________________
> R-SIG-Mac mailing list
> R-SIG-Mac at stat.math.ethz.ch
> https://stat.ethz.ch/mailman/listinfo/r-sig-mac
>
More information about the R-SIG-Mac
mailing list