[R] makeCluster help needed
Uwe Ligges
ligges at statistik.tu-dortmund.de
Thu Oct 10 12:18:01 CEST 2013
On 10.10.2013 04:04, Jeffrey Flint wrote:
> Uwe,
>
> Good news. I installed 3.0.2, and the parallel package examples ran
> successfully. This time a firewall window popped up. Probably the
> firewall was the problem with the snow package too, but for some reason the
> window didn't pop up with the snow package.
Great new.
>
> Thanks for the suggestion to use "parallel". I noticed that the package is
> brand new! Or, at least the pdf help was written 9/25/13.
Not that new, just updated.
Best,
Uwe
> Jeff
>
>
>
>
> On Sat, Sep 28, 2013 at 10:15 AM, Uwe Ligges <
> ligges at statistik.tu-dortmund.de> wrote:
>
>> Can you please upgrade R to R-3.0.2 and use the parallel package?
>> And can you please explain why you want to start the workers manually? I'd
>> be happy to look into the details if you can reproduce the problem with a
>> recent version of R and the parallel package.
>>
>> Best,
>> Uwe Ligges
>>
>>
>>
>>
>>
>>
>> On 28.09.2013 03:20, Jeffrey Flint wrote:
>>
>>> This is in regards to the SNOW library.
>>>
>>> I'm using Windows. The problem is that makeSOCKcluster hangs in R as well
>>> as the DOS command line. Below I've shown that it completes the Rscript
>>> until it reaches the line "slaveLoop(master)" , at which point it hangs.
>>>
>>> =============================
>>>
>>> In R:
>>>
>>> cl <-
>>>>
>>> makeSOCKcluster(names=c("**localhost","localhost"),**
>>> manual=T,outfile="jeff.log")
>>> Manually start worker on localhost with
>>> C:/PROGRA~1/R/R-214~1.2/bin/**Rscript.exe "C:/Program
>>> Files/R/R-2.14.2/library/snow/**RSOCKnode.R" MASTER=localhost PORT=11590
>>> OUT=jeff.log SNOWLIB=C:/Program Files/R/R-2.14.2/library
>>> [HANGS]
>>> ==============================**==
>>>
>>> On the DOS Command Line:
>>>
>>> C:\Documents and Settings\Jeff>C:/PROGRA~1/R/R-**214~1.2/bin/Rscript.exe
>>> "C:/Program Files/R/R-2.14.2/library/snow/**RSOCKno
>>> de.R" MASTER=localhost PORT=11590 OUT=jeff.log SNOWLIB=C:/Program
>>> Files/R/R-2.14.2/library
>>> [HANGS]
>>> ^C
>>> C:\Documents and Settings\Jeff>type jeff.log
>>> starting worker for localhost:11590
>>>
>>> ==============================**======
>>>
>>>
>>> In the file RSOCKnode.R, stalls after last line, after executing
>>> "slaveLoop(master)".
>>>
>>>
>>>
>>>
>>> local({
>>> master <- "localhost"
>>> port <- "8765"
>>> snowlib <- Sys.getenv("R_SNOW_LIB")
>>> outfile <- Sys.getenv("R_SNOW_OUTFILE")
>>>
>>> args <- commandArgs()
>>> pos <- match("--args", args)
>>> args <- args[-(1 : pos)]
>>> for (a in args) {
>>> pos <- regexpr("=", a)
>>> name <- substr(a, 1, pos - 1)
>>> value <- substr(a,pos + 1, nchar(a))
>>> switch(name,
>>> MASTER = master <- value,
>>> PORT = port <- value,
>>> SNOWLIB = snowlib <- value,
>>> OUT = outfile <- value,
>>> RANK = rank <- value,
>>> TMPWS = tmpWsName <- value)
>>> }
>>> ##**** these should be passed as arguments to makeNWSmaster
>>> Sys.setenv(MASTER = master)
>>> Sys.setenv(PORT = port)
>>> Sys.setenv(RANK = rank)
>>> Sys.setenv(TMPWS = tmpWsName)
>>>
>>> if (! (snowlib %in% .libPaths()))
>>> .libPaths(c(snowlib, .libPaths()))
>>> library(methods) ## because Rscript as of R 2.7.0 doesn't load
>>> methods
>>> library(nws)
>>> library(snow)
>>>
>>> sinkWorkerOutput(outfile)
>>> master <- makeNWSmaster()
>>> sendData(master, "ping")
>>> cat("starting NWS worker\n")
>>> slaveLoop(master)
>>> })
>>>
>>> [[alternative HTML version deleted]]
>>>
>>> ______________________________**________________
>>> R-help at r-project.org mailing list
>>> https://stat.ethz.ch/mailman/**listinfo/r-help<https://stat.ethz.ch/mailman/listinfo/r-help>
>>> PLEASE do read the posting guide http://www.R-project.org/**
>>> posting-guide.html <http://www.R-project.org/posting-guide.html>
>>> and provide commented, minimal, self-contained, reproducible code.
>>>
>>>
>
More information about the R-help
mailing list