<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="Generator" content="Microsoft Word 14 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:Wingdings;
        panose-1:5 0 0 0 0 0 0 0 0 0;}
@font-face
        {font-family:Wingdings;
        panose-1:5 0 0 0 0 0 0 0 0 0;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph
        {mso-style-priority:34;
        margin-top:0cm;
        margin-right:0cm;
        margin-bottom:0cm;
        margin-left:36.0pt;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
span.EmailStyle17
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri","sans-serif";
        mso-fareast-language:EN-US;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
        {page:WordSection1;}
/* List Definitions */
@list l0
        {mso-list-id:1280527432;
        mso-list-type:hybrid;
        mso-list-template-ids:1480514196 -457168826 134807555 134807557 134807553 134807555 134807557 134807553 134807555 134807557;}
@list l0:level1
        {mso-level-number-format:bullet;
        mso-level-text:\F0B7;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        font-family:Symbol;
        mso-fareast-font-family:Calibri;
        mso-bidi-font-family:"Times New Roman";}
@list l0:level2
        {mso-level-number-format:bullet;
        mso-level-text:o;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        font-family:"Courier New";}
@list l0:level3
        {mso-level-number-format:bullet;
        mso-level-text:\F0A7;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        font-family:Wingdings;}
@list l0:level4
        {mso-level-number-format:bullet;
        mso-level-text:\F0B7;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        font-family:Symbol;}
@list l0:level5
        {mso-level-number-format:bullet;
        mso-level-text:o;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        font-family:"Courier New";}
@list l0:level6
        {mso-level-number-format:bullet;
        mso-level-text:\F0A7;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        font-family:Wingdings;}
@list l0:level7
        {mso-level-number-format:bullet;
        mso-level-text:\F0B7;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        font-family:Symbol;}
@list l0:level8
        {mso-level-number-format:bullet;
        mso-level-text:o;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        font-family:"Courier New";}
@list l0:level9
        {mso-level-number-format:bullet;
        mso-level-text:\F0A7;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        font-family:Wingdings;}
ol
        {margin-bottom:0cm;}
ul
        {margin-bottom:0cm;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-GB" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D">Hi Zeus,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D">Two possible things to check:<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D"><o:p>&nbsp;</o:p></span></p>
<p class="MsoListParagraph" style="text-indent:-18.0pt;mso-list:l0 level1 lfo1"><![if !supportLists]><span style="font-size:11.0pt;font-family:Symbol;color:#1F497D"><span style="mso-list:Ignore">·<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span></span><![endif]><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D">Are you using printf or debug_printf for output?&nbsp; I&#8217;d suggest using the latter &#8211; it really goes out right away, so you can trust what you see
</span><span style="font-size:11.0pt;font-family:Wingdings;color:#1F497D">J</span><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D"><br>
<br>
<o:p></o:p></span></p>
<p class="MsoListParagraph" style="text-indent:-18.0pt;mso-list:l0 level1 lfo1"><![if !supportLists]><span style="font-size:11.0pt;font-family:Symbol;color:#1F497D"><span style="mso-list:Ignore">·<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span></span><![endif]><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D">If it possible that the message handler is doing something that is causing a recursive call to event_dispatch?&nbsp; (Actually, maybe this would be from
 within printf?)<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D">Cheers,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D">Tim<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><b><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;">From:</span></b><span lang="EN-US" style="font-size:10.0pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;"> zeus@aluzina.org [mailto:zeus@aluzina.org]
<b>On Behalf Of </b>Zeus Gómez Marmolejo<br>
<b>Sent:</b> 17 August 2011 15:31<br>
<b>To:</b> Timothy Roscoe<br>
<b>Cc:</b> barrelfish-users@lists.inf.ethz.ch; Tim Harris (RESEARCH)<br>
<b>Subject:</b> Re: [Barrelfish-users] Messages<o:p></o:p></span></p>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
<p class="MsoNormal">Hi,<o:p></o:p></p>
<div>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
</div>
<div>
<p class="MsoNormal">I discovered another surprising thing. I'm calling the function messages_wait_and_handle_next() to wait and dispatch one message. Which in turn calls to event_dispatch(). According to the info I get on screen, sometimes it handles two messages
 before returning. This is strange.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-bottom:12.0pt">I was inspecting the code and it's calling to get_next_event() which is supposed to handle only one event from the waitset. I don't understand this behavior, is this possible?<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">zeus.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
<div>
<p class="MsoNormal">El 17 de agosto de 2011 14:48, Zeus Gómez Marmolejo &lt;<a href="mailto:zeus.gomez@bsc.es">zeus.gomez@bsc.es</a>&gt; escribió:<o:p></o:p></p>
<p class="MsoNormal">Ok, I don't get any failures when sending messages, as I'm always checking with can_send(). Otherwise, I call the event_dispatch().<o:p></o:p></p>
<div>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
</div>
<div>
<p class="MsoNormal">But now I'm sure that messages get reordered somehow. It's difficult to send the code as it's quite involved, but I filled the code with some printf. I'm using own implemented barriers using the barrelfish message passing and I see the
 message handler that is in the barrier dispatching messages that were sent after the barrier reply.&nbsp;Then suddenly the message reply for the barrier arrives ... how can it be?<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
</div>
<div>
<p class="MsoNormal">I don't know how the stub is working but is it possible that is sending a retry of a message after the following message has been sent?<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
</div>
<div>
<p class="MsoNormal">zeus.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
<div>
<p class="MsoNormal">El 13 de agosto de 2011 17:49, Timothy Roscoe &lt;<a href="mailto:troscoe@inf.ethz.ch" target="_blank">troscoe@inf.ethz.ch</a>&gt; escribió:<o:p></o:p></p>
<div>
<div>
<blockquote style="border:none;border-left:solid #CCCCCC 1.0pt;padding:0cm 0cm 0cm 6.0pt;margin-left:4.8pt;margin-right:0cm">
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
<p class="MsoNormal"><br>
Well, messages should never be lost or reordered on a UMP channel, but<br>
both sending and receiving messages can temporarily fail in a variety<br>
of ways (we push retries due to full channels, etc. back to the<br>
sender).<br>
<br>
This means that a single-threaded sender and receiver can deadlock if<br>
they're not careful about handling things like send failures due to a<br>
full channel, or the need to send acks back from the receiver.<br>
<br>
The stubs try to hide most of the functionality required for this,<br>
except for the fact that any send or recv can fail (as with Unix NBIO<br>
and select/poll).<br>
<br>
That said, you probably already know most of this :-)<br>
<br>
And, of course, there are probably bugs.<br>
<br>
&nbsp;-- Mothy<o:p></o:p></p>
<div>
<div>
<p class="MsoNormal"><br>
At Sat, 13 Aug 2011 15:08:27 &#43;0200, Zeus Gómez Marmolejo &lt;<a href="mailto:zeus.gomez@bsc.es" target="_blank">zeus.gomez@bsc.es</a>&gt; wrote:<br>
&gt; I'm trying to simplify the code (I'm using all gasnet and the library I<br>
&gt; made), but whenever I get it simpler it turns out that it's working...<br>
&gt;<br>
&gt; So I have to figure out where the problem is.<br>
&gt;<br>
&gt;<br>
&gt; El 12 de agosto de 2011 11:43, Tim Harris (RESEARCH)<br>
&gt; &lt;<a href="mailto:tharris@microsoft.com" target="_blank">tharris@microsoft.com</a>&gt;escribió:<br>
&gt;<br>
&gt; &gt; &nbsp;Could you post some code examples?****<br>
&gt; &gt;<br>
&gt; &gt; ** **<br>
&gt; &gt;<br>
&gt; &gt; Cheers,****<br>
&gt; &gt;<br>
&gt; &gt; ** **<br>
&gt; &gt;<br>
&gt; &gt; Tim****<br>
&gt; &gt;<br>
&gt; &gt; ** **<br>
&gt; &gt;<br>
&gt; &gt; ** **<br>
&gt; &gt;<br>
&gt; &gt; ** **<br>
&gt; &gt;<br>
&gt; &gt; *From:* Zeus Gómez Marmolejo [mailto:<a href="mailto:zeus.gomez@bsc.es" target="_blank">zeus.gomez@bsc.es</a>]<br>
&gt; &gt; *Sent:* 12 August 2011 10:42<br>
&gt; &gt; *To:* <a href="mailto:barrelfish-users@lists.inf.ethz.ch" target="_blank">barrelfish-users@lists.inf.ethz.ch</a><br>
&gt; &gt; *Subject:* [Barrelfish-users] Messages****<br>
&gt; &gt;<br>
&gt; &gt; ** **<br>
&gt; &gt;<br>
&gt; &gt; Hi,****<br>
&gt; &gt;<br>
&gt; &gt; ** **<br>
&gt; &gt;<br>
&gt; &gt; I'm developing a benchmark for message passing in Barrelfish, but I don't<br>
&gt; &gt; get it working properly. I experience some random errors. ****<br>
&gt; &gt;<br>
&gt; &gt; ** **<br>
&gt; &gt;<br>
&gt; &gt; The application is single threaded and it's using the flounder stubs to<br>
&gt; &gt; send messages via the UMP backend. Some of the messages get lost. Is it<br>
&gt; &gt; possible that they arrive in different order that they were sent? I'm not<br>
&gt; &gt; sure how to debug it****<br>
&gt; &gt;<br>
&gt; &gt; ** **<br>
&gt; &gt;<br>
&gt; &gt; ** **<br>
&gt; &gt;<br>
&gt; &gt; Thanks for your help!<br>
&gt; &gt;<br>
&gt; &gt; --<br>
&gt; &gt; Zeus Gómez Marmolejo<br>
&gt; &gt; Barcelona Supercomputing Center<br>
&gt; &gt; PhD student<br>
&gt; &gt; <a href="http://www.bsc.es" target="_blank">http://www.bsc.es</a><br>
&gt; &gt;<br>
&gt; &gt; ****<br>
&gt; &gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; --<br>
&gt; Zeus Gómez Marmolejo<br>
&gt; Barcelona Supercomputing Center<br>
&gt; PhD student<br>
&gt; <a href="http://www.bsc.es" target="_blank">http://www.bsc.es</a><br>
&gt;<o:p></o:p></p>
</div>
</div>
</blockquote>
</div>
</div>
</div>
<p class="MsoNormal"><br>
<br clear="all">
<o:p></o:p></p>
<div>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
</div>
<p class="MsoNormal">-- <o:p></o:p></p>
<div>
<p class="MsoNormal" style="margin-bottom:12.0pt">Zeus Gómez Marmolejo<br>
Barcelona Supercomputing Center<br>
PhD student<br>
<a href="http://www.bsc.es" target="_blank">http://www.bsc.es</a><br>
<br>
<o:p></o:p></p>
</div>
</div>
</div>
<p class="MsoNormal"><br>
<br clear="all">
<o:p></o:p></p>
<div>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
</div>
<p class="MsoNormal" style="margin-bottom:12.0pt">-- <br>
Zeus Gómez Marmolejo<br>
Barcelona Supercomputing Center<br>
PhD student<br>
<a href="http://www.bsc.es" target="_blank">http://www.bsc.es</a><br>
<br>
<o:p></o:p></p>
</div>
</div>
</body>
</html>