[R-sig-hpc] R hangs when connected via VPN [incl. minimal example]
Marius Hofert
m_hofert at web.de
Mon Mar 14 20:57:50 CET 2011
Dear expeRts,
This is a similar post as on R-SIG-MAC [I didn't receive an answer there] and
R-help. On the latter mailing list, Duncan Murdoch suggested to contact a
package maintainer and ask for help. I contacted Rich Calaway from Revolution
Analytics. After a few trials he suggested to write to R-SIG-HPC.
The problem is that if [and only if] I am connected via VPN, R "hangs" on executing
the minimal example below.
After contacting Rich Calaway, I realized that [after executing the minimal example
line by line] the makeCluster call is the problem. So if I am connected via
VPN, the following line is not executed properly:
cl <- makeCluster(mpi.universe.size(), type ="MPI")
Is this a known issue?
The "red button" in the R Console is dark red [normal behavior if R is running],
so R tries to do something, but cannot succeed. CPU goes up to 100%... This is quite
annoying when working on a server but testing code locally at the same time.
I'm running R version 2.12.1 (Platform: x86_64-apple-darwin9.8.0/x86_64 (64-bit))
on a MacBook Pro under Mac OS X 10.6.6. I am connected to a server via a VPN client
[Cisco AnyConnect; same happens with Apple's internal VPN connection].
Any help is highly appreciated.
Cheers,
Marius
Minimal example:
library(doSNOW)
library(Rmpi)
library(rlecuyer)
library(foreach)
cl <- makeCluster(mpi.universe.size(), type ="MPI")
tmp <- clusterSetupRNG(cl, seed=rep(1,6))
registerDoSNOW(cl)
counter <- 0
res <- foreach(k = 1:1000) %do% {
counter <- counter + 1
}
tmp <- stopCluster(cl)
unlist(res)
library(doSNOW)
library(foreach)
cl <- makeCluster(mpi.universe.size(), type ="MPI") # (loads Rmpi)
tmp <- clusterSetupRNG(cl, seed=rep(1,6)) # (loads rlecuyer)
registerDoSNOW(cl)
counter <- 0
res <- foreach(k = 1:1000) %do% { # same problem with dopar
counter <- counter + 1
}
tmp <- stopCluster(cl)
unlist(res)
More information about the R-sig-hpc
mailing list