0

I have the common issue with the R-package 'parallel' as seen here. The command

cl <- future::makeClusterPSOCK(1, outfile = NULL, verbose = TRUE) 

hangs on the machine whenever I am logged onto a wifi connection. However, it works fine when I am logged onto a mobile hotspot from my phone.

I have read all posts asking for solutions, but so far the best idea was to reinstall my operating system, which I would really prefer to avoid...

Any ideas?

I use R version 3.5.1, Platform: x86_64-apple-darwin15.6.0 (64-bit).

Update 1: When connections are turned off or I am on a wifi network, the output from the command above is something like:

Workers: [n = 1] ‘localhost’
Base port: 11349
Creating node 1 of 1 ...
- setting up node
Starting worker #1 on ‘localhost’: '/Library/Frameworks/R.framework/Resources/bin/Rscript' --default-packages=datasets,utils,grDevices,graphics,stats,methods -e 'parallel:::.slaveRSOCK()' MASTER=localhost PORT=11349 OUT= TIMEOUT=2592000 XDR=TRUE
Waiting for worker #1 on ‘localhost’ to connect back
starting worker pid=4841 on localhost:11349 at 08:37:36.219

On a mobile hotspot it looks very similar but with success:

Workers: [n = 1] ‘localhost’
Base port: 11501
Creating node 1 of 1 ...
- setting up node
Starting worker #1 on ‘localhost’: '/Library/Frameworks/R.framework/Resources/bin/Rscript' --default-packages=datasets,utils,grDevices,graphics,stats,methods -e 'parallel:::.slaveRSOCK()' MASTER=localhost PORT=11501 OUT= TIMEOUT=2592000 XDR=TRUE
Waiting for worker #1 on ‘localhost’ to connect back
starting worker pid=4892 on localhost:11501 at 08:39:47.070
Connection with worker #1 on ‘localhost’ established
- assigning connection UUID
- collecting session information
Creating node 1 of 1 ... done
  • This sounds like a firewall blocking the port(s) that R tries to use when it opens up the connection between the master process and the background worker. What happens if disable all networking, i.e. put your notebook in "airplane" mode? (PS. Please always try to include the output you get as well; there could be some clues in there) – HenrikB Oct 26 '18 at 16:39
  • 1
    Thank you for the suggestion @HenrikB. When I turn off networking, the command still hangs (see edit above). – C. Pedersen Oct 29 '18 at 07:41
  • Not sure it makes a difference but worth a try; instead of (default) `localhost` try with `127.0.0.1`, i.e. `cl <- future::makeClusterPSOCK("127.0.0.1", outfile = NULL, verbose = TRUE)`. Does it make any difference? – HenrikB Oct 29 '18 at 20:01
  • 1
    Thanks again @HenrikB. Ufortunately this results in the exact same behaviour and output as before... – C. Pedersen Oct 31 '18 at 07:48

0 Answers0