Open MPI logo

Hardware Locality Development Mailing List Archives

  |   Home   |   Support   |   FAQ   |   all Hardware Locality Development mailing list

Subject: Re: [hwloc-devel] Patch for hwloc_obj_attr_snprintf
From: Ralph Castain (rhc_at_[hidden])
Date: 2011-09-22 16:04:11


Resending - had to join list!

********************
Either is fine with me - just want it to be labelled so it can be understood.

Thx!

On Sep 22, 2011, at 1:59 PM, Brice Goglin wrote:

> Hello Ralph,
>
> Indeed, adding something before the cache size might be good.
>
> But if I was picky, I would say "size=32kB linesize=64". The word "Cache" is already written above (in the object type), why would we duplicate it in "Cachesize" and "Cacheline" ?
>
> Right now, lstopo shows:
> L3Cache L#3 (4096KB line=64)
> With your patch, it would say:
> L3Cache L#3 (Cachesize=4096KB Cacheline=64)
> With my variant, it would say:
> L3Cache L#3 (size=4096KB linesize=64)
>
> Brice
>
>
>
>
> Le 22/09/2011 21:27, Jeff Squyres a écrit :
>>
>> Ralph noticed the following when working on integrating hwloc deeply into OMPI, and suggests the attached patch. Does it look good to you guys?
>>
>> -----
>>
>> Something isn't right with hwloc_obj_attr_snprintf() when the object is a cache. I get this when printing the topology of my Mac:
>>
>> Detected Resources: Type: Machine Number of child objects: 1
>> Name=NULL
>> total=3145728KB
>> Backend=Darwin
>> OSName=Darwin
>> OSRelease=10.8.0
>> OSVersion="Darwin Kernel Version 10.8.0: Tue Jun 7 16:33:36 PDT 2011; root:xnu-1504.15.3~1/RELEASE_I386"
>> Architecture=i386
>> Cpuset: 0x00000003
>> Online: 0x00000003
>> Allowed: 0x00000003
>> Type: NUMANode Number of child objects: 1
>> Name=NULL
>> local=3145728KB
>> total=3145728KB
>> Cpuset: 0x00000003
>> Online: 0x00000003
>> Allowed: 0x00000003
>> Type: Socket Number of child objects: 1
>> Name=NULL
>>
>> Cpuset: 0x00000003
>> Online: 0x00000003
>> Allowed: 0x00000003
>> Type: L2Cache Number of child objects: 2
>> Name=NULL
>> 4096KB
>> line=64
>> Cpuset: 0x00000003
>> Online: 0x00000003
>> Allowed: 0x00000003
>> Type: L1Cache Number of child objects: 1
>> Name=NULL
>> 32KB
>> line=64
>> Cpuset: 0x00000001
>> Online: 0x00000001
>> Allowed: 0x00000001
>> Type: Core Number of child objects: 1
>> Name=NULL
>>
>> Cpuset: 0x00000001
>> Online: 0x00000001
>> Allowed: 0x00000001
>> Type: PU Number of child objects: 0
>> Name=NULL
>>
>> Cpuset: 0x00000001
>> Online: 0x00000001
>> Allowed: 0x00000001
>> Type: L1Cache Number of child objects: 1
>> Name=NULL
>> 32KB
>> line=64
>> Cpuset: 0x00000002
>> Online: 0x00000002
>> Allowed: 0x00000002
>> Type: Core Number of child objects: 1
>> Name=NULL
>>
>> Cpuset: 0x00000002
>> Online: 0x00000002
>> Allowed: 0x00000002
>> Type: PU Number of child objects: 0
>> Name=NULL
>>
>> Cpuset: 0x00000002
>> Online: 0x00000002
>> Allowed: 0x00000002
>>
>> Note that I get an empty line (it is non-NULL and has length > 0) when there are no attrs at all, but attrs is non-NULL (see the output for the cores). The output for the caches shows "32KB", but no title explaining what that value means. Likewise, I get a "line=64" output, which makes no sense.
>>
>> The attached patch clarifies the output.
>>
>>
>> _______________________________________________
>> hwloc-devel mailing list
>> hwloc-devel_at_[hidden]
>> http://www.open-mpi.org/mailman/listinfo.cgi/hwloc-devel
>