Error attempting doSMP example

2019-03-06 14:45发布

I'm attempting to run the simple example in the doSMP vignette, but get the following error. First, I'm not sure how there is an existing doSMP session since I executed the code below right after I restarted my machine. Also, there are repeated errors about the package doSMP not existing, but the library(doSMP) call works just fine. help!

> librayr(doSMP)
Error: could not find function "librayr"
> library(doSMP)
Loading required package: foreach
Loading required package: iterators
Loading required package: codetools
foreach: simple, scalable parallel programming from Revolution Analytics
Use Revolution R for scalability, fault tolerance and more.
http://www.revolutionanalytics.com
Loading required package: revoIPC
Warning messages:
1: package 'doSMP' was built under R version 2.13.1
2: package 'foreach' was built under R version 2.13.1
3: package 'revoIPC' was built under R version 2.13.1
> w <- startWorkers(workerCount=4)
Warning messages:
1: In startWorkers(workerCount = 4) :
  there is an existing doSMP session using doSMP1
2: In startWorkers(workerCount = 4) :
  there is an existing doSMP session using doSMP2
> Error in library(doSMP) : there is no package called 'doSMP'
Calls: suppressMessages -> withCallingHandlers -> library
Execution halted
Error in library(doSMP) : there is no package called 'doSMP'
Calls: suppressMessages -> withCallingHandlers -> library
Execution halted
Error in library(doSMP) : there is no package called 'doSMP'
Calls: suppressMessages -> withCallingHandlers -> library
Execution halted
Error in library(doSMP) : there is no package called 'doSMP'
Calls: suppressMessages -> withCallingHandlers -> library
Execution halted

2条回答
趁早两清
2楼-- · 2019-03-06 15:18

A task queue is created by doSMP, whenever you call the startWorkers function. If you don't call stopWorkers() before exiting your R session, then the interprocess communication resources used to start the task queue will still exist after exiting R.

You can delete the task queue as follows:

>rmSessions(all.names=TRUE)
attempting to delete qnames: doSMP1, doSMP2, doSMP3, doSMP4, doSMP5, doSMP6, doSMP7, doSMP8
successfully deleted queues: doSMP1, doSMP2, doSMP3, doSMP4, doSMP5

Now any subsequent calls to startWorkers() shoudn't create any warnings. This is documented in the help file for 'rmSessions'.

Stephen Weller
Revolution Analytics Technical Support Engineer
Revolution Analytics, Inc.
1505 Westlake Ave North Suite 300
Seattle, WA 98109

查看更多
Ridiculous、
3楼-- · 2019-03-06 15:37

Closing out this question - the package is too buggy for use. If someone else has gotten this to work reliably, then please respond and I'll un-mark this post as the answer.

查看更多
登录 后发表回答