[R-sig-hpc] snow, socket cluster: problem with path to rscript
Dirk Eddelbuettel
edd at debian.org
Wed Apr 15 15:09:29 CEST 2009
On 15 April 2009 at 07:16, Dirk Eddelbuettel wrote:
| On 15 April 2009 at 17:29, Matthieu Stigler wrote:
| | >> 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...
| | >>
| | >
| | > This tells you is that "something went wrong". The basic strategy in this case
| | > is to use the "outfile" option to hopefully capture an error message. You might
| | > need to set outfile differently for different slaves, particularly if
| | > you're starting
| | > more than one on the same machine, but I suggest just starting one slave
| | > on 210 to avoid the issue. So do something like:
| | >
| | >
| | >> host210 <- list(host = "mat at 192.100.100.210", rscript = "/usr/bin/Rscript",
| | >>
| | > + outfile="/tmp/log.txt")
| | >
| | >> cl2 <- makeCluster(list(host210), type = "SOCK")
| | >>
| | >
| | >
| | Ok, thanks for pointing out this methid.
| |
| | I tried it and got following error message. This does not seem not be
| | computer specific (tried to do it to other host 213, and from other host
| | 213 to 212, always same error message):
| |
| | starting worker for ubuntu:10187
| |
| | Error in socketConnection(master, port = port, blocking = TRUE, open = "a+b") :
| |
| | unable to open connection
| |
| | Calls: local ... slaveLoop -> recvData -> makeSOCKmaster -> socketConnection
| |
| | In addition: Warning message:
| |
| | In socketConnection(master, port = port, blocking = TRUE, open = "a+b") :
| |
| | ubuntu:10187 cannot be opened
| |
| | Execution halted
| |
| |
| | Is it related to ssh or snow? I did not find any reference to that prob
| | googling for it...
|
| Test for it --- can you actually issue an ssh command for the _script_ on the
| _machine_ you have specified ? I.e. run
|
| $ ssh mat at 192.100.100.210 /usr/bin/Rscript --version
|
| where I added --version to make sure Rscript has something to do. Unless
| this works 'by itself', you cannot expect to use it.
That's what I get for posting before the coffee settles in. Thanks to Luke
for correcting the test for socket rather ssh connections.
Yet when I specify "SOCK" as type, I still get noise [1] from ssh:
> cl <- makeSOCKcluster(c("l1", "l2"))
Control socket connect(/home/deddelbuettel/.ssh/master-deddelbuettel at l1:22): Connection refused
ControlSocket /home/deddelbuettel/.ssh/master-deddelbuettel at l1:22 already exists, disabling multiplexing
Control socket connect(/home/deddelbuettel/.ssh/master-deddelbuettel at l2:22): Connection refused
ControlSocket /home/deddelbuettel/.ssh/master-deddelbuettel at l2:22 already exists, disabling multiplexing
> str(cl)
List of 2
$ :List of 3
..$ con :Classes 'sockconn', 'connection' atomic [1:1] 5
.. .. ..- attr(*, "conn_id")=<externalptr>
..$ host: chr "l1"
..$ rank: int 1
..- attr(*, "class")= chr "SOCKnode"
$ :List of 3
..$ con :Classes 'sockconn', 'connection' atomic [1:1] 6
.. .. ..- attr(*, "conn_id")=<externalptr>
..$ host: chr "l2"
..$ rank: int 2
..- attr(*, "class")= chr "SOCKnode"
- attr(*, "class")= chr [1:2] "SOCKcluster" "cluster"
>
implying that you'd still want to sort out ssh access to the hosts even when
you use socket connections.
Dirk
[1] I am using the following in ~/.ssh/config which can speed up multiple
connections to the same machines which is my use case at work:
-----------------------------------------------------------------------------
Host *
ControlPath ~/.ssh/master-%r@%h:%p
ControlMaster auto
ForwardAgent yes
ForwardX11 yes
ForwardX11Trusted yes
-----------------------------------------------------------------------------
--
Three out of two people have difficulties with fractions.
More information about the R-sig-hpc
mailing list