[R] makeSOCKcluster
Prof Brian Ripley
ripley at stats.ox.ac.uk
Fri Sep 1 07:59:55 CEST 2006
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, ripley at stats.ox.ac.uk
Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/
University of Oxford, Tel: +44 1865 272861 (self)
1 South Parks Road, +44 1865 272866 (PA)
Oxford OX1 3TG, UK Fax: +44 1865 272595
More information about the R-help
mailing list