<span class="Apple-style-span" style><div>Dear all,</div><div><br></div><div>I've read the kmeans code here: <a href="http://www.lingrok.org/source/xref/barrelfish/usr/phoenix_tests/kmeans.c" target="_blank" style="color:rgb(17,85,204)">http://www.lingrok.org/source/xref/barrelfish/usr/phoenix_tests/kmeans.c</a>. I wonder if you maintain the code, but I don't know who else to contact.</div>
<div>I do have some questions about using phoenix in kmeans.</div><div><br></div><div><pre style="white-space:pre-wrap;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;margin-top:0px;margin-bottom:0px;background-color:rgb(255,255,255)">
<a href="http://www.lingrok.org/source/xref/barrelfish/usr/phoenix_tests/kmeans.c#map_reduce_args" target="_blank" style="color:rgb(153,51,102);text-decoration:none;font-weight:bold">map_reduce_args</a>.<a href="http://www.lingrok.org/source/s?defs=L1_cache_size&project=barrelfish" target="_blank" style="color:rgb(32,32,98);text-decoration:none">L1_cache_size</a> = <a href="http://www.lingrok.org/source/s?defs=atoi&project=barrelfish" target="_blank" style="color:rgb(32,32,98);text-decoration:none">atoi</a>(<a href="http://www.lingrok.org/source/s?defs=GETENV&project=barrelfish" target="_blank" style="color:rgb(32,32,98);text-decoration:none">GETENV</a>(<span style="color:green">"MR_L1CACHESIZE"</span>));<span style="color:rgb(102,102,102)">//1024 * 8;</span>
<a href="http://www.lingrok.org/source/xref/barrelfish/usr/phoenix_tests/kmeans.c#map_reduce_args" target="_blank" style="color:rgb(153,51,102);text-decoration:none;font-weight:bold">map_reduce_args</a>.<a href="http://www.lingrok.org/source/s?defs=num_map_threads&project=barrelfish" target="_blank" style="color:rgb(32,32,98);text-decoration:none">num_map_threads</a> = <a href="http://www.lingrok.org/source/s?defs=atoi&project=barrelfish" target="_blank" style="color:rgb(32,32,98);text-decoration:none">atoi</a>(<a href="http://www.lingrok.org/source/s?defs=GETENV&project=barrelfish" target="_blank" style="color:rgb(32,32,98);text-decoration:none">GETENV</a>(<span style="color:green">"MR_NUMTHREADS"</span>));<span style="color:rgb(102,102,102)">//8;</span>
<a href="http://www.lingrok.org/source/xref/barrelfish/usr/phoenix_tests/kmeans.c#map_reduce_args" target="_blank" style="color:rgb(153,51,102);text-decoration:none;font-weight:bold">map_reduce_args</a>.<a href="http://www.lingrok.org/source/s?defs=num_reduce_threads&project=barrelfish" target="_blank" style="color:rgb(32,32,98);text-decoration:none">num_reduce_threads</a> = <a href="http://www.lingrok.org/source/s?defs=atoi&project=barrelfish" target="_blank" style="color:rgb(32,32,98);text-decoration:none">atoi</a>(<a href="http://www.lingrok.org/source/s?defs=GETENV&project=barrelfish" target="_blank" style="color:rgb(32,32,98);text-decoration:none">GETENV</a>(<span style="color:green">"MR_NUMTHREADS"</span>));<span style="color:rgb(102,102,102)">//16;</span>
<a href="http://www.lingrok.org/source/xref/barrelfish/usr/phoenix_tests/kmeans.c#map_reduce_args" target="_blank" style="color:rgb(153,51,102);text-decoration:none;font-weight:bold">map_reduce_args</a>.<a href="http://www.lingrok.org/source/s?defs=num_merge_threads&project=barrelfish" target="_blank" style="color:rgb(32,32,98);text-decoration:none">num_merge_threads</a> = <a href="http://www.lingrok.org/source/s?defs=atoi&project=barrelfish" target="_blank" style="color:rgb(32,32,98);text-decoration:none">atoi</a>(<a href="http://www.lingrok.org/source/s?defs=GETENV&project=barrelfish" target="_blank" style="color:rgb(32,32,98);text-decoration:none">GETENV</a>(<span style="color:green">"MR_NUMTHREADS"</span>));<span style="color:rgb(102,102,102)">//8;</span>
<a href="http://www.lingrok.org/source/xref/barrelfish/usr/phoenix_tests/kmeans.c#map_reduce_args" target="_blank" style="color:rgb(153,51,102);text-decoration:none;font-weight:bold">map_reduce_args</a>.<a href="http://www.lingrok.org/source/s?defs=num_procs&project=barrelfish" target="_blank" style="color:rgb(32,32,98);text-decoration:none">num_procs</a> = <a href="http://www.lingrok.org/source/s?defs=atoi&project=barrelfish" target="_blank" style="color:rgb(32,32,98);text-decoration:none">atoi</a>(<a href="http://www.lingrok.org/source/s?defs=GETENV&project=barrelfish" target="_blank" style="color:rgb(32,32,98);text-decoration:none">GETENV</a>(<span style="color:green">"MR_NUMPROCS"</span>));<span style="color:rgb(102,102,102)">//16;</span></pre>
</div><div><br></div><div>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?</div>
<div><br></div><div>I would be much appreciated if you could help me with these questions. </div><div><br></div><div>Best regards,</div><div>- Liyang</div></span>