[petsc-users] Pthread support

Barry Smith bsmith at mcs.anl.gov
Tue Jul 24 14:17:31 CDT 2012


On Jul 24, 2012, at 2:13 PM, Alexander Goncharov wrote:

> Jed,
> 
> I actually tried taskset utility, and it did not help.

   Right, it didn't help because we have a bug where we always start with the globally lowest core for each process hence get overlap. This will be fixed shortly in petsc-dev. The threaded code is still preliminary and not production ready, only useful for eager early adoptors.

   Barry

> 
> alex.
> 
> On Tue, 2012-07-24 at 14:06 -0500, Jed Brown wrote:
>> 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.
> 
> 



More information about the petsc-users mailing list