6

On my RHEL-server I do not have admin rights, but I can create Conda environments. I would like to create a Conda environment running R with Intel MKL (IntelĀ® Math Kernel Library).

I create the environment with R_defaults.yml, running $> conda env create --file R_defaults.yml:

name: R_defaults
channels:
  - defaults
  - conda-forge
dependencies:
  - pkgs/r::r-essentials=3.6.0=r36_0

Activating the environment, starting R, and sessionInfo() I get that MKL is not used:

R version 3.6.1 (2019-07-05)
Platform: x86_64-conda_cos6-linux-gnu (64-bit)
Running under: Red Hat Enterprise Linux Server 7.7 (Maipo)

Matrix products: default
BLAS/LAPACK: /home/geiringe/miniconda3/envs/R_r/lib/R/lib/libRblas.so

Microsoft R Open (https://mran.microsoft.com/download) can be installed with MKL.

It seems Anaconda has changed opinions about Microsoft R Open. In June 2018 it was said to become default R for the Anaconda distribution (https://www.anaconda.com/introducing-microsoft-r-open-as-default-r-for-anaconda-distribution/). Now they want us to migrate away from Microsoft R Open, and they will not update MRO packages (https://docs.anaconda.com/anaconda/user-guide/tasks/using-r-language/#switch-an-environment-from-r-to-mro). The latest version of r::mro-base is 3.5.1, and is more than 1 year old. The latest version of r::r-essentials is 3.6.0

Is there a way for me to create a Conda environment with an updated version of R and with MKL?

5

Prioritizing Conda Forge and explicitly specifying a libblas build get's it working for me (osx-64). E.g.,

YAML

name: R_mkl
channels:
  - conda-forge
  - defaults
dependencies:
  - conda-forge::r-essentials=3.6
  - conda-forge::libblas=3.8.0=14_mkl

Output from R -e "sessionInfo()" in activated env:

R version 3.6.1 (2019-07-05)
Platform: x86_64-apple-darwin13.4.0 (64-bit)
Running under: macOS Mojave 10.14.6

Matrix products: default
BLAS/LAPACK: /Users/mfansler/miniconda3/envs/r_mkl/lib/libmkl_rt.dylib

locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

loaded via a namespace (and not attached):
[1] compiler_3.6.1

Hopefully it's similar for linux-64.

2
  • It worked! I have also explored libblas=3.8.0=14_openblas and libblas=3.8.0=14_blis now. In Anaconda Cloud libblas has as home netlib.org/lapack. How does LAPACK 3.8.0_14 (Nov 2017) relate to intel::mkl which has 2019.5 as the lastest version? Is conda-forge::libblas=3.8.0=14 much older? I did not manage to replace by intel::mkl=2019.5. – Geir Inge Nov 14 '19 at 15:34
  • 1
    @GeirInge no, Conda Forge's build 14 is only a month old (see files) and is listed to be compatible for all 2019 MKL releases. On my system it takes the latest mkl from defaults channel. – merv Nov 14 '19 at 15:48

Your Answer

By clicking ā€œPost Your Answerā€, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.