Open MPI logo

Open MPI User's Mailing List Archives

  |   Home   |   Support   |   FAQ   |  

This web mail archive is frozen.

This page is part of a frozen web archive of this mailing list.

You can still navigate around this archive, but know that no new mails have been added to it since July of 2016.

Click here to be taken to the new web archives of this list; it includes all the mails that are in this frozen archive plus all new mails that have been sent to the list since it was migrated to the new archives.

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.

/Lars