Open MPI logo

Hardware Locality Users' Mailing List Archives

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

Subject: Re: [hwloc-users] How do I access CPUModel info string
From: Olivier Cessenat (cessenat_at_[hidden])
Date: 2012-10-27 13:10:55


Hello,

Sorry for not replying to your thread but my free zimbra box is broken
so I fetched your answer from
http://www.open-mpi.org/community/lists/hwloc-users/2012/10/0754.php
Please include my orange box if you reply so that I get the answer
instantly...

So, here is the output:
mac:/tmp/hwloc-1.6a1r4928 cessenat$ ./utils/lstopo-no-graphics
Machine (3072MB) + NUMANode L#0 (P#0 3072MB) + L2 L#0 (4096KB)
  L1d L#0 (32KB) + L1i L#0 (32KB) + PU L#0 (P#0)
  L1d L#1 (32KB) + L1i L#1 (32KB) + PU L#1 (P#1)

Olivier Cessenat.

PS:
Just in case, I also provide the output of sysctl hw:
<<
hw.ncpu: 2
hw.byteorder: 1234
hw.memsize: 3221225472
hw.activecpu: 2
hw.physicalcpu: 2
hw.physicalcpu_max: 2
hw.logicalcpu: 2
hw.logicalcpu_max: 2
hw.cputype: 7
hw.cpusubtype: 4
hw.cpufamily: 1114597871
hw.cacheconfig: 2 1 2 0 0 0 0 0 0 0
hw.pagesize: 4096
hw.busfrequency: 664000000
hw.busfrequency_min: 664000000
hw.busfrequency_max: 664000000
hw.cpufrequency: 2160000000
hw.cpufrequency_min: 2160000000
hw.cpufrequency_max: 2160000000
hw.cachelinesize: 64
hw.l1icachesize: 32768
hw.l1dcachesize: 32768
hw.l2cachesize: 4194304
hw.tbfrequency: 1000000000
hw.optional.floatingpoint: 1
hw.optional.mmx: 1
hw.optional.sse: 1
hw.optional.sse2: 1
hw.optional.sse3: 1
hw.optional.x86_64: 1
hw.optional.supplementalsse3: 1
hw.machine = i386
hw.model = iMac5,1
hw.ncpu = 2
hw.byteorder = 1234
hw.physmem = 2147483648
hw.usermem = 1789140992
hw.pagesize = 4096
hw.epoch = 0
hw.vectorunit = 1
hw.busfrequency = 664000000
hw.cpufrequency = 2160000000
hw.cachelinesize = 64
hw.l1icachesize = 32768
hw.l1dcachesize = 32768
hw.l2settings = 1
hw.l2cachesize = 4194304
hw.tbfrequency = 1000000000
hw.memsize = 3221225472
hw.availcpu = 2
>>

<< Brice Goglin wrote:
Can you send your lstopo output?
preferably with latest trunk tarball
    
http://www.open-mpi.org/software/hwloc/nightly/trunk/hwloc-1.6a1r4928.tar.gz

One way to solve this problem (which may also occur on old Linux
distribs) would be to store the CPU model in the machine object. But
we'll have to make sure all processors in the machine are indeed of the
same model. On MacOSX, it looks like sysctl reports a single socket
description anyway, so no problem.

Brice
>>

Le samedi 27 octobre 2012 à 11:37 +0200, Olivier Cessenat a écrit :
> Hello,
>
> Robin Scher indicated how to get the info on a Mac.
>
> At least on mine (OSX 10.4) with darwin 8.11.1
> where
> $ sysctl -a machdep.cpu.brand_string
> machdep.cpu.brand_string: Intel(R) Core(TM)2 CPU T7400 @
> 2.16GHz
> I unfortunately have no socket:
> *** The number of sockets is unknown
> [ from Third example: Print the number of sockets. of
> http://www.open-mpi.org/projects/hwloc/doc/v1.5.1/
> ]
> I see objects type 1,2,4 and 6 only.
>
> So, will there be another (non socket hwloc object based) way to get
> CPUModel or will it find sockets as on Linux ?
>
> Thanks.
>
> Olivier Cessenat.
>
>
> Le jeudi 25 octobre 2012 à 23:42 +0200, Brice Goglin a écrit :
> > Hello,
> >
> > Assuming you found the socket hwloc object whose name you want, do
> > hwloc_obj_get_info_by_name(obj, "CPUModel");
> > you'll get const char * pointing to what you want.
> >
> > However, this info is only available on Linux and Solaris for now. If
> > you have any idea of to discover such info on other OS, please let us
> > know.
> >
> > Brice
> >
> >
> >
> > Le 25/10/2012 23:39, Robin Scher a écrit :
> > > Is there a way to get this string (e.g. "Intel(R) Core(TM) i7 CPU M
> > > 620 @ 2.67GHz") consistently on Windows, Linux, OS-X and Solaris?
> > >
> > > Thanks,
> > > -robin
> > >
> > > --
> > > Robin Scher Uberware
> > > robin_at_[hidden]
> > > +1 (213) 448-0443
> > >
> > >
> > >
> > >
> > > _______________________________________________
> > > hwloc-users mailing list
> > > hwloc-users_at_[hidden]
> > > http://www.open-mpi.org/mailman/listinfo.cgi/hwloc-users
> >
> > _______________________________________________
> > hwloc-users mailing list
> > hwloc-users_at_[hidden]
> > http://www.open-mpi.org/mailman/listinfo.cgi/hwloc-users