The doc says "get the last physical CPU where the current process or
thread ran". As usual, there's no well-defined portable way to identify
those things. On AMD, it's a core. On Intel, it's a hyperthread, and
could also be a core if HT is disabled. On other archs/systems, it may
be called "logical processor" or "execution unit" instead. We try to
explain that at the end of the glossary
http://www.open-mpi.org/projects/hwloc/doc/v1.7.2/a00001.php but we
can't repeat that everywhere.
the actually returns a cpuset, so it doesn't actually return any object,
but you can convert the cpuset into what you want. It sets a single bit
in that cpuset (once per thread if you look at an entire processor), so
that corresponds to a single HT thread on Intel, but that's also a
single core on Intel without HT.
Le 05/10/2013 02:45, Vlad a écrit :
> I've been a user for a while and have just noticed an area where the API documentation is either unclear or the version I am using (1.7 on Fedora 17) returns a wrong topology object type. Specifically, I took the "physical CPU" wording to mean HWLOC_OBJ_CORE but on a machine that has hyperthreading enabled the above method appears to return HWLOC_OBJ_PU).
> Most likely, all is well (returning the smallest processing element of hardware kind of makes more sense) and I'd misunderstood the API all along (I work mostly on machines with HT disabled), but it would be useful to confirm.
> Thanks in advance,
> hwloc-users mailing list