Hi, The example on ?mpi.close.Rslaves seems to 'hang' for me:
library(Rmpi) mpi.spawn.Rslaves(nslaves=2) tailslave.log() mpi.remote.exec(rnorm(10)) mpi.close.Rslaves() # => hangs ... with output (hanging at the last line, not returning to the prompt): > library(Rmpi) > mpi.spawn.Rslaves(nslaves=2) tailslave.log() 2 slaves are spawned successfully. 0 failed. master (rank 0, comm 1) of size 3 is running on: sklar slave1 (rank 1, comm 1) of size 3 is running on: sklar slave2 (rank 2, comm 1) of size 3 is running on: sklar > ==> sklar.51249+1.51251.log <== Host: sklar Rank(ID): 1 of Size: 3 on comm 1 ==> sklar.51249+1.51252.log <== Host: sklar Rank(ID): 2 of Size: 3 on comm 1 > mpi.remote.exec(rnorm(10)) X1 X2 1 0.7266248 -1.3922235 2 0.7212728 1.6761796 3 0.4735390 -1.8894523 4 1.3799295 -1.0452228 5 -2.1399312 -0.3452672 6 0.0909944 0.3565657 7 -0.6401649 0.8735195 8 -0.4515465 -0.8951751 9 -0.2142557 0.1436790 10 -1.3349072 -0.7224436 > mpi.close.Rslaves() Below is my sessionInfo(). OpenMPI was installed correctly: mhofert@sklar:~$ mpirun --version mpirun (Open MPI) 2.1.1 Report bugs to http://www.open-mpi.org/community/help/ mhofert@sklar:~$ More information: 1) The above behavior is also mentioned in the last comment on https://github.com/Burke-Lauenroth-Lab/rSFSW2/issues/43 2) We use(d) similar code in 'simsalapar' some time/years ago and it never failed. I haven't used the package myself in a while, so I just noticed (while trying to check the package, it 'hung'/never terminated). mpi.close.Rslaves() didn't seem to change in that time either. The only thing that changed is my hardware (no MacBook Pro "13, 2017; from MacBook Pro "15, 2015). I suspect it's related to that (?) but not sure. 3) Since mpi.close.Rslaves() 'hangs', I see all workers still active (htop output). Thanks & cheers, Marius > sessionInfo() R version 3.4.1 (2017-06-30) Platform: x86_64-apple-darwin16.7.0 (64-bit) Running under: macOS Sierra 10.12.6 Matrix products: default BLAS: /usr/local/R/R-3.4.1_build/lib/libRblas.dylib LAPACK: /usr/local/R/R-3.4.1_build/lib/libRlapack.dylib locale: [1] en_CA.UTF-8/en_CA.UTF-8/en_CA.UTF-8/C/en_CA.UTF-8/en_CA.UTF-8 attached base packages: [1] stats graphics grDevices utils datasets methods base other attached packages: [1] Rmpi_0.6-6 loaded via a namespace (and not attached): [1] compiler_3.4.1 parallel_3.4.1 _______________________________________________ R-SIG-Mac mailing list R-SIG-Mac@r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-mac