title: mpiexec and python mpi4py gives rank 0 and size 1
body: <p>I have a problem with running a python Hello World mpi4py code on a virtual machine.</p>
  
  <p>The hello.py code is:</p>
  
  <pre><code>#!/usr/bin/python
  #hello.py
  from mpi4py import MPI
  
  comm = MPI.COMM_WORLD
  
  size = comm.Get_size()
  rank = comm.Get_rank()
  
  print "hello world from process ", rank,"of", size
  </code></pre>
  
  <p>I've tried to run it using mpiexec and mpirun, but it is not running well.
  The output:</p>
  
  <pre><code>$ mpirun -c 4 python hello.py 
  hello world from process  0 of 1
  hello world from process  0 of 1
  hello world from process  0 of 1
  hello world from process  0 of 1
  </code></pre>
  
  <p>And from mpiexec:</p>
  
  <pre><code>$ mpiexec -n 4 python hello.py 
  hello world from process  0 of 1
  hello world from process  0 of 1
  hello world from process  0 of 1
  hello world from process  0 of 1
  </code></pre>
  
  <p>They seem not getting rank and size of comm. What can cause this? How to solve it?</p>
  
  <pre><code>mpiexec --version
  mpiexec (OpenRTE) 1.6.5
  
  mpirun --version
  mpirun (Open MPI) 1.6.5
  </code></pre>
  
  <p>The system is Ubuntu 14.04 on the Virtal Machine.</p>
  
  <p>Any ideas why? Thanks!</p>