On Saturday 22 May 2010 11:42:31 am Brice Goglin wrote:
> On 17/05/2010 17:41, Jirka Hladky wrote:
> > I don't have system with 128 CPUs, but according to man page it's
> > 0x80000000000000000000000000000000
> > 
> > I have attached the source code as well.  See str_to_cpuset function. It
> > supports cpuset hex mask of any length.
> > 
> > I understand your point to use hwloc-bind. However, I still believe that
> > supporting taskset would be a useful feature and very easy to implement
> > (you basically just convert physical CPU # into hex). taskset is
> > currently THE user-space program to set CPU affinity.  I understand that
> > it's probably too late for this release. But perhaps you can consider it
> > for the next release.
> 
> Hello Jirka,
> 
> I have added --taskset options to hwloc-calc, hwloc-bind and lstopo. It
> uses some new hwloc_cpuset_taskset_snprint/asprintf/sscanf() functions.
> 
> See the patch at:
> 
> https://svn.open-mpi.org/trac/hwloc/changeset?new=2120%40trunk&old=2119%40t
> runk (applies to trunk, but not to 1.0)
> 
> The easiest way for you to test it might be tomorrow's nightly tarball
> (http://www.open-mpi.org/software/hwloc/nightly/trunk/).
> 
> Brice

Hi Brice,

thanks a lot for the patch. I have tested hwloc-1.1a1r2130 from May 22.

I have tested it on the box with 64 cores.


lstopo --taskset --cpuset
works as expected. Correct taskset string is generated. That's great news!! 
:-)

What's confusing is that --taskset alone (without --cpuset) has no effect at 
all. IMHO, --cpuset and --taskset should be mutually exclusive options.

I was not able to get hwloc-distrib working together with hwloc-calc to get 
expected output:
hwloc-distrib --single 8
0x00000001
0x00000010
0x00000002
0x00000020
0x00000004
0x00000040
0x00000008
0x00000080

but
hwloc-distrib --single 8 | xargs hwloc-calc --taskset
will produce
0xff ???

Could you please suggest what am I doing wrong or  perhaps add support of 
--taskset to
hwloc-distrib
command directly?

Thanks a lot for looking into it!!!
Jirka

Reply via email to