title: How can I synchronize cores, using mpi4py?
body: <p>I am running the following Python Script with <code>mpi4py</code> version <code>3.0.1a0</code>:</p>
  
  <pre><code>from mpi4py import MPI
  
  comm = MPI.COMM_WORLD
  rank = comm.Get_rank()
  size = comm.Get_size()
  
  
  print 'INIT',rank,size
  comm.Barrier()
  if rank==0:
      bla=4
  else:
      bla=None
  print 'BEFORE',rank,bla
  comm.Barrier()
  print 'AFTER',rank,bla
  </code></pre>
  
  <p>and submitting it via <code>mpiexec -n 16 python test_run.py</code> to the cluster. It seems that everything works, because I do not get any error, however, it does not do what I expect, meaning it does not recognize the barrier:</p>
  
  <pre><code>INIT 1 16
  BEFORE 1 None
  AFTER 1 None
  INIT 2 16
  BEFORE 2 None
  AFTER 2 None
  INIT 3 16
  BEFORE 3 None
  AFTER 3 None
  INIT 4 16
  BEFORE 4 None
  AFTER 4 None
  INIT 5 16
  BEFORE 5 None
  AFTER 5 None
  INIT 6 16
  BEFORE 6 None
  AFTER 6 None
  INIT 7 16
  BEFORE 7 None
  AFTER 7 None
  INIT 8 16
  BEFORE 8 None
  AFTER 8 None
  INIT 9 16
  BEFORE 9 None
  AFTER 9 None
  INIT 10 16
  BEFORE 10 None
  AFTER 10 None
  INIT 11 16
  BEFORE 11 None
  AFTER 11 None
  INIT 12 16
  BEFORE 12 None
  AFTER 12 None
  INIT 13 16
  BEFORE 13 None
  AFTER 13 None
  INIT 14 16
  BEFORE 14 None
  AFTER 14 None
  INIT 15 16
  BEFORE 15 None
  AFTER 15 None
  INIT 0 16
  BEFORE 0 4
  AFTER 0 4
  </code></pre>
  
  <p>I also tried to add <code>comm.bcast(bla,root=0)</code>, but this also did not do anything. Why is <code>mpi4py</code> not able to perform these tasks?</p>