On 9/13/2011 9:54 AM, Brice Goglin wrote:
Le 13/09/2011 21:51, TERRY DONTJE a écrit :
On 9/13/2011 9:23 AM, Brice Goglin wrote:
Le 12/09/2011 21:01, Brice Goglin a écrit :
Le 09/09/2011 13:25, TERRY DONTJE a écrit :
On 9/8/2011 3:10 PM, Brice Goglin wrote:
Hello Terry,
Indeed there's nothing like this as of today. We talked about it
in the past but it's not very easy to implement on Linux (see
below) so we forgot about it until somebody complained.
Adding infos would certainly be fine. I think it should rather be
"CPUType" and "CPUModel" since existing infos have no underscore
in their name if I remember correctly. You could also set
object->name to a combination of type and model. Socket looks
like the right object to put this. Maybe even use "Model" and
"Type" as the info names then?
The reason it's not easy on Linux is that we usually take infos
from either sysfs, or /proc/cpuinfo if sysfs isn't available, but
not from both. Processor names are only in /proc/cpuinfo IIRC. So
we'd need to mix sysfs and /proc/cpuinfo. Not easy with the
current code, especially if you can't assume that all sockets are
similar. But definitely something that I will do at some point.
Brice
The way info objects would be attached to a Socket object I assume
it would be ok to just attach such an object under Solaris but not
not for the other OSes. Since one can look for the named object
and it is either going to be there or not :-).
Anyway, I'll play around with this for Solaris.
Looking at the code, you might want to drop hwloc_setup_level() and
copy it back into the caller. It will make the addition of info
attributes much easier. I am looking at the Linux side.
I just pushed some code that will make this much easier on Linux (I
may change the Solaris code similarly when I'll take time to test on
a real solaris machine).
Now I have a patch that reads the CPU vendor and model in
/proc/cpuinfo (x86 only for now) and use them to set Socket info
attributes (CPUVendor and CPUModel) and name (CPUVendor+CPUModel).
Before I push this, we need to clarify what we want. You were
talking about "CPUType" and "CPUModel". Can you give some example of
what it would look like under Solaris? I want to compare to what I
can get on Linux.
Both type and model are character strings. An example of what I
currently store in the sysinfo structures are:
type = "SPARC"
model = "SPARC64_VI"
Other values for model are "T1", "T2", "SPARC64_VII"...
What about Solaris on non-sparc machines ?
Looks like the type is an empty string and model is "i86pc" in one case.
These are basically values that come from calls to solairs sysinfo.
Brice
_______________________________________________
hwloc-devel mailing list
hwloc-de...@open-mpi.org
http://www.open-mpi.org/mailman/listinfo.cgi/hwloc-devel
--
Oracle
Terry D. Dontje | Principal Software Engineer
Developer Tools Engineering | +1.781.442.2631
Oracle *- Performance Technologies*
95 Network Drive, Burlington, MA 01803
Email terry.don...@oracle.com <mailto:terry.don...@oracle.com>