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 05:37:01


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