Monday, February 25, 2013

drop in replacement of BLAS & Lapack library from Intel

I was trying to use Intel's BLAS & Lapack library from R and was able to do it as in previous post.  Since BLAS & Lapack are commonly used libraries, I was thinking using Intel's version for all programs that rely on them.  Here is how to do it.

  1. add path: /opt/intel/Compiler/11.1/064/lib/ia32 and /opt/intel/Compiler/11.1/064/mkl/lib/32to /etc/ld.so.conf or create new file inside /etc/ld.so.conf.d
  2. go to /opt/intel/Compiler/11.1/064/mkl/tools/builder/
  3. make ia32 export=blas_list
    This will make a libblas of ia32 version to replace libblas.so.3gf.  You may need to modify makefile.  Read the makefile for more options
  4. make ia32 export=lapack_list
  5. use "update-alternative" command to point system's libblas and liblapack to your newly built mkl blas/lapack libraries
  6. verify your libraries are used. launch R, find its PID, then execute lsof -p <PID>
My system is x86 version ubuntu 11.10 with intel MKL installed in default folder.

No comments:

Post a Comment