LAM/MPI logo

LAM/MPI General User's Mailing List Archives

  |   Home   |   Download   |   Documentation   |   FAQ   |   all just in this list

From: Jeff Squyres (jsquyres_at_[hidden])
Date: 2005-12-09 17:58:20


On Dec 7, 2005, at 11:54 AM, Salman Pervez wrote:

> Hi, I am assuming some of the lam programmers are on this list. I
> have a
> question about the source code that you will hopefully take the
> time to
> answer. I am looking at the code for a class project. In the file
> lam_ssi_rpi_tcp_low.c, in the function lam_ssi_rpi_tcp_send_synch, the
> cq_adv function for the request is set to tcp_req_done. I am wondering
> why the ack is never received? From what I understand about the
> synchronous send protocol, the ack must be received before the request
> is marked done. Can someone please explain? thanks,

Greetings. It's been a while since I've looked at this code;
hopefully I'll get this right. :-)

You are correct that the cq_adv function pointer is set to
tcp_req_done, but that does not make the request complete. Note too
that the request is put in a READ state, so it can be matched by an
incoming ACK. IIRC, this occurs in tcp_match_adv() when the ACK is
fully received and matched against this request; then the cq_adv
function pointer is invoked and the request is completed.

Don't be fooled by the red herrings in lam_ssi_rpi_tcp_advmultiple()
and lam_ssi_rpi_tcp_adv1() -- note that those functions will invoke
the *read* function (because the request was switched to read mode
because it's waiting for an ACK).

Does that help?

--
{+} Jeff Squyres
{+} The Open MPI Project
{+} http://www.open-mpi.org/