Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

I want to use parallel::makePSOCKcluster(..., outfile = "") to show output from worker processes, and I also want to hide the "starting worker" messages. Is this possible? Currently, I get:

> 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
like image 239
landau Avatar asked Mar 02 '26 22:03

landau


1 Answers

No, it isn't possible to avoid those messages without modifying the parallel package. The .slaveRSOCK function always displays that message using cat, so if you specify outfile="", you'll always see those messages.

like image 182
Steve Weston Avatar answered Mar 05 '26 15:03

Steve Weston