Unable to delete previous doSMP queues

安稳与你 提交于 2019-12-02 00:57:33

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.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!