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]]
On Sat, Dec 16, 2017 at 7:41 PM, Kenny Bell <kmbell56 at gmail.com> wrote:> 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... >> >> PeterI've been building R on Windows 64 bit with OpenBLAS for years and my builds pass check-devel. For a while in the past it failed one check as the tolerance was 5e-5 and with my build of OpenBLAS the error was 5.4e-5 or 5.7e-5, but that was changed around R 3.3, if I recall correctly. I provide descriptions here [1], but I haven't gone so far as to post compiled Rblas.dlls just yet. My personal build sets 4 threads when compiling OpenBLAS itself as I'm currently on a quad-core SandyBridge. In tests I ran a few years ago, both single and multi threaded BLAS compile and then can be compiled into R with no issues (on my platforms, at least). Most matrix operations performed better with multi-threaded except for R's eigenvalue decomposition, to the nest of my recollection. Avi [1] https://www.avrahamadler.com/r-tips/build-openblas-for-windows-r64/
Julia Programming Language uses also OpenBlas, and it is actively maintained with bugs being fixed as I have checked it out: http://www.openblas.net/Changelog.txt So I still see it ok to be included as an options(...) feature (by default off, just for safety), over other Blas libraries. R could not use Intel MKL for legal reasons (I think), because as long that R ships with GPL libraries, shipping R by default with Non-GPL is illegal. Cheers, Juan El 17/12/2017 2:50 a. m., "Avraham Adler" <avraham.adler at gmail.com> escribi?:> On Sat, Dec 16, 2017 at 7:41 PM, Kenny Bell <kmbell56 at gmail.com> wrote: > > 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 > > I've been building R on Windows 64 bit with OpenBLAS for years and my > builds pass check-devel. For a while in the past it failed one check > as the tolerance was 5e-5 and with my build of OpenBLAS the error was > 5.4e-5 or 5.7e-5, but that was changed around R 3.3, if I recall > correctly. I provide descriptions here [1], but I haven't gone so far > as to post compiled Rblas.dlls just yet. My personal build sets 4 > threads when compiling OpenBLAS itself as I'm currently on a quad-core > SandyBridge. In tests I ran a few years ago, both single and multi > threaded BLAS compile and then can be compiled into R with no issues > (on my platforms, at least). Most matrix operations performed better > with multi-threaded except for R's eigenvalue decomposition, to the > nest of my recollection. > > Avi > > [1] https://www.avrahamadler.com/r-tips/build-openblas-for-windows-r64/ > > ______________________________________________ > R-devel at r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-devel >[[alternative HTML version deleted]]