5

Lately I've been doing a lot of linear algebra-heavy stuff and I found my trusty CRAN R struggling, so I looked for some ways to get a better performance. However, to get that under Windows doesn't seem so easy. Since I have an Intel machine, I thought of compiling R against the Intel MKL Math library instead than the standard BLAS. I found this: relatively simple, but the reference to Red Hat Linux at the end of the page raises a suspicion. And rightly so, because if you look up the MKL entry in the R admin manual, you see that apparently compiling R against MKL doesn't work in Windows. There are similar problems if one tries to use ATLAS under Windows. Thus, much to my regret, I decided to abandon CRAN R and to switch to Microsoft R Open. It's very simple to install MKL for this distribution of R, and it works great. Thus I wonder: are there are other R distributions or implementations under Windows, which are consistently faster than CRAN R for linear algebra computations? Are they in common use? Do you use any of them?

DeltaIV
  • 4,773
  • 12
  • 39
  • 86
  • does https://cran.r-project.org/bin/windows/base/rw-FAQ.html#Can-I-use-a-fast-BLAS_003f help (instructions for replacing the distributed BLAS with an optimized version) – Ben Bolker Mar 25 '16 at 17:54
  • Unfortunately my chip (Intel Xeon) isn't listed there. It's a pity, because that would have been a great solution: just overwrite a file (Rblas.dll) without even having to compile from source. – DeltaIV Mar 25 '16 at 18:00
  • maybe e-mail the maintainer (listed at http://prs.ism.ac.jp/~nakama/SurviveGotoBLAS2/ ) and find out if they might be able to get their hands on a Xeon? – Ben Bolker Mar 25 '16 at 18:08
  • maybe more than you bargained for but maybe try https://github.com/xianyi/OpenBLAS ? – Ben Bolker Mar 25 '16 at 18:09
  • Never tried it, not sure if it applies here, but this guy forked R and claims his is faster... http://www.pqr-project.org/ – cory Mar 25 '16 at 18:12
  • Wow, lots of suggestions! Thanks @benbolker, the xianyi link says that the code for Nehalem should be the same as for Xeon, so I will try to compile that. Also contacting the SurviveGotoBLAS2 maintainer is a good suggestion. cory , I didn't know about pnr. It sounds cool, but the instructions for compiling from source under Windows are a bit complicated and I'm not sure if it requires installing cygwin before or not. I will start with Ben Bolker's suggestions and if they don't work, I may try pqr. – DeltaIV Mar 25 '16 at 18:30
  • [Here's a useful (if maybe slightly outdated) list.](https://github.com/qinwf/awesome-R#other-interpreters) – alistaire Mar 25 '16 at 18:35
  • it would be great if after trying some stuff out you compile a list of what worked (and maybe what didn't) and post as an answer ... – Ben Bolker Mar 25 '16 at 18:50
  • @BenBolker, I left the office for Easter holidays now, but I'll be sure to fire up a few tests and let you know next week. Happy Easter! – DeltaIV Mar 25 '16 at 21:22
  • **R** with Intel MKL also works on Xeon Phi line of coprocessors, https://software.intel.com/en-us/articles/running-r-with-support-for-intel-xeon-phi-coprocessors, though hardware is a bit pricey. Another link: http://blog.revolutionanalytics.com/2015/05/behold-the-power-of-parallel.html. Revolution **R** is what is known nowadays as Microsoft **R** – Severin Pappadeux Mar 25 '16 at 21:45
  • @BenBolker, I would have loved to compile the list you asked for, but the question was closed. Frankly the reason for closing it makes no sense: the question didn't attract any "opinionated" answer (?? all answers express some opinion, there are no universal truths) nor any spam. On the contrary all your comments were very useful and helped me a lot. Sorry, I would have loved to give back to the community, but I can't. – DeltaIV Apr 06 '16 at 07:54
  • 1
    Here is also some methods to make the latest version of R, 3.6.2, use Intel MKL: https://stackoverflow.com/questions/38090206/linking-intels-math-kernel-library-mkl-to-r-on-windows/42854705#42854705 and here is also some benchmarks: https://csantill.github.io/RPerformanceWBLAS/ Instructions for installing R with OpenBlas on Windows are given here: http://www.avrahamadler.com/r-tips/build-openblas-for-windows-r64/ – Tom Wenseleers Dec 27 '19 at 09:42

0 Answers0