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

Matthieu Stigler matthieu.stigler at gmail.com
Mon Apr 13 10:46:45 CEST 2009


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)

-Once I try only on local host (hist 212), give complete Rscript path: 
does not work
ssh: Could not resolve hostname /usr/bin/Rscript: Name or service not known

workaround: don't give full info, only IP

-When add a second host (host 210):
   -give full infos: same problem as above: ssh: Could not resolve 
hostname /usr/bin/Rscript: Name or service not known
   -give only IP: does not work as it is looking for same path for 
rscript, and this is different on both machines


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")
dsge at 192.100.100.212's password:
ssh: Could not resolve hostname /usr/lib64/R/bin/Rscript: Name or 
service not known

#but it exists!
system("ls /usr/lib64/R/bin/Rs*")
/usr/lib64/R/bin/Rscript

host212<-"dsge at 192.100.100.212"
cl<-makeCluster(c(rep(host212, 2)), type = "SOCK")
stopCluster(cl)
#this work

###adding an external machine
#just by IP:
cl2 <- makeCluster(c("dsge at 192.100.100.212","dsge at 192.100.100.212", 
"mat at 192.100.100.210"), type = "SOCK")
bash: /usr/lib64/R/bin/Rscript: Aucun fichier ou dossier de ce type 
(english: no such file)

#with full info
host212Full <-list(host = "dsge at 192.100.100.212", rscript = 
"/usr/lib64/R/bin/Rscript")
host210 <- list(host = "mat at 192.100.100.210", rscript = "/usr/bin/Rscript")

cl2 <-makeCluster(c(host210,rep(host212Full, 2)), type = "SOCK")
mat at 192.100.100.210's password:
bash: /usr/lib64/R/bin/Rscript: Aucun fichier ou dossier de ce type
#it did not take into account the specific path for 210!

#note that inverting it:
cl2 <-makeCluster(c(rep(host212Full, 2), host210), type = "SOCK")
ssh: Could not resolve hostname /usr/lib64/R/bin/Rscript: Name or 
service not known
#shows the same problem as above



Version infos:
local host (212)
platform       x86_64-pc-linux-gnu
arch           x86_64
os             linux-gnu
system         x86_64, linux-gnu
status
major          2
minor          7.1
year           2008
month          06
day            23
svn rev        45970
language       R
version.string R version 2.7.1 (2008-06-23)

External host (210)
platform       i486-pc-linux-gnu
arch           i486
os             linux-gnu
system         i486, linux-gnu
status
major          2
minor          8.1
year           2008
month          12
day            22
svn rev        47281
language       R
version.string R version 2.8.1 (2008-12-22)



More information about the R-sig-hpc mailing list