<div class="gmail_quote">On Tue, Jul 24, 2012 at 1:59 PM, Barry Smith <span dir="ltr"><<a href="mailto:bsmith@mcs.anl.gov" target="_blank">bsmith@mcs.anl.gov</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
But how do you know what cores the other processes on the machine are using? Couldn't they be anything?</blockquote></div><br><div>Yes, but a person running a single-process multi-thread job should be doing something like (suppose a 32-core machine)</div>
<div><br></div><div><font face="courier new, monospace">$ taskset 0x000000ff ./job1 -nthreads 8     # use all slots</font></div><div><font face="courier new, monospace">$ taskset 0xffffff00 ./job2 -nthreads 12    # use 12 of 24 "slots" arbitrarily</font></div>
<div><br></div><div><br></div><div>Now the second job might set affinity by splitting the 24 slots between the 12 threads, or it might group them into three groups per CPU die, setting 0xff00000000, 0x00ff0000, and 0x0000ff00 for all four threads in each of the three groups respectively.</div>