[R] Problem with R, MKL, and Ubuntu 11.04

Yan Zhou zhouyan at me.com
Sun Mar 27 15:36:57 CEST 2011


This may not be a proper question to ask here, however I don't find a better place to ask.

I am testing Ubuntu Natty 11.04. I build R with Blas/Lapack linked to intel MKL. Everything works fine but when quitting R with q(), the R process won't quit, and the system monitor shows its waiting channel as futex_wait_queue_me. For example, with "make check", the process will halted after checking the graphics package, whose test script called lm(), which I think used lapack routines in MKL.

The next thing I tried is using environmental variables such that MKL runs in sequential mode. Then everything goes perfect. "make check" was successful.

So I identified that the problem is with the multi-threaded version of MKL. After some trials, I think it is true, as eigen(), inv(), and matrix multiplication, etc all cause the same problem. The computing itself is fine, but R is halted when quiting.

Then I wrote some C code using blas/lapack to test, and there's no problem with MKL, at least with my testing code.

Both R-2.13 and R-2.12 are tried. Both intel icc and gcc, ifort and gfortran are tried. In sum, I tried most configuration combination of compilers, openmp flags, etc I can think about. But the problem persist.

I think this could be a problem with ubuntu 11.04. So this as I said in the beginning, this may not be a proper question to ask here. However, I tried blas/lapack routines for decomposition, etc in C, and it runs without problem. So there's may be some workaround with the problem when building R and hopefully someone can give some hints.

Best,

Yan


More information about the R-help mailing list