[mpich-discuss] Failed to allocate memory for an unexpected message

Pavan Balaji balaji at mcs.anl.gov
Fri Nov 1 19:00:22 CDT 2013


On Nov 1, 2013, at 4:30 PM, Luiz Carlos da Costa Junior <lcjunior at ufrj.br> wrote:
> I understand that I will have to have N buffers, one for each posted MPI_Irecv. I will also have to TEST (using MPI_PROBE or MPI_WAITANY) until a message comes. The result of this test will identify which one of the posted MPI_Irecv has actually received the message and then process the right buffer. Is this correct?

Correct.

> Should I have to change anything at the sender's processes?

Likely not.  But you need to think through your algorithm to confirm that.

> At the end, my receiver process receives a message identifying that it should exit this routine. What should I do with the already posted MPI_Irecv's? Can I cancel them?

Yes, you can with MPI_CANCEL.

  —- Pavan

--
Pavan Balaji
http://www.mcs.anl.gov/~balaji


More information about the discuss mailing list