我正在尝试运行doSMP发布的here示例:
require(plyr) # make sure you have 1.2 or later installed
x <- seq_len(20)
wait <- function(i) Sys.sleep(0.1)
system.time(llply(x, wait))
require(doSMP)
workers <- startWorkers(2) # My computer has 2 cores
registerDoSMP(workers)
system.time(llply(x, wait, .parallel = TRUE))
我收到以下警告:
Warning messages:
1: <anonymous>: ... may be used in an incorrect context: ‘.fun(piece, ...)’
2: <anonymous>: ... may be used in an incorrect context: ‘.fun(piece, ...)’
这些警告意味着什么,我应该担心它们吗?
编辑:
getRversion() = 2.12.2
packageDescription("plyr", fields="Version") = 1.4
packageDescription("doSMP", fields="Version") = 1.0-1
答案 0 :(得分:1)
然后我尝试使用doMC而不是doSMP,它运行良好。