Re: [R] makeSOCKcluster

From: Prof Brian Ripley <>
Date: Fri 01 Sep 2006 - 05:59:55 GMT

On Fri, 1 Sep 2006, Hrishikesh Rajpathak wrote:

> Hi,

> I am a newbie to R and trying to implement parallelism in R. I am

> currently using R-2.3.1, and Cygwin to run R on Windows xp.

Did you build R under Cygwin (which is not a supported platform), or are you running a native Windows build of R? If the latter, you may be being optimistic to expect R to run Unix commands in the same way as under Unix.

I presume you mean this line in package snow:

    system(paste(rshcmd, "-l", user, machine, "env", env, script))  

which appears to be attempting to run a shell script: no shell is used by system() on Windows R. As the return value is not checked, this will not fail.

R under Windows differs from R under Unix in a number of ways, and system() is a major one.

> ssh and all are working fine,

> When I try to create a socket connection as

> makeSOCKcluster(c("localhost","localhost")),

> it just waits for the other prcess on localhost to get created and respond. But this other process is not created.

> To debug, I put print statements in the "snow " file in library\snow\r of R after every statement that comes under Socket Implementation. I realized that it does the execution till

> system(a<-paste(rshcmd, "-l", user, machine, "env", env, script))

> part and then it goes in wait state. It cannot run the next command which is

> con <- socketConnection(port = port, server=TRUE, blocking=TRUE,
> open="a+b")
> can someone please tell me what exactly could be the problem?
> Thank you,
> Rishi

Brian D. Ripley,        
Professor of Applied Statistics,
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595

______________________________________________ mailing list
PLEASE do read the posting guide
and provide commented, minimal, self-contained, reproducible code.
Received on Fri Sep 01 16:07:32 2006

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Thu 07 Sep 2006 - 07:51:16 GMT.

Mailing list information is available at Please read the posting guide before posting to the list.