2017-03-15 36 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="",您將始終看到這些消息。