r - 进行并行计算时运行 Rmpi 出错
问题描述
我正在尝试使用以下行在 R 中运行并行计算
library(parallel)
library(snow)
library(snowFT)
library(VGAM)
library(dplyr)
library(Rmpi)
nCores <- detectCores() - 1
cl <- makeCluster(nCores)
然后R返回一个错误
Error in Rmpi::mpi.comm.spawn(slave = mpitask, slavearg = args, nslaves = count, : Internal MPI error!, error stack: MPI_Comm_spawn(cmd="C:/R/R-40~1.2/bin/x64/Rscript.exe", argv=0x00000223DB137530, maxprocs=11, MPI_INFO_NULL, root=0, MPI_COMM_SELF, intercomm=0x00000223DCFCD998, errors=0x00000223DA9FC9E8) failed Internal MPI error! FAILspawn not supported without process manager
3. Rmpi::mpi.comm.spawn(slave = mpitask, slavearg = args, nslaves = count, intercomm = intercomm)
2. makeMPIcluster(spec, ...)
1. makeCluster(nCores)
我试图从这里在 Windows 上安装 MPICH2 ,但最终的 cmd 命令mpiexec -validate
总是返回FAIL
。
您能否详细说明如何解决此问题?
解决方案
问题是makeCluster(nCores)
被多个包使用。因此,我用它parallel::makeCluster(nCores)
来解决这个问题。
推荐阅读
- amazon-web-services - 如何将客户端连接到远程 Windows Server 2019 AWS EC2
- terminal - 安装颤振 bash_profile
- c# - 从内部窗口关闭客户端模板
- reactjs - 用 jss 重新绘制样式
- vb.net - 如何不断地将文本输出到 RichTextBox 并使其在视觉上引人注目?
- excel - 是否可以编写一个在 Excel 外部运行的 VBA 宏,并打开一个 .xlsx 文件并将其另存为 .xlsb 文件?
- r - 如何在整齐的世界中折叠行或使用 data.table 在传播数据 long -> wide 后折叠行
- fpdf - $pdf->output("reports/SalesReport.pdf", "F"); 不能在 Mac 上工作
- wpf - 在调试和构建 WPF 应用程序时遇到问题
- python - 无法在 python 3.7.0 上导入 ijson 模块