[R-sig-hpc] Choosing Intel MKL BLAS when compiling R
jgrn at illinois.edu
Tue Nov 1 23:40:51 CET 2011
Thanks -- I was able to get this running on a Debian box previously
but I'm having trouble figuring out specific steps I need to do to
choose the Intel MKL BLAS, particularly now that I don't have a
package manager to rely on -- is it an issue of using
update-alternatives? How can I check to see what R is currently
On Tue, Nov 1, 2011 at 3:12 PM, Dirk Eddelbuettel <edd at debian.org> wrote:
> On 1 November 2011 at 14:36, Jonathan Greenberg wrote:
> | r-sig-hpc'ers:
> | I am compiling R 2.14 from scratch on a cluster computer (I can't use
> | any package managers for the install, unfortunately), and they have
> | the Intel MKL libraries available for BLAS/LAPACK. I have not
> | successfully gotten a configure/make/make install combo yet that uses
> | multiple CPUs to do, say:
> | a = matrix(rnorm(5000*5000), 5000, 5000)
> | b = matrix(rnorm(5000*5000), 5000, 5000)
> | # This following line, minimally, should be getting distributed.
> | c = a%*%b
> | First off, I've tried compiling it with the configure flags:
> | ./configure --prefix=/myprefix/ --enable-BLAS-shlib
> | How do I then select the Intel MKL libraries to be used as the BLAS?
> | They are located in /usr/local/intel-11.1/mkl/lib/em64t
> BLAS is an interface so you do not have to configure for a given BLAS. You
> just build for the generic BLAS, and the drop better ones in.
> This is demonstrated in a little package / vignette / paper I have at
> and you may want to hit the pdf directly at
> This uses the package manager on Debian/Ubuntu to drop the basic Blas, Atlas,
> Goto and MKL in and out in a fully automatable (and hence scripted) manner so
> that benchmarks can be run. Besides the fact that is uses the dpkg package
> manager --- and of course the fact that the respective package maintainer
> have done the hard work of conforming to the Debian standard for pluggable
> Blas --- nothing is really distro specific. So you could use this as
> 'proof-of-concept' and try to make your cluster machines conform.
> In essence, this means trying to configure R to any external Blas and then
> plugging the MKL in.
> Some other details are in the 'R Installation and Administration' manual.
> Good luck, Dirk
> "Outside of a dog, a book is a man's best friend. Inside of a dog, it is too
> dark to read." -- Groucho Marx
Jonathan A. Greenberg, PhD
Department of Geography
University of Illinois at Urbana-Champaign
607 South Mathews Avenue, MC 150
Urbana, IL 61801
AIM: jgrn307, MSN: jgrn307 at hotmail.com, Gchat: jgrn307, Skype: jgrn3007
More information about the R-sig-hpc