So I think the comments are just misleading/wrong here. So messages are grouped by signature/envelope of the message. The ompi_crcp_bkmrk_pml_drain_message_ref_t and ompi_crcp_bkmrk_pml_traffic_message_ref_t data structures describe the envelope and each have a list of 'msg_contents' that point to the unique information for each message (e.g., buffer, request, status) of the type ompi_crcp_bkmrk_pml_message_content_ref_t.
So the 'drain_message' and 'traffic_message' datatypes use the various integers to count the number of done/active/posted 'message_content' datatypes stored in the list that they are responsible for. The internals of crcp_bkmrk_pml.c use these counter values to quickly look up what needs to be drained or waited on instead of iterating through the list of all messages every time.
This was a technique to reduce both the memory footprint of the implementation and improve performance slightly. It looks like the comments were not updated to match the change. Sorry about that. I'll file a ticket to update those comments in the trunk and branches so I don't forget.
I hope that helps a bit.
On Aug 26, 2010, at 1:59 AM, <ananda.mudar_at_[hidden]> <ananda.mudar_at_[hidden]> wrote:
> In the file ompi/mca/crcp/bkmrk/crcp_bkmrk_pml.h, I have a question on the way few of the members of the following structures are defined:
> Under the definition of ompi_crcp_bkmrk_pml_drain_message_ref_t, based on the comments following members are better declared as Boolean variables however they are declared as integers. Is there any reason for not using Boolean type?
> /** Is this message complete WRT PML semantics?
> * true = message done on this side (send or receive)
> * false = message still in process (sending or receiving)
> int done;
> /** Is the message actively being worked on?
> * true = Message is !done, and is in the progress cycle
> * false = Message is !done and is *not* in the progress cycle ( [send/recv]_init requests)
> int active;
> /** Has this message been posted?
> * true = message was posted (Send or recv)
> * false = message was not yet posted.
> * Used when trying to figure out which messages the drain protocol needs to post, and
> * which message have already been posted for it.
> int already_posted;
> I see that you have used bool type for similar members in ompi_crcp_bkmrk_pml_message_content_ref_t.
> Ananda B Mudar, PMP
> Senior Technical Architect
> Wipro Technologies
> Please do not print this email unless it is absolutely necessary.
> The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain proprietary, confidential or privileged information. If you are not the intended recipient, you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately and destroy all copies of this message and any attachments.
> WARNING: Computer viruses can be transmitted via email. The recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email.
Postdoctoral Research Associate
Oak Ridge National Laboratory