[Rd] MKL with latest Rs

Tomas Kalibera tom@@@k@||ber@ @end|ng |rom gm@||@com
Fri Jul 26 12:22:19 CEST 2019

Dear Robert,

try setting these MKL environment variables


the example should then report correct results (and regardless of the 
version of R). There is no need to rebuild R from source, but when you 
are building from source, this problem would be detected by checks in R 
configure scripts. I can reproduce the problem on Ubuntu 19.04 and MKL 
installed from binaries as described in Dirk's blog, both with R 3.5.2 
and R-devel, and the problem goes away on both when the variables are set.


On 7/17/19 3:18 PM, Robert B. Gramacy wrote:
> Dear R-devel team,
> I've encountered problems with recent Rs (>= 3.5.3) and MKL.  I've followed
> Dirk's (http://dirk.eddelbuettel.com/blog/2018/04/15/) and Intel's (
> https://software.intel.com/en-us/articles/quick-linking-intel-mkl-blas-lapack-to-r)
> instructions and many versions of MKL.  All works fine in my Ubuntu 18
> setup for R 3.5.2 and older.  Carrying out the install and linking
> instructions works fine for later Rs, but calculations involving linear
> algebra become corrupted.  E.g., following Dirk's very simple svd example
> from that link above ...
>> n <- 1e3
>> X <- matrix(rnorm(n*n),n,n)
>> Xsvd <- svd(X)
>> Xsvd$d[1:5]
> [1] 63.09366 62.47868 62.26147 61.94530 61.84727
> ... you get Eigenvalues that are bigger than 1e26 in R-devel, say, but
> (correct) values near 60 with R 3.5.2.
> I just wanted to throw that out there in case anyone else had come across
> something similar.  I don't mind using a slightly older R/MKL for my
> stuff.  I might speculate that the Microsoft R Open folks are having
> similar issues because they're still using older Rs.
> I haven't tried compiling and linking from source (
> https://cran.r-project.org/doc/manuals/R-admin.html#MKL) because I haven't
> had success with that in some time.
> -B
> 	[[alternative HTML version deleted]]
> ______________________________________________
> R-devel using r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel

More information about the R-devel mailing list