Hi Jeff S.
Thank you very much for your reply.
I am still feeling some confusion. Please guide.
The idea is to do this:
MPI_Recv_init()
MPI_Send_init()
for (i = 0; i < 1000; ++i) {
MPI_Startall()
/* do whatever */
MPI_Waitall()
}
for (i = 0; i < 1000; ++i) {
MPI_Request_free()
}
So in your inner loop, you just call MPI_Startall() and a corresponding MPI_Test* / MPI_Wait* call to complete those requests.
The idea is that the MPI_*_init() functions do some one-time setup on the requests and then you just start and complete those same requests over and over and over. When you're done, you free them.
Actually in my code what I was doing is: