title: MPI_Isend/Recv- Is there a deadlock?
body: <p>I have a total of 8 messages being passed on 4 nodes using MPI. I noticed that there were two messages whose arrays did not provide meaningful results. I have copied an excerpt of the code below? These are some related questions I had based on the code/results below:</p>
  
  <ol>
  <li>Does the MPI_Isend also require a wait? I am not sure if there is a deadlock. I also tried just passing these two variables from one node to the other, and the array values were still NULL.</li>
  <li>Will MPI_SendRecv improve the efficiency of the code as suggested here <a href="https://stackoverflow.com/questions/6052486/non-blocking-communication-in-mpi-and-mpi-wait-issue-not-all-information-is-pass">Non Blocking communication in MPI and MPI Wait Issue. Not all information is passed correctly</a>? If so, how/why? Would also appreciate some pointers on setting that up. </li>
  </ol>
  
  <p>Thanks!</p>
  
  <pre><code>Source Code:
  
  if ((my_rank) == 0)
  {
  MPI_Irecv(A, Rows, MPI_DOUBLE, my_rank+1, MPI_ANY_TAG, MPI_COMM_WORLD, &amp;request[6]);
  MPI_Wait(&amp;request[6], &amp;status[6]);
  }
  
  
  if ((my_rank) == 1)
  {
  MPI_Isend(AA, Rows, MPI_DOUBLE, my_rank-1, 0, MPI_COMM_WORLD, &amp;request[6]);
  }
  
  
  if ((my_rank) == 2)
  {
  MPI_Isend(B, Rows, MPI_DOUBLE, my_rank+1, 0, MPI_COMM_WORLD, &amp;request[7]);
  }
  
  if ((my_rank) == 3)
  {
  MPI_Irecv(BB, Rows, MPI_DOUBLE, my_rank-1, MPI_ANY_TAG, MPI_COMM_WORLD, &amp;request[7]);
  MPI_Wait(&amp;request[7], &amp;status[7]);
  }
  </code></pre>