无法删除以前的 doSMP 队列

发布于 2024-10-20 08:43:43 字数 473 浏览 2 评论 0原文

我正在尝试使用 doSMP,当我尝试 w <- startWorkers(4) 时,出现错误

1:在startWorkers(workerCount = 4)中:

存在使用 doSMP1 的现有 doSMP 会话

(实际上是 doSMP1,...doSMP8)。现在,当我尝试使用 rmSessions('doSMP1') 删除它时,我收到错误消息

尝试删除 qname:doSMP1

无法删除队列:doSMP1

有关如何使其工作的任何建议。在我的 8 核机器上,doSNOW 从版本 2.11 开始停止工作,我希望能够在本地并行处理,而无需将数据发送到 Linux 服务器。

我在 8 核机器上的 WinXP 64 位上运行 R 2.12.1(32 位)。

I'm trying to use doSMP, and when I try w <- startWorkers(4), I get the error

1: In startWorkers(workerCount = 4) :

there is an existing doSMP session using doSMP1

(actually doSMP1,...doSMP8). Now, when I try to remove this using rmSessions('doSMP1') I get the error message

attempting to delete qnames: doSMP1

unable to delete queues: doSMP1

Any suggestions on how to get this to work. On my 8-core machine, doSNOW stopped working from version 2.11, and I would like to be able to parallel process locally without sending things out to a linux server.

I'm running R 2.12.1 (32-bit) on WinXP 64-bit on a 8-core machine.

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

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

发布评论

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

评论(1

手长情犹 2024-10-27 08:43:43

doSMP 实际上是为了在 Revolution 版本上使用而开发的,并且对您的系统来说相当沉重。根据我的经验,如果你对自己所做的事情不是非常非常小心,它很容易使 R 崩溃。对于并行计算,我对 snow 包有更好的体验, snowfall (本质上是雪的前端)和多核

还要确保您使用最新版本的 R (2.12.2),因为当前版本的 doSMP 是针对 2.12.2 编译的。

如果您确实需要删除这些会话,您可以尝试删除查看工人对象时指定的临时目录中的文件:

>  w <- startWorkers(workerCount = 4)
> w
$taskq
<pointer: 0x05974f20>

$qname
[1] "doSMP1"

$workerCount
[1] 4

$tmpdir
[1] "C:\\Users\\JORISF~1\\AppData\\Local\\Temp\\RtmpXxLcTk\\doSMP44c815a1"

您应该清除该目录。写下临时文件后,首先停止当前的工作人员,然后尝试删除所有会话:

stopWorkers(w)
rmSessions(all=TRUE)

然后清理目录。然后重新启动 R。有时,启动后仍有剩余会话在运行,如果再次使用 startWorkers(),您会看到这一点。如果是这样,请再次先使用 stopWorkers(w) 而无需先注册!然后再次执行 rmSessions(all=TRUE)。有时 R 会直接崩溃。重新启动并按照此处的指示继续。

最后,忘记 doSMP 并使用其他提到的软件包之一。如果您以前没有经验,降雪会给您带来的头痛最少。 这里有一个很好的介绍

更新:从 R2.14 开始,您将拥有内置包 parallel,它结合了 multicoresnow 的功能。

doSMP is actually developed to be used on the Revolution build, and is rather heavy on your system. In my experience it can crash R rather easily if you're not very, very careful about what you're doing. For parallel computing, I have far better experiences with the packages snow, snowfall (which is essentially a front-end to snow) and multicore.

Also make sure that you use the latest version of R (2.12.2), as the current build of doSMP is compiled for 2.12.2.

If you really need to get rid of those sessions, you can try to delete the files in the temporary directory specified when looking at the workers object :

>  w <- startWorkers(workerCount = 4)
> w
$taskq
<pointer: 0x05974f20>

$qname
[1] "doSMP1"

$workerCount
[1] 4

$tmpdir
[1] "C:\\Users\\JORISF~1\\AppData\\Local\\Temp\\RtmpXxLcTk\\doSMP44c815a1"

This directory you should clear. After you wrote down the temporary file, first stop the current workers and then try to delete all sessions :

stopWorkers(w)
rmSessions(all=TRUE)

Then clean out the directory. Then restart R. Sometimes it happens that after startup there is still a remainder of the sessions running, you'll see that if you use startWorkers() again. If so, again use first stopWorkers(w) without registering first! Then again do rmSessions(all=TRUE). Sometimes R will simply crash. Restart and continue as indicated here.

Finally, forget about doSMP and use one of the other mentioned packages. Snowfall will give you the least headaches if you have no previous experience. There's a nice introduction here.

UPDATE : From R2.14 on you have the built-in package parallel that combines the functionality of multicore and snow.

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