parallel processing - makeCluster function in R snow hangs indefinitely -
i using makecluster
function r package snow
linux machine start sock cluster on remote linux machine. seems settled 2 machines communicate succesfully (i able estabilish ssh connections between two). but:
makecluster("192.168.128.24",type="sock")
does not throw result, hangs indefinitely.
what doing wrong?
thanks lot
unfortunately, there lot of things can go wrong when creating snow (or parallel) cluster object, , common failure mode hang indefinitely. problem makesockcluster
launches cluster workers 1 one, , each worker (if started) must make socket connection master before master proceeds launch next worker. if of workers fail connect master, makesockcluster
hang without error message. worker may issue error message, default error message redirected /dev/null
.
in addition ssh problems, makesockcluster
hang because:
- r not installed on worker machine
- snow not installed on worker machine
- r or snow not installed in same location local machine
- current user doesn't exist on worker machine
- networking problem
- firewall problem
and there many more possibilities.
in other words, no 1 can diagnose problem without further information, have troubleshooting in order information.
in experience, single useful troubleshooting technique manual mode enable specifying manual=true
when creating cluster object. it's idea set outfile=""
error messages workers aren't redirected /dev/null
:
cl <- makesockcluster("192.168.128.24", manual=true, outfile="")
makesockcluster
display rscript command execute in terminal on specified machine, , wait execute command. in other words, makesockcluster hang until manually start worker on host 192.168.128.24, in case. remember troubleshooting technique, not solution problem, , hope more information why workers aren't starting trying start them manually.
obviously, use of manual mode bypasses ssh issues (since you're not using ssh), if can create sock cluster in manual mode, ssh problem. if rscript command isn't found, either r isn't installed, or it's installed in different location. you'll error message lead solution.
if makesockcluster
still hangs after you've executed specified rscript command on specified machine, have networking or firewall issue.
for more troubleshooting advice, see answer making cluster in doparallel / snowfall hangs.
Comments
Post a Comment