Open MPI logo

Hardware Locality Development Mailing List Archives

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

Subject: Re: [hwloc-devel] lstopo --top
From: Jiri Hladky (hladky.jiri_at_[hidden])
Date: 2013-06-21 11:50:29

I have checked API of hwloc_topology_insert_misc_object_by_parent and there
is no support for color:

hwloc_obj_t hwloc_topology_insert_misc_object_by_cpuset (hwloc_topology_t
topology, hwloc_const_cpuset_t cpuset, const char *name)
  Add a MISC object to the topology.
hwloc_obj_t hwloc_topology_insert_misc_object_by_parent (hwloc_topology_t
topology, hwloc_obj_t parent, const char *name)
  Add a MISC object as a leaf of the topology.

Nevertheless I gave it a try but i cannot get it running. Original code
(using cpuset) was

        hwloc_bitmap_set(cpuset, d->lines[j]->cpu[i]);
        snprintf(data, 128, "%d: %d", i, d->lines[j]->cpu[0]);
        hwloc_topology_insert_misc_object_by_cpuset(topology, cpuset, data);

I have now changed it to
hwloc_obj[0] = hwloc_get_first_largest_obj_inside_cpuset(topology, cpuset);
hwloc_obj[1] = hwloc_obj[0]->parent;
and tried both
hwloc_topology_insert_misc_object_by_parent (topology, hwloc_obj[0], data);
hwloc_topology_insert_misc_object_by_parent (topology, hwloc_obj[1], data);

but lstopo will core dump with the XML file
$lstopo --input /tmp/a.xml
lstopo: topology.c:1128: add_default_object_sets: Assertion `obj->cpuset'
Aborted (core dumped)

I have attached
- source code
- input file data
- out /tmp/a.xml

Commands to reproduce the problem;
gcc -Wall -Wextra -o parse parse.c -lhwloc
./parse data
lstopo --input /tmp/a.xml

Any idea what's wrong?


On Fri, Jun 21, 2013 at 2:20 PM, Samuel Thibault

> Jiri Hladky, le Thu 20 Jun 2013 22:08:03 +0200, a écrit :
> > lstopo has obviously some logic how to sort the data inserted
> > by hwloc_topology_insert_misc_object_by_cpuset. Could be data displayed
> in the
> > same order as inserted?
> hwloc_topology_insert_misc_object_by_parent probably does that, you just
> need to replace the cpuset with an hwloc object.
> Samuel
> _______________________________________________
> hwloc-devel mailing list
> hwloc-devel_at_[hidden]

  • application/octet-stream attachment: data

  • text/xml attachment: a.xml