Snow/Snowfall hangs on windows 7

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

Snow/Snowfall hangs on windows 7

Anna Ågren
Dear users,

 

I want to set up R to use one R-script directory and one R-library (directory for packages) for many end-users. I try to do this by using one network-share. This works fine as long as we don't use the snowfall package with parallel=TRUE (sfInit(parallel=TRUE, cpus=4, type="SOCK")).

 

When running R with default settings (local library and local script directory) then snowfall works great.

 

When I tried to understand the problem I tested local library and local script directory and started the R program through a shortcut but this resulted in the program hanging as well. The same when I tried to start the program through the directory C:\Program Files\R\R-2.12.1\bin\i386 and C:\Program Files\R\R-2.12.1\bin\x64. The only way for it to work is when I start the program through the Start-menu.

 

The R-program hangs when executing sfInit(parallel=TRUE, cpus=Cpu, type="SOCK").  When running process explorer I see the R-program creating a TCP connection in the state LISTENER but no ESTABLISHED happens.

 

Regards

Anna


        [[alternative HTML version deleted]]

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Reply | Threaded
Open this post in threaded view
|

Re: Snow/Snowfall hangs on windows 7

Truc
Dear Anna !

I have the same problem with Window 7 - 64 bits.
If I use R 2.12.2 with snow packages 0.3-3. It works well. But with R 2.13.0 with the same snow packages.
It just hang. I start R (Run as administrator), turn off firewall ... But it seems R .13.0 version of socket connect to window has been changed ???
That 's my experience so far.
Reply | Threaded
Open this post in threaded view
|

Re: Snow/Snowfall hangs on windows 7

Uwe Ligges-3


On 28.04.2011 09:57, Truc wrote:
> Dear Anna !
>
> I have the same problem with Window 7 - 64 bits.
> If I use R 2.12.2 with snow packages 0.3-3. It works well. But with R 2.13.0
> with the same snow packages.
> It just hang. I start R (Run as administrator), turn off firewall ... But it
> seems R .13.0 version of socket connect to window has been changed ???
> That 's my experience so far.


I was just on a Windows 7 64bit machine and tried to verify some older
reports. For this one:

the example in ?parApply

library("snow")
cl <- makeSOCKcluster(c("localhost","localhost"))
parSapply(cl, 1:20, get("+"), 3)

works fine with R-2.13.0 in 32-bit and 64-bit and snow 0.3-3. Since you
have not given a single line of code, it is hard to help.

Uwe Ligges



> --
> View this message in context: http://r.789695.n4.nabble.com/Snow-Snowfall-hangs-on-windows-7-tp3436724p3480368.html
> Sent from the R help mailing list archive at Nabble.com.
>
> ______________________________________________
> [hidden email] mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Reply | Threaded
Open this post in threaded view
|

Re: Snow/Snowfall hangs on windows 7

David Anisman
Same problem as Anna here.

Windows 7 64-bit. Running R 2.13.0. snow + snowfall installed.

Testing:

library(snow)
library(snowfall)

sfInit(parallel=TRUE, cpus=2, type="SOCK")

Then R spins forever (yes, I disabled the Windows firewall).

On the same box, tried the same on Ubuntu under Virtualbox. No problem. Runs well.

Any suggestions/ideas appreciated.


David

Reply | Threaded
Open this post in threaded view
|

Re: Snow/Snowfall hangs on windows 7

David Anisman
btw, I installed R.10.1 on the same box (Windows 7, 64bit, 4 cores).

snow/snowfall work fine.

here is my sessionInfo()

R version 2.10.1 (2009-12-14)
i386-pc-mingw32

locale:
[1] LC_COLLATE=English_United States.1252
[2] LC_CTYPE=English_United States.1252  
[3] LC_MONETARY=English_United States.1252
[4] LC_NUMERIC=C                          
[5] LC_TIME=English_United States.1252    

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base    

other attached packages:
[1] snowfall_1.84 snow_0.3-3  

loaded via a namespace (and not attached):
[1] tools_2.10.1


David
Reply | Threaded
Open this post in threaded view
|

Re: Snow/Snowfall hangs on windows 7

Uwe Ligges-3
In reply to this post by David Anisman
Folks,

