library(pa-6ren">
gpt4 book ai didi

r - 静默并行::makePSOCKcluster(..., outfile = "")

转载 作者:行者123 更新时间:2023-12-04 14:26:51 26 4
gpt4 key购买 nike

我想使用 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

最佳答案

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

关于r - 静默并行::makePSOCKcluster(..., outfile = ""),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42821130/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com