I have just installed Rmpi on a Suse 9.1 linux cluster with
openmpi-1.0.1. I am trying the example included below from the tutorial
website. However, I keep getting the following error:
> # Load the R MPI package if it is not already loaded.
> if (!is.loaded("mpi_initialize")) {
+ library("Rmpi")
+ }
>
> # Spawn as many slaves as possible
> mpi.spawn.Rslaves(nslaves=4)
4 slaves are spawned successfully. 0 failed.
Error in unserialize(obj) : unknown input format
Calls: mpi.spawn.Rslaves ... mpi.bcast.Robj -> .mpi.unserialize ->
unserialize -
> .Call
Execution halted
# Load the R MPI package if it is not already loaded.
if (!is.loaded("mpi_initialize")) {
library("Rmpi")
}
# Spawn as many slaves as possible
mpi.spawn.Rslaves(nslaves=4)
# In case R exits unexpectedly, have it automatically clean up
# resources taken up by Rmpi (slaves, memory, etc...)
.Last <- function(){
if (is.loaded("mpi_initialize")){
if (mpi.comm.size(1) > 0){
print("Please use mpi.close.Rslaves() to close slaves.")
mpi.close.Rslaves()
}
print("Please use mpi.quit() to quit R")
.Call("mpi_finalize")
}
}
# Tell all slaves to return a message identifying themselves
mpi.remote.exec(paste("I
am",mpi.comm.rank(),"of",mpi.comm.size()))
# Tell all slaves to close down, and exit the program
mpi.close.Rslaves()
mpi.quit()
Mark Lyman, Statistician
ATK Launch Systems
mark.lyman@atk.com <mailto:mark.lyman@atk.com>
(435) 863-2863
[[alternative HTML version deleted]]