使用 SNOW(或多核或...)时如何保存计算状态

发布于 2024-08-29 07:09:20 字数 127 浏览 3 评论 0原文

根据丰富的经验,我发现偶尔将长时间计算的状态保存到磁盘以便稍后在出现故障时启动它们很有用。我可以在 R 的分布式计算包(如 SNOW 或多核)中执行此操作吗?
由于主人以不透明的方式从奴隶那里收集东西,因此似乎不清楚如何做到这一点。

From hard experience I've found it useful to occasionally save the state of my long computations to disk to start them up later if something fails. Can I do this in a distributed computation package in R (like SNOW or multicore)?
It does not seem clear how this could be done since the master is collecting things from the slaves in a non-transparent way.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

白衬杉格子梦 2024-09-05 07:09:20

这(再次:-)是一件很难的事。

您可以尝试使用 save()save.image() 在节点上转储快照。然后,您可以尝试重新组织代码,以便节点可以在上次快照后恢复。

或者您可以尝试重新组织工作流程,以便节点“获取票据”并返回结果。这样,中央节点就会密切关注所有内容,您可以在那里记录临时结果。

不管怎样,你想要的东西都不是开箱即用的(据我所知)。

This is (again :-) a hard one.

You could try to dump snapshots on the nodes using save() or save.image(). You could then try to re-organize your code so that the nodes can resume after the last snapshot.

Or you could try to re-organize your workflow such that nodes 'take tickets' and return the results. That way the central node keeps tabs on everything and you can log interim results there.

Either way, what you desire is not available out of the box (as far as I know).

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文