<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Word 14 (filtered medium)">
<style><!--
/* Font Definitions */
@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;}
@font-face
        {font-family:Consolas;
        panose-1:2 11 6 9 2 2 4 3 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;}
pre
        {mso-style-priority:99;
        mso-style-link:"HTML Preformatted Char";
        margin:0cm;
        margin-bottom:.0001pt;
        font-size:10.0pt;
        font-family:"Courier New";}
span.apple-style-span
        {mso-style-name:apple-style-span;}
span.HTMLPreformattedChar
        {mso-style-name:"HTML Preformatted Char";
        mso-style-priority:99;
        mso-style-link:"HTML Preformatted";
        font-family:Consolas;
        mso-fareast-language:DE-CH;}
span.EmailStyle20
        {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:70.85pt 70.85pt 2.0cm 70.85pt;}
div.WordSection1
        {page:WordSection1;}
--></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="DE-CH" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D">Hi Liyang,<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" 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 lang="EN-US" style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D">These questions are probably best asked in the Phoenix MapReduce mailing list (phoenix-users@lists.stanford.edu), rather than the Barrelfish list.
 The Barrelfish behavior of Phoenix should be identical to the Linux one.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" 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 lang="EN-US" style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D">Hope this helps,<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D">Simon<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" 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;"> Liyang [mailto:tangliyang921@gmail.com]
<br>
<b>Sent:</b> Samstag, 24. Dezember 2011 03:24<br>
<b>To:</b> barrelfish-users@lists.inf.ethz.ch<br>
<b>Subject:</b> [Barrelfish-users] questions about phoenix kmeans<o:p></o:p></span></p>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
<div>
<p class="MsoNormal">Dear all,<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
</div>
<div>
<p class="MsoNormal">I've read the kmeans&nbsp;code here:&nbsp;<a href="http://www.lingrok.org/source/xref/barrelfish/usr/phoenix_tests/kmeans.c" target="_blank"><span style="color:#1155CC">http://www.lingrok.org/source/xref/barrelfish/usr/phoenix_tests/kmeans.c</span></a>.
 I wonder if you maintain the code, but I don't know who else to contact.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">I do have some questions about using phoenix in kmeans.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
</div>
<div>
<pre style="background:white;white-space:pre-wrap"><o:p>&nbsp;</o:p></pre>
<pre style="background:white"><o:p>&nbsp;</o:p></pre>
<pre style="background:white"><a href="http://www.lingrok.org/source/xref/barrelfish/usr/phoenix_tests/kmeans.c#map_reduce_args" target="_blank"><b><span style="color:#993366;text-decoration:none">map_reduce_args</span></b></a>.<a href="http://www.lingrok.org/source/s?defs=L1_cache_size&amp;project=barrelfish" target="_blank"><span style="color:#202062;text-decoration:none">L1_cache_size</span></a> = <a href="http://www.lingrok.org/source/s?defs=atoi&amp;project=barrelfish" target="_blank"><span style="color:#202062;text-decoration:none">atoi</span></a>(<a href="http://www.lingrok.org/source/s?defs=GETENV&amp;project=barrelfish" target="_blank"><span style="color:#202062;text-decoration:none">GETENV</span></a>(<span style="color:green">&quot;MR_L1CACHESIZE&quot;</span>));<span style="color:#666666">//1024 * 8;</span><o:p></o:p></pre>
<pre style="background:white"><a href="http://www.lingrok.org/source/xref/barrelfish/usr/phoenix_tests/kmeans.c#map_reduce_args" target="_blank"><b><span style="color:#993366;text-decoration:none">map_reduce_args</span></b></a>.<a href="http://www.lingrok.org/source/s?defs=num_map_threads&amp;project=barrelfish" target="_blank"><span style="color:#202062;text-decoration:none">num_map_threads</span></a> = <a href="http://www.lingrok.org/source/s?defs=atoi&amp;project=barrelfish" target="_blank"><span style="color:#202062;text-decoration:none">atoi</span></a>(<a href="http://www.lingrok.org/source/s?defs=GETENV&amp;project=barrelfish" target="_blank"><span style="color:#202062;text-decoration:none">GETENV</span></a>(<span style="color:green">&quot;MR_NUMTHREADS&quot;</span>));<span style="color:#666666">//8;</span><o:p></o:p></pre>
<pre style="background:white"><a href="http://www.lingrok.org/source/xref/barrelfish/usr/phoenix_tests/kmeans.c#map_reduce_args" target="_blank"><b><span style="color:#993366;text-decoration:none">map_reduce_args</span></b></a>.<a href="http://www.lingrok.org/source/s?defs=num_reduce_threads&amp;project=barrelfish" target="_blank"><span style="color:#202062;text-decoration:none">num_reduce_threads</span></a> = <a href="http://www.lingrok.org/source/s?defs=atoi&amp;project=barrelfish" target="_blank"><span style="color:#202062;text-decoration:none">atoi</span></a>(<a href="http://www.lingrok.org/source/s?defs=GETENV&amp;project=barrelfish" target="_blank"><span style="color:#202062;text-decoration:none">GETENV</span></a>(<span style="color:green">&quot;MR_NUMTHREADS&quot;</span>));<span style="color:#666666">//16;</span><o:p></o:p></pre>
<pre style="background:white"><a href="http://www.lingrok.org/source/xref/barrelfish/usr/phoenix_tests/kmeans.c#map_reduce_args" target="_blank"><b><span style="color:#993366;text-decoration:none">map_reduce_args</span></b></a>.<a href="http://www.lingrok.org/source/s?defs=num_merge_threads&amp;project=barrelfish" target="_blank"><span style="color:#202062;text-decoration:none">num_merge_threads</span></a> = <a href="http://www.lingrok.org/source/s?defs=atoi&amp;project=barrelfish" target="_blank"><span style="color:#202062;text-decoration:none">atoi</span></a>(<a href="http://www.lingrok.org/source/s?defs=GETENV&amp;project=barrelfish" target="_blank"><span style="color:#202062;text-decoration:none">GETENV</span></a>(<span style="color:green">&quot;MR_NUMTHREADS&quot;</span>));<span style="color:#666666">//8;</span><o:p></o:p></pre>
<pre style="background:white"><a href="http://www.lingrok.org/source/xref/barrelfish/usr/phoenix_tests/kmeans.c#map_reduce_args" target="_blank"><b><span style="color:#993366;text-decoration:none">map_reduce_args</span></b></a>.<a href="http://www.lingrok.org/source/s?defs=num_procs&amp;project=barrelfish" target="_blank"><span style="color:#202062;text-decoration:none">num_procs</span></a> = <a href="http://www.lingrok.org/source/s?defs=atoi&amp;project=barrelfish" target="_blank"><span style="color:#202062;text-decoration:none">atoi</span></a>(<a href="http://www.lingrok.org/source/s?defs=GETENV&amp;project=barrelfish" target="_blank"><span style="color:#202062;text-decoration:none">GETENV</span></a>(<span style="color:green">&quot;MR_NUMPROCS&quot;</span>));<span style="color:#666666">//16;</span><o:p></o:p></pre>
</div>
<div>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
</div>
<div>
<p class="MsoNormal">How could the above codes get the values for args? I mean, where are those MR_ environment variables defined? And what if they are not? Does the cache size variable has any connection with the splitter function? I know that phoenix schedules
 threads according to cache size as chunk size, but how?<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
</div>
<div>
<p class="MsoNormal">I would be much appreciated if you could help me with these questions.
<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
</div>
<div>
<p class="MsoNormal">Best regards,<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">- Liyang<o:p></o:p></p>
</div>
</div>
</body>
</html>