Intel® oneAPI Math Kernel Library
Ask questions and share information with other developers who use Intel® Math Kernel Library.
6981 Discussions

Intel MKL make R lm() fails if observations are high enough

Raffaele_M_
Beginner
421 Views

I have installed Intel MKL on my Kubuntu 19.04. I have R 3.6.0.

Using Intel MKL, R's linear regression failes if the number of samples is somehow high (20k). Here is the code:

```
rm(list=ls())
N = 20000
xvar <- runif(N, -10, 10) 
e <- rnorm(N, mean=0, sd=1)
yvar <- 1 + 2*xvar + e
plot(xvar,yvar)
lmMod <- lm(yvar~xvar)
print(summary(lmMod))
```

The coefficients are just random numbers and are not significant, R-squared is low. Instead for lower N (like 2000) it works.

Just uninstalling Intel MKL and thus relying back on OpenBLAS solved the problem completely.
 

Also check here

0 Kudos
0 Replies
Reply