[R-SIG-Mac] BLAS/LAPACK/Accelerate on Leopard with R 2.6.2

Bill Northcott w.northcott at unsw.edu.au
Fri Mar 28 02:35:43 CET 2008


On 27/03/2008, at 10:00 PM, Alexy wrote:
> BLAS = -Wl,-framework -Wl,Accelerate
>
> -- per:
>
> http://macresearch.org/performance_tutorial_part_i_introducing_accelerate
>
> -- is this compatible with that packaged gfortran?

Shared libraries on MacOS X are dylibs.  These are independent of the  
compiler used to build them.  It matters not if it was gcc 3.x, 4.x  
some Intel/IBM thingy or LLVM-clang.  They are not like shared objects  
on other UNIX/Linux.

The ABI differences do matter when you try to link object files or  
static libraries.

Prof Ripley wrote

> I believe that the binary versions distributed from CRAN are compiled
> against vecLib:
>
> blacklark% otool -L libRblas.dylib
> libRblas.dylib:
>
> /Library/Frameworks/R.framework/Versions/2.6/Resources/lib/ 
> libRblas.dylib
> (compatibility version 0.0.0, current version 0.0.0)
>         /System/Library/Frameworks/vecLib.framework/Versions/A/vecLib
>

In Tiger/Leopard veclib is a subframework of Accelerate.framework.   
Apple recommends including and linking it as Accelerate.  At some time  
in the future veclib may be merged into Accelerate.  All that matters  
is that Accelerate provides the APIs you would expect from BLAS/LAPACK  
all optimised for the Mac you are using.  Don't worry about what goes  
on inside.  That's Apple's business.

If you think you can build a better BLAS/LAPACK than they do, you are  
welcome to roll your own, but using Accelerate means your code  
automatically, without recompiling, acquires any fixes/optimisations  
that Apple supplies in software updates (and they have supplied such  
updates in the past).

Bill



More information about the R-SIG-Mac mailing list