I am trying to use the parallel
package, and found that makeCluster
fails to complete. I've traced the hang to the following line in newPSOCKnode
:
con <- socketConnection("localhost", port = port, server = TRUE,
blocking = TRUE, open = "a+b", timeout = timeout)
That command stalls (granted the default timeout is a large value). My suspicion is this is due to some "overzealous IT rules" laid down on our work computers, but would welcome any suggestions as to how to trace (and fix) the source of the problem. This is Windows7-64, "Enterprise", R 3.0.1 .
More info: inside debugging session, I set timeout < - 10
, but it still hangs -- as though socketConnection
is getting trapped somewhere that it can't even check the timeout value.
Here's my dump at the same point as Richie Cotton's data:
Browse[3]> ls.str()
arg : chr "parallel:::.slaveRSOCK()"
cmd : chr ""C:/Users/carl.witthoft/Documents/R/R-3.0.1/bin/x64/Rscript" -e "parallel:::.slaveRSOCK()" MASTER=localhost PORT=11017 OUT="| __truncated__
env : chr "MASTER=localhost PORT=11017 OUT=/dev/null TIMEOUT=2592000 METHODS=TRUE XDR=TRUE"
machine : chr "localhost"
manual : logi FALSE
master : chr "localhost"
methods : logi TRUE
options : <environment: 0x000000000ccac6a0>
outfile : chr "/dev/null"
port : int 11017
rank : int 1
renice : int NA
rscript : chr ""C:/Users/carl.witthoft/Documents/R/R-3.0.1/bin/x64/Rscript""
timeout : num 2592000
useXDR : logi TRUE
So aside from a different port number, I think everything matches up.
Next trick: I opened a shell and ran netsh advfirewall firewall add rule name="Open Port 11017" dir=in action=allow protocol=TCP localport=11017
and got an "OK" response.
I ran netstat -a -n
and found the following line:
TCP 0.0.0.0:11017 0.0.0.0:0 LISTENING
But running makePSOCKcluster
still hangs at the same place.
NEXT:
I tried running R
from the command line (via cygwin bash), and the error message I get is Error in loadhistory(file) : no history mechanism available
Execution halted
, after which -C returns me to the R-prompt.