Open MPI logo

Open MPI Development Mailing List Archives

  |   Home   |   Support   |   FAQ   |   all Development mailing list

Subject: Re: [OMPI devel] mca_btl_sm_sendi question
From: George Bosilca (bosilca_at_[hidden])
Date: 2009-02-25 09:34:38


On Feb 24, 2009, at 18:08 , Eugene Loh wrote:

> (Probably this message only for George, but I'll toss it out to the
> alias/archive.)
>
> I have a question about the sm sendi() function. What should happen
> if the sendi() function attempts to write to the FIFO, but the FIFO
> is full?

The write should not be queued except in the case where the whole data
referred by the convertor is copied out of the user memory. If the
FIFO is full, the best will be to allocate the descriptor and give it
back to the PML.

> Currently, it appears that the sendi() function returns an error
> code to the PML, which assumes that the sendi() tried to send the
> message but failed and so just tried to allocate a descriptor.

Yes, this is the expected behavior.

> But is that what should happen? The condition of the FIFO being
> full is a little misleading since the write is still queued for
> further progress -- not in the FIFO itself but in the pending-send
> queue. This distinction should perhaps not matter to the upper
> layers. The upper layers should still view the send as
> "completed" (buffered by the MPI implementation to be progressed
> later). I would think that the sendi() function should return a
> SUCCESS code.

If the write is queued then this is more or less a bug. We will nicely
cope with this case, because we have this sequence number and we will
drop a message duplicate, but we will end-up sending the same message
twice. The problem is that I don't know which of the copies will be
used on the receiver side, I guess the first one reaching the receiver.

   george.

>
> Relevent source code is
>
> PML, line 496
> https://svn.open-mpi.org/source/xref/ompi_1.3/ompi/mca/pml/ob1/pml_ob1_sendreq.c
> #496
>
> BTL, line 785
> https://svn.open-mpi.org/source/xref/ompi_1.3/ompi/mca/btl/sm/
> btl_sm.c#785
>
> FIFO write, line 18
> https://svn.open-mpi.org/opengrok/xref/ompi_1.3/ompi/mca/btl/sm/btl_sm_fifo.h
> #18
> _______________________________________________
> devel mailing list
> devel_at_[hidden]
> http://www.open-mpi.org/mailman/listinfo.cgi/devel