Building R using BLIS

231 views
Skip to first unread message

Andrew Finley

unread,
Aug 18, 2020, 11:09:25 PM8/18/20
to blis-discuss

Hi All,

Just curious if anyone has tried or has some insight about what it would take (or if it is possible) to build R using the BLIS's BLAS-like interface on linux? R can be built using openBLAS, MKL, and other threaded BLAS libraries, see https://cran.r-project.org/doc/manuals/r-devel/R-admin.html#BLAS R can also take advantage of threaded LAPACK see https://cran.r-project.org/doc/manuals/r-devel/R-admin.html#LAPACK

I just bought a threadripper 3990X and would love to not rely on the MKL MKL_DEBUG_CPU_TYPE  workaround (which doesn't work any more with the newest MKL builds).

There would a lot of statistical computing community interest if we could figure out how to build R using BLIS and perhaps also libFLAME. I'd be happy to collaborate on getting this to work and perhaps contributing to the R documentation and/or short peer reviewed benchmark publication.

Thanks!
-Andy


Justin Shea

unread,
Aug 19, 2020, 1:21:13 AM8/19/20
to Andrew Finley, blis-discuss
Hi Andy,

R user and early Threadripper adopter here, I’ve done this and presented the performance in a lightning talk at the 2019 R/Finance conference. So, it does indeed work, and very well I might add.

I’ve linked BLIS to R on a 1950x and 2950x. I’m exploring a 39XXx build at present.

Using the benchmarkme R package, BLIS beat out other identical processors by a wide margin, which presumably were not using BLIS. I noticed a substantial increase in multithreaded performance on my own machine, which was extremely satisfying.

I’ve long wanted to document the process more in depth and write it up. I started running more formal benchmarks against all the popular BLAS options, but got preoccupied by other endeavors before writing it up...I was just happy it worked so well! I also explored creating an R package which streamlines the BLIS install process which can be done without too much work for Linux builds.

Thanks for offering to collaborate and even help writeup benchmark findings for publication. I’m interested. I do need to publish and with Zen architecture gaining popularity at both the high and low end of the market, I agree this would indeed be very helpful to other R users.

Justin 



--


You received this message because you are subscribed to the Google Groups "blis-discuss" group.


To unsubscribe from this group and stop receiving emails from it, send an email to blis-discuss...@googlegroups.com.


To view this discussion on the web visit https://groups.google.com/d/msgid/blis-discuss/1c3cb8cb-7903-4f45-bcf8-1c0e5209e93cn%40googlegroups.com.


Andrew Finley

unread,
Aug 19, 2020, 11:03:19 AM8/19/20
to justi...@gmail.com, blis-discuss
Hi Justin,

That’s fantastic news! Thanks for responding. Would you mind sharing your blis compile configuration, R configure arguments, etc. to get it compiled? Did you use the generic lapack or somehow use libFLAME?

I have two R packages spBayes and spNNGP that rely greatly on the underlying blas and lapack implementations. We could do some benchmarking with blis, openblas, and mkl on 3990X. The R Journal might be a good outlet for a short paper. Perhaps we could talk about other outlets off this thread, please feel free to email me at fin...@msu.edu if you’re interested.

Thanks again for your help!
Andy

Justin Shea

unread,
Aug 21, 2020, 12:34:10 AM8/21/20
to Andrew Finley, blis-discuss
Hi Andy,

Sure thing, I'll share my notes via your MSU address.

I paired BLIS with both LAPACK and libFLAME and I didn't notice a big difference between them. This was early 2019 though, so might be time to try it again.
The real gains came from BLIS.

Your R packages look very interesting and should benefit from BLIS!

More to your MSU address soon,

Justin

Justin Shea

unread,
Sep 4, 2020, 10:53:18 PM9/4/20
to Andrew Finley, blis-discuss
Hi Andy,

I messaged your @msu address from my js...@roosevelt.edu account. Let me know if you received it and if you have any questions.

Good luck with the start of a new semester!

~ Justin


Reply all
Reply to author
Forward
0 new messages