Open MPI logo

Open MPI User's Mailing List Archives

  |   Home   |   Support   |   FAQ   |   all Open MPI User's mailing list

Subject: Re: [OMPI users] Receiving MPI messages of unknown size
From: Lars Andersson (larsand_at_[hidden])
Date: 2009-06-04 03:24:46

> On Thu, 2009-06-04 at 14:54 +1000, Lars Andersson wrote:
>> Hi Gus,
>> Thanks for the suggestion. I've been thinking along those lines, but
>> it seems to have drawbacks. Consider the following MPI conversation:
>> Time NODE 1 NODE 2
>> 0 local work local work
>> 1 post n-b recv local work
>> 2 local work post n-b send
>> 3 complete recv in 1 local work
> Its been awhile since i did mpi programming but...
> why not just post a n-b recv for the header too?
> just tag it correctly.

I guess that would be a partial cure, but not optimal. The problem is
that I can't allocate a buffer of appropriate size and post the main
data transfer (MPI_Irecv) call until I have received the size from the
header message. So, after posting the recv for the header on NODE 1
and getting on with local work, I would have to call MPI_Test() at
regular intervals to check if the header has arrived, and then post a
recv for the main transfer.

I guess that would work, but if there's a nicer solution, I'd like to find out.