[R-sig-hpc] snow, socket cluster: problem with path to rscript

Matthieu Stigler matthieu.stigler at gmail.com
Tue Apr 14 11:29:18 CEST 2009


luke at stat.uiowa.edu a écrit :
> On Mon, 13 Apr 2009, Steve Weston wrote:
>
>> Hi Matthieu,
>>
>> On Mon, Apr 13, 2009 at 4:46 AM, Matthieu Stigler
>> <matthieu.stigler at gmail.com> wrote:
>>> Hello
>>>
>>> I'm trying to set-up a cluster having three nodes with cluster 
>>> type=SOCK.
>>>
>>> I have a problem to give the path to the rscript (different on the two
>>> machines).... I try to give full information (fill the list(host, 
>>> rscript)
>>> as in the makeCluster example)
>>
>> [snip]
>>
>>> I'm really thankfull if you can give me advice and tell me wether I do
>>> something wrong or not! Thanks a lot!
>>> See:
>>>
>>> library(snow)
>>>
>>> #local host only
>>> host212Full <-list(host = "dsge at 192.100.100.212", rscript =
>>> "/usr/lib64/R/bin/Rscript")
>>> makeCluster(c(rep(host212Full, 2)), type = "SOCK")
>>
>> I think the immediate problem is the way that you're creating
>> the first argument to makeCluster.  Your code is concatenating
>> host212Full to itself, creating a list of length 4 with elements
>> that are not lists. I think you want to create a list of two lists,
>> each of length 2.
>>
>> One way to create the appropriate list (which worked for me on
>> R 2.8.1) is:
>>
>> makeCluster(rep(list(host212Full), 2), type = "SOCK")
>>
>> I hope that helps.
>
> Thanks -- the help page gets this wrong (in an example that is not run
> ) -- I'll fix that for the net release.
>
> luke
>
Ok! You pointed out the right error Steve, thanks!


So it is now working for the local computer with. However, when trying 
to use the external computer, it seems to be working but nothing happens 
after he asked for the last password...


 > library(snow)
 > host210 <- list(host = "mat at 192.100.100.210", rscript = 
"/usr/bin/Rscript")
 > host212 <-list(host = "dsge at 192.100.100.212", rscript = 
"/usr/lib64/R/bin/Rscript")
 >
 > cl2 <- makeCluster(list(host212, host212), type = "SOCK")
dsge at 192.100.100.212's password:
dsge at 192.100.100.212's password:
 > stopCluster(cl2)
 > host210 <- list(host = "mat at 192.100.100.210", rscript = 
"/usr/bin/Rscript")
 > host212 <-list(host = "dsge at 192.100.100.212", rscript = 
"/usr/lib64/R/bin/Rscript")
 >
 > cl2 <- makeCluster(list(host212, host212, host210), type = "SOCK")
dsge at 192.100.100.212's password:
dsge at 192.100.100.212's password:
mat at 192.100.100.210's password:
#and then nothing...

(I did a ssh mat at 192.100.100.210 before).

What should I check to understand this problem? On the local (212), or 
on the external (210)?

Thanks a lot!!



More information about the R-sig-hpc mailing list