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. 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 --------------------------------- Here's a new way to find what you're looking for - Yahoo! Answers [[alternative HTML version deleted]]
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
On Fri, 1 Sep 2006, Prof Brian Ripley wrote:> 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.This runs a command of the form ssh -l user machine env X=x Y=z script so if your ssh is a .exe this should be OK. I have successfully run a snow master on Windows with slave nodes on Linux with I believe the ssh coming from cygwin, but that was a while ago. My suggestion is that you look at the command that is generated by the paste and try running it by hand and see if you can work out why it hangs. Best, luke> > >> 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 > >-- Luke Tierney Chair, Statistics and Actuarial Science Ralph E. Wareham Professor of Mathematical Sciences University of Iowa Phone: 319-335-3386 Department of Statistics and Fax: 319-335-3017 Actuarial Science 241 Schaeffer Hall email: luke at stat.uiowa.edu Iowa City, IA 52242 WWW: http://www.stat.uiowa.edu
Maybe Matching Threads
- makeSOCKcluster
- problem with opening more than one SOCK cluster with package snow
- increasing the # of socket connections
- Connecting to "heterogenous" cluster using makeSOCKcluster of SNOW-package
- Connecting to "heterogenous" cluster using makeSOCKcluster of SNOW-package