0

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
Suraj
  • 35,905
  • 47
  • 139
  • 250
  • This isn't really a programming question... maybe try superuser? – Joshua Ulrich Jul 22 '11 at 18:19
  • 1
    I agree, this is not a programming question. However, I consider this one as a duplicate. http://stackoverflow.com/questions/5197619/unable-to-delete-previous-dosmp-queues – Roman Luštrik Jul 22 '11 at 18:52
  • I don't think this is a duplicate...different errors/warnings with the "there is no package called 'doSMP'" – Suraj Jul 22 '11 at 19:33
  • Have you tried removing the workers as Joris suggests? – Roman Luštrik Jul 22 '11 at 20:35
  • Yes, unfortunately that doesn't work. – Suraj Jul 22 '11 at 20:46
  • Stephen Weller has answered the real question in that you seem to have called the `startWorkers` function before the previous one has been stopped. But some of your warnings may come from using an old version of R or some other packages – Henry Jul 22 '11 at 21:00
  • @Henry - I upgraded to latest R, so the warnings related to that are now gone...but the issue is still resolved. I responded to Stephen Weller's post – Suraj Jul 22 '11 at 22:04

2 Answers2

1

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.

Suraj
  • 35,905
  • 47
  • 139
  • 250
0

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

Dirk Eddelbuettel
  • 360,940
  • 56
  • 644
  • 725
  • This doesn't seem to work. I've tried calling rmSessions(all.names=TRUE) per the documentation and whenever I followup with a call to startWorkers, I'm told that an existing session exists. I've tried to delete temp folder associated with doSMP as well and also to restart R with no luck. The one time I got no warnings I tried the simple example and R locked up. I can get doSNOW to work just fine, so I don't believe this is a machine issue. – Suraj Jul 22 '11 at 20:49
  • @SFun28: I experience the same using R2.13.1. Cannot get it to work and rmSessions locks up the R session. Even tried to compile revoIPC myself -- nothing changes – f3lix Aug 04 '11 at 09:04
  • f3lix - its good to hear from someone else with the same problem. I highly recommend doSNOW. – Suraj Aug 04 '11 at 12:15