Hi Henrik, Thanks for the suggestions! I tried your approach, and obtained the following output, which is pretty similar to the previous ones.
> cl <- future::makeClusterPSOCK(1, outfile = NULL, verbose = TRUE) *Workers: [n = 1] ‘localhost’* *Base port: 11214* *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=11214 OUT= TIMEOUT=2592000 XDR=TRUE* *Waiting for worker #1 on ‘localhost’ to connect back* starting worker pid=13731 on localhost:11214 at 15:48:41.991 I guess this is a connection problem. I am not sure what these numbers mean. Do you have any further idea on this? I very much appreciate it! Thanks, Zhihao -- Zhihao (Daniel) Huang Graduate Student Department of Statistics, University of Michigan, Ann Arbor Email: zhhhw...@umich.edu On Mon, Sep 17, 2018 at 12:38 AM Henrik Bengtsson < henrik.bengts...@gmail.com> wrote: > Hi, > > did you see my answer on StackOverflow? Specifically, if you set > argument 'outfile = NULL' to either of those two functions, you'll get > a little bit more information that *might* provide some clues. > > /Henrik > > > On Sun, Sep 16, 2018 at 5:38 PM Zhihao Huang <zhhhw...@umich.edu> wrote: > > > > Hi all, > > > > The function makeCluster() of parallel does not work on my laptop. It > hangs > > infinitely. > > > > *1. Problem Summary:* > > > > > # Loading parallel packages > > > > > library(parallel) > > > > > cl <- makeCluster(2) # It hangs at this line of code. > > It hangs at the second line of the code. > > > > *2. Potential Reason* > > I also tried to see the details of what it does internally by using the > > following code. > > > > > library(future) > > > > > cl <- future::makeClusterPSOCK(1L, verbose = TRUE) # It hangs at this > > line of code. > > And it returns the following descriptions and hangs. > > > > *Workers: [n = 1] ‘localhost’* > > > > *Base port: 11214* > > > > *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=11214 OUT=/dev/null > > TIMEOUT=2592000 XDR=TRUE* > > > > *Waiting for worker #1 on ‘localhost’ to connect back* > > So the problem is that the "worker #1 on 'local host'" never connects > back, > > and that's why it hangs forever. I have no idea what causes this. > > > > *3. my sessionInfo():* > > > > R version 3.5.1 (2018-07-02) > > > > Platform: x86_64-apple-darwin15.6.0 (64-bit) > > > > Running under: macOS High Sierra 10.13.6 > > > > > > Matrix products: default > > > > BLAS: > > > /Library/Frameworks/R.framework/Versions/3.5/Resources/lib/libRblas.0.dylib > > > > LAPACK: > > > /Library/Frameworks/R.framework/Versions/3.5/Resources/lib/libRlapack.dylib > > > > > > locale: > > > > [1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8 > > > > > > attached base packages: > > > > [1] stats graphics grDevices utils datasets methods base > > > > > > loaded via a namespace (and not attached): > > > > [1] compiler_3.5.1 > > > > I spent hours searching for the solutions but failed. It looks like some > > other people met similar problem here > > <http://r.789695.n4.nabble.com/makeCluster-hangs-td4748238.html>. Also, > I > > posted this question online here > > < > https://stackoverflow.com/questions/52264460/r-parallel-makecluster-hangs-infinitely-on-mac/52284709#52284709 > > > > a > > week ago. > > > > Any suggestion would be appreciated. Thanks a lot! > > > > Thanks, > > Zhihao > > -- > > Zhihao (Daniel) Huang > > Graduate Student > > Department of Statistics, > > University of Michigan, Ann Arbor > > Email: zhhhw...@umich.edu > > > > -- > > 黄 之昊 > > Zhihao Huang > > > > Graduate Student > > Department of Statistics, > > University of Michigan, Ann Arbor > > Email: zhhhw...@umich.edu > > > > [[alternative HTML version deleted]] > > > > ______________________________________________ > > R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see > > https://stat.ethz.ch/mailman/listinfo/r-help > > PLEASE do read the posting guide > http://www.R-project.org/posting-guide.html > > and provide commented, minimal, self-contained, reproducible code. > [[alternative HTML version deleted]] ______________________________________________ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.