[Rcpp-devel] Install RcppArmadillo against Intel MKL

Dirk Eddelbuettel edd at debian.org
Sat Sep 3 06:45:46 CEST 2011


Hi Zarrar,

On 2 September 2011 at 17:19, Zarrar Shehzad wrote:
| Is it possible to install RcppArmadillo with Intel's MKL library?

In principle, yes. In practice, probably too as well :)

When we started this we used Armadillo as library and via a configure
step. Doug later convinced us that relying on R is easier -- so we can take
LAPACK and BLAS and other things as given. This then, we pre-configure
Armadillo and essentially just use templates, which makes portability a snap.

So you should "just" need to declare MKL the proper way for R itself, and as
RcppArmadillo calls into R to get BLAS resolved, you should get MKL that way.
As MKL is multithreaded so you should see a speed pickup for certain ops.

See the R Inst + Admin manual for how to setup R and and MKL.

| I tried to replace the "$(LAPACK_LIBS) $(BLAS_LIBS)" in the Makevars with links
| to Intel's MKL: "-L/opt/intel/composerxe/mkl/lib/intel64/ -lmkl_gf_ilp64
| -lmkl_core -lmkl_def -lmkl_gnu_thread -
| lgomp -L/opt/intel/composerxe/mkl/lib/intel64/ -lmkl_gf_ilp64 -lmkl_core
| -lmkl_def -lmkl_gnu_thread -lgomp" and also uncommented the "#define
| ARMA_USE_LAPACK" and "#define ARMA_USE_BLAS" in armadillo_bits/config.hpp. Are
| these the wrong things to do or is there something else I should be doing?

Try leaving it as is.  At least on my Debian / Ubuntu systems, it would
transparently pass through to BLAS as used by R.

Dirk
 
| Thanks
| Zarrar
| 
| ----------------------------------------------------------------------
| _______________________________________________
| Rcpp-devel mailing list
| Rcpp-devel at lists.r-forge.r-project.org
| https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel

-- 
Two new Rcpp master classes for R and C++ integration scheduled for 
New York (Sep 24) and San Francisco (Oct 8), more details are at
http://dirk.eddelbuettel.com/blog/2011/08/04#rcpp_classes_2011-09_and_2011-10
http://www.revolutionanalytics.com/products/training/public/rcpp-master-class.php


More information about the Rcpp-devel mailing list