Parallel processing in R 2.11 Windows 64-bit using SNOW does not quite work

I am running R 2.11 64-bit on a WinXP64 machine with 8 processors. In R 2.10.1, the following code spawned 6 R processes for parallel processing:


require(foreach)
require(doSNOW)
cl = makeCluster(6, type='SOCK')
registerDoSNOW(cl)
bl2 = foreach(i=icount(length(unqmrno))) %dopar% {
    (Some code here)
}
stopCluster(cl)

When I run the same code in R 2.11 Win64, the 6 R processes do not multiply and the code freezes. I am wondering if this is a problem with the SNOW port up to 2.11-64bit, or if any additional code is required on my part. Thanks

By the way, this works very well on my multi-core machine, which runs 64-bit Ubuntu Karmic and R 2.11. Unfortunately, I have to work on Win64 at work

+3
source share
2 answers

The code seems to work here.

R version 2.11.0 (2010-04-22) 
x86_64-pc-mingw32 
other attached packages:
[1] doSNOW_1.0.3    snow_0.3-3      foreach_1.3.0   codetools_0.2-2
[5] iterators_1.0.3
loaded via a namespace (and not attached):
[1] tools_2.11.0

(), , . , , , Windows 7 makeCluster . , , . (, ), TCP UDP- .

+1

, R-2.13.1 64 Win 64-.

doSNOW R 32-, R-64-, "cl = makeCluster (6, type = 'SOCK" ).

, "C:\Program Files\R\R-2.13.1\bin\x64" % PATH% (win + pause/advanced system settings/advanced/environment variables/ ). , R Windows C:\Program Files\R\R-2.13.1\bin 32- R.exe Rscript.exe( x64).

, makeCluster() 12 , 6 32 6 64 , 64 .

+1

Source: https://habr.com/ru/post/1745115/


All Articles