我一直试图遵循一些指南,以便在运行Windows 7的工作机器上使用我的所有(4)处理器,它们都建议使用降雪()包。但是,当我运行下面的代码时,R会一直运行,直到我终止它。换句话说,R是挂的。
sfInit(parallel = TRUE, cpus = 4)同样的结果
sfInit(parallel = TRUE, cpus = 2)再来一次
sfInit(parallel = TRUE)出于好奇,我的Sys.info()
sysname release version nodename
"Windows" "7" "build 7601, Service Pack 1" "<REDACTED>"
machine login user effective_user
"x86" "<REDACTED>" "<REDACTED>" "<REDACTED>" 还有..。
sessionInfo()
R version 3.2.0 (2015-04-16)
Platform: i386-w64-mingw32/i386 (32-bit)
Running under: Windows 7 (build 7601) Service Pack 1
locale:
[1] LC_COLLATE=English_United States.1252 LC_CTYPE=English_United States.1252
[3] LC_MONETARY=English_United States.1252 LC_NUMERIC=C
[5] LC_TIME=English_United States.1252
attached base packages:
[1] parallel stats graphics grDevices utils datasets methods base
other attached packages:
[1] actuar_1.1-8 fitdistrplus_1.0-4 MASS_7.3-40 doParallel_1.0.8 doSNOW_1.0.12
[6] iterators_1.0.7 foreach_1.4.2 snowfall_1.84-6 snow_0.3-13
loaded via a namespace (and not attached):
[1] compiler_3.2.0 tools_3.2.0 survival_2.38-1 splines_3.2.0 codetools_0.2-11发布于 2015-06-17 15:10:17
虽然不直接使用降雪,但我能够通过运行以下命令实现我想要的结果
library(doParallel)
win7 <- makeCluster(4)
registerDoParallel(win7)
#... rest of code to run in parallel ...
#... using doParallel specific syntax https://stackoverflow.com/questions/30813241
复制相似问题