Hi R-devel list, OpenBLAS is readily available for unix-likes: https://cloud.r-project.org/web/packages/gcbd/vignettes/gcbd.pdf However, my questions are: 1) Would R-devel consider using OpenBLAS for the main distribution of R for all platforms including Windows? 2) If so, would R-devel set the default multi-thread level to the number of (real) cores on a machine? My sense is there're a lot of wasted resources on laptops and personal desktops around the world that could be utilised by such a switch. I believe most unix-like users don't know about OpenBLAS and are blissfully ignorant of the available speed gains. It seems to be quite difficult for a typical Windows user to get this done today. Thanks heaps, Kenny [[alternative HTML version deleted]]
Kenny, On 17 December 2017 at 09:28, Kenny Bell wrote: | Hi R-devel list, | | OpenBLAS is readily available for unix-likes: | | https://cloud.r-project.org/web/packages/gcbd/vignettes/gcbd.pdf Please consider re-reading this vignette of mine. BLAS is an interface, OpenBLAS is but one implementation. R has allowed you to switch between different implementations for a long time (if you used a shared library build), and illustrating / measuring the possible performance differences is the whole point of the gcbd benchmarking package. | However, my questions are: | | 1) Would R-devel consider using OpenBLAS for the main distribution of R for | all platforms including Windows? | 2) If so, would R-devel set the default multi-thread level to the number of | (real) cores on a machine? It's complicated. If you fork at the process-level (with package parallel or one of the many other mechansim) and then also used multi-threaded BLAS you can starve yourself for resources quickly. | My sense is there're a lot of wasted resources on laptops and personal | desktops around the world that could be utilised by such a switch. I | believe most unix-like users don't know about OpenBLAS and are blissfully | ignorant of the available speed gains. It seems to be quite difficult for a | typical Windows user to get this done today. Many things a developer / power-user would do are very difficult on Windows. It is one of the charms of the platform. On the other hand you do get a few solitaire games so I guess everybody is happy. Dirk | Thanks heaps, | Kenny | | [[alternative HTML version deleted]] | | ______________________________________________ | R-devel at r-project.org mailing list | https://stat.ethz.ch/mailman/listinfo/r-devel -- http://dirk.eddelbuettel.com | @eddelbuettel | edd at debian.org
On point 1): The standard approach seems to favor the reference BLAS for reasons other than speed. For example, vecLib, Apple's multi-threaded BLAS library, is not the default choice for macOS binaries due to concerns about 'precision'. See: https://cloud.r-project.org/bin/macosx/RMacOSX-FAQ.html#Whic h-BLAS-is-used-and-how-can-it-be-changed_003f This doesn't appear to be Mac- or vecLib-specifc. R-Core seem wary of non-reference BLAS implementations for several reasons: 'External BLAS implementations often make less use of extended-precision floating-point registers and will almost certainly re-order computations. This can result in less accuracy than using the internal BLAS, and may result in different solutions, e.g. different signs in SVD and eigendecompositions.' https://cran.r-project.org/doc/manuals/r-devel/R-admin.html#BLAS I'm not sure how pervasive a problem this is, though. Keith On Sat, Dec 16, 2017 at 4:01 PM, Dirk Eddelbuettel <edd at debian.org> wrote:> > Kenny, > > On 17 December 2017 at 09:28, Kenny Bell wrote: > | Hi R-devel list, > | > | OpenBLAS is readily available for unix-likes: > | > | https://cloud.r-project.org/web/packages/gcbd/vignettes/gcbd.pdf > > Please consider re-reading this vignette of mine. BLAS is an interface, > OpenBLAS is but one implementation. R has allowed you to switch between > different implementations for a long time (if you used a shared library > build), and illustrating / measuring the possible performance differences > is > the whole point of the gcbd benchmarking package. > > | However, my questions are: > | > | 1) Would R-devel consider using OpenBLAS for the main distribution of R > for > | all platforms including Windows? > | 2) If so, would R-devel set the default multi-thread level to the number > of > | (real) cores on a machine? > > It's complicated. If you fork at the process-level (with package parallel > or > one of the many other mechansim) and then also used multi-threaded BLAS you > can starve yourself for resources quickly. > > | My sense is there're a lot of wasted resources on laptops and personal > | desktops around the world that could be utilised by such a switch. I > | believe most unix-like users don't know about OpenBLAS and are blissfully > | ignorant of the available speed gains. It seems to be quite difficult > for a > | typical Windows user to get this done today. > > Many things a developer / power-user would do are very difficult on > Windows. It is one of the charms of the platform. On the other hand you do > get a few solitaire games so I guess everybody is happy. > > Dirk > > | Thanks heaps, > | Kenny > | > | [[alternative HTML version deleted]] > | > | ______________________________________________ > | R-devel at r-project.org mailing list > | https://stat.ethz.ch/mailman/listinfo/r-devel > > -- > http://dirk.eddelbuettel.com | @eddelbuettel | edd at debian.org > > ______________________________________________ > R-devel at r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-devel >[[alternative HTML version deleted]]
I would be very cautious about OpenBLAS in particular... from time to time I get complains from users that compiled code calculations in my WGCNA package crash or produce wrong answers with large data, and they all come from OpenBLAS users. I am yet to reproduce any of their crashes when using MKL and ATLAS BLAS implementations. Just my 2 cents... Peter On Sat, Dec 16, 2017 at 12:28 PM, Kenny Bell <kmbell56 at gmail.com> wrote:> Hi R-devel list, > > OpenBLAS is readily available for unix-likes: > > https://cloud.r-project.org/web/packages/gcbd/vignettes/gcbd.pdf > > However, my questions are: > > 1) Would R-devel consider using OpenBLAS for the main distribution of R for > all platforms including Windows? > 2) If so, would R-devel set the default multi-thread level to the number of > (real) cores on a machine? > > My sense is there're a lot of wasted resources on laptops and personal > desktops around the world that could be utilised by such a switch. I > believe most unix-like users don't know about OpenBLAS and are blissfully > ignorant of the available speed gains. It seems to be quite difficult for a > typical Windows user to get this done today. > > Thanks heaps, > Kenny > > [[alternative HTML version deleted]] > > ______________________________________________ > R-devel at r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-devel
It seems like many of the multi-threaded BLASes have some sort of fundamental problem preventing use in the way Juan suggests: - Dirk's vignette states that ATLAS "fixes the number of cores used at compile-time and cannot vary this setting at run-time", so any user-friendly implementation for R would have to compile ATLAS for 1-16 threads to allow the user to switch at run-time. This might dramatically affect install times. - MKL seems like it's been outright rejected in the past based on not being "free-enough". - OpenBLAS causes crashes. Has anyone tried ExBLAS for use with R? On Sun, Dec 17, 2017 at 1:03 PM, Peter Langfelder < peter.langfelder at gmail.com> wrote:> I would be very cautious about OpenBLAS in particular... from time to > time I get complains from users that compiled code calculations in my > WGCNA package crash or produce wrong answers with large data, and they > all come from OpenBLAS users. I am yet to reproduce any of their > crashes when using MKL and ATLAS BLAS implementations. > > Just my 2 cents... > > Peter > > On Sat, Dec 16, 2017 at 12:28 PM, Kenny Bell <kmbell56 at gmail.com> wrote: > > Hi R-devel list, > > > > OpenBLAS is readily available for unix-likes: > > > > https://cloud.r-project.org/web/packages/gcbd/vignettes/gcbd.pdf > > > > However, my questions are: > > > > 1) Would R-devel consider using OpenBLAS for the main distribution of R > for > > all platforms including Windows? > > 2) If so, would R-devel set the default multi-thread level to the number > of > > (real) cores on a machine? > > > > My sense is there're a lot of wasted resources on laptops and personal > > desktops around the world that could be utilised by such a switch. I > > believe most unix-like users don't know about OpenBLAS and are blissfully > > ignorant of the available speed gains. It seems to be quite difficult > for a > > typical Windows user to get this done today. > > > > Thanks heaps, > > Kenny > > > > [[alternative HTML version deleted]] > > > > ______________________________________________ > > R-devel at r-project.org mailing list > > https://stat.ethz.ch/mailman/listinfo/r-devel > >[[alternative HTML version deleted]]