title: Can I use MPI_Barrier() to synchronize data in-between iteration steps
body: <p>Is it good idea to use MPI_Barrier() to synchronize data in-between iteration steps. Please see below pseudo code.</p>
  
  <pre><code>While(numberIterations&lt; MaxIterations)
  {
     MPI_Iprobe() -- check for incoming data
      while(flagprobe !=0)
      {
          MPI_Recv() -- receive data
          MPI_Iprobe() -- loop if more data
      }
  
     updateData() -- update myData
  
     for(i=0;i&lt;N;i++) MPI_Bsend_init(request[i]) -- setup request
  
     for(i=0;i&lt;N;i++) MPI_Start(request[i]) -- send data to all other N processors
  
     if(numberIterations = MaxIterations/2) 
        MPI_Barrier() -- wait for all processors -- CAN I DO THIS
  
     numberIterations ++
  
  }
  </code></pre>