On Tue, 2009-03-17 at 12:12 +0900, Ei-ji Nakama wrote: > Hi > > > I have seen a lot of problems from people trying to compile R with > > MKL. So I am writing my experience in case it helps and to ask one > > question. I installed R-2.8.1.patched in Ubuntu 9.04 (gcc 4.3.3) using > > MKL 10.1.1.019. > > Do you use gcc and gfortran? > > > I configured correctly (following MKL userguide) with : > > > > sudo ./configure --with-blas="-I/opt/intel/mkl/10.1.1.019/include > > -L/opt/intel/mkl/10.1.1.019/lib/em64t -lmkl_intel_lp64 > > -lmkl_intel_thread -lmkl_core -liomp5 -lpthread" > > --with-lapack="-I/opt/intel/mkl/10.1.1.019/include > > -L/opt/intel/mkl/10.1.1.019/lib/em64t -lmkl_intel_lp64 > > -lmkl_intel_thread -lmkl_core -liomp5 -lpthread" > > cited reference https://svn.r-project.org/R/trunk/doc/manual/R-admin.texi > | You are strongly encouraged to read the MKL User's Guide > | <snip> > | @example > | MKL=" -...@{mkl_lib_path@} \ > | -Wl,--start-group \ > | $...@{mkl_lib_path@}/libmkl_gf_lp64.a \ > | $...@{mkl_lib_path@}/libmkl_gnu_thread.a \ > | $...@{mkl_lib_path@}/libmkl_core.a \ > | -Wl,--end-group \ > | -liomp5 -lpthread" > | @end example > > However, It is a little different.( -lgomp and configure line) > > MKL=" -...@{mkl_lib_path@} \ > -Wl,--start-group \ > $...@{mkl_lib_path@}/libmkl_gf_lp64.a \ > $...@{mkl_lib_path@}/libmkl_gnu_thread.a \ > $...@{mkl_lib_path@}/libmkl_core.a \ > -Wl,--end-group \ > -lgomp -lpthread" > ./configure --with-blas="$MKL" --with-lapack="$MKL"
Yes I see. If you are statically linking to MKL, you want to link to the GNU OMP runtime for portability. Sorry about that. > > But in order to compile had to edit src/modules/lapack/vecLibg95c.c > > and comment out the include. Weird, since I am not building for Mac. > > Please note the thing that ABI of fortran is different with Intel compiler > and GNU compiler. > difficult to detect the mistake. ----------------------------------------------------------------------- This message and its attachments are strictly confidenti...{{dropped:8}} ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.