且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

无法删除以前的doSMP队列

更新时间:2023-12-03 18:11:40

doSMP实际上是为在Revolution版本上使用而开发的,并且在您的系统上非常繁重.以我的经验,如果您对自己的工作不是很非常小心,它很容易使R崩溃.对于并行计算,我对包有更好的体验,降雪(实际上是下雪的前端)和多核.

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.

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

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.

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

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)

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

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.

最后,忘记doSMP并使用其他提到的软件包之一.如果您以前没有经验,降雪将使您头疼的问题降到最低. 此处

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.

更新:从R2.14开始,您具有内置软件包parallel,该软件包结合了multicoresnow的功能.

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