Closed merliseclyde closed 1 year ago
Hi Merlise -- you are the second person who is coming ringing this week.
I clearly need to hightlight better what is at the botton of the README under appendix: this is essentially five years old, and outdated. You should be able to get MKL directly from the distro. My 22.10 system on which I type this has
edd@rob:~$ apt-cache search intel-mkl
intel-mkl - Intel® Math Kernel Library (Intel® MKL)
intel-mkl-cluster - Intel® Math Kernel Library (Intel® MKL) (Cluster)
intel-mkl-doc - Intel® Math Kernel Library (Intel® MKL) (Doc)
intel-mkl-full - Intel® Math Kernel Library (Intel® MKL) (Full)
libmkl-cluster-dev - Static libs of intel-MKL: Cluster
libmkl-computational-dev - Static libs of intel-MKL: Computational Layer
libmkl-interface-dev - Static libs of intel-MKL: Interface Layer
libmkl-meta-cluster - Metapackage for Intel-MKL: Shared Object for Cluster
libmkl-meta-computational - Metapackage of intel-MKL: Shared Objects for Computaional Layer
libmkl-meta-interface - Metapackage of intel-MKL: Shared Objects of Interface Layer
libmkl-meta-threading - Metapackage of intel-MKL: Shared Objects of Threading Layer
libmkl-threading-dev - Static libs of intel-MKL: Threading Layer
edd@rob:~$
With rocker/r-devel there may be another simplification we always had in the same base shell script I posted for ten or fiften years to build R (here R-devel) from source: I think for simplicity it used the included LAPACK/BLAS and not the interface.
Again looking at my local installation -- this confirms it. But I suggest you check your container:
> sessionInfo()
R Under development (unstable) (2023-04-09 r84207)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 22.10
Matrix products: default
BLAS: /usr/local/lib/R-devel/lib/R/lib/libRblas.so
LAPACK: /usr/local/lib/R-devel/lib/R/lib/libRlapack.so; LAPACK version 3.11.0
locale:
[1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8 LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 LC_PAPER=en_US.UTF-8
[8] LC_NAME=C LC_ADDRESS=C LC_TELEPHONE=C LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C
time zone: America/Chicago
tzcode source: system (glibc)
attached base packages:
[1] stats graphics grDevices utils datasets methods base
loaded via a namespace (and not attached):
[1] compiler_4.4.0 parallel_4.4.0 fortunes_1.5-4
>
Pulling the newest (remotely cron
built) r-devel now.
... Moments later ... conforming. Also libRblas.so
and libRlapack.so
so no 'hook' for MKL or OpenBLAS.
edd@rob:~$ dkrrr rocker/r-devel RD
R Under development (unstable) (2023-04-09 r84210) -- "Unsuffered Consequences"
Copyright (C) 2023 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.
Natural language support but running in an English locale
R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.
Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.
> sessionInfo()
R Under development (unstable) (2023-04-09 r84210)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Debian GNU/Linux bookworm/sid
Matrix products: default
BLAS: /usr/local/lib/R/lib/libRblas.so
LAPACK: /usr/local/lib/R/lib/libRlapack.so; LAPACK version 3.11.0
locale:
[1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C
[3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8
[5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8
[7] LC_PAPER=en_US.UTF-8 LC_NAME=C
[9] LC_ADDRESS=C LC_TELEPHONE=C
[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C
time zone: Etc/UTC
tzcode source: system (glibc)
attached base packages:
[1] stats graphics grDevices utils datasets methods base
loaded via a namespace (and not attached):
[1] compiler_4.4.0
>
I made a https://github.com/eddelbuettel/mkl4deb/commit/9178efd1a37957fb400ca414a35b2287f3e8e14e to clarify in the README.
So I think we can close this. Now, as for bark
, CRAN actually does not use MKL as far as I know [ goes checking ]. Oh, wow. One of those added BDR tests. Well in that case I recommend to (hushes quietly) ... simply not run that test at CRAN. I have a trick in Rcpp to turn extended tests on when the version number has four parts (say: 1.0.10.4 as our current dev version) and off when it has three (say: 1.0.11, next release due July). That avoids control over env vars and other tricks. Or you could move that one test to another directory and use a helper script at home to include it etc pp.
Ok if we close this? Feel free to reopen if you have an issue with the old scripts, happy to help at Rocker repo or otherwise.
I was tying to use the (updated) script to add MLK support in a rocker/r-devel image (so far just running interactively) to test an R package (/tthps://github.com/merliseclyde/bark) that fails unit-tests on CRAN MKL. (I am guessing it is a random-number threading issue, but would like to debug more)
Script (slightly updated for MKL version) from the one here
But when I go to start r-devel. via RD and run sesssionInfo() I am not seeing the MKL BLAS but:
Matrix products: default BLAS: /usr/local/lib/R/lib/libRblas.so LAPACK: /usr/local/lib/R/lib/libRlapack.so; LAPACK version 3.11.0
Any suggestions of what I may have missed? Is there an existing rocker/r version with MKL support already configured ?TIA - Merlise