arnaud gaboury
2015-Sep-17 21:43 UTC
[Rd] Optimize R: some confusion with Lapack and OpenBlas/openBlas openmp packages.
I run Fedora 22 R package. It is build with --with-lapack \ --with-blas \ --enable-R-shlib \. As the machine will act as a server with lots of R data computing, I try to optimize my R package. At first, I installed parallel_studio_xe_2016 with a free one year licence. Then, I build a package for R with Intel MKL and compiler. This took me lots of time as it was my first .rmp build. I finally managed to build and run it. Now, when looking at some blogs about R-RBenchmark.25, I realized that there is very few speed difference between Intel BLAS and OpenBlas. I am now wondering if such Intel stuff (with its paid licencing) and the need to build my own R package is really worth. Do anyone have some realistic point of view/advice? Then, in case I gave up with the Intel stuff, I am confused between the Lapack package and Openblas one. I know first one will provide liblas.so.3 when second one libopenblas.so. Am i right to say I only need one blas library and the openBlas one is the one to get? Can I use instead the openmp version of openblas, or shall I installed both? here again, I am a litle confused. As for the liblapack.so.3, I will get it from the Fedora lapack package. last, what is the correct way to tell R to use these shared libraries, after R has been built? Thank you for advices and help. --
arnaud gaboury
2015-Sep-18 07:38 UTC
[Rd] Optimize R: some confusion with Lapack and OpenBlas/openBlas openmp packages.
On Thu, Sep 17, 2015 at 11:43 PM, arnaud gaboury <arnaud.gaboury at gmail.com> wrote:> I run Fedora 22 R package. It is build with --with-lapack \ > --with-blas \ --enable-R-shlib \. > > As the machine will act as a server with lots of R data computing, I > try to optimize my R package. > > At first, I installed parallel_studio_xe_2016 with a free one year > licence. Then, I build a package for R with Intel MKL and compiler. > This took me lots of time as it was my first .rmp build. I finally > managed to build and run it. > > Now, when looking at some blogs about R-RBenchmark.25, I realized that > there is very few speed difference between Intel BLAS and OpenBlas. I > am now wondering if such Intel stuff (with its paid licencing) and the > need to build my own R package is really worth. > > Do anyone have some realistic point of view/advice? > > Then, in case I gave up with the Intel stuff, I am confused between > the Lapack package and Openblas one. I know first one will provide > liblas.so.3 when second one libopenblas.so. Am i right to say I only > need one blas library and the openBlas one is the one to get? Can I > use instead the openmp version of openblas, or shall I installed both? > here again, I am a litle confused. > As for the liblapack.so.3, I will get it from the Fedora lapack package. > > last, what is the correct way to tell R to use these shared libraries, > after R has been built?What I have done: # update-alternatives --install /usr/lib64/libblas.so.3 libblas.so.3 /usr/lib64/libopenblas.so 90 so now: # update-alternatives --config libblas.so.3 There is 1 program that provides 'libblas.so.3'. Selection Command ----------------------------------------------- *+ 1 /usr/lib64/libopenblas.so -------------------------------- As for lappack, I can't see anything about this library in my R dynamic executable: % ldd /usr/lib64/R/bin/exec/R linux-vdso.so.1 (0x00007fffc8de5000) libR.so => /usr/lib64/R/lib/libR.so (0x00007f69b8d93000) libgomp.so.1 => /lib64/libgomp.so.1 (0x00007f69b8b70000) libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f69b8954000) libc.so.6 => /lib64/libc.so.6 (0x00007f69b8594000) libblas.so.3 => /lib64/libblas.so.3 (0x00007f69b64ef000) libgfortran.so.3 => /lib64/libgfortran.so.3 (0x00007f69b61c4000) libm.so.6 => /lib64/libm.so.6 (0x00007f69b5ebc000) libquadmath.so.0 => /lib64/libquadmath.so.0 (0x00007f69b5c7c000) libreadline.so.6 => /lib64/libreadline.so.6 (0x00007f69b5a32000) libtre.so.5 => /lib64/libtre.so.5 (0x00007f69b5822000) libpcre.so.1 => /lib64/libpcre.so.1 (0x00007f69b55b1000) liblzma.so.5 => /lib64/liblzma.so.5 (0x00007f69b538b000) libbz2.so.1 => /lib64/libbz2.so.1 (0x00007f69b517b000) libz.so.1 => /lib64/libz.so.1 (0x00007f69b4f64000) librt.so.1 => /lib64/librt.so.1 (0x00007f69b4d5c000) libdl.so.2 => /lib64/libdl.so.2 (0x00007f69b4b58000) libicuuc.so.54 => /lib64/libicuuc.so.54 (0x00007f69b47c6000) libicui18n.so.54 => /lib64/libicui18n.so.54 (0x00007f69b436f000) /lib64/ld-linux-x86-64.so.2 (0x000055bf4c183000) libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x00007f69b4157000) libtinfo.so.5 => /lib64/libtinfo.so.5 (0x00007f69b3f2d000) libicudata.so.54 => /lib64/libicudata.so.54 (0x00007f69b2501000) libstdc++.so.6 => /lib64/libstdc++.so.6 (0x00007f69b217f000) ------------------------------------------------------- I guess I have to build with openmp to be able to use it.> > Thank you for advices and help. > > ---- google.com/+arnaudgabourygabx