[Rcpp-devel] Using Goto blas in Mac OS

Anirban Mukherjee anirban.mukherjee at gmail.com
Mon Nov 1 05:38:51 CET 2010


Hi Dirk,


> We do not do anything particular. We just let R and the OS load the right
> one
>  for us.
>

Yep, that's what I would have expected as well. Will send a post out on OS X
if it becomes worth it: for now, can stick with VecLib. I do suspect this
should be easy to fix.


> In general replacing a BLAS implementation is just a matter of making it
> visible to the dynamic linker -- I used that very feature on a recent paper
> on BLAS benchmarking (see my blog and the gcbd package on CRAN which has
> the
> paper as a vignette).  But again, I limited myself to Linux there as that
> is
> what I use.
>

Yep, same on Mac. Details here:

http://cran.rakanu.com/bin/macosx/RMacOSX-FAQ.html#Which-BLAS-is-used-and-how-can-it-be-changed_003f


> You are one Rcpp version behind here. We did release 0.8.7 right after R
> 2.12.0.
>

Mac binary on CRAN is for 0.8.6. Had not installed 0.8.7 from source because
I figured there must be a reason why the Mac binary was for 0.8.6. Just
updated from source: seems to have installed fine.

Somewhat instructive that Rcpp works with alternative BLAS. The problem
occurs only for RcppArmadillo and other BLAS.

> fx <- cxxfunction( signature(x = "integer", y = "numeric" ) , '
+ return wrap( as<int>(x) * as<double>(y) ) ;
+ ', plugin = "Rcpp" )
> fx( 2L, 5 )
[1] 10
> fx <- cxxfunction( signature(x = "integer", y = "numeric" ) , '
+ int dim = as<int>( x ) ;
+ arma::mat z = as<double>(y) * arma::eye<arma::mat>( dim, dim ) ;
+ return wrap( arma::accu(z) ) ;
+ ', plugin = "RcppArmadillo" )
> fx( 2L, 5 )
Error in dyn.load(libLFile) :
  unable to load shared object
'/var/folders/jE/jEC73-DJEeSnEv72rVDHDE+++TM/-Tmp-//RtmpYGZhs8/file5483259d.so':
  dlopen(/var/folders/jE/jEC73-DJEeSnEv72rVDHDE+++TM/-Tmp-//RtmpYGZhs8/file5483259d.so,
6): Library not loaded: libgoto2_penrynp-r1.13.dylib
  Referenced from:
/var/folders/jE/jEC73-DJEeSnEv72rVDHDE+++TM/-Tmp-//RtmpYGZhs8/file5483259d.so
  Reason: image not found

Thanks,
Anirban

-- 
Anirban Mukherjee | Assistant Professor, Marketing | LKCSB, SMU
5056 School of Business, 50 Stamford Road, Singapore 178899 | +65-6828-1932
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.r-forge.r-project.org/pipermail/rcpp-devel/attachments/20101101/bdd7cc2e/attachment-0001.htm>


More information about the Rcpp-devel mailing list