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

Steve Weston steve at revolution-computing.com
Mon Apr 13 15:30:51 CEST 2009

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)


> 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", 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.

Steve Weston
REvolution Computing
One Century Tower | 265 Church Street, Suite 1006
New Haven, CT  06510
P: 203-777-7442 x266 | www.revolution-computing.com

More information about the R-sig-hpc mailing list