[petsc-users] Pthread support

Jed Brown jedbrown at mcs.anl.gov
Tue Jul 24 14:06:39 CDT 2012


On Tue, Jul 24, 2012 at 1:59 PM, Barry Smith <bsmith at mcs.anl.gov> wrote:

> But how do you know what cores the other processes on the machine are
> using? Couldn't they be anything?


Yes, but a person running a single-process multi-thread job should be doing
something like (suppose a 32-core machine)

$ taskset 0x000000ff ./job1 -nthreads 8     # use all slots
$ taskset 0xffffff00 ./job2 -nthreads 12    # use 12 of 24 "slots"
arbitrarily


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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20120724/1c49ebeb/attachment.html>


More information about the petsc-users mailing list