Silent parallel :: makePSOCKcluster(...,outfile ="")

时间:2017-03-15 21:35:12

标签: r parallel-processing

我想使用parallel::makePSOCKcluster(..., outfile = "")来显示工作进程的输出,我还想隐藏"起始工作者"消息。这可能吗?目前,我得到:

> library(parallel)
> sink("/dev/null")
> cluster = makePSOCKcluster(4, outfile = "")
starting worker pid=6695 on localhost:11111 at 17:31:50.015
starting worker pid=6703 on localhost:11111 at 17:31:50.240
starting worker pid=6711 on localhost:11111 at 17:31:50.467
starting worker pid=6724 on localhost:11111 at 17:31:50.698

1 个答案:

答案 0 :(得分:3)

不,如果不修改parallel包,就无法避免这些消息。 .slaveRSOCK功能始终使用cat显示该消息,因此,如果您指定outfile="",您将始终看到这些消息。