2017-03-15 67 views
1

我想使用parallel::makePSOCKcluster(..., outfile = "")来显示工作进程的输出,并且我还想隐藏“正在启动的worker”消息。这可能吗?目前,我得到:Silent 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 

回答

3

不,不可能在不修改parallel包的情况下避免这些消息。 .slaveRSOCK函数总是使用cat显示该消息,因此如果指定outfile="",您将始终看到这些消息。