I guess I know what is going on (and why I haven't seen this so far):
All of you have installed R in a directory with blanks in it, right?

Please source() the attached sock.R and afterwards try again. Does it
work with SOCK clusters now? Then it was just the lack of quotes.

CCing Luke the diffs (against snow 0.3-3 on CRAN):

@@ -29,8 +29,8 @@
              env <- paste("MASTER=", master,
                           " PORT=", port,
                           " OUT=", outfile,
-                         " SNOWLIB=", snowlib, sep="")
-            cmd <- paste(rscript, script, env)
+                         " SNOWLIB=", shQuote(snowlib), sep="")
+            cmd <- paste(shQuote(rscript), shQuote(script), env)
          }
          else {
              script <- "RunSnowWorker RSOCKnode.R"
@@ -43,13 +43,13 @@
      else {
          if (homogeneous) {
              scriptdir <- getClusterOption("scriptdir", options)
-            script <- file.path(scriptdir, "RSOCKnode.sh")
+            script <- shQuote(file.path(scriptdir, "RSOCKnode.sh"))
              rlibs <- paste(getClusterOption("rlibs", options),
collapse = ":")
              rprog <- getClusterOption("rprog", options)
              env <- paste("MASTER=", master,
                           " PORT=", port,
                           " OUT=", outfile,
-                         " RPROG=", rprog,
+                         " RPROG=", shQuote(rprog),
                           " R_LIBS=", rlibs, sep="")
          }
          else {


(same problem in mpi.R, nws.R etc. as well, I think)

Best wishes,
Uwe









On 16.05.2011 00:01, David Anisman wrote:

> Same problem as Anna here.
>
> Windows 7 64-bit. Running R 2.13.0. snow + snowfall installed.
>
> Testing:
>
> library(snow)
> library(snowfall)
>
> sfInit(parallel=TRUE, cpus=2, type="SOCK")
>
> Then R spins forever (yes, I disabled the Windows firewall).
>
> On the same box, tried the same on Ubuntu under Virtualbox. No problem. Runs
> well.
>
> Any suggestions/ideas appreciated.
>
>
> David
>
>
>
> --
> View this message in context: http://r.789695.n4.nabble.com/Snow-Snowfall-hangs-on-windows-7-tp3436724p3524990.html
> Sent from the R help mailing list archive at Nabble.com.
>
> ______________________________________________
> [hidden email] mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

sock.R (5K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Snow/Snowfall hangs on windows 7

luke-tierney
Thanks to Thomas, Steve, Uwe, and others for reporting the problem and
suggesting fixes. A new version of snow is on its way to CRAN that
hopefully fixes the problem on Windows without breaking tings
elsewhere.  I don't have access to Windows at the moment so if things
don't work and you are willing to help debug then please let me know.
I was hoping to be able to make snow robust to spaces in paths on
other platforms as well but that seems to be complicated, so for now I
signal an error on non-Windows platforms with spaces in path names
snow uses. Also, I have not tested mpi or nws back ends on Linux.
Again, if this version creates problems for you and you are willing to
help sort things out please let me know.

This release also includes some experimental performance monitoring
tools described in ?snow.time.

Best,

luke

On Mon, 16 May 2011, Uwe Ligges wrote:

> Folks,
>
> I guess I know what is going on (and why I haven't seen this so far): All of
> you have installed R in a directory with blanks in it, right?
>
> Please source() the attached sock.R and afterwards try again. Does it work
> with SOCK clusters now? Then it was just the lack of quotes.
>
> CCing Luke the diffs (against snow 0.3-3 on CRAN):
>
> @@ -29,8 +29,8 @@
>             env <- paste("MASTER=", master,
>                          " PORT=", port,
>                          " OUT=", outfile,
> -                         " SNOWLIB=", snowlib, sep="")
> -            cmd <- paste(rscript, script, env)
> +                         " SNOWLIB=", shQuote(snowlib), sep="")
> +            cmd <- paste(shQuote(rscript), shQuote(script), env)
>         }
>         else {
>             script <- "RunSnowWorker RSOCKnode.R"
> @@ -43,13 +43,13 @@
>     else {
>         if (homogeneous) {
>             scriptdir <- getClusterOption("scriptdir", options)
> -            script <- file.path(scriptdir, "RSOCKnode.sh")
> +            script <- shQuote(file.path(scriptdir, "RSOCKnode.sh"))
>             rlibs <- paste(getClusterOption("rlibs", options), collapse =
> ":")
>             rprog <- getClusterOption("rprog", options)
>             env <- paste("MASTER=", master,
>                          " PORT=", port,
>                          " OUT=", outfile,
> -                         " RPROG=", rprog,
> +                         " RPROG=", shQuote(rprog),
>                          " R_LIBS=", rlibs, sep="")
>         }
>         else {
>
>
> (same problem in mpi.R, nws.R etc. as well, I think)
>
> Best wishes,
> Uwe
>
>
>
>
>
>
>
>
>
> On 16.05.2011 00:01, David Anisman wrote:
>> Same problem as Anna here.
>>
>> Windows 7 64-bit. Running R 2.13.0. snow + snowfall installed.
>>
>> Testing:
>>
>> library(snow)
>> library(snowfall)
>>
>> sfInit(parallel=TRUE, cpus=2, type="SOCK")
>>
>> Then R spins forever (yes, I disabled the Windows firewall).
>>
>> On the same box, tried the same on Ubuntu under Virtualbox. No problem.
>> Runs
>> well.
>>
>> Any suggestions/ideas appreciated.
>>
>>
>> David
>>
>>
>>
>> --
>> View this message in context:
>> http://r.789695.n4.nabble.com/Snow-Snowfall-hangs-on-windows-7-tp3436724p3524990.html
>> Sent from the R help mailing list archive at Nabble.com.
>>
>> ______________________________________________
>> [hidden email] mailing list
>> https://stat.ethz.ch/mailman/listinfo/r-help
>> PLEASE do read the posting guide
>> http://www.R-project.org/posting-guide.html
>> and provide commented, minimal, self-contained, reproducible code.
>

--
Luke Tierney
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:      [hidden email]
Iowa City, IA 52242                 WWW:  http://www.stat.uiowa.edu

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.