Hello, macosx 10.13.6, Rdevel r76458 I'm trying to compile against openblas to reproduce an error on the CRAN check page (my package is clean under winbuilder and all but one of the checks). I've downloaded and installed openblas 0.3.7 but I am not 100% sure that it is being used by R. Using ./configure --with-blas="-lopenblas" Then running R to discover the PID I get: Rd % lsof -p 17960|egrep -i blas R 17960 rhankin txt REG 1,8 189224 33471762 /Users/rhankin/Rd/lib/R/lib/libRblas.dylib But it is not clear to me how to interpret this. Am I using openblas as intended? I suspect not, for I cannot reproduce the error. Can anyone advise? hankin.robin at gmail.com
I'm a linux guy so take the advice with a grain of salt... When you run the configure script, look at the output at the end of the run, it should either say Options enabled: shared BLAS, ... (means you are using R BLAS) or it should mention OpenBLAS in External libraries (meaning you are using OpenBLAS). You can also see the results in config.log of you search for BLAS. Or you could use the old trick of replacing libRblas.dylib with a link to the appropriate OpenBLAS dylib. On Tue, May 7, 2019 at 5:01 PM robin hankin <hankin.robin at gmail.com> wrote:> > Hello, macosx 10.13.6, Rdevel r76458 > > I'm trying to compile against openblas to reproduce an error on the > CRAN check page (my package is clean under winbuilder and all but one > of the checks). I've downloaded and installed openblas 0.3.7 but I > am not 100% sure that it is being used by R. > > Using > > ./configure --with-blas="-lopenblas" > > Then running R to discover the PID I get: > > > Rd % lsof -p 17960|egrep -i blas > > R 17960 rhankin txt REG 1,8 189224 33471762 > /Users/rhankin/Rd/lib/R/lib/libRblas.dylib > > > But it is not clear to me how to interpret this. Am I using openblas > as intended? I suspect not, for I cannot reproduce the error. Can > anyone advise? > > > hankin.robin at gmail.com > > ______________________________________________ > R-devel at r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-devel
(CCing the R-devel list, maybe someone will have a better answer.) To be honest, I don't know how to. I wasn't able to configure R to use OpenBLAS using the configure script and options on my Linux Fedora system. I configure it without external BLAS, then replace the libRblas.dylib (.so in my case) with a link to the OpenBLAS dynamic link library. Peter On Tue, May 7, 2019 at 7:39 PM robin hankin <hankin.robin at gmail.com> wrote:> thanks Peter, I appreciate your advice here. > > ./configure --with-blas="-lopenblas" --without-recommended-packages > > > gives me > > > > > Interfaces supported: X11, aqua, tcltk > > External libraries: readline, curl > > Additional capabilities: JPEG, NLS, ICU > > Options enabled: shared BLAS, R profiling > > > Capabilities skipped: PNG, TIFF, cairo > > Options not enabled: memory profiling > > > Recommended packages: no > > > > so it doesn't look like it's using the openBlas... how come the arguments > to ./configure are being ignored? > > > > <hankin.robin at gmail.com> > hankin.robin at gmail.com > > <hankin.robin at gmail.com> > > <hankin.robin at gmail.com> > > > On Wed, May 8, 2019 at 1:04 PM Peter Langfelder < > peter.langfelder at gmail.com> wrote: > >> I'm a linux guy so take the advice with a grain of salt... When you >> run the configure script, look at the output at the end of the run, it >> should either say >> >> Options enabled: shared BLAS, ... (means you are using R BLAS) >> >> or it should mention OpenBLAS in External libraries (meaning you are >> using OpenBLAS). >> >> You can also see the results in config.log of you search for BLAS. >> >> Or you could use the old trick of replacing libRblas.dylib with a link >> to the appropriate OpenBLAS dylib. >> >> On Tue, May 7, 2019 at 5:01 PM robin hankin <hankin.robin at gmail.com> >> wrote: >> > >> > Hello, macosx 10.13.6, Rdevel r76458 >> > >> > I'm trying to compile against openblas to reproduce an error on the >> > CRAN check page (my package is clean under winbuilder and all but one >> > of the checks). I've downloaded and installed openblas 0.3.7 but I >> > am not 100% sure that it is being used by R. >> > >> > Using >> > >> > ./configure --with-blas="-lopenblas" >> > >> > Then running R to discover the PID I get: >> > >> > >> > Rd % lsof -p 17960|egrep -i blas >> > >> > R 17960 rhankin txt REG 1,8 189224 33471762 >> > /Users/rhankin/Rd/lib/R/lib/libRblas.dylib >> > >> > >> > But it is not clear to me how to interpret this. Am I using openblas >> > as intended? I suspect not, for I cannot reproduce the error. Can >> > anyone advise? >> > >> > >> > hankin.robin at gmail.com >> > >> > ______________________________________________ >> > R-devel at r-project.org mailing list >> > https://stat.ethz.ch/mailman/listinfo/r-devel >> >[[alternative HTML version deleted]]
On 7 May 2019 at 19:43, Peter Langfelder wrote: | (CCing the R-devel list, maybe someone will have a better answer.) | | To be honest, I don't know how to. I wasn't able to configure R to use | OpenBLAS using the configure script and options on my Linux Fedora system. | I configure it without external BLAS, then replace the libRblas.dylib (.so | in my case) with a link to the OpenBLAS dynamic link library. We have been doing this for nearly 20 years in Debian. The configure call when building R is ./configure --prefix=/usr \ --with-cairo \ [... stuff omitted ...] \ $(atlas) \ $(lapack) \ --enable-R-profiling \ --enable-R-shlib \ --enable-memory-profiling \ --without-recommended-packages \ --build $(buildarch) where $(atlas) and $(lapack) these days simply are atlas = --with-blas [...] lapack = --with-lapack (and that used to be different on different architectures a long time ago). As I recall the --enable-R-shlib is also helpful. With that we have R using _external_ LAPACK and BLAS allowing us to switch seamlessly between, inter alia, reference BLAS, ATLAS, OpenBLAS and MKL (see my blog for the last one). MKL appeared to be marginally faster than OpenBLAS at a larger installation footprint. Full details are in this (somewhat sprawling, my bad) file: https://salsa.debian.org/edd/r-base/blob/master/debian/rules Dirk -- http://dirk.eddelbuettel.com | @eddelbuettel | edd at debian.org
On Wed, 8 May 2019 at 04:52, Peter Langfelder <peter.langfelder at gmail.com> wrote:> > (CCing the R-devel list, maybe someone will have a better answer.) > > To be honest, I don't know how to. I wasn't able to configure R to use > OpenBLAS using the configure script and options on my Linux Fedora system. > I configure it without external BLAS, then replace the libRblas.dylib (.so > in my case) with a link to the OpenBLAS dynamic link library.R on Fedora uses openblas by default since Fedora 23. In fact, there's a specific package, openblas-Rblas, that provides libRblas.so. $ ll /usr/lib64/R/lib/ total 64544 -rwxr-xr-x. 1 root root 60113776 feb 28 13:37 libRblas.so -rwxr-xr-x. 1 root root 1961880 mar 11 20:37 libRlapack.so -rwxr-xr-x. 1 root root 182304 mar 11 20:37 libRrefblas.so -rwxr-xr-x. 1 root root 3828104 mar 11 20:37 libR.so R reference blas is installed as libRrefblas.so. I?aki