简体   繁体   English

Conda 使用 MKL 安装 r-essentials

[英]Conda install r-essentials with MKL

On my RHEL-server I do not have admin rights, but I can create Conda environments.在我的 RHEL 服务器上,我没有管理员权限,但我可以创建 Conda 环境。 I would like to create a Conda environment running R with Intel MKL (Intel® Math Kernel Library).我想使用英特尔 MKL(英特尔® Math Kernel 库)创建一个运行 R 的 Conda 环境。

I create the environment with R_defaults.yml , running $> conda env create --file R_defaults.yml :我使用R_defaults.yml创建环境,运行$> 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 和 sessionInfo() 我知道没有使用 MKL:

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. Microsoft R Open ( https://mran.microsoft.com/download ) 可以与 MKL 一起安装。

It seems Anaconda has changed opinions about Microsoft R Open. Anaconda 似乎改变了对 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/ ). 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 ).现在他们希望我们从 Microsoft R Open 迁移,并且他们不会更新 MRO 包( https://docs.Z7E3332C5FD0270D97C964E52BA184-guide-an-environment/#switch-ad8Z.com/anatask-language/#switch-ad8Z.com/anataskconda/ -从-r-到-mro )。 The latest version of r::mro-base is 3.5.1, and is more than 1 year old. r::mro-base的最新版本是3.5.1,已经1年多了。 The latest version of r::r-essentials is 3.6.0 r::r-essentials 最新版本是 3.6.0

Is there a way for me to create a Conda environment with an updated version of R and with MKL?我有没有办法使用 R 的更新版本和 MKL 创建一个 Conda 环境?

Prioritizing Conda Forge and explicitly specifying a libblas build get's it working for me ( osx-64 ).优先考虑 Conda Forge 并明确指定一个libblas构建让它对我有用( osx-64 )。 Eg,例如,

YAML 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: Output 来自R -e "sessionInfo()"在激活的环境中:

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 .希望它与linux-64类似。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM