帮助奇怪的plyr / doSMP警告

时间:2011-04-04 21:56:54

标签: r parallel-processing

我正在尝试运行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

1 个答案:

答案 0 :(得分:1)

你正在使用Windows吗? 我在linux上得到了同样的错误。 还有与doSNOW相同的错误。

然后我尝试使用doMC而不是doSMP,它运行良好。