title: The MPI_Sendrecv_replace function is excessively time consuming.
body: <p>I called the MPI_Sendrecv_replace several times in my code. But the function behaves very strangely. In the first loop (5000 iterations), MPI_Sendrecv_replace costs about 30 seconds totally. However, in the second loop the function used only 1 second. I am very curious about the reason because I want to optimize the code. The code is running with 32 processors. The machine is one node with 4 Intel(R) Xeon(R) CPU E5-4620 v2.</p>
  
  <p>Part of my code is here:</p>
  
  <pre><code>for (ishot=1;ishot&lt;=nshots;ishot+=SHOTINC){
      ...
      for (nt=1;nt&lt;=NT;nt++){
           ...
           MPI_Sendrecv_replace(&amp;bufferlef_to_rig[1][1],NY*fdo3,MPI_FLOAT,INDEX[1],TAG1,INDEX[2],TAG1,MPI_COMM_WORLD,&amp;status);
           ...
      }
      for (nt=1;nt&lt;=NT;nt++){
          ...
          MPI_Sendrecv_replace(&amp;bufferlef_to_rig[1][1],NY*fdo3,MPI_FLOAT,INDEX[1],TAG1,INDEX[2],TAG1,MPI_COMM_WORLD,&amp;status);
           ...
      }
  }
  </code></pre>
  
  <p>And I used the MPI_Wtime to count the time costed by MPI_Sendrecv_replace.</p>