title: Rmpi can not spawn process across nodes
body: <p>I followed the instruction here "<a href="http://math.acadiau.ca/ACMMaC/Rmpi/sample.html" rel="nofollow">http://math.acadiau.ca/ACMMaC/Rmpi/sample.html</a>". Here is my R code </p>
  
  <pre><code>library("Rmpi")
  mpi.spawn.Rslaves()
  .Last &lt;- function(){
  if (is.loaded("mpi_initialize")){
      if (mpi.comm.size(1) &gt; 0){
          print("Please use mpi.close.Rslaves() to close slaves.")
          mpi.close.Rslaves()
      }
      print("Please use mpi.quit() to quit R")
      .Call("mpi_finalize")
      }
  }
  mpi.remote.exec(paste("I am",mpi.comm.rank(),"of",mpi.comm.size()-1,"on",mpi.get.processor.name()))
  mpi.close.Rslaves()
  mpi.quit()
  </code></pre>
  
  <p>And in the script I designated the process number:</p>
  
  <pre><code>#$ -S /bin/sh
  #$ -pe orte 20
  #$ -cwd
  #$ -V
  #$ -o /data1/users/liuyang/R/rmpi.o
  #$ -e /data1/users/liuyang/R/rmpi.e
  mpiexec -np 1 R --slave CMD BATCH rmpi.R
  </code></pre>
  
  <p>But I found the R code only run on the master node, and mpi.spawn.Rslaves() only spawn 12 processes(cpu core number of the master node). </p>
  
  <p>The cluster is a sge cluster, and I installed Rmpi package with openmpi version 1.4.3. So what's the reason?</p>
  
  <p>I also tried to comment the mpi.spawn.Rslaves() line in the R code and changed the parameter of mpiexec to "-np $NSLOTS", but it gave no slave process error.</p>