我正在尝试运行并行计算。因此我安装了软件包
Rmpi
。
install.packages("Rmpi")
require("Rmpi")
您能详细说明一下为什么我刚安装软件包时会出现这样的错误消息吗?
WARNING: Rtools is required to build R packages but is not currently installed. Please download and install the appropriate version of Rtools before proceeding:
https://cran.rstudio.com/bin/windows/Rtools/
Installing package into �C:/Users/Dung Le/Documents/R/win-library/4.0�
(as �lib� is unspecified)
trying URL 'https://cran.rstudio.com/bin/windows/contrib/4.0/Rmpi_0.6-9.zip'
Content type 'application/zip' length 353588 bytes (345 KB)
downloaded 345 KB
package ‘Rmpi’ successfully unpacked and MD5 sums checked
The downloaded binary packages are in
C:\Users\Dung Le\AppData\Local\Temp\RtmpGm7Riu\downloaded_packages
Loading required package: Rmpi
Error: package or namespace load failed for �Rmpi�:
.onLoad failed in loadNamespace() for 'Rmpi', details:
call: inDL(x, as.logical(local), as.logical(now), ...)
error: unable to load shared object 'C:/Users/Dung Le/Documents/R/win-library/4.0/Rmpi/libs/x64/Rmpi.dll':
LoadLibrary failure: The specified module could not be found.
PS:我使用Windows 10 Pro,版本为2004,内部版本为19041.508。我的 R 是 4.0.2.
我遇到了完全相同的问题,这是因为我实际上没有在计算机上安装 MPI 实现。
我使用的是 Windows,因此我从
下载了 msmpisdk.msi 和 msmpisetup.exe 文件 (v10.1.1)
https://github.com/microsoft/Microsoft-MPI/releases
我立即运行库(Rmpi)并且它起作用了。