Matthew Keller
2011-Jun-27 23:47 UTC
[R] how to have R tell me which node is being used in a multi-node cluster
Hi all,
I'm trying to use a parallel script on a 20 node cluster, 8 processors
per node. Each node has a name, e.g., "vm0000", "vm0001",
etc. Within
a foreach loop, I would like R to tell me what node it is actually
running on. How can this be accomplished? Thanks!
require(doMPI)
cl <- startMPIcluster(16)
registerDoMPI(cl)
x <- foreach(i = 1:16) %dopar% {
<some function that writes the node name out to screen or file>
}
closeCluster(cl)
--
Matthew C Keller
Asst. Professor of Psychology
University of Colorado at Boulder
www.matthewckeller.com
Possibly Parallel Threads
- R: mpirun .C and R
- foreach hangs when using doMPI on Windows with Microsoft MPI
- [R-sig-hpc] doMC - compiler - concatenate an expression vector into a single expression?
- how to make read in a vector of 0s and 1s with no space between them
- tapply for enormous (>2^31 row) matrices
