[R] linking R against MKL

Liaw, Andy andy_liaw at merck.com
Fri Jan 11 19:50:55 CET 2002


Dear R-help,

Has anyone tried linking R against the Intel Math Kernel Library on
(obviously) Intel architecture?  Since MKL claimed to provide optimized BLAS
and Lapack, I thought it might be possible to compile R against it w/o too
much trouble.

My first naive try under Linux (Mandrake 7.1), using R-patched dated Jan. 4,
2002:

./configure --with-blas=/usr/local/intel/mkl/LIB/libmkli32_p3.a

Unfortunately, life does not turn out to be that simple.  In config.log, I
get:

configure:8183: checking for dgemm_ in -lmkl32_p3
configure:8202: gcc -o conftest -g -O2 -I/usr/local/include  conftest.c
-lmkl32_p3 -L/usr/lib  -lg2c -lm
-L/usr/lib/gcc-lib/i586-mandrake-linux/2.95.3 -L/usr/i586-mandrake-linux/lib
-lm -ldl -lncurses -lm -L/usr/local/lib 1>&5
/usr/lib/libmkl32_p3.a(smp.o): In function `smp_setnprocessors':
smp.o(.text+0x2ce): undefined reference to `pthread_cancel'
/usr/lib/libmkl32_p3.a(smp.o): In function `smp_init':
smp.o(.text+0x462): undefined reference to `pthread_create'
collect2: ld returned 1 exit status
configure: failed program was:
#line 8191 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char dgemm_();
 
int main() {
dgemm_()
; return 0; }                    

Does anyone have any idea where to go from here?

Also, has anyone compared MKL with ATLAS?  Maybe it's not worth the effort
fooling with MKL?

Any hints/comments much appreciated!

Andy
Andy I. Liaw, PhD
Biometrics Research          Phone: (732) 594-0820
Merck & Co., Inc.              Fax: (732) 594-1565
P.O. Box 2000, RY70-38            Rahway, NJ 07065
mailto:andy_liaw at merck.com



-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list