csgillespie / benchmarkme

Crowd sourced benchmarking
https://csgillespie.github.io/benchmarkme/
40 stars 13 forks source link

get_linear_algebra() does not detect Intel MKL #15

Closed ck37 closed 5 years ago

ck37 commented 6 years ago

Hello,

It looks like get_linear_algebra() does not detect Intel MKL blas/lapack when R is compiled to use that - it just returns character(0) for $blas and $lapack.

Looks like it should be an easy fix to detect one of the MKL libraries though:

screen shot 2017-09-23 at 12 34 28 pm

This is using R 3.4.2-beta, Intel MKL 2015.6.233, and gcc 4.8.5.

(Here are the instructions I used to compile R with MKL on my cluster: https://github.com/ck37/savio-xsede-notes/blob/master/compile-R.md)

Cheers, Chris

ck37 commented 6 years ago

Confirmed on another cluster as well (XSEDE bridges), this time with a more recent MKL and slightly different .so files displayed. Looks like libmkl_core.so might be the best one to look for, or just "libmkl".

[ck37@br005 3-analysis]$ lsof -p 17013 | grep libmkl
R       17013 ck37  mem    REG   0,42  28137653   54600213 /opt/intel/compilers_and_libraries_2017.4.196/linux/mkl/lib/intel64_lin/libmkl_core.so (br001.opa.bridges.psc.edu:/nfs/opt/intel)
R       17013 ck37  mem    REG   0,42  28634975   54600196 /opt/intel/compilers_and_libraries_2017.4.196/linux/mkl/lib/intel64_lin/libmkl_intel_thread.so (br001.opa.bridges.psc.edu:/nfs/opt/intel)
R       17013 ck37  mem    REG   0,42   9734508   54600205 /opt/intel/compilers_and_libraries_2017.4.196/linux/mkl/lib/intel64_lin/libmkl_intel_lp64.so (br001.opa.bridges.psc.edu:/nfs/opt/intel)
csgillespie commented 6 years ago

Thanks for the report. So in the above code, what should be returned for blas & lapack?

Thanks

ck37 commented 6 years ago

I think "mkl" would be reasonable - that is what R shows in ./configure when building from source.

csgillespie commented 6 years ago

Do you mkl for both blas & lapack?

I just noticed, but does the lp in libmkl_intel_lp64.so stand for lapack?

ck37 commented 6 years ago

Yep it's used for both blas & lapack. Not sure about intel_lp64 but that makes sense.

On Tue, Sep 26, 2017 at 9:26 AM, Colin Gillespie notifications@github.com wrote:

Do you mkl for both blas & lapack?

I just noticed, but does the lp in libmkl_intel_lp64.so stand for lapack?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/csgillespie/benchmarkme/issues/15#issuecomment-332255888, or mute the thread https://github.com/notifications/unsubscribe-auth/AADGUpAMjDhdLc7Lzu3aofmJB-0my_c2ks5smSXKgaJpZM4Phqc2 .

csgillespie commented 6 years ago

Would you try https://gist.github.com/csgillespie/b0ddf5b54d806e8b3c02d236ebf5ecdf

ck37 commented 6 years ago

Trying it on another system it looks like there is a different lapack path, so that current proposed grep search would need to be modified a bit:

/global/software/sl-6.x86_64/modules/langs/intel/2015.6.233/mkl/lib/intel64/libmkl_gf_lp64.so
csgillespie commented 6 years ago

Thanks. I've updated the blas detection in the latest GitHub version. It should pick up your configuration. Would you check when you have a minute?

csgillespie commented 5 years ago

Using sessionInfo should return the correct lib