Open MPI logo

Hardware Locality Development Mailing List Archives

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

Subject: Re: [hwloc-devel] XML::Simple doesn't like lstopo's XML
From: Brice Goglin (Brice.Goglin_at_[hidden])
Date: 2012-11-19 14:59:49


Looks related to these warnings:

Warning: <object> element has non-unique value in 'name' key attribute:
Intel Corporation I350 Gigabit Network Connection at ./topo.pl line 16
Warning: <object> element has non-unique value in 'name' key attribute:
Intel Corporation I350 Gigabit Network Connection at ./topo.pl line 16
Warning: <object> element has non-unique value in 'name' key attribute:
Intel Corporation I350 Gigabit Network Connection at ./topo.pl line 16
Warning: <object> element has non-unique value in 'name' key attribute:
Cisco Systems Inc VIC PCIe Downstream Port at ./topo.pl line 16

If I replace name=... with foo=... in the XML, those go away and all
your eth interfaces come back. So it looks like there may be something
special with the "name" attribute of XML objects. What's strange is that
it seems to only happen when two children have the same "name" XML
attribute. We have quite a lot of same "name" attributes, but not always
in sibling XML objects.

I am trying to find out whether we misrespect the XML specs, but I
couldn't so far. Maybe it's a XML::Simple problem? libxml2 and xmllint
never complained like this.

Brice

Le 19/11/2012 19:01, Jeff Squyres a écrit :
> Odd. On the SVN trunk, I'm running this code:
>
> -----
> open (LSTOPO, "lstopo -.xml|") || die "Can't open lstopo";
> my $lstopo;
> while (<LSTOPO>) {
> $lstopo .= $_;
> print "Read: $_";
> }
> close(LSTOPO);
>
> my $xml;
> $xml = XMLin($lstopo);
> print Dumper($xml);
> -----
>
> In looking at the output, I see that lstopo's XML output includes all PCI devices, but when I look at the Dumper output of the parsed XML, some PCI devices are not listed. In particular: both eth4 and eth5 are included in the "lstopo -.xml" output, but eth4 is not included in the Dumper output.
>
> The same thing happens if I "lstopo foo.xml" and then "XMLin("foo.xml")". So it's not a problem with perl reading from lstopo's stdout.
>
> I've attached foo.xml -- any ideas why this is happening?
>
>
>
> _______________________________________________
> hwloc-devel mailing list
> hwloc-devel_at_[hidden]
> http://www.open-mpi.org/mailman/listinfo.cgi/hwloc-devel