fork(1) download
  1. library(Rmpi)
  2. mpi.spawn.Rslaves(needlog = FALSE)
  3.  
  4. mpi.bcast.cmd( id <- mpi.comm.rank() )
  5. mpi.bcast.cmd( np <- mpi.comm.size() )
  6. mpi.bcast.cmd( host <- mpi.get.processor.name() )
  7. result <- mpi.remote.exec(paste("I am", id, "of", np, "running on", host))
  8.  
  9. print(unlist(result))
  10.  
  11. mpi.close.Rslaves(dellog = FALSE)
  12. mpi.exit()
  13.  
  14.  
Success #stdin #stdout #stderr 0.33s 39624KB
stdin
Standard input is empty
stdout
Standard output is empty
stderr
Error in library(Rmpi) : there is no package called ‘Rmpi’
Execution halted