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: Brice Goglin (Brice.Goglin_at_[hidden])
Date: 2012-10-27 05:47:42


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 27/10/2012 11:37, 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
> _______________________________________________
> hwloc-users mailing list
> hwloc-users_at_[hidden]
> http://www.open-mpi.org/mailman/listinfo.cgi/hwloc-users