Hi all, I'm trying to build R from subversion with MKL 10.0.2 on Ubuntu. I tried: ./configure --with-blas='-L/opt/intel/mkl/10.0.2.018/lib/em64t -lmkl -lguide' --with-lapack='/opt/intel/mkl/10.0.2.018/lib/em64t -lmkl -lmkl_lapack' --enable-R-shlib and got: R is now configured for x86_64-unknown-linux-gnu Source directory: . Installation directory: /usr/local C compiler: gcc -std=gnu99 -g -O2 Fortran 77 compiler: gfortran -g -O2 C++ compiler: g++ -g -O2 Fortran 90/95 compiler: gfortran -g -O2 Obj-C compiler: Interfaces supported: X11 External libraries: readline Additional capabilities: PNG, JPEG, iconv, MBCS, NLS, cairo Options enabled: shared R library, shared BLAS, R profiling, Java Recommended packages: yes but make then builds R's blas, and when I subsequently do linear algebra in R it's obviously not multithreading. What am I doing wrong? Thanks, Anand [[alternative HTML version deleted]]
Look in config.log to see what's wrong. (E.g. is /opt/intel/mkl/10.0.2.018/lib/em64t in the ld.so cache?) And note the warnings in the manual about using --with-lapack: it is most definitely not recommended. R-devel would be a better place to ask questions about this. On Tue, 4 Nov 2008, Anand Patil wrote:> Hi all, > I'm trying to build R from subversion with MKL 10.0.2 on Ubuntu. I tried: > > ./configure --with-blas='-L/opt/intel/mkl/10.0.2.018/lib/em64t -lmkl > -lguide' --with-lapack='/opt/intel/mkl/10.0.2.018/lib/em64t -lmkl > -lmkl_lapack' --enable-R-shlib > > and got: > > R is now configured for x86_64-unknown-linux-gnu > > Source directory: . > Installation directory: /usr/local > > C compiler: gcc -std=gnu99 -g -O2 > Fortran 77 compiler: gfortran -g -O2 > > C++ compiler: g++ -g -O2 > Fortran 90/95 compiler: gfortran -g -O2 > Obj-C compiler: > > Interfaces supported: X11 > External libraries: readline > Additional capabilities: PNG, JPEG, iconv, MBCS, NLS, cairo > Options enabled: shared R library, shared BLAS, R profiling, > Java > > Recommended packages: yes > > but make then builds R's blas, and when I subsequently do linear algebra in > R it's obviously not multithreading. What am I doing wrong? > > Thanks, > Anand > > [[alternative HTML version deleted]] > > ______________________________________________ > R-help at 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. >-- Brian D. Ripley, ripley at stats.ox.ac.uk Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UK Fax: +44 1865 272595
On Thu, Nov 6, 2008 at 2:01 AM, Ei-ji Nakama <nakama@ki.rim.or.jp> wrote:> Hi > > If you want to use MKL10(no 8 or 9), you should obey instructions of > R-admin. > MKL10 needs openmp. This needs gcc4.2 or later. > OpenMP for Intel was necessary with MKL10.0.1.x (There was not it in a > manual of MKL). > # Please try an additional effect of "-liomp5" in the %*% > > # fp-model of Linux of IA32 is 387(80bit) about the precision, > # but SSE2(64bit) is a default in Intel64. > # It is caused by this that results are different. > > There was not the problem in R-2.8.0 either > MKL_LIB_PATH=/opt/intel/mkl/10.0.5.025/lib/em64t > MKL=" -L${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 -lguide -lpthread -lgomp" > ./configure --with-lapack="$MKL" --with-blas="$MKL"Thanks Ei-Ji, I tried that earlier, and it doesn't encounter the zdotu error (maybe it was fixed in 10.0.5?) but I got a different error: gcc -std=gnu99 -I../../src/extra/zlib -I../../src/extra/bzip2 -I../../src/extra/pcre -I. -I../../src/include -I../../src/include -I/usr/local/include -DHAVE_CONFIG_H -fpic -g -O2 -c Rmain.c -o Rmain.o gcc -std=gnu99 -Wl,--export-dynamic -L/usr/local/lib64 -o R.bin Rmain.o -L../../lib -lR /opt/intel/fce/10.1.018/lib/libiomp5.so: undefined reference to `pthread_atfork' collect2: ld returned 1 exit status make[3]: *** [R.bin] Error 1 make[3]: Leaving directory `/working_copies/R/src/main' make[2]: *** [R] Error 2 However, I saw the same error with 10.0.2 and the broken thermometer; setting the environment variables listed previously: CFLAGS=-pthread -O3 FC=gfortran -pthread FFLAGS=-pthread CXXFLAGS=-O3 -pthread FCLAGS=-pthread LDFLAGS=-lpthread makes that error not happen, so it looks like we have a real solution! Anand [[alternative HTML version deleted]]