title: Fatal Error in MPI_Wait
body: <p>Here is the output for a source code implementation shown below. I am not sure what it means and how i should remedy the code. </p>
  
  <pre><code> aborting job:
   Fatal error in MPI_Wait: Invalid MPI_Request, error stack:
   MPI_Wait(139): MPI_Wait(request=0xffffd6a4, status0xffffd690) failed
   MPI_Wait(75) : Invalid MPI_Request
   rank 0 in job 1 &lt;processor #) caused collective abort of all ranks
   exit status of rank 0: return code 13
  </code></pre>
  
  <p>SOURCE CODE:</p>
  
  <pre><code> #define Rows 48 
   ...
  
    double *northedge1 = new double[Rows];
    double *northofnorthedge3 = new double[Rows];
    ...
    ...
  
    int main (int argc, char *argv[])
    {
    ....
    ....
  
    MPI_Request send_request, recv_request;
    ...
    ...
  
  
    if ((my_rank) == 1)
    {
    MPI_Isend(northedge1, Rows, MPI_DOUBLE, my_rank+2, 0, MPI_COMM_WORLD, &amp;send_request); 
    }
  
    if ((my_rank) == 3)
    {
    MPI_Irecv(northofnorthedge3, Rows, MPI_DOUBLE, my_rank-2, MPI_ANY_TAG, MPI_COMM_WORLD,   
    &amp;send_request);
    }
  
  
    MPI_Wait(&amp;send_request, &amp;status);
    .....
    MPI_Finalize ()
  </code></pre>