As the title says, makeCluster and makeSOCKcluster from the snow package hang when running on a linux machine..

cl <- makeCluster(4, type="SOCK)
cl <- makeSOCKcluster(c("localhost","localhost","localhost","localhost"))

Both hang and never create the workers.. This code works on my Windows 8.1 Machine (64-bit) with the same R/RStudio versions. This leads me to believe it's a configuration error. Maybe firewall? Are localhost workers affected by firewall? I've tried disabling it via sudo ufw disable, but the code still hangs..

Any ideas?

Thanks.

Ubuntu Linux 13.04, Raring Ringtail
RStudio Version 0.98.490
R version 3.02 (2013-09-25)
Platform: x86_64-pc-linux-gnu (64-bit)
snow_0.3-13

有帮助吗?

解决方案

Answering my own question..

For anyone else in this situation (many threads online but none regarding snow), the reason it didn't work was because it didn't have enough memory to allocate.. I cleared my workspace and lo and behold, creating clusters were instant. My guess is that makeCluster was waiting for resources, but they were never given up by RStudio.

Thanks.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top