Reputation: 491
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.
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 <processor #) caused collective abort of all ranks
exit status of rank 0: return code 13
SOURCE 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, &send_request);
}
if ((my_rank) == 3)
{
MPI_Irecv(northofnorthedge3, Rows, MPI_DOUBLE, my_rank-2, MPI_ANY_TAG, MPI_COMM_WORLD,
&send_request);
}
MPI_Wait(&send_request, &status);
.....
MPI_Finalize ()
Upvotes: 1
Views: 4672
Reputation: 50927
It looks like you're calling the MPI_Wait() even from rank 0, even though you're only doing nonblocking communications in rank 1 and 3. So there's no valid send_request in rank 0, so the MPI_Wait is invalid. In the above, it looks like you should have
if ( (my_rank == 1) || (my_rank == 3))
MPI_Wait(&send_request, &status);
Upvotes: 